コード例 #1
0
ファイル: report1.old.php プロジェクト: hscomp2002/superp
function add_item()
{
    $fields = array();
    foreach ($_REQUEST as $key => $value) {
        if (strpos($key, "new_") === 0 && $key != "new_id" && $key != "new_en") {
            $fields[substr($key, 4)] = $value;
        }
    }
    $customer = new customer_class((int) $fields["customer_id"]);
    $customer->daryaft((int) $fields["mablagh"], (int) $_SESSION[conf::app . "_user_id"], $fields["tozihat"], hamed_pdateBack($fields["tarikh"]));
}
コード例 #2
0
ファイル: daryaft.php プロジェクト: hscomp2002/superp
function add_item($gname, $table, $fields, $col)
{
    $typ = $GLOBALS["typ"];
    $conf = new conf();
    $mysql = new mysql_class();
    foreach ($fields as $key => $value) {
        if (strpos($key, "new_") === 0 && $key != "new_id" && $key != "new_en") {
            $fields[substr($key, 4)] = $value;
        }
    }
    $customer = new customer_class((int) $fields["customer_id"]);
    $customer->daryaft((int) umonize($fields["mablagh"]), (int) $_SESSION[$conf->app . "_user_id"], $fields["tozihat"], $typ, hamed_pdateBack($fields["tarikh"]));
    return $ret;
}
コード例 #3
0
ファイル: index1.php プロジェクト: hscomp2002/superp
 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
ファイル: sync_moghim.php プロジェクト: hscomp2002/superp
$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)) {
            $i++;
            $tarikh = hamed_pdateBack((string) $flight->fldate);
            $saat = (string) $flight->outtime;
            $zarfiat = (string) $flight->showcapnet;
            $ghimat = (string) $flight->adlprice1 + (isset($upghimatArr[(string) $flight->AgencyCode]) ? $upghimatArr[(string) $flight->AgencyCode] : 100000);
            $strsource = arabicToPersian((string) $flight->strsource);
            $strdest = arabicToPersian((string) $flight->strdest);
            $alname = hs_airline((string) $flight->alname);
            $tmp .= ($tmp == '' ? '' : ',') . '(' . (string) $flight->ID . ",-1,'{$tarikh}','{$saat}',{$zarfiat},{$ghimat},'" . (string) $flight->flnum . "'," . (string) $flight->subflid . ",'{$strsource}','{$strdest}','{$alname}','" . (string) $flight->flclass . "',0,'00:00:00',1,'" . (string) $flight->AgencyCode . "'," . (string) $flight->selrate . ",'" . (string) $flight->adlprice1 . "')";
            if ($i % 500 == 0) {
                $my->ex_sqlx($qu . $tmp);
                $tmp = '';
            }
        }
    }
}
$my->ex_sqlx($qu . $tmp);
コード例 #5
0
ファイル: tarikhparvaz.php プロジェクト: hscomp2002/superp
        }
        if ($y < 1000) {
            $y = $y + 1300;
        }
        $inp = "{$y}/{$m}/{$d}";
        $out = audit_class::hamed_jalalitomiladi(audit_class::perToEn($inp));
    }
    return $out;
}
function hamed_pdate($str)
{
    $out = jdate('Y/n/j', strtotime($str));
    return enToPerNums($out);
}
$saztarikh = isset($_REQUEST["saztarikh"]) ? hamed_pdateBack($_REQUEST["saztarikh"]) : date("Y-m-d");
$statarikh = isset($_REQUEST["statarikh"]) ? hamed_pdateBack($_REQUEST["statarikh"]) : date("Y-m-d");
$parvaz_id = isset($_REQUEST["parvaz_id"]) ? (int) $_REQUEST["parvaz_id"] : -1;
if (isset($_REQUEST["saztarikh"])) {
    $parvaz = new parvaz_class($parvaz_id);
    $days = explode(',', $_REQUEST["days"]);
    if ($parvaz_id > 0) {
        $parvaz->fromDateToDate($saztarikh, $statarikh, $days);
        die('true');
    } else {
        die('false');
    }
}
?>
<script>
	$(document).ready(function(){
                $.each($(".dateValue"),function(id,field){
コード例 #6
0
ファイル: report2.php プロジェクト: hscomp2002/superp
    $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";
    }
コード例 #7
0
ファイル: esterdad.habibi.php プロジェクト: hscomp2002/superp
function loadParvazDateBack($pdate)
{
    $pdate = str_replace(" ", "", $pdate);
    $out = hamed_pdateBack($pdate);
    return $out;
}