41 lines
1.9 KiB
PHP
Executable File
41 lines
1.9 KiB
PHP
Executable File
<?php
|
|
require_once('../../../fixed/config/go_con.php');
|
|
|
|
$emp_Name_id = mysqli_real_escape_string($db, $_POST['empName']);
|
|
$servid = mysqli_real_escape_string($db, $_POST['servid']);
|
|
|
|
if (!empty($emp_Name_id)) {
|
|
|
|
$get_services_sql = mysqli_query($db, "SELECT
|
|
`services`.`id`,
|
|
`services`.`name`,
|
|
`services`.`price`
|
|
|
|
FROM `emplyee_has_services`
|
|
INNER JOIN `services` ON `emplyee_has_services`.`services_id` = `services`.`id`
|
|
WHERE `emplyee_has_services`.`emplyee_id` = $emp_Name_id
|
|
AND `services`.`activation_id` = 2
|
|
ORDER BY
|
|
CASE
|
|
WHEN `services`.`Order_by` IS NULL THEN 1
|
|
ELSE 0
|
|
END,
|
|
`services`.`Order_by`
|
|
");
|
|
|
|
?>
|
|
<option value="-1" data-cuPrice="0" data-price="0" selected>المرجو الاختيار</option>
|
|
<option value="0" data-cuPrice="0" data-price="0">خدمات مجمعة</option>
|
|
<?php
|
|
$old_active_serv = [1,2,3,6,7,8,9,11,183,184,185,86,88,89,90,91];
|
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
|
?>
|
|
<option <?php if (!in_array($services_row['id'],$old_active_serv) && $services_row['id'] <= 265) echo 'style="background: #f77070;"';?> data-canbook="<?php if (!in_array($services_row['id'],$old_active_serv)) echo 1; else echo 0;;?>" value="<?=$services_row['id']?>" <?php if(!empty($servid)){if($servid == $services_row['id']){echo"selected";}}?> data-cuPrice="<?=round($services_row['price'],2)?>" data-price="<?=round($services_row['price'] + (($services_row['price'])*$vat)/100,2)?>"><?=$services_row['name']?> >>> السعر : <?=round($services_row['price'] + (($services_row['price'])*$vat)/100,2) ?> </option>
|
|
<?php
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|