<?php
session_start();
//استدعاء ملف الاعدادات
$conc_type='cp_exec_conc';
include '../conf.php';
include '../conf_sub.php';
//استدعاء ملف الاتصال بقاعدة البيانات
//include $cp_exec_conc;


//ضمان توافق قاعدة البيانات مع اللغة العربية
mysqli_query($conn,"SET NAMES 'utf8'");
mysqli_query($conn,'SET CHARACTER SET utf8');
mysqli_query($conn,"SET character_set_client=utf8");
mysqli_query($conn,"SET character_set_connection=utf8");
mysqli_query($conn,"SET character_set_database=utf8");
mysqli_query($conn,"SET character_set_results=utf8");
mysqli_query($conn,"SET character_set_server=utf8");
mysqli_query($conn," set character_set_server='utf8'");



//ايقاف التنفيذ فى حالة عدم تسجيل الدخول
if(!isset($_SESSION[$domain.'_user']) || $_SESSION[$domain.'_user']==""){die;}



//بداية الاستعلام
$query="select id,name,code,sub,sort from rows_classes where sub=0 and menu_type=".$_POST['stage_id']." order by sort " ;
//تنفيذ الاستعلام
$result=mysqli_query($conn,$query);	
?>
<option></option>
<?php

   /*بداية التكرار */  
 while($fetch = mysqli_fetch_array($result)) {
   		 $fetch = clean_array($fetch);?>
<option class="sub_job" sort="<?php echo $fetch['sort']?>" id="<?php echo $fetch['id']?>" value="<?php echo $fetch['id']?>" sub="<?php echo $fetch['sub']?>" ><?php echo $fetch['name']  ?></option>
<?php }

?>