示例#1
0
 public static function search($date, $rdate, $from_city, $to_city, $extra, $airlines, $sort, $way)
 {
     function perToEnNums($inNum)
     {
         $outp = $inNum;
         $outp = str_replace('۰', '0', $outp);
         $outp = str_replace('۱', '1', $outp);
         $outp = str_replace('۲', '2', $outp);
         $outp = str_replace('۳', '3', $outp);
         $outp = str_replace('۴', '4', $outp);
         $outp = str_replace('۵', '5', $outp);
         $outp = str_replace('۶', '6', $outp);
         $outp = str_replace('۷', '7', $outp);
         $outp = str_replace('۸', '8', $outp);
         $outp = str_replace('۹', '9', $outp);
         return $outp;
     }
     $out = array();
     $conf = new conf();
     $url = $conf->wurl . "rest/lowfaresearch";
     $User = $conf->wuser;
     $Password = $conf->wpass;
     $dtmp = explode('/', perToEnNums($date));
     $mtmp = jalali_to_jgregorian($dtmp[0], $dtmp[1], $dtmp[2]);
     $date = $mtmp[0] . '-' . str_pad($mtmp[1], 2, "0", STR_PAD_LEFT) . '-' . str_pad($mtmp[2], 2, "0", STR_PAD_LEFT);
     $timestamp = date('Y-m-dTH:i:s+3:30');
     $data = '<OTA_AirLowFareSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 
                 OTA_AirLowFareSearchRQ.xsd" EchoToken="1234" TimeStamp="' . $timestamp . '"
                 Target="New" Version="2.001" SequenceNmbr="1" PrimaryLangID="En-us">	
                       <OriginDestinationInformation>
                               <DepartureDateTime>' . $date . '</DepartureDateTime>
                               <OriginLocation LocationCode="' . $from_city . '"/>
                               <DestinationLocation LocationCode="' . $to_city . '"/>
                       </OriginDestinationInformation>';
     if ($rdate != '') {
         $dtmp = explode('/', perToEnNums($rdate));
         //            var_dump($dtmp);
         $mtmp = jalali_to_jgregorian($dtmp[0], $dtmp[1], $dtmp[2]);
         $rdate = $mtmp[0] . '-' . str_pad($mtmp[1], 2, "0", STR_PAD_LEFT) . '-' . str_pad($mtmp[2], 2, "0", STR_PAD_LEFT);
         $data .= '<OriginDestinationInformation>
                         <DepartureDateTime>' . $rdate . '</DepartureDateTime>
                         <OriginLocation LocationCode="' . $to_city . '"/>
                         <DestinationLocation LocationCode="' . $from_city . '"/>
                 </OriginDestinationInformation>';
     }
     $data .= '</OTA_AirLowFareSearchRQ>';
     //        echo "REQUEST : <br/>\n" . $data;
     $json = search_class::sendRequest($url, $User, $Password, $data);
     //        echo "<br/>\nRESPONSE : <br/>\n" . $json;
     $new_out = json_decode($json, TRUE);
     //        var_dump($new_out);
     $out = $new_out;
     //[0];
     return $out;
 }
示例#2
0
function loadParvazDets($parvaz_det_id)
{
    $out = null;
    $no = date("Y-m-d");
    $par = new parvaz_det_class((int) $parvaz_det_id);
    mysql_class::ex_sql("select `parvaz_det`.`id`,`parvaz`.`shomare`,`parvaz_det`.`tarikh`,`parvaz_det`.`saat` from `parvaz_det` left join `parvaz` on (`parvaz_det`.`parvaz_id` = `parvaz`.`id`) where `parvaz_det`.`en`=1 and `parvaz_det`.`id` <> {$parvaz_det_id} and `parvaz_det`.`tarikh`>='{$no}' and `parvaz`.`mabda_id`=" . $par->maghsad_id . " and `parvaz`.`maghsad_id`=" . $par->mabda_id . " order by `tarikh`,`saat`,`parvaz_id`", $q);
    while ($r = mysql_fetch_array($q)) {
        $out[$r['shomare'] . '(' . perToEnNums(audit_class::hamed_pdate($r['tarikh'])) . ' ' . $r['saat'] . ')'] = $r['id'];
    }
    return $out;
}
示例#3
0
 if (isset($_REQUEST["cust_id"])) {
     $_SESSION["customer_id"] = (int) $_REQUEST["cust_id"];
 }
 $today = date("Y-m-d");
 $time_now = date("H:i:s", strtotime(date("H:i:s") . " + 1 hour"));
 $aftertomarrow = date("Y-m-d", strtotime($today . " + 1 month"));
 $smabda_id = isset($_REQUEST["smabda_id"]) ? $_REQUEST["smabda_id"] : -1;
 $smaghsad_id = isset($_REQUEST["smaghsad_id"]) ? $_REQUEST["smaghsad_id"] : -1;
 $domasire = FALSE;
 $domasire = isset($_REQUEST["domasire"]) && $_REQUEST["domasire"] ? TRUE : FALSE;
 $saztarikh = isset($_REQUEST["saztarikh"]) ? $_REQUEST["saztarikh"] : hamed_pdate1($today);
 $statarikh = isset($_REQUEST["statarikh"]) ? $_REQUEST["statarikh"] : hamed_pdate1($aftertomarrow);
 if ($_SESSION['customer_typ'] != 2 && strtotime(hamed_pdateBack(perToEnNums($saztarikh))) < strtotime($today)) {
     $saztarikh = hamed_pdate1($today);
 }
 $whereClause = " (`tarikh` > '" . hamed_pdateBack(perToEnNums($saztarikh)) . "' and `tarikh` <= '" . hamed_pdateBack(perToEnNums($statarikh)) . "') or (`tarikh`='" . hamed_pdateBack(perToEnNums($saztarikh)) . "' and `saat`>='{$time_now}')";
 //and  parvaz_id in (select id from `parvaz` where
 $whereClause1 = "";
 if ($smabda_id > 0) {
     $whereClause1 .= " (`mabda_id` = '{$smabda_id}'";
     if ($domasire) {
         $whereClause1 .= " or `maghsad_id` = '{$smabda_id}'";
     }
     $whereClause1 .= ")";
 }
 if ($smaghsad_id > 0) {
     $whereClause1 .= " and `en`='1' and (`maghsad_id` = '{$smaghsad_id}'";
     if ($domasire) {
         $whereClause1 .= " or `mabda_id` = '{$smaghsad_id}'";
     }
     $whereClause1 .= ")";
示例#4
0
文件: inc.php 项目: hscomp2002/superp
function hamed_pdateBack($inp)
{
    $inp = perToEnNums($inp);
    $out = FALSE;
    $tmp = explode("/", $inp);
    if (count($tmp) == 3) {
        $y = (int) $tmp[2];
        $m = (int) $tmp[1];
        $d = (int) $tmp[0];
        if ($d > $y) {
            $tmp = $y;
            $y = $d;
            $d = $tmp;
        }
        if ($y < 1000) {
            $y = $y + 1300;
        }
        $inp = "{$y}/{$m}/{$d}";
        $out = audit_class::hamed_jalalitomiladi(audit_class::perToEn($inp));
    }
    return $out;
}
}
function loadTicket($id)
{
    $str = '';
    $conf = new conf();
    $ref = '';
    $my = new mysql_class();
    $my->ex_sql("select `shomare`,`sanad_record_id` from `ticket` where `id`='{$id}' ", $q);
    if (isset($q[0])) {
        $ref = ticket_class::rahgiriToCode($q[0]['sanad_record_id'], $conf->rahgiri);
        $str = 'eticket.php?shomare=' . $q[0]['shomare'] . '&id=' . $id;
    }
    return '<span class=\'msg detail_div\' style=\'font-family:tahoma;\'  onclick="wopen(\'' . $str . '\',\'\',800,500)" >(' . $ref . ')</span>';
}
$customer_id = (int) $_SESSION[$conf->app . '_customer_id'];
$tday = perToEnNums(jdate("Y/m/d"));
$tdayG = date("Y-m-d");
$aztarikh = isset($_REQUEST['aztarikh']) ? pateBack($_REQUEST['aztarikh']) : $tdayG;
$tatarikh = isset($_REQUEST['tatarikh']) ? pateBack($_REQUEST['tatarikh']) : $tdayG;
if (isset($_REQUEST['jam']) && $_REQUEST['jam'] == 'true') {
    $su = ticketJam("`en`=1 and (date(`regtime`) >= '{$aztarikh}' and date(`regtime`) <= '{$tatarikh}') and `customer_id` = {$customer_id} ");
    die("جمع مبلغ بلیت : " . monize($su['sum_mablagh']) . " جمع مبلغ تور : " . monize($su['sum_tour_mablagh']) . '<br/>' . 'جمع کمیسیون از کل بلیت : ' . monize($su['sum_poorsant_kol']) . ' جمع کمیسیون از مبلغ بلیت : ' . monize($su['sum_poorsant_mablagh']));
}
$gname = "gname_ticket_gozaresh";
$input = array($gname => array('table' => 'ticket', 'div' => 'main_div_ticket_gozaresh'));
$xgrid = new xgrid($input);
$xgrid->whereClause[$gname] = "`en`=1 and (date(`regtime`) >= '{$aztarikh}' and date(`regtime`) <= '{$tatarikh}')  and `customer_id` = {$customer_id} ";
$xgrid->column[$gname][0]['name'] = '';
$xgrid->column[$gname][1]['name'] = 'نام';
$xgrid->column[$gname][1]['sort'] = 'true';
$xgrid->column[$gname][2]['name'] = 'نام‌خانوادگی';
示例#6
0
function umonizeGh($inp)
{
    return perToEnNums(umonize($inp));
}
示例#7
0
    public function get()
    {
        $conf = new conf();
        $out = '';
        if (!$this->ticket_ok) {
            exit;
        }
        $customer = new customer_class($this->customer_id);
        $parvaz = new parvaz_det_class($this->parvaz_det_id[0]);
        $par = new parvaz_class($parvaz->parvaz_id);
        $this->fare .= '<span style="font-size:6px;" >' . monize($par->ghimat_ticket) . 'ریال </span>';
        $allow0 = $this->allow[0];
        $allow1 = $this->isCopon ? $this->allow[1] : '';
        $ok = '';
        $saat = '';
        $par2_dates = "";
        $fl2 = '';
        $flight_class0 = $this->flight_class[0];
        $flight_class1 = $this->flight_class[1];
        $city0 = $this->loadCity($parvaz->mabda_id);
        $city1 = $this->loadCity($parvaz->maghsad_id);
        $parvaz_back = isset($this->parvaz_det_id[1]) ? new parvaz_det_class($this->parvaz_det_id[1]) : null;
        $sherkat0 = $this->loadSherkat($parvaz->sherkat_id);
        $b = new barcode_class(ticket_class::rahgiriToCode($this->serial, $conf->rahgiri));
        $barcode = '<img src="../img/barcodes/' . ticket_class::rahgiriToCode($this->serial, $conf->rahgiri) . '.png" alt="' . ticket_class::rahgiriToCode($this->serial, $conf->rahgiri) . '" />';
        if ($parvaz_back != null && $this->isCopon) {
            $sherkat1 = $this->loadSherkat($parvaz_back->sherkat_id);
            $city2 = $this->loadCity($parvaz_back->maghsad_id);
            $ok = 'OK';
            $saat = $parvaz_back->saat;
            $perdate1 = perToEnNums(jdate("m/d", strtotime($parvaz_back->tarikh)));
            $endate1 = date("d M", strtotime($parvaz_back->tarikh));
            $par2_dates = "\n                                <table width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n                                        <tr>\n                                                <td  style=\"font-size:12px;\" >\n                                                        <b>{$perdate1}</b>\n                                                </td>\n                                                <td style=\"border-right-style:solid;font-size:10px;\">\n                                                        <b>{$endate1}</b>\n                                                </td>\n                                        </tr>\n                                </table>";
            $fl2 = "\n                                <table width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n                                        <tr>\n                                                <td>\n                                                        <b>{$flight_class1}</b>\n                                                </td>\n                                                <td style=\"border-right-style:solid;font-size:10px;\">\n                                                        <b>{$parvaz_back->shomare}</b>\n                                                </td>\n                                        </tr>\n                                </table>";
        } else {
            $sherkat1 = '';
            $city2 = 'VOID';
        }
        $user = new user_class($this->user_id);
        $perdate = perToEnNums(jdate("m/d", strtotime($parvaz->tarikh)));
        $endate = date("d M", strtotime($parvaz->tarikh));
        $this->serialText = $this->isAdmin ? '<input type="text" style="border-style:none;font-weight:bold;width:100%;text-align:center;" value="' . $this->serial . '" />' : $this->serial;
        $this->refrenceText = $this->isAdmin ? '<input type="text" style="border-style:none;font-weight:bold;width:100%;text-align:center;" value="' . $this->refrence . '" />' : $this->refrence;
        $out = <<<et
\t\t<span>Serial(Voucher/ Passenger No):{$this->serial}</span>
\t\t<table style="border-style: solid;border-collapse: collapse; font-size: 9px; direction: rtl; width:90%; height: 7cm;" border="2" >
\t\t<tbody>
\t\t<tr>
\t\t\t<td align="center" valign="top" rowspan="2" colspan="4" style="width:4cm;" >
\t\t\t\t<table width="100%">
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="font-size:7px;text-align:center;vertical-align:top;">
\t\t\t\t\t\t\tتاریخ و محل صدور :
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="font-size:7px;text-align:left;vertical-align:top;">
\t\t\t\t\t\t\tDATE AND PLACE OF ISSUE
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan="3" style="direction:ltr;font-size:10px;">
\t\t\t\t\t\t\t{$this->regTime}
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan="3" style="font-size:12px;" >
\t\t\t\t\t\t\t<b>{$customer->name}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan="3" style="font-size:8px;" >
\t\t\t\t\t\t\t{$user->fname} {$user->lname}
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="font-size:7px;text-align:right;vertical-align:bottom;">
\t\t\t\t\t\t\tصادر کننده 
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="font-size:7px;text-align:left;vertical-align:bottom;">
\t\t\t\t\t\t\tAGENT 
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td colspan="3" style="height:0.8cm;font-size:7px;"  >
\t\t\t<b>
\t\t\t\t{$this->route}
\t\t\t</b>
\t\t\t</td>
\t\t\t<td style="font-size: 6px;width:10%;text-align:left;vertical-align:top;">
\t\t\t\tORIGIN/DESTINATION
\t\t\t</td>
\t\t\t<td style="text-align: left;height:0.8cm;" colspan="6">
\t\t\t\t<table style="font-size: 6px;width:100%;">
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t{$this->our_logo}
\t\t\t\t\t\t\t\t\t<br/>
\t\t\t\t\t\t\t\t{$this->our_logo_text}
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t{$this->customer_logo}
\t\t\t\t\t\t\t\t<br/>
\t\t\t\t\t\t\t\t{$this->customerlogotext}
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="font-size: 6px;width:10%;text-align:left;vertical-align:top;">
\t\t\t\t\t\t\tISSUED BY
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="font-size: 5px;width:30%;text-align:left;" >
\t\t\t\t\t\t\tPASSENGER<br/>AIR/GROUND<br/>SERVICES<br/>VOUCHER AND<br/>BAGGAGE CHECK
\t\t\t\t\t\t</td>\t\t\t\t\t
\t\t\t\t\t</tr>
\t\t\t\t</table>\t\t\t
\t\t\t</td>
\t\t</tr>
<!--
\t\t<tr>
\t\t\t<td colspan="10" style="height:0.2cm;">
\t\t\t\t&nbsp;
\t\t\t</td>
\t\t</tr>
-->
\t\t<tr>\t\t
\t\t\t<td style="text-align: center;font-size:13px;" colspan="10">
\t\t\t\t<table width="100%" cellspacing="0" cellpadding="0" >
\t\t\t\t\t<tr style="height:100%" >
\t\t\t\t\t\t<td style="text-align: right;font-size:7px;vertical-align:top;">
\t\t\t\t\t\t\tنام مسافر(غیر قابل انتقال) :
\t\t\t\t\t\t</td>\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t<td style="text-align:left;direction:ltr;font-size:7px;vertical-align:top;">
\t\t\t\t\t\t\tNAME OF PASSENGER :
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr style="height:0.7cm;">
\t\t\t\t\t\t<td colspan="2" style="font-size:13px;vertical-align:top;" >
\t\t\t\t\t\t\t<b>{$this->ticket_fname} {$this->ticket_lname}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t
\t\t\t\t</table>
\t\t\t</td>
\t\t</tr>
\t\t<tr valign="top" style="height:0.5cm;" >
\t\t\t<td >
\t\t\t<span style="font-size: 7px;">بار کنترل شده  ‌BAGGAEG<br/>بار کنترل نشده CK/UNCK
</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t<span style="font-size: 7px;">ALLOW<br/>بارمجاز</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t<span style="font-size: 7px;">NOT VALID<br/>AFTER<br/>
‫فاقد اعتبار بعد از
</span>
\t\t\t</td>
\t\t\t<td >
\t\t\t\t<span style="font-size: 7px;">NOT VALID<br/>BEFORE<br/>‫فاقد اعتبار قبل از‬</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<span style="font-size: 7px;">FARE BASIS<br/>مبنای نرخ‬‫</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<span style="font-size: 7px;">STATUS<br/>وضعیت‬‫</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<span style="font-size: 7px;">TIME<br/>زمان‬‫</span>
\t\t\t</td>
\t\t\t<td colspan="2">
\t\t\t\t<span style="font-size: 7px;">DATE<br/>تاریخ</span>
\t\t\t</td>
\t\t\t<td colspan="2">
\t\t\t\t<span style="font-size: 7px;">FLIGHT/CLASS<br/>پرواز/کلاس</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<span style="font-size: 7px;">CARRIER<br/>حمل کننده</span>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<table width="100%" cellspacing="0" cellpadding="0" style="font-size: 7px;" >
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="text-align: right;font-size:7px;vertical-align:top;">
\t\t\t\t\t\tبرای مسافرت معتبر نیست
\t\t\t\t\t\t</td>\t\t
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>\t\t
\t\t\t\t\t\t<td style="text-align:left;direction:ltr;font-size:7px;vertical-align:top;">
\t\t\t\t\t\t\tNOT GOOD FOR PASSAGE
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<p style="text-align: center;"><span style="font-size: 7px;">
\t\t\t\t\tX/O
\t\t\t\t</p>
\t\t\t</td>

\t\t</tr>
\t\t<tr style="height:0.8cm;" >
\t\t\t<td>
\t\t\t\t<table width="100%" cellspacing="0" cellpadding="0">
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="text-align: left;font-size: 6px;">
\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="text-align: left;font-size: 6px;">
\t\t\t\t\t\tPCS
\t\t\t\t\t\t<br/>
\t\t\t\t\t\tتعداد
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="text-align: right;font-size: 6px;">
\t\t\t\t\t\tوزن
\t\t\t\t\t\t\t<br/>
\t\t\t\t\t\t\tWT
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="text-align: left;font-size: 6px;">
\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td style="text-align: center;"><b>{$allow0}</b></td>
\t\t\t<td>&nbsp;</td>
\t\t\t<td>&nbsp;</td>
\t\t\t<td>&nbsp;</td>
\t\t\t<td><b>OK</b></td>
\t\t\t<td><b>{$parvaz->saat}</b></td>
\t\t\t<td colspan="2">
\t\t\t\t<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t<b>{$perdate}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="border-right-style:solid;">
\t\t\t\t\t\t\t<b>{$endate}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td colspan="2">
\t\t\t\t<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t<b>{$flight_class0}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="border-right-style:solid;">
\t\t\t\t\t\t\t<b>{$parvaz->shomare}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<b>{$sherkat0}</b>
\t\t\t</td>
\t\t\t<td >
\t\t\t\t<table style="text-align: center;width:100%;" >
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="direction:rtl;text-align:right;font-size: 6px;" >
\t\t\tاز:
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="direction:ltr;text-align:left;font-size: 6px;" >
\t\t\tfrom:
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan='2'>
\t\t\t\t\t\t\t<b>{$city0}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>\t
\t\t\t</td>
\t\t\t<td>&nbsp;</td>
\t\t</tr>
\t\t<tr align="center" style="height:0.7cm;" >
\t\t\t<td>
\t\t\t\t<table width="100%" cellspacing="0" cellpadding="0">
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="text-align: left;font-size: 6px;">
\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="text-align: left;font-size: 6px;">
\t\t\t\t\t\tPCS
\t\t\t\t\t\t<br/>
\t\t\t\t\t\tتعداد
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="text-align: right;font-size: 6px;">
\t\t\t\t\t\tوزن
\t\t\t\t\t\t\t<br/>
\t\t\t\t\t\t\tWT
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="text-align: left;font-size: 6px;">
\t\t\t\t\t\t&nbsp;
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td style="text-align: center;"><b>{$allow1}</b></td>
\t\t\t<td>&nbsp;</td>
\t\t\t<td>&nbsp;</td>
\t\t\t<td>&nbsp;</td>
\t\t\t<td><b>{$ok}</b></td>
\t\t\t<td><b>{$saat}</b></td>
\t\t\t<td colspan="2">
{$par2_dates}
\t\t\t</td>
\t\t\t<td colspan="2">
{$fl2}
\t\t\t</td>
\t\t\t<td><b>{$sherkat1}</b></td>
\t\t\t<td >
\t\t\t\t<table style="text-align: center;width:100%;" >
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="direction:rtl;text-align:right;font-size: 6px;" >
\t\t\tبه:
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="direction:ltr;text-align:left;font-size: 6px;" >
\t\t\tto:
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan='2'>
\t\t\t\t\t\t\t<b>{$city1}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>\t
\t\t\t</td>
\t\t\t<td>&nbsp;</td>
\t\t</tr>
\t\t<tr style="height:0.8cm;" >
\t\t\t<td style="text-align: center;" colspan="8" rowspan="3">
\t\t\t\t{$barcode}
\t\t\t\t<?php
\t\t\t\t?>
\t\t\t</td>
\t\t\t<td colspan="4">
\t\t\t\t<table style="text-align: center;font-size: 6px;width:100%;height:100%;" >
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="direction:rtl;text-align:right;vertical-align:top;" >
\t\t\tکد گروه:
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="direction:ltr;text-align:left;vertical-align:top;" >
\t\t\tTOUR CODE:
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t<table style="text-align: center;width:100%;" >
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="direction:rtl;text-align:right;font-size: 6px;" >
\t\t\tبه:
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="direction:ltr;text-align:left;font-size: 6px;" >
\t\t\tto:
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan='2'>
\t\t\t\t\t\t\t<b>{$city2}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>\t
\t\t\t</td>
\t\t\t<td>
\t\t\t&nbsp;
\t\t\t</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td colspan="4">
\t\t\t\t<table style="text-align: center;width:100%;height:100%;" >
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td style="direction:rtl;text-align:right;vertical-align:top;font-size: 5px;" >
\t\t\tطرز پرداخت:
\t\t\t\t\t\t</td>
\t\t\t\t\t\t<td style="direction:ltr;text-align:left;vertical-align:top;font-size: 5px;" >
\t\t\tFORM OF PAYMENT:
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td colspan="2" align="center">
\t\t\t\t\t\t\t<b>{$this->payment}</b>
\t\t\t\t\t\t</td>
\t\t\t\t\t</tr>
\t\t\t\t</table>
\t\t\t</td>
\t\t\t<td>
\t\t\t\t{$this->fare}
\t\t\t</td>
\t\t\t<td>
\t\t\t&nbsp;
\t\t\t</td>
\t\t</tr>
\t\t<tr style="height:0.7cm;" >
\t\t<td colspan="5">
\t\t\t<table style="text-align: center;width:100%;" >
\t\t\t\t<tr>
\t\t\t\t\t<td style="direction:rtl;text-align:right;font-size: 5px;" >
\t\tرفرنس
\t\t\t\t\t</td>
\t\t\t\t\t<td style="direction:ltr;text-align:left;font-size: 5px;" >
\t\tSerial
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td width="50%">
\t\t\t\t\t{$this->refrenceText}
\t\t\t\t\t</td>
\t\t\t\t\t<td>
\t\t\t\t\t{$this->serialText}
                                        </td>
\t\t\t\t</tr>
\t\t\t</table>
\t\t</td>
\t\t<td>
\t\t\t&nbsp;
\t\t</td>
\t\t</tr>
\t\t</tbody>
\t\t</table>
et;
        return $out;
    }
\t\t\t\t</tr>
tmp2;
                } else {
                    $infants .= <<<tmp2
                                <tr class="showgrid_row_odd">
                                        <td class="showgrid_row_td_reserve" >{$radif}</td>
                                        <td>نام و نام‌خانوادگی:</td>
                                        <td  colspan='2'  class="showgrid_row_td_reserve" style='width:auto;text-align:right;' ><input type='text' name='inf_lname_{$i}' id='inf_lname_{$i}' class='inp'  style="width:400px;"/></td>
\t\t\t\t\t<td><select class='inp' name='inf_gender_{$i}' ><option value='1' >مذکر</option><option value='0' >مؤنث</option></select></td>
\t\t\t\t\t<td class="showgrid_row_td_reserve" readonly="readonly">{$inf_ghimat}</td>
                                        <td class="showgrid_row_td_reserve" readonly="readonly">{$poorsant}</td>
                                        <td class="showgrid_row_td_reserve" readonly="readonly">{$khal}</td>
                                </tr>
tmp2;
                }
                $radif = enToPerNums(perToEnNums($radif) + 1);
            }
        }
        $out = <<<OOUT
\t<span style="color:firebrick;font-size:15px;" >
\t\tدقت فرمایید رزرو موقت شما تنها ۵ دقیقه معتبر است
\t</span>
\t\t<input id="tim" style="color:#000000;width:70px;font-size:25px;" readonly="readonly" value="5:0" />
\t\t<script>
\t\t\tvar t = setTimeout("dec();",1000);
\t\t\tfunction dec()
\t\t\t{
\t\t\t\tvar tim = document.getElementById('tim');
\t\t\t\tvar noe = tim.value;
\t\t\t\tvar tmp = noe.split(':');
\t\t\t\tvar m = parseInt(tmp[0],10);
示例#9
0
}
function loadActiveAgency()
{
    $out = array();
    $my = new mysql_class();
    $my->ex_sql("select `moghim_code` from agency where en=1", $q);
    foreach ($q as $r) {
        $out[] = $r['moghim_code'];
    }
    return $out;
}
$upghimatArr = loadghimatArr();
$activeAgency = loadActiveAgency();
$today = substr(perToEnNums(jdate('Y/m/d', strtotime(date("Y-m-d H:i:s")))), 2);
//
$onem = substr(perToEnNums(jdate('Y/m/d', strtotime(date("Y-m-d H:i:s", time() + 30 * 24 * 60 * 60)))), 2);
// date("Y-m-d H:i:s",time()+ 30*24*60*60);
$cl = new SoapClient("http://91.98.31.190/Moghim24Scripts/Moghim24Services.svc?wsdl");
$param = array('fd' => $today, 'ld' => $onem, 'cust' => '1010', 'pass' => '123456');
$res = $cl->openTempfllist($param);
$pattern = '/<xs:schema.*<\\/xs:schema>/';
$xml = preg_replace($pattern, '', $res->openTempfllistResult->any);
$response = simplexml_load_string($xml);
$tt = $response->NewDataSet;
$qu = "insert into parvaz_det (`id`, `parvaz_id`, `tarikh`, `saat`, `zarfiat`, `ghimat`, `flnum`, `subflid`, `strsource`, `strdest`, `alname`, `flclass`, `typ`, `saat_kh`, `en`, `customer_id`,selrate,ghimat_origin) values ";
$tmp = '';
$i = 0;
$my->ex_sqlx("truncate table parvaz_det");
foreach ($tt as $val) {
    foreach ($val as $flight) {
        if ((string) $flight->reservable == 'true' && (string) $flight->reservekind == '1' && in_array((string) $flight->AgencyCode, $activeAgency)) {
示例#10
0
			</td>
			<td style="text-align: center;"><b>20</b></td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td><b>OK</b></td>
			<td><b><?php 
    echo $parvaz->saat;
    ?>
</b></td>
			<td colspan="2">
				<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
					<tr>
						<td>
							<b><?php 
    echo perToEnNums(jdate("m/d", strtotime($parvaz->tarikh)));
    ?>
</b>
						</td>
						<td style="border-right-style:solid;">
							<b><?php 
    echo date("d M", strtotime($parvaz->tarikh));
    ?>
</b>
						</td>
					</tr>
				</table>
			</td>
			<td colspan="2">
				<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
					<tr>
示例#11
0
     $grid->columnCallBackFunctions[4] = "hamed_pdateBack";
     $grid->columnAccesses[1] = 0;
     $grid->whereClause = '1=0';
     if (isset($_REQUEST["saztarikh"])) {
         $grid->whereClause = " `typ`=-1 and `tarikh` >= '{$saztarikh} 00:00:00' and `tarikh` <='{$statarikh} 23:59:59'";
     }
     if (isset($_REQUEST["customer_id"]) && (int) $_REQUEST["customer_id"] != -2) {
         $grid->whereClause .= " and `customer_id` = '" . (int) $_REQUEST["customer_id"] . "' ";
     }
     $grid->whereClause .= " order by `tarikh`";
     $grid->pageCount = 30;
     if ($max_tedad == 1) {
         $mysql->ex_sql('select `id` from `customer_daryaft` where' . $grid->whereClause, $tedad);
         $grid->pageCount = $mysql->num_rows($tedad);
     }
     $grid->footer = "<td class=\"showgrid_row_odd\" align=\"left\" colspan=\"7\" >مانده از قبل:</td><td id=\"mande_ghabl\" class=\"showgrid_row_odd\"  align=\"center\">" . perToEnNums(loadMandeh($mande_ghabl_value)) . "</td>";
     $grid->footer .= "</tr><tr><td class=\"showgrid_row_even\"><input name=\"txttedad\"type=\"hidden\" value=\"1\"/>";
     $grid->footer .= "<input class=\"inp1\" type=\"button\" name=\"tedad\" value=\"مشاهده همه\" onclick='document.getElementById(\"set_max_tedad\").value=1;document.getElementById(\"filter\").submit();'  /></td><td colspan='4' class=\"showgrid_row_even\" align='left' >جمع:</td><td class=\"showgrid_row_even\"  id='jam_bed1' align='center'  ></td><td class=\"showgrid_row_even\"  id='jam_bes1' align='center'  ></td><td id=\"tafazol\" align=\"center\" class=\"showgrid_row_even\" ></td>";
     $grid->footer .= "</tr><tr><td class=\"showgrid_row_odd\" align=\"left\" colspan=\"7\" >مانده  کل:</td><td id=\"mande_kol\" class=\"showgrid_row_odd\"  align=\"center\"></td>";
     break;
 case 1:
     $saztarikh = "{$saztarikh} 00:00:00";
     $statarikh = "{$statarikh} 23:59:59";
     $grid->query = "SELECT `customer_id` as `cid`,(select -1*SUM(`mablagh`) from `customer_daryaft` where `customer_id` = `cid` and `typ`=-1 and `tarikh` >= '{$saztarikh}' and `tarikh` <= '{$statarikh}' ) as `bede`,(select SUM(`mablagh`) from `customer_daryaft` where `customer_id` = `cid` and `typ`=1 and `tarikh` >= '{$saztarikh}' and `tarikh` <= '{$statarikh}' ) as `best`,SUM(`mablagh`*`typ`) as `mande`  FROM `customer_daryaft` where `tarikh` >= '{$saztarikh}' and `tarikh` <= '{$statarikh}'  group by `customer_id`";
     $grid->loadQueryField = TRUE;
     for ($i = 0; $i < count($grid->columnHeaders); $i++) {
         $grid->columnHeaders[$i] = null;
     }
     $grid->columnHeaders[0] = "مشتری";
     $grid->columnLists[0] = loadCustomers();
     $grid->columnHeaders[2] = "بستانکار";
示例#12
0
<?php

session_start();
include_once "../kernel.php";
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);
}
$tim = perToEnNums(jdate("Y-m-d_H-i-s", strtotime(date("Y-m-d H:i:s"))));
backup_class::backup(getcwd() . '/backup/' . conf::app . '_' . $tim . '.sqz.gz');
?>
<html>
	<body>
		<script language="javascript">
			window.location = 'backup/<?php 
echo conf::app . '_' . $tim . '.sqz.gz';
?>
';
		</script>
	</body>
</html>
示例#13
0
function loadGhimat($inp)
{
    return perToEnNums(monize($inp));
}
示例#14
0
function loadParvazDate($parvaz_det_id)
{
    $parvaz_det_id = perToEnNums($parvaz_det_id);
    $out = jdate("d / m / Y", strtotime($parvaz_det_id));
    return $out . " 00:00:00";
}
示例#15
0
		                </table>
			</td>
		</tr>
	</table>		
                </div>
            </div>  	              
                               
    </div></div>		
	<br/>
	<br/>
	<div align="center">
	<?php 
    echo $conf->contact;
    ?>
			<?php 
    echo 'تاریخ امروز:&nbsp;' . perToEnNums(jdate('l , d , m , Y', strtotime(date("Y-m-d"))));
    echo '&nbsp;' . date("D ,M j, Y");
    if ((int) $_SESSION[$conf->app . '_customer_typ'] == 2 && (int) $_SESSION[$conf->app . '_typ'] == 0) {
        echo " تعداد کاربران آنلاین : " . count(user_class::getOnlines());
    }
    ?>
	</div>
<script>
$(document).ready(function(){
<?php 
    if (isset($GLOBALS['extraScript'])) {
        echo $GLOBALS['extraScript'];
    }
    ?>
    $("#grp_manage").click(function () {
      //$("ul").slideToggle("slow");