<?php include '../kernel.php'; $reserve_tmp = new reserve_tmp_class(118); $res = moghim_class::reservefl($reserve_tmp); var_dump($res); /* function removeGran() { $my = new mysql_class; $repeat = array(); $my->ex_sql("SELECT tarikh from parvaz_det group by tarikh order by tarikh ",$q); foreach($q as $r) { $my->ex_sql("SELECT customer_id,flnum,id,zarfiat,ghimat from parvaz_det where tarikh='".$r['tarikh']."' ORDER BY `parvaz_det`.`flnum` ASC",$p); //echo "SELECT customer_id,flnum,id,zarfiat,ghimat from parvaz_det where tarikh='".$r['tarikh']."' ORDER BY `parvaz_det`.`flnum` ASC <br/>"; $hs_tmp = ''; $hs_ghimat=0; $hs_id=0; $hs_zarfiat=0; foreach($p as $t) { if($hs_tmp!=$t['flnum']) { $hs_tmp = $t['flnum']; $hs_ghimat = $t['ghimat']; $hs_id = $t['id']; $hs_zarfiat = $t['zarfiat']; //echo $hs_tmp."<br/>"; } else
public static function reservefl($pardakht) { $conf = new conf(); $tt = json_decode($pardakht->log_text); $moghim_out = moghim_class::loadReserveParam($tt); $cl = new SoapClient($conf->moghim_wsdl); $param = array('rep' => &$rep, 'refer' => &$refer, 'seldate' => &$seldate, 'netlog' => $tt->netlog, 'rwaitlog' => $tt->rwaitlog, 'sexkind' => $moghim_out['sexkind'], 'fname' => $moghim_out['fname'], 'lname' => $moghim_out['lname'], 'passkind' => $moghim_out['passkind'], 'mellicode' => $moghim_out['mellicode'], 'passport' => $moghim_out['passport'], 'remark' => '', 'mobile' => '09125245831', 'cust' => $conf->moghim_cust, 'pass' => $conf->moghim_pass); /* $out = new stdClass(); $out->reserveflResult = TRUE; $out->refer = 'PDYPIQ'; $out->seldate = '94/05/27'; $out->rep = ''; return($out); */ return $cl->reservefl($param); }
$adl_ghimat = 0; $chd_ghimat = 0; $inf_ghimat = 0; $hs_adl_ghimat = 0; $hs_chd_ghimat = 0; $hs_inf_ghimat = 0; $poorsant = 0; $radif = '۱'; $k = 0; //var_dump($_SESSION); foreach ($selectedParvaz as $tmp) { $timeout = 5; if ($kharid_typ == 'naghdi') { $timeout = 15; } $moghim_res = moghim_class::checkselection((int) $tmp->subflid, (int) $tmp->customer_id, $adl, $chd, $inf); //var_dump($moghim_res); if ($moghim_res->checkselectionResult) { $alaki = ticket_class::addTmp($tmp->getId(), $tedad, $timeout, $moghim_res->netlog, $moghim_res->rwaitlog, $moghim_res->adlprice, $moghim_res->chdprice, $moghim_res->infprice, $adl, $chd, $inf); $mysql = new mysql_class(); $mysql->ex_sql("select upghimat from parvaz_det left join agency on (moghim_code=customer_id) where parvaz_det.id=" . $tmp->getId(), $p); $upghimat = count($p) > 0 ? $p[0]['upghimat'] : 100000; $tmp->setZarfiat($tedad); $tmp_id[] = $alaki; $adl_ghimat += $moghim_res->adlprice + $upghimat; $chd_ghimat += $moghim_res->chdprice + $upghimat; $inf_ghimat += $moghim_res->infprice + $upghimat; $hs_adl_ghimat += $moghim_res->adlprice + $upghimat; $hs_chd_ghimat += $moghim_res->chdprice + $upghimat; $hs_inf_ghimat += $moghim_res->infprice + $upghimat; //$poorsant += $tmp->ghimat * ($customer->getPoorsant($tmp->getId())/100);
include_once "../kernel.php"; $SESSION = new session_class(); register_shutdown_function('session_write_close'); session_start(); if (!isset($_SESSION[$conf->app . '_user_id'])) { die(lang_fa_class::access_deny); } $se = security_class::auth((int) $_SESSION[$conf->app . '_user_id']); if (!$se->can_view) { die(lang_fa_class::access_deny); } if (isset($_REQUEST['rwaitlog'])) { $rwaitlog = $_REQUEST['rwaitlog']; $refer = $_REQUEST['refer']; $seldate = str_replace('/', '', $_REQUEST['seldate']); $etick = moghim_class::printEticket($rwaitlog); if (isset($etick->printEticketResult)) { file_put_contents("../pdf/{$refer}" . $seldate . ".pdf", fopen("http://" . $conf->moghim_ip . "/ereports/{$refer}" . $seldate . ".pdf", 'r')); $ou = "../pdf/{$refer}" . $seldate . ".pdf"; } else { $ou = "err"; } die($ou); } ?> <div> <input type="text" id="rwaitlog" placeholder="rwaitlog" > <input type="text" id="refer" placeholder="refer" > <input type="text" id="seldate" placeholder="seldate" > <a class="btn btn-success" onclick="getTicket()" > ارسال درخواست