JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-}JFIFICC_PROFILElcmsmntrRGB XYZ  acspMSFTsawsctrl-hand=@=@t," desc_cprt wtptrXYZ,gXYZ@bXYZTrTRCh`gTRCh`bTRCh`descuRGBtextCC0XYZ TXYZ o8XYZ bXYZ $curv*|uN  bj. C$)j.~39?FWM6Tv\dluV~,6۾ewC    #%$""!&+7/&)4)!"0A149;>>>%.DIC;C  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?|WH?cS?Ne.r˿ޱ5\YYhFOejT7PZ[qs2c/$Ep[Gqo(Nù=QHci;OipX=Ģ8d^mQeӴm1OsL/x2];i6p!zU -/uX!=<-} .
LIBYA CYBER ARMY
Logo of a company Instagram@3g86    Server : Apache
System : Linux uta-edu.server.ly 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : utripoli ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /home/utripoli/public_html/cp/student2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/utripoli/public_html/cp/student2/list_session.php
<?php
// اتصال بقاعدة بيانات
require_once("../../connection/connect.php");
$page_title = "الجلسات المتاحة";
$page_select = "11";
require_once("include/header.php");
require_once("include/check.php");
require_once("include/locked.php");


// استجلاب بيانات الإعدادات
$dirsa->select_db($database_dirsa);
$query_setting_y = sprintf("SELECT * FROM setting_online where set_on_id=%s",
                    GetSQLValueString(1, "int"));
$setting_y = $dirsa->query($query_setting_y) or die($dirsa->error);
$row_setting_y = $setting_y->fetch_assoc();
$totalRows_setting_y = $setting_y->num_rows;


        // بيانات الطالب
        $dirsa->select_db($database_dirsa);
        $query_student = sprintf("SELECT * FROM student where username= %s",
                          GetSQLValueString($_SESSION['MM_student'], "text"));
        $student = $dirsa->query($query_student) or die($dirsa->error);
        $row_student = $student->fetch_assoc();
        $totalRows_student = $student->num_rows;


                // استجلاب بيانات المقررة المسجلة
                $dirsa->select_db($database_dirsa);
                $query_list_subject_d = sprintf("SELECT * FROM 	coruse_booking where co_stu_id= %s and co_year=%s",
                                  GetSQLValueString($row_users22['stu_id'], "int"),
                                  GetSQLValueString($row_setting_y['set_year_id'], "int"));
                $list_subject_d = $dirsa->query($query_list_subject_d) or die($dirsa->error);
                $row_list_subject_d = $list_subject_d->fetch_assoc();
                $totalRows_list_subject_d = $list_subject_d->num_rows;

                                // استجلاب بيانات المقررة المسجلة
                                $dirsa->select_db($database_dirsa);
                                $query_list_subject_d2 = sprintf("SELECT * FROM 	coruse_booking where co_stu_id= %s and co_year=%s and co_state=%s",
                                                  GetSQLValueString($row_student['stu_id'], "int"),
                                                  GetSQLValueString($row_setting_y['set_year_id'], "int"),
                                                  GetSQLValueString(1, "int"));
                                $list_subject_d2 = $dirsa->query($query_list_subject_d2) or die($dirsa->error);
                                $row_list_subject_d2 = $list_subject_d2->fetch_assoc();
                                $totalRows_list_subject_d2 = $list_subject_d2->num_rows;

///////////////////////////////////////////////////////////////
/////////////////// جلب بيانات الفعاليات ////////////////////////////
$maxRows_activite =10;
$pageNum_activite = 0;
if (isset($_GET['pageNum_activite'])) {
$pageNum_activite = $_GET['pageNum_activite'];
}
$startRow_activite = $pageNum_activite * $maxRows_activite;


$dirsa->select_db($database_dirsa);
$query_activite = sprintf("SELECT * FROM course_group where (co_section=%s or co_section=0) and (group_reg_date_start <= CURDATE() and group_reg_date_end >= CURDATE()) and is_deleted is null and group_state=%s",
                         GetSQLValueString($row_student['stu_section'], "int"),
                         GetSQLValueString(1, "int"));
$query_limit_activite = sprintf("%s LIMIT %d, %d", $query_activite, $startRow_activite, $maxRows_activite);
$activite = $dirsa->query($query_limit_activite) or die($dirsa->error);
$row_activite = $activite->fetch_assoc();
$totalRows_activite = $activite->num_rows;



if (isset($_GET['totalRows_activite'])) {
  $totalRows_activite = $_GET['totalRows_activite'];
  } else {
  $all_activite = $dirsa->query($query_activite);
  $totalRows_activite = $all_activite->num_rows;
  }
  $totalPages_activite = ceil($totalRows_activite/$maxRows_activite)-1;


$queryString_activite = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
  if (stristr($param, "pageNum_activite") == false &&
      stristr($param, "totalRows_activite") == false) {
    array_push($newParams, $param);
  }
}
if (count($newParams) != 0) {
  $queryString_activite = "&" . htmlentities(implode("&", $newParams));
}
}

?>
<style>
    @media screen {
        #printSection {
            display: none;
        }
    }

    @media print {
        body * {
            visibility:hidden;
        }
        #printSection, #printSection * {
            visibility:visible;
        }
        #printSection {
            position:absolute;
            left:0;
            top:0;
        }
    }



</style>

    <div class="container-xxl">
      <div class="authentication-wrapper authentication-basic container-p-y">
      <div class="demo-inline-spacing" style="float:left;">
                        <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal"><i class='bx bx-list-ul'></i> قائمة المواد</button>
                        <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal3"><i class='bx bx-printer'></i> طباعة نموذج التنزيل</button>
                      </div>
      <h4 class="fw-bold py-3 mb-4"><span class="text-muted fw-light">الفصل الدراسي الحالي /</span>&nbsp;&nbsp;<?php
      // استجلاب بيانات الإعدادات
        $dirsa->select_db($database_dirsa);
        $query_who_fasil = sprintf("SELECT * FROM years where year_id=%s",
                            GetSQLValueString($row_setting_y['set_year_id'], "int"));
        $who_fasil = $dirsa->query($query_who_fasil) or die($dirsa->error);
        $row_who_fasil = $who_fasil->fetch_assoc();
        $totalRows_who_fasil = $who_fasil->num_rows;
      echo $row_who_fasil['year_name']; ?></h4>
      <div class="row align-items-start">
         <?php do { ?>
            <?php if($totalRows_activite > 0 ) { ?>
      <div class="col-4 mb-3">
      <div class="card text-center">
                    <div class="card-header"><h3><b><?php
                            // بيانات الطالب
                  $dirsa->select_db($database_dirsa);
                  $query_whois_subject = sprintf("SELECT * FROM course where course_id= %s",
                          GetSQLValueString($row_activite['group_id_course'], "int"));
                  $whois_subject = $dirsa->query($query_whois_subject) or die($dirsa->error);
                  $row_whois_subject = $whois_subject->fetch_assoc();
                  $totalRows_whois_subject = $whois_subject->num_rows;
                  if($totalRows_whois_subject > 0) {
                    echo $row_whois_subject['course_title']; } else {} ?></b></h3></div>
                    <div class="card-body">
                    <p class="card-text">القسم: <?php
                    $dirsa->select_db($database_dirsa);
                     $query_whois_section = sprintf("SELECT * FROM section where section_id=%s",
                            GetSQLValueString($row_whois_subject['section_id'], "int"));
                    $whois_section = $dirsa->query($query_whois_section) or die($dirsa->error);
                    $row_whois_section = $whois_section->fetch_assoc();
                    $totalRows_whois_section = $whois_section->num_rows;
                    if($totalRows_whois_section > 0) {
                     echo  $row_whois_section['section_name']; } else {} ?></p>
                    <p class="card-text">أخر موعد للتسجيل : <?php echo $row_activite['group_reg_date_end']; ?></p>
                      <p class="card-text">تاريخ البدء : <?php echo $row_activite['group_date_from']; ?></p>
                      <p class="card-text">تاريخ الإنتهاء : <?php echo $row_activite['group_date_to']; ?></p>
                      <p class="card-text">متطلبات: 
                      <?php 
                      $dirsa->select_db($database_dirsa);
                  $query_who_s_course = sprintf("SELECT * FROM course where course_id= %s",
                          GetSQLValueString($row_activite['group_id_course'], "int"));
                  $who_s_course = $dirsa->query($query_who_s_course) or die($dirsa->error);
                  $row_who_s_course = $who_s_course->fetch_assoc();
                  $totalRows_who_s_course = $who_s_course->num_rows;
                  
                  if($row_who_s_course['course_if'] <> 0) { 
                  $dirsa->select_db($database_dirsa);
                  $query_who_s_course2 = sprintf("SELECT * FROM course where course_id= %s",
                          GetSQLValueString($row_who_s_course['course_if'], "int"));
                  $who_s_course2 = $dirsa->query($query_who_s_course2) or die($dirsa->error);
                  $row_who_s_course2 = $who_s_course2->fetch_assoc();
                  $totalRows_who_s_course2 = $who_s_course2->num_rows;
                  
                  echo $row_who_s_course2['course_title']; } else { echo "لايوجد"; } ?>
                      
                      </p>
                     <?php
                     // التحقق من تنزيل المادة ام لا
                     $dirsa->select_db($database_dirsa);
                     $query_check_down = sprintf("SELECT * FROM coruse_booking where co_stu_id=%s and co_course_id=%s",
                            GetSQLValueString($row_student['stu_id'], "int"),
                            GetSQLValueString($row_activite['group_id_course'], "int"));
                    $check_down = $dirsa->query($query_check_down) or die($dirsa->error);
                    $row_check_down = $check_down->fetch_assoc();
                    $totalRows_check_down = $check_down->num_rows;
                    ?>
                    <?php if($totalRows_check_down == 0) { ?>
                      <a href="rev_subject.php?id=<?php echo $row_activite['group_id']; ?>" class="btn btn-primary">تنزيل</a>
                      <?php } else { ?>
                        <a href="javascript:void(0)" class="btn btn-primary">تم تنزيل</a>
                        <?php if($row_check_down['co_year'] == $row_setting_y['set_year_id']) { ?>
                        <a href="rev_subject_cancel.php?id=<?php echo $row_check_down['co_booking_id']; ?>">إلغاء التنزيل</a>
                        <?php } ?>
                        <?php } ?>
                    </div>
                  </div>

                  </div>
            <?php } ?>
        <?php } while ($row_activite = $activite->fetch_assoc()); ?>
            </div>
      </div>
    </div>

    <!-- قائمة المواد -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">قائمة بالمواد التي قمت بتنزيلها</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <?php if($totalRows_list_subject_d > 0 ) { ?>
          <center><h3>الفصل الدراسي : <?php echo $row_who_fasil['year_name']; ?></h3></center>
      <table class="table">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">المادة</th>
      <th scope="col">التخصص</th>
      <th scope="col">الحالة</th>
    </tr>
  </thead>
  <tbody>
    <?php
    $s = 1;
    do { ?>
    <tr>
      <th scope="row"><?php echo $s; ?></th>
      <td><?php
      $dirsa->select_db($database_dirsa);
      $query_who_subjects = sprintf("SELECT * FROM course where course_id=%s",
             GetSQLValueString($row_list_subject_d['co_course_id'], "int"));
     $who_subjects = $dirsa->query($query_who_subjects) or die($dirsa->error);
     $row_who_subjects = $who_subjects->fetch_assoc();
     $totalRows_who_subjects = $who_subjects->num_rows;
      echo $row_who_subjects['course_title']; ?></td>
      <td><?php
      // التخصص
       $dirsa->select_db($database_dirsa);
       $query_who_section = sprintf("SELECT * FROM section where section_id=%s",
              GetSQLValueString($row_list_subject_d['co_section'], "int"));
      $who_section = $dirsa->query($query_who_section) or die($dirsa->error);
      $row_who_section = $who_section->fetch_assoc();
      $totalRows_who_section = $who_section->num_rows;
      echo $row_who_section['section_name']; ?></td>
      <td><?php if($row_list_subject_d['co_state'] == 1) { ?>
        <span class="badge rounded-pill bg-success">تم التنزيل</span>
      <?php } ?></td>
    </tr>
    <?php $s++; } while ($row_list_subject_d = $list_subject_d->fetch_assoc()); ?>
  </tbody>
</table>
  <?php } ?>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button>
      </div>
    </div>
  </div>
</div>

  <!-- شاشة الاستفسار -->

  <div class="modal fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">إرسال استفسار</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
      <form>
  <div class="mb-3">
    <label for="exampleInputEmail1" class="form-label">عنوان الموضوع</label>
    <input type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
  </div>
  <div class="mb-3">
    <label for="exampleInputPassword1" class="form-label">الرسالة </label>
    <textarea class="form-control" rows="3" id="exampleInputPassword1"></textarea>
  </div>

      </div>
      <div class="modal-footer">
      <button type="button" class="btn btn-primary">إرسال</button>
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button>
      </div>
      </form>
    </div>
  </div>
</div>

<!-- نهاية شاشة الاستفسار -->

<!-- بداية شاشة طباعة نموذج الجامعة -->
<!-- Modal -->
<div class="modal fade" id="exampleModal3" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">طباعة نموذج التنزيل</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body" id="printThis">
          <button type="button" class="btn-primary"  id="Print" data-bs-dismiss="modal" aria-label="Close">طباعة</button>
        <center><img src="assets/img/logo.png" width="120px;"></center>
        <center><h4>نموذج تنزيل المواد جامعة طرابلس الاهلية</h4></center>
        <hr>
        <table class="table">
  <tbody>
    <tr>
      <th scope="row"><b>الاسم</b></th>
      <td><?php echo $row_student['full_name']; ?></td>
      <td><b>الفصل الدراسي</b></td>
      <td><?php echo $row_who_fasil['year_name']; ?></td>
    </tr>
    <tr>
      <th scope="row"><b>التخصص</b></th>
      <td><?php
            // تخصص الطالب
            $dirsa->select_db($database_dirsa);
            $query_who_section_s = sprintf("SELECT * FROM section where section_id=%s",
                   GetSQLValueString($row_student['stu_section'], "int"));
           $who_section_s = $dirsa->query($query_who_section_s) or die($dirsa->error);
           $row_who_section_s = $who_section_s->fetch_assoc();
           $totalRows_who_section_s = $who_section_s->num_rows;

          echo $row_who_section_s['section_name']; ?></td>
      <td><b>رقم القيد</b></td>
      <td><?php echo $row_student['stu_num']; ?></td>
    </tr>
  </tbody>
</table>
<center>المواد الدراسية</center>
<table class="table">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">المادة</th>
      <th scope="col">التخصص</th>
    </tr>
  </thead>
  <tbody>
    <?php
    if($row_list_subject_d2 > 0) {
    $s = 1;
    do {  ?>
    <tr>
      <th scope="row"><?php echo $s; ?></th>
      <td><?php
          $dirsa->select_db($database_dirsa);
          $query_who_course_n = sprintf("SELECT * FROM course where course_id=%s",
              GetSQLValueString( $row_list_subject_d2['co_course_id'], "int"));
          $who_course_n = $dirsa->query($query_who_course_n) or die($dirsa->error);
          $row_who_course_n = $who_course_n->fetch_assoc();
          $totalRows_who_course_n = $who_course_n->num_rows;

          echo $row_who_course_n['course_title']; ?></td>
      <td><?php
          $dirsa->select_db($database_dirsa);
          $query_who_section_n = sprintf("SELECT * FROM section where section_id=%s",
              GetSQLValueString($row_list_subject_d2['co_section'], "int"));
          $who_section_n = $dirsa->query($query_who_section_n) or die($dirsa->error);
          $row_who_section_n = $who_section_n->fetch_assoc();
          $totalRows_who_section_n = $who_section_n->num_rows;

          echo $row_who_section_n['section_name']; ?></td>
    </tr>
    <?php $s++; }while ($row_list_subject_d2 = $list_subject_d2->fetch_assoc());
    } ?>
  </tbody>
</table>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button>
      </div>
    </div>
  </div>
</div>

<!-- انتهاء شاشة الطباعة -->
    <!-- / Content -->
<script>
    document.getElementById("Print").onclick = function () {
        printElement(document.getElementById("printThis"));
    };

    function printElement(elem) {
        var domClone = elem.cloneNode(true);

        var $printSection = document.getElementById("printSection");

        if (!$printSection) {
            var $printSection = document.createElement("div");
            $printSection.id = "printSection";
            document.body.appendChild($printSection);
        }

        $printSection.innerHTML = "";
        $printSection.appendChild(domClone);
        window.print();
    }
</script>
    <!-- Core JS -->
    <!-- build:js assets/vendor/js/core.js -->
  <?php require_once("include/footer.php"); ?>

3g86 2022