foreach($_REQUEST as $k => $v) ${$k} = $v;
$months = array('01'=>'كانون2','02'=>'شباط','03'=>'آذار','04'=>'نيسان','05'=>'أيار','06'=>'حزيران',
'07'=>'تموز','08'=>'آب','09'=>'أيلول','10'=>'تشرين1','11'=>'تشرين2','12'=>'كانون1');
include("head.php");
if (!$qq)
$qq = "Y";
$result = mysql_query("SELECT Count(*) FROM CoursesCats") or die(mysql_error());
$row = mysql_fetch_row($result);
$TotCrsCats = $row[0];
$result = mysql_query("SELECT Count(*) FROM Courses WHERE Accepted='Y'") or die(mysql_error());
$row = mysql_fetch_row($result);
$TotCrss = $row[0];
$query = "SELECT Value FROM Configs WHERE Name='ItemPerPage'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_row($result);
$ItemPerPage = $row[0];
$pgs = ceil($TotCrsCats/$ItemPerPage);
if ( !$pg ) $pg = 1;
$nextpg = $pg+1;
$prevpg = $pg-1;
$end = $pg * $ItemPerPage;
$start = $end - $ItemPerPage +1;
if ( $end > $TotCrsCats ) $end = $TotCrsCats;
$NowYear = date("Y",time());
if (!$selCatID )
$GoBack="index.php";
else
$GoBack="crsscats.php";
$result = mysql_query("SELECT Category, CatID FROM CoursesCats Order By CatID ") or die(mysql_error());
$row = mysql_fetch_row($result);
$Category = stripslashes($row[0]);
$CatID = intval($row[1]);
?>
|
الدورات التدريبية
|
عودة
|
|
// اختيار الفئة المطلوبة
if(!$selCatID)
{
echo' يرجى اختيار الفئة المطلوبة : |
';
$cnt=0;
$result = mysql_query("SELECT Category,CatID FROM CoursesCats Order By CatID") or die(mysql_error());
while ($row = mysql_fetch_row($result))
{
$cnt++;
$TCategory = stripslashes($row[0]);
$TCatID = intval($row[1]);
$result1 = mysql_query("SELECT COUNT(*) FROM Courses WHERE CatID='$TCatID' AND Accepted='$qq' ") or die(mysql_error());
$row1 = mysql_fetch_row($result1);
$TCrss = intval($row1[0]);
echo" | | ";
}
echo " | | ";
}
// اختيار السنة المطلوبة
else
{
if (!$Y) $Year=$NowYear;
$CatID=$selCatID;
$result = mysql_query("SELECT Category, CatID FROM CoursesCats WHERE CatID='$selCatID'") or die(mysql_error());
$row = mysql_fetch_row($result);
$Category = stripslashes($row[0]);
echo" يرجى اختيار السنة المطلوبة في فئة دورات ";
echo" $Category ";
echo": |
| ";
}
?>
|
|
include("tail.php")
?>