$v) ${$k} = $v; $months = array('01'=>'كانون2','02'=>'شباط','03'=>'آذار','04'=>'نيسان','05'=>'أيار','06'=>'حزيران', '07'=>'تموز','08'=>'آب','09'=>'أيلول','10'=>'تشرين1','11'=>'تشرين2','12'=>'كانون1'); include_once("admin/config.php"); mysql_connect($DBHost,$DBUser,$DBPass) or die(mysql_error()); mysql_select_db($DBName) or die(mysql_error()); $Year = $_GET['Y']; $CatID = $_GET['CatID']; $Or = $_GET['Or']; if ( !$Or ) $Or = 'SD'; if ($Or=="TD") { $Order = "Title DESC"; $TOr = "TA"; $SOr = "SA"; } elseif ($Or=="SA") { $Order = "SDate"; $TOr = "TA"; $SOr = "SD"; } elseif ($Or=="SD") { $Order = "SDate DESC"; $TOr = "TA"; $SOr = "SA"; } else { $Order = "Title"; $TOr = "TD"; $SOr = "SA"; } $result = mysql_query("SELECT * FROM CoursesCats WHERE CatID='$CatID'") or die(mysql_error()); $row = mysql_fetch_row($result); $Category = stripslashes($row[0]); $CatDetails = stripslashes($row[1]); $ReqLogin = stripslashes($row[2]); $ReqAdmin = stripslashes($row[3]); $CatID = intval($row[4]); //if ( $ReqLogin=='Y' || $LUID ) // include("uauth.php"); //$result = mysql_query("SELECT CAID FROM CrssCatsAdmins WHERE CatID='$CatID' AND UID='$LUID'") or die(mysql_error()); //$row = mysql_fetch_row($result); //$AdminHere = intval($row[0]); include("head.php"); if ($Year == 'a') { $where = ""; $CategoryTitle = "

$Category

"; } elseif ($Year == 'd') { $CategoryTitle = "

$Category (الدورات المنفذة)

"; $where = "AND SDate <= NOW() AND YEAR(SDate)>0"; } elseif ($Year == 'n') { $CategoryTitle = "

$Category (الخطة التدريبية)

"; $where = "AND (SDate > NOW() OR YEAR(SDate)=0)"; } else { $CategoryTitle = "

دورات $Category ( في عام $Y)

"; $NowYear = date("Y",time()); if ($Y >= ($NowYear)) $where = "AND (YEAR(SDate)=$Y OR YEAR(SDate)=0)"; else $where = "AND YEAR(SDate)=$Y "; } //YEAR(SDate)='$Year' $result = mysql_query("SELECT Count(*) FROM Courses WHERE CatID='$CatID' AND Accepted='Y' $where") or die(mysql_error()); $row = mysql_fetch_row($result); $Crss = $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($Crss/$ItemPerPage); if ( !$pg ) { $pg = 1; $_GET['pg']=1; } $nextpg = $pg+1; $prevpg = $pg-1; $end = $pg * $ItemPerPage; $start = $end - $ItemPerPage +1; if ( $end > $Crss ) $end = $Crss; */ ?>
"; } if ( $CatID ) { if (!$subCatID) $subCatID="1" ; $result = mysql_query("SELECT Category, CatID FROM CoursesCats WHERE CatID='$CatID'") or die(mysql_error()); $row = mysql_fetch_row($result); $Category = stripslashes($row[0]); $CatID = stripslashes($row[1]); $result = mysql_query("SELECT subCategory, subCatID FROM CoursessubCats WHERE subCatID='$subCatID'") or die(mysql_error()); $row = mysql_fetch_row($result); $subCategory = stripslashes($row[0]); $subCatID = stripslashes($row[1]); $result1 = mysql_query("SELECT COUNT(*) FROM Courses WHERE CatID='$CatID' AND subCatID='$subCatID' AND subCatID='$subCatID' $where") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $TCrss = intval($row1[0]); ?>
عودة  
لديك سماحية إدارة هذه الصفحة
دورات للمراجعة () | تعليقات للمراجعة () | إضافة دورة
لديك سماحية إضافة دورة في هذه الصفحة من إدارة الموقع
إضافة دورة
"; $cnt=0; $result = mysql_query("SELECT subCategory,subCatID FROM CoursessubCats Order By subCatID") or die(mysql_error()); while ($row = mysql_fetch_row($result)) { $cnt++; if ($cnt%3==1) echo ""; $TsubCategory = stripslashes($row[0]); $TsubCatID = stripslashes($row[1]); $result1 = mysql_query("SELECT COUNT(*) FROM Courses WHERE CatID='$CatID' AND subCatID='$TsubCatID' $where") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $TCrss = intval($row1[0]); echo""; if ($cnt%3==0) echo ""; if ($cnt%3==0) break; } echo "
" ."$TsubCategory ( $TCrss دورة ) " ."
إجمالي دورة
= $SDate ) $Started = 1; else $Started = 0; if ($NowDate >= $EDate ) $Fineshed = 1; else $Fineshed = 1; $result1 = mysql_query("SELECT CUID FROM CoursesUsers WHERE CrsID='$CrsID' AND UID='$LUID' AND Inst='N'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $CrsStd = intval($row1[0]); $result1 = mysql_query("SELECT CUID FROM CoursesUsers WHERE CrsID='$CrsID' AND UID='$LUID' AND Inst='Y'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $CrsInst = intval($row1[0]); $DetailsLines = explode("\n",$Details); $Details = ''; for ($kk=0;$kk<4;$kk++) $Details .= $DetailsLines[$kk]; //$Details = nl2br($Details); //$Details = mb_substr($Details,0,100); if (!$UID) $Submitter="مدير الموقع"; else { $result1 = mysql_query("SELECT Username,FirstName,LastName FROM Users WHERE UID='$UID'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); //$Submitter= " ".stripslashes($row1[0])." (".stripslashes($row1[1])." ".stripslashes($row1[2]).")"; $Submitter= " ".stripslashes($row1[0]); } $result1 = mysql_query("SELECT To_days( EDate ) - TO_DAYS( SDAte ) FROM Courses WHERE CrsID='$CrsID'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $Duration = intval($row1[0]) + 1; $DateArr = explode(" ", $SDate); list($Y,$M,$D)= explode("-",$DateArr[0]); $SFinalDate = $D.'/'.$M.'/'.$Y; if ( !@checkdate($M,$D,$Y) ) { $SFinalDate = "(يتم تحديده لاحقاً)"; $Duration = "-"; } $DateArr = explode(" ", $EDate); list($Y,$M,$D)= explode("-",$DateArr[0]); $EFinalDate = $D.'/'.$M.'/'.$Y; if ( !@checkdate($M,$D,$Y) ) { $EFinalDate = "(يتم تحديده لاحقاً)"; $Duration = "-"; } $result1 = mysql_query("SELECT MIN(PID) FROM CoursesImgs WHERE CrsID='$CrsID'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $PID = intval($row1[0]); $result1 = mysql_query("SELECT COUNT(*) FROM CoursesCmnts WHERE CrsID='$CrsID' AND Accepted='Y'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $Comments = intval($row1[0]); $result1 = mysql_query("SELECT MAX(CmntID) FROM CoursesCmnts WHERE CrsID='$CrsID' AND Accepted='Y'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $MAXCmntID = intval($row1[0]); $result1 = mysql_query("SELECT UID,Date FROM CoursesCmnts WHERE CmntID='$MAXCmntID'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $MAXCmntUID = intval($row1[0]); $MAXCmntDate = $row1[1]; if (!$MAXCmntUID) $MAXCmntSub="مدير الموقع"; else { $result1 = mysql_query("SELECT Username,FirstName,LastName FROM Users WHERE UID='$MAXCmntUID'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $MAXCmntSub= " ".stripslashes($row1[0]); } $MAXCmntDateArr = explode(" ", $MAXCmntDate); list($Y,$M,$D)= explode("-",$MAXCmntDateArr[0]); $MAXCmntDate = $D.'/'.$M.'/'.$Y; $result1 = mysql_query("SELECT COUNT(*) FROM CoursesUsers WHERE CrsID='$CrsID' AND Inst='Y' AND Accepted='Y'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $Insts = intval($row1[0]); $result1 = mysql_query("SELECT COUNT(*) FROM CoursesUsers WHERE CrsID='$CrsID' AND Inst='N' AND Accepted='Y'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $Stds = intval($row1[0]); $result1 = mysql_query("SELECT COUNT(*) FROM CoursesCmnts WHERE CrsID='$CrsID' AND Accepted='N'") or die(mysql_error()); $row1 = mysql_fetch_row($result1); $Comments4V = intval($row1[0]); if ( $SFinalDate == "(يتم تحديده لاحقاً)" ) $tbl_rslt_nd .= ""; elseif ( $SFinalDate == $SDate >= $NowDate ) $tbl_rslt_d .= ""; else $tbl_rslt .= ""; } // if ($Or == "SA") // $tbl_rslt .= $tbl_rslt_nd; // if ($Or == "SD") $tbl_rslt = $tbl_rslt_d.$tbl_rslt_nd.$tbl_rslt; echo $tbl_rslt; } } ?>
دورات
رقم اسم الدورة مدة الدورة
( يوم )
تاريخ التنفيذ
$CrsCntr
$Title
$Duration$SFinalDate
$CrsCntr
$Title
$Duration$SFinalDate
$CrsCntr
$Title
$Duration$SFinalDate