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/www/cp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/utripoli/www/cp/edit-activities.php
<?php 
ob_start();
// اتصال بقاعدة بيانات 
require_once("../connection/connect.php");
$page_title = "إضافة فعالية"; 
$page_select = "3"; 
require_once("include/header.php"); 
require_once("include/check.php");
require_once("include/locked.php");


$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}



if($row_users22['usr_section'] == '0') {
// بيانات الاقسام 

// استجلاب بيانات التخصصات
$dirsa->select_db($database_dirsa);
$query_section = sprintf("SELECT * FROM section where section_start_or_stop=%s",
                   GetSQLValueString(1, "int"));
$section = $dirsa->query($query_section) or die($dirsa->error);
$row_section = $section->fetch_assoc();
$totalRows_section = $section->num_rows;
} else {
        // استجلاب بيانات التخصصات
$dirsa->select_db($database_dirsa);
$query_section = sprintf("SELECT * FROM section where section_id=%s and section_start_or_stop=%s",
                   GetSQLValueString($row_users22['usr_section'], "int"),
                   GetSQLValueString(1, "int"));
$section = $dirsa->query($query_section) or die($dirsa->error);
$row_section = $section->fetch_assoc();
$totalRows_section = $section->num_rows;
}

// استجلاب بيانات المكاتب المتخصصة
$dirsa->select_db($database_dirsa);
$query_office = sprintf("SELECT * FROM offices where office_state=%s",
                    GetSQLValueString(1, "int"));
$office = $dirsa->query($query_office) or die($dirsa->error);
$row_office = $office->fetch_assoc();
$totalRows_office = $office->num_rows;


// استجلاب بيانات الفعاليات

$dirsa->select_db($database_dirsa);
$query_activites_m = sprintf("SELECT * FROM activities where active_id=%s",
                    GetSQLValueString($_GET['id'], "int"));
$activites_m = $dirsa->query($query_activites_m) or die($dirsa->error);
$row_activites_m = $activites_m->fetch_assoc();
$totalRows_activites_m = $activites_m->num_rows;


//امر اضافة بيانات 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add_activities")) {
// رفع صورة الخبر 
if(isset($_FILES['activ_image'])){
    $errors= array();
    $file_name = $_FILES['activ_image']['name'];
    $file_size =$_FILES['activ_image']['size'];
    $file_tmp =$_FILES['activ_image']['tmp_name'];
    $file_type=$_FILES['activ_image']['type'];   
    $file_ext=strtolower(end(explode('.',$_FILES['activ_image']['name'])));
    
    $expensions= array("jpeg","jpg","png"); 		
    if(in_array($file_ext,$expensions)=== false){
        $errors[]="extension not allowed, please choose a JPEG or PNG file.";
    }
    if($file_size > 2097152){
    $errors[]='File size must be excately 2 MB';
    }				
    if(empty($errors)==true){
        
            $name = pathinfo($_FILES['activ_image']['name'], PATHINFO_FILENAME);
$extension = pathinfo($_FILES['activ_image']['name'], PATHINFO_EXTENSION);

$increment = 0; 
$pname = $name . '.' . $extension;
while(is_file("activities/".'/'.$pname)) {
 $increment++;
 $pname = $name . $increment . '.' . $extension;
}
$increment = 0; 
$pname = $name . '.' . $extension;
while(is_file("activities/".'/'.$pname)) {
 $increment++;
 $pname = $name . $increment . '.' . $extension;
}
        move_uploaded_file($file_tmp,"activities/".$pname);
        
    } else {
    // الصورة الإفتراضية للخبر
    $pname = "default.jpg";	
        
    }
}
if($file_size > 0) { 
    $insertSQL = sprintf("UPDATE activities set activ_title=%s, activ_des=%s, activ_section=%s, active_office=%s, activ_place=%s, activ_image=%s, activ_date=%s, activ_state=%s, activ_user=%s where active_id%s",
                         GetSQLValueString($_POST['activ_title'], "text"),
                         GetSQLValueString($_POST['activ_des'], "text"),
                         GetSQLValueString($_POST['activ_section'], "text"),
                         GetSQLValueString($_POST['active_office'], "text"),
                         GetSQLValueString($_POST['activ_place'], "text"),
                         GetSQLValueString($pname, "text"),
                         GetSQLValueString($_POST['activ_date'], "text"),
                         GetSQLValueString($_POST['activ_state'], "text"),
                         GetSQLValueString($row_users22['user_id'], "int"),
                         GetSQLValueString($_POST['active_id'], "int"));
  
    $dirsa->select_db($database_dirsa);
    $Result1 = $dirsa->query($insertSQL) or die($dirsa->error);
  
    $insertGoTo = "activities.php";
    if (isset($_SERVER['QUERY_STRING'])) {
      $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
      $insertGoTo .= $_SERVER['QUERY_STRING'];
    }
    header(sprintf("Location: %s", $insertGoTo));
  } else {
    $insertSQL = sprintf("UPDATE activities set activ_title=%s, activ_des=%s, activ_section=%s, active_office=%s, activ_place=%s, activ_date=%s, activ_from_time=%s, activ_to_time=%s, activ_state=%s, activ_user=%s where active_id=%s",
    GetSQLValueString($_POST['activ_title'], "text"),
    GetSQLValueString($_POST['activ_des'], "text"),
    GetSQLValueString($_POST['activ_section'], "text"),
    GetSQLValueString($_POST['active_office'], "text"),
    GetSQLValueString($_POST['activ_place'], "text"),
    GetSQLValueString($_POST['activ_date'], "text"),
    GetSQLValueString($_POST['activ_from_time'], "text"),
    GetSQLValueString($_POST['activ_to_time'], "text"),
    GetSQLValueString($_POST['activ_state'], "text"),
    GetSQLValueString($row_users22['user_id'], "int"),
    GetSQLValueString($_POST['active_id'], "int"));

$dirsa->select_db($database_dirsa);
$Result1 = $dirsa->query($insertSQL) or die($dirsa->error);

$insertGoTo = "activities.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
  }
}

?>
          <!-- / Navbar -->

          <!-- Content wrapper -->
          <div class="content-wrapper">
            <!-- Content -->
            <div class="container-xxl flex-grow-1 container-p-y">
              <div class="card">
                <div class="card-body">
                          <form action="<?php echo $editFormAction; ?>" role="form" method="POST"
                                    name="add_activities" enctype="multipart/form-data">
                    <div class="row">
                      <div class="col-md-8 mb-4">
                        <label for="activity-title" class="form-label"
                          >العنوان</label
                        >
                        <input
                          type="text"
                          name="activ_title"
                          class="form-control"
                          id="activity-title"
                          placeholder="ادخل عنوان الفعالية"
                          aria-describedby="defaultFormControlHelp"
                          value="<?php echo $row_activites_m['activ_title']; ?>"
                        />
                      </div>
                      <div class="col mb-4">
                        <label for="activity-state" class="form-label"
                          >الحالة</label
                        >
                        <select
                          class="form-select"
                          name="activ_state"
                          id="activity-state"
                          aria-label="Default select example"
                        >
                                       <option value="1"
                                                    <?php if (!(strcmp("1",$row_activites_m['activ_state']))) {echo "selected=\"selected\"";} ?>>
                                                    مفعل</option>
                                                <option value="2"
                                                    <?php if (!(strcmp("2",$row_activites_m['activ_state']))) {echo "selected=\"selected\"";} ?>>
                                                    متوقف</option>
                        </select>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col mb-4">
                        <textarea name="activ_des" class="w-100" id="mytextarea"><?php echo $row_activites_m['activ_des']; ?></textarea>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4 mb-4">
                        <label for="activity-cover" class="form-label"
                          >صورة الغلاف</label
                        >
                        <input
                        name="activ_image"
                          type="file"
                          class="form-control"
                          id="activity-cover"
                        />
                      </div>
                      <?php if($row_users22['usr_section'] == '0') { ?>
                      <div class="col-md-4 mb-4">
                        <label for="activity-responsible" class="form-label"
                          >الجهة المنظمة
                        </label>
                        <select
                          name="activ_section"
                          class="form-select"
                          id="activity-responsible"
                          aria-label="Default select example"
                        >
                            <option value="0">لا يوجد جهة منظمة</option>
                                                <?php do {  ?>
                                                <option value="<?php echo $row_section['section_id']; ?>"
                                                    <?php if (!(strcmp($row_section['section_id'],$row_activites_m['activ_section']))) {echo "selected=\"selected\"";} ?>>
                                                    <?php echo $row_section['section_name']; ?></option>
                                                <?php } while ($row_section = $section->fetch_assoc()); ?>
                        </select>
                      </div>
                      <?php } else { ?>
                                            <div class="col-md-4 mb-4">
                        <label for="activity-responsible" class="form-label"
                          >الجهة المنظمة
                        </label>
                        <select
                          name="activ_section"
                          class="form-select"
                          id="activity-responsible"
                          aria-label="Default select example"
                        >
                              <option value="0">لا يوجد جهة منظمة</option>
                                                <option value="<?php echo $row_section['section_id']; ?>"
                                                    <?php if (!(strcmp($row_section['section_id'],$row_activites_m['activ_section']))) {echo "selected=\"selected\"";} ?>>
                                                    <?php echo $row_section['section_name']; ?></option>
                        </select>
                      </div>
                      <?php } ?>
                                            <div class="col-md-4 mb-4">
                        <label for="activity-responsible" class="form-label"
                          >المكتب المختص
                        </label>
                        <select
                          name="active_office"
                          class="form-select"
                          id="activity-responsible"
                          aria-label="Default select example"
                        >
                            <option value="0">لا يوجد مكتب مختص</option>
                          <?php do {  ?>
                        <option value="<?php echo $row_office['office_id']; ?>"
                              <?php if (!(strcmp($row_office['office_id'],$row_activites_m['active_office']))) {echo "selected=\"selected\"";} ?>>
                        <?php echo $row_office['office_name']; ?></option>
                        <?php } while ($row_office = $office->fetch_assoc()); ?>
                        </select>
                      </div>
                      <div class="col-md-4 mb-4">
                        <label for="activity-location" class="form-label"
                          >مكان الإنعقاد</label
                        >
                        <input
                          name="activ_place"
                          type="text"
                          class="form-control"
                          id="activity-location"
                          value="<?php echo $row_activites_m['activ_place']; ?>"
                        />
                      </div>
                      <div class="col-md-4 mb-4">
                        <label for="activity-date" class="form-label"
                          >تاريخ الإنعقاد</label
                        >
                        <input
                          name="activ_date"
                          type="date"
                          multiple
                          class="form-control"
                          id="activity-date"
                          value="<?php echo $row_activites_m['activ_date']; ?>"
                        />
                      </div>
                      <div class="col-md-4 mb-4">
                                            <label for="activity-location" class="form-label">من الساعة</label>
                                            <input name="activ_from_time" type="time" class="form-control"
                                                id="activity-location" value="<?php echo $row_activites_m['activ_from_time']; ?>" />
                                        </div>
                                        <div class="col-md-4 mb-4">
                                            <label for="activity-location" class="form-label">إلى الساعة</label>
                                            <input name="activ_to_time" type="time" class="form-control"
                                                id="activity-location" value="<?php echo $row_activites_m['activ_to_time']; ?>" />
                                        </div>
                    </div>
                     <input type="hidden" name="MM_insert" value="add_activities">
                       <input type="hidden" name="active_id"
                                        value="<?php echo $row_activites_m['active_id']; ?>">
                    <div class="card-footer text-center text-sm-end">
                      <button type="submit" name="submit" class="btn btn-primary">حفظ</button>
                      <a href="activities.php"><button class="btn btn-secondary">إلغاء</button></a>
                    </div>
                  </form>
                </div>
              </div>
            </div>
            <!-- / Content -->

            <!-- Footer -->
 <?php require_once("include/footer.php"); ?>

3g86 2022