コード例 #1
0
ファイル: checkflight2.php プロジェクト: hscomp2002/superp
                 }
                 if ($kharid_typ == 'etebari') {
                     $ok = $ok and $ticket->add($tmp_id[$index], $noth);
                 } else {
                     $info_ticket[] = $ticket;
                 }
                 $ghimat_kharid += 200000;
                 $parvaz->mablagh_kharid;
             }
         }
     }
     if ($kharid_typ == 'etebari') {
         $mysql->ex_sqlx("delete from `reserve_tmp` where `id` = " . $tmp_id[$index]);
     }
     $log_text_info[] = $parvaz;
     if (ticket_class::updateTmp($tmp_id[$index], $info_ticket)) {
         $mysql->ex_sql("select `adlprice`,`adltedad`,`chdprice`,`chdtedad`,`infprice`,`inftedad`,`info` from reserve_tmp where id=" . $tmp_id[$index], $q);
         //echo "select `adlprice`,`adltedad`,`chdprice`,`chdtedad`,`infprice`,`inftedad`,`info` from reserve_tmp where id=".$tmp_id[$k]."<br/>";
         if (count($q) > 0) {
             $info = unserialize($q[0]['info']);
             $mysql->ex_sql("select upghimat from parvaz_det left join agency on (moghim_code=customer_id) where parvaz_det.id=" . $info['parvaz']->id, $p);
             $upghimat = count($p) > 0 ? $p[0]['upghimat'] : 100000;
             $jam_ghimat1 += ($q[0]['adlprice'] + $upghimat) * $q[0]['adltedad'] + ($q[0]['chdprice'] + $upghimat) * $q[0]['chdtedad'] + $q[0]['infprice'] * $q[0]['inftedad'];
         }
     } else {
         $bool = FALSE;
     }
     $index++;
     $p_i++;
 }
 for ($k = 0; $k < count($tmp_id); $k++) {
コード例 #2
0
                 $ghimat_kharid += $parvaz->mablagh_kharid;
             }
         }
     }
     if ($kharid_typ == 'etebari') {
         mysql_class::ex_sqlx("delete from `reserve_tmp` where `id` = " . $tmp_id[$index]);
     }
     $jam_ghimat1 += $zarib * $tedad * $parvaz->ghimat + $zarib * $inf * $parvaz->ghimat / 10;
     $index++;
     $p_i++;
 }
 if ($kharid_typ == 'naghdi') {
     $bool = TRUE;
     $tarikh_now = date("Y-m-d H:i:s");
     for ($k = 0; $k < count($tmp_id); $k++) {
         if (!ticket_class::updateTmp($tmp_id[$k], $info_ticket)) {
             $bool = FALSE;
         }
     }
     if ($bool) {
         $pardakht_id = pardakht_class::add(implode(',', $tmp_id), $tarikh_now, $jam_ghimat1);
         $pardakht = new pardakht_class($pardakht_id);
         $rahgiri = $pardakht->getBarcode();
         $pay_code = pay_class::pay($pardakht_id, $jam_ghimat1);
         $tmpo = explode(',', $pay_code);
         if (count($tmpo) == 2 && $tmpo[0] == 0 || TRUE) {
             $redirect = "<script language=\"javascript\">alert(\"کد رهگیری خود را یادداشت نمایید \\n {$rahgiri} \\n سپس به بانک هدایت می شوید\");postRefId('" . $tmpo[1] . "');</script>";
         } else {
             die('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><center>در پردازش مشکلی پیش آمده است مجدد تلاش نمایید در صورت پرداخت وجه مبلغی از حساب شما کم نشده است <br/><a href="index.php" >بازگشت</a></center></body></html>');
         }
     } else {