function edit_item($id, $feild, $value) { if ($feild == 'frase') { mysql_class::ex_sql("select `id` from `access_det` where `acc_id` = (select `acc_id` from `access_det` where `id`={$id}) and `frase` = '{$value}'", $q); if (!($r = mysql_fetch_array($q))) { mysql_class::ex_sqlx("update `access_det` set `frase` = '{$value}' where `id`={$id}"); } } else { mysql_class::ex_sqlx("update `access_det` set `{$feild}` = '{$value}' where `id`={$id}"); } } if (!isset($_REQUEST['acc_id'])) { die("<script language=\"javascript\">alert('خطا در استفاده');</script>"); } $acc_id = (int) $_REQUEST['acc_id']; $grid = new jshowGrid_new("access_det", "grid1"); $grid->echoQuery = TRUE; $grid->whereClause = " `acc_id` = {$acc_id}"; $grid->columnHeaders[0] = null; $grid->columnHeaders[1] = null; $grid->columnHeaders[2] = 'عبارت امنیتی'; $grid->addFunction = 'add_item'; $grid->editFunction = 'edit_item'; $grid->intial(); $grid->executeQuery(); $out = $grid->getGrid(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
$whereClause1 .= ")"; } if ($smaghsad_id > 0) { $whereClause1 .= " and `en`='1' and (`maghsad_id` = '{$smaghsad_id}'"; if ($domasire) { $whereClause1 .= " or `mabda_id` = '{$smaghsad_id}'"; } $whereClause1 .= ")"; } if ($whereClause1 != "") { $whereClause .= " and `en`='1' and parvaz_id in (select id from `parvaz` where {$whereClause1})"; } $whereClause .= " order by `tarikh`"; $forms = null; $out = ""; $grid = new jshowGrid_new("parvaz_det", "grid1"); $grid->width = "99%"; $grid->columnHeaders[1] = "هواپیمایی"; $grid->columnFunctions[1] = "loadParvazInfo"; /* $grid->columnHeaders[1]="روز"; $grid->columnFunctions[1] = "hamed_pdate_day"; */ $grid->columnHeaders[2] = "تاریخ"; $grid->columnFunctions[2] = "hamed_pdate"; $grid->columnHeaders[3] = "ساعت"; $grid->columnFunctions[3] = "saat"; $grid->fieldList[4] = 'id'; $grid->columnHeaders[4] = "ظرفیت"; $grid->columnFunctions[4] = "loadZarfiat"; //$grid->columnAccesses[4] = 0;
} return $out1; } $typ = (int) $_SESSION[conf::app . "_customer_typ"]; $today = date("Y-m-d"); $befortomarrow = date("Y-m-d", strtotime($today . " - 1 month")); $saztarikh = isset($_REQUEST["saztarikh"]) ? hamed_pdateBack(enToPerNums($_REQUEST["saztarikh"])) : hamed_pdate($befortomarrow); $statarikh = isset($_REQUEST["statarikh"]) ? hamed_pdateBack(enToPerNums($_REQUEST["statarikh"])) : hamed_pdate($today); $max_tedad = isset($_REQUEST['set_max_tedad']) ? (int) $_REQUEST['set_max_tedad'] : -1; if ($typ == 2 && (int) $_SESSION[conf::app . "_typ"] == 0) { $customer_id = isset($_REQUEST["customer_id"]) ? (int) $_REQUEST["customer_id"] : -1; } else { $customer_id = (int) $_SESSION[conf::app . "_customer_id"]; } $report_type = isset($_REQUEST["report_type"]) ? (int) $_REQUEST["report_type"] : 0; $grid = new jshowGrid_new("customer_daryaft", "grid1"); switch ($report_type) { case 0: $grid->addFeild("id"); $grid->addFeild("id"); $grid->addFeild("id"); $grid->fieldList[5] = "id"; $grid->index_width = '30px'; $grid->width = '99%'; $grid->columnHeaders[0] = null; $grid->columnHeaders[1] = "مشتری(آژانس)"; $grid->columnHeaders[2] = null; $grid->columnHeaders[3] = null; $grid->columnHeaders[4] = "تاریخ"; $grid->columnHeaders[5] = "شرح سند"; $grid->columnHeaders[6] = "شماره سند";
mysql_class::ex_sqlx($query); } function edit_item($id, $feild, $value) { if ($feild != "rang") { mysql_class::ex_sqlx("update `parvaz` set `{$feild}` = '{$value}' where `id` = {$id}"); } else { mysql_class::ex_sqlx("update `parvaz` set `{$feild}` = '#{$value}' where `id` = {$id}"); } } $noe["عمومی"] = 0; $noe["خصوصی"] = 1; $noe["صندوق"] = 2; $yesNo["خیر"] = 0; $yesNo["بله"] = 1; $grid = new jshowGrid_new("parvaz", "grid1"); $grid->index_width = '20px'; $grid->width = '95%'; $grid->addFeild("id"); $grid->columnHeaders[0] = null; $grid->columnHeaders[1] = "شماره پرواز"; $grid->columnHeaders[2] = null; $grid->columnHeaders[3] = "شرکت"; $grid->columnHeaders[4] = "مبدا"; $grid->columnHeaders[5] = "مقصد"; $grid->columnHeaders[6] = "هواپیما"; $grid->columnHeaders[7] = "قیمت مصوب"; $grid->columnHeaders[8] = "ظرفیت پایه"; $grid->columnHeaders[9] = "ساعت پرواز"; $grid->columnHeaders[10] = "ساعت ورود <br>به مقصد"; $grid->columnHeaders[11] = "کمیسیون پایه(به درصد)";
return $out; } $customer_id = isset($_REQUEST["customer_id"]) ? (int) $_REQUEST["customer_id"] : -1; $typ = 1; if (!isset($_REQUEST["customer_id"]) && (int) $_SESSION[conf::app . "_customer_typ"] != 2) { $customer_id = (int) $_SESSION[conf::app . "_customer_id"]; $typ = 0; } if (isset($_REQUEST["changetyp"]) && (int) $_SESSION[conf::app . "_customer_typ"] == 2) { $changetyp = (int) $_REQUEST["changetyp"]; $typ = (int) $_REQUEST["typ"]; mysql_class::ex_sqlx("update `customer_daryaft` set `typ`={$typ} where `id` ={$changetyp}"); } $GLOBALS["typ"] = $typ; $customer = new customer_class($customer_id); $grid = new jshowGrid_new("customer_daryaft", "grid1"); $grid->width = '99%'; $grid->index_width = '20px'; $grid->columnHeaders[0] = null; $grid->columnHeaders[1] = "مشتری(آژانس)"; //$grid->columnFilters[1] = TRUE; $grid->columnHeaders[2] = null; $grid->columnHeaders[3] = "مبلغ"; $grid->columnHeaders[4] = "تاریخ"; $grid->columnHeaders[5] = "توضیحات"; $grid->columnHeaders[6] = 'شماره سند'; $grid->columnHeaders[7] = null; $grid->columnHeaders[8] = null; $grid->columnAccesses[4] = 0; $grid->columnAccesses[6] = 0; $grid->columnJavaScript[3] = " onkeyup=\"monize(this);\" ";
$whereClause1 .= ")"; } if ($smaghsad_id > 0) { $whereClause1 .= " and (`maghsad_id` = '{$smaghsad_id}'"; if ($domasire) { $whereClause1 .= " or `mabda_id` = '{$smaghsad_id}'"; } $whereClause1 .= ")"; } if ($whereClause1 != "") { $whereClause .= "and parvaz_id in (select id from `parvaz` where {$whereClause1})"; } $whereClause .= " order by `tarikh`"; $forms = null; $out = ""; $grid = new jshowGrid_new("parvaz_det", "grid1"); $grid->width = "99%"; $grid->columnHeaders[1] = "هواپیمایی"; $grid->columnFunctions[1] = "loadParvazInfo"; /* $grid->columnHeaders[1]="روز"; $grid->columnFunctions[1] = "hamed_pdate_day"; */ $grid->columnHeaders[2] = "تاریخ"; $grid->columnFunctions[2] = "hamed_pdate"; $grid->columnHeaders[3] = "ساعت"; $grid->columnFunctions[3] = "saat"; $grid->columnHeaders[4] = "ظرفیت"; $grid->columnFunctions[4] = "zarfiat1"; $grid->columnHeaders[5] = "قیمت"; $grid->columnFunctions[5] = "monize";