Exemplo n.º 1
0
     $p_i++;
 }
 for ($k = 0; $k < count($tmp_id); $k++) {
 }
 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) {
         $mysql = new mysql_class();
         $pardakht_id = pardakht_class::add(implode(',', $tmp_id), $tarikh_now, $jam_ghimat1, toJSON(array('ticket' => $info_ticket, 'parvaz' => $log_text_info, 'netlog' => $netlog, 'rwaitlog' => $rwaitlog)));
         $pardakht = new pardakht_class($pardakht_id);
         $rahgiri = $pardakht->getBarcode();
         if ($conf->ps === TRUE) {
             $pay_code = pay_class::ps_pay($pardakht_id, $jam_ghimat1);
         } else {
             if ($conf->payline === TRUE) {
                 $pay_code = pay_class::pl_pay($pardakht_id, $jam_ghimat1);
                 $mysql->ex_sqlx("update `pardakht` set `bank_out` = '{$pay_code}' where `id` = {$pardakht_id}");
             } else {
                 $pay_code = pay_class::pay($pardakht_id, $jam_ghimat1);
             }
         }
         //var_dump($pay_code);
         $tmpo = explode(',', $pay_code);
         if (count($tmpo) == 2 && $tmpo[0] == 0 && $conf->ps !== 'TRUE') {
Exemplo n.º 2
0
         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 {
         die("<html><body><script language=\"javascript\">alert(\"Err. Try again please\"); window.location='index.php'; </script></body></html>");
     }
 } else {
     if ($kharid_typ == 'etebari') {
         $customer->buyTicket($sanad_record_id, $jam_ghimat1);