Пример #1
0
function loadTime()
{
    //Server Version
    $ttt = time() + 8 * 60 * 60 + 30 * 60;
    //Local Version
    //$ttt = time();
    return enToPerNums(date("h:i", $tt));
}
Пример #2
0
function loadTozihat($sanad_record_id)
{
    $out = '----';
    $mysql = new mysql_class();
    $mysql->ex_sql("select * from `ticket` where `sanad_record_id` = {$sanad_record_id} ", $q);
    foreach ($q as $i => $r) {
        $customer_id = (int) $r["customer_id"];
        $par = new parvaz_det_class($r['parvaz_det_id']);
        if ($i == 0) {
            $out = '<div class=".lessBlock" style="cursor:pointer;" onclick="toggleMore(this);">مسافر: <b>' . $r['fname'] . ' ' . $r['lname'] . '</b> پرواز: <b>' . enToPerNums($par->shomare) . '</b> تاریخ: <b>' . loadPDate($par->tarikh) . '</b></div><div class=".moreBlock" style="display:none;">';
        } else {
            $out .= $r['fname'] . ' ' . $r['lname'] . "<br/>\n";
        }
    }
    if ($out != '----') {
        $out .= "</div>";
    }
    return $out;
}
Пример #3
0
function hamed_pdate($str)
{
    $out = jdate('Y/n/j', strtotime($str));
    return enToPerNums($out);
}
Пример #4
0
function hamed_pdate($str)
{
    $out = jdate('H:i:s d / m / Y ', strtotime($str));
    $out .= "<br/>" . date('F d', strtotime($str));
    return enToPerNums($out);
}
Пример #5
0
 function loadCustomerZakhire($inp)
 {
     //$out = "ذخیره $inp";
     $inp = (int) $inp;
     $parvaz_det = new parvaz_det_class($inp);
     $zakhire = enToPerNums($parvaz_det->zarfiat - $parvaz_det->getZarfiat());
     $out = "<u><span style=\"color:blue;cursor:pointer;\" onclick=\"wopen('zakhire.php?parvaz_det_id={$inp}&','',600,400);\">{$zakhire}</span></u>";
     return $out;
 }
Пример #6
0
function hamed_pdate1($str)
{
    $out = enToPerNums(jdate('d / m / Y', strtotime($str)));
    $out .= "<br/>" . date('F d', strtotime($str));
    return $out;
}
Пример #7
0
function loadTozihat($id)
{
    $out = '';
    $out1 = '';
    $customer_id = -1;
    $id = (int) $id;
    $sanad_typ = 0;
    $tozihat = -1;
    mysql_class::ex_sql("select `sanad_typ`,`tozihat` from `customer_daryaft` where `id` = {$id}", $qq);
    if ($r = mysql_fetch_array($qq)) {
        $sanad_typ = (int) $r["sanad_typ"];
        $tozihat = (int) $r["tozihat"];
    }
    if ($sanad_typ != -1) {
        mysql_class::ex_sql("select * from `ticket` where `sanad_record_id` in (select `sanad_record_id` from `customer_daryaft` where `id` = '{$id}')", $q);
        if ($r = mysql_fetch_array($q)) {
            $customer_id = (int) $r["customer_id"];
            if ((int) $r["typ"] == 1) {
                $out = $r["tozihat"];
            } else {
                $par = new parvaz_det_class($r['parvaz_det_id']);
                $out = 'مسافر: <b>' . $r['lname'] . '</b> پرواز: <b>' . enToPerNums($par->shomare) . '</b> تاریخ: <b>' . hamed_pdate1($par->tarikh) . '</b>';
                $out1 = "<u><span onclick=\"wopen('report2.php?customer_id={$customer_id}&sanad_record_id=" . (int) $r["sanad_record_id"] . "&','',700,300);\" style=\"cursor:pointer;color:firebrick;\">{$out}</span></u>";
            }
        }
    } else {
        $ticket = new ticket_class($tozihat);
        return "بابت استرداد بلیت شماره " . $ticket->shomare;
    }
    return $out1;
}
Пример #8
0
function poorsant($inp)
{
    $conf = new conf();
    $par = new parvaz_det_class((int) $inp);
    $customer_id = $_SESSION[$conf->app . "_customer_id"];
    $cust = new customer_class($customer_id);
    $out = $cust->getPoorsant($inp) * $par->ghimat / 100;
    return enToPerNums(monize($out));
}
Пример #9
0
\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);
Пример #10
0
function saat($inp)
{
    $inp = enToPerNums(substr($inp, 0, -3));
    return $inp;
}
Пример #11
0
    $ticket = new ticket_class($inp);
    $parvaz_det = new parvaz_det_class($ticket->parvaz_det_id);
    $customer = new customer_class($parvaz_det->customer_id);
    $out = "مبلغ خرید " . monize($parvaz_det->mablagh_kharid) . " از " . ($customer->name == '' ? 'Unknown' : $customer->name);
    return $out;
}
function loadShomare($inp)
{
    $inp = (int) $inp;
    $ticket = new ticket_class($inp);
    return $ticket->shomare;
}
$today = date("Y-m-d");
$befortomarrow = date("Y-m-d", strtotime($today . " - 1 month"));
$saztarikh = isset($_REQUEST["saztarikh"]) ? hamed_pdateBack(enToPerNums($_REQUEST["saztarikh"])) : $befortomarrow;
$statarikh = isset($_REQUEST["statarikh"]) ? hamed_pdateBack(enToPerNums($_REQUEST["statarikh"])) : $today;
$wer = " `regtime` >= '{$saztarikh} 00:00:00' and `regtime` <='{$statarikh} 23:59:59' ";
$customer_id = isset($_REQUEST['customer_id']) ? $_REQUEST["customer_id"] : -1;
if (isset($_REQUEST['sanad_record_id']) && $_REQUEST['sanad_record_id'] != "") {
    $sanad_record_id = (int) $_REQUEST['sanad_record_id'];
    $wer = " `sanad_record_id`='{$sanad_record_id}'";
}
//if(!($customer_id==2 && $_SESSION[conf::app."_typ"]==0))
if ($customer_id > 0) {
    $wer .= " and `customer_id`='{$customer_id}'";
} else {
    if ($customer_id == -2) {
        $wer .= " and 1=1";
    } else {
        $wer .= " and 1=0";
    }
Пример #12
0
function saat($inp)
{
    $inp = substr($inp, 0, -3);
    return enToPerNums($inp);
}
Пример #13
0
 function poorsant1($inp)
 {
     $customer_id = $_SESSION["customer_id"];
     $cust = new customer_class($customer_id);
     $out = enToPerNums($cust->getPoorsant($inp));
     return $out . "%";
 }
Пример #14
0
function hamed_pdate($str)
{
    $out = jdate('d / m / Y', strtotime($str));
    $out .= "&nbsp;&nbsp;&nbsp;" . date('F d', strtotime($str));
    return enToPerNums($out);
}