当前位置: 首页>>代码示例>>PHP>>正文


PHP DateModules::shamsi_to_miladi方法代码示例

本文整理汇总了PHP中DateModules::shamsi_to_miladi方法的典型用法代码示例。如果您正苦于以下问题:PHP DateModules::shamsi_to_miladi方法的具体用法?PHP DateModules::shamsi_to_miladi怎么用?PHP DateModules::shamsi_to_miladi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DateModules的用法示例。


在下文中一共展示了DateModules::shamsi_to_miladi方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DatesAreValid

 function DatesAreValid()
 {
     $dt = PdoDataAccess::runquery("select * from ATN_PersonShifts\r\n\t\t\twhere PersonID=:p \r\n\t\t\tAND ( :f between FromDate AND ToDate OR :t between FromDate AND ToDate ) AND RowID <> :r", array(":p" => $this->PersonID, ":r" => $this->RowID, ":f" => DateModules::shamsi_to_miladi($this->FromDate, "-"), ":t" => DateModules::shamsi_to_miladi($this->ToDate, "-")));
     if (count($dt) > 0) {
         ExceptionHandler::PushException("شیفت انتخاب شده دارای تداخل زمانی میباشد");
         return false;
     }
     /*$ShiftObj = new ATN_shifts($this->ShiftID);
     		
     		$dt = PdoDataAccess::runquery("select * from ATN_PersonShifts join ATN_shifts using(ShiftID)
     			where PersonID=:p 
     			AND ( (:s between FromTime AND ToTime) OR (:e between FromTime AND ToTime) ) AND RowID <> :r 
     			AND ( (:f between FromDate AND if(ToDate='0000-00-00','4000-00-00',ToDate) ) 
     				OR (:t between FromDate AND if(ToDate='0000-00-00','4000-00-00',ToDate) ) )", 
     			array(":p" => $this->PersonID, ":s" => $ShiftObj->FromTime, 
     				  ":e" => $ShiftObj->ToTime, ":r" => $this->RowID,
     				  ":f" => DateModules::shamsi_to_miladi($this->FromDate), 
     				  ":t" => DateModules::shamsi_to_miladi($this->ToDate)));
     
     		if(count($dt) > 0)
     		{
     			ExceptionHandler::PushException("شیفت های این فرد با یکدیگر دارای تداخل ساعتی می باشند");;
     			return false;
     		}		*/
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:26,代码来源:shift.class.php

示例2: MakeWhere

 function MakeWhere(&$where, &$whereParam)
 {
     foreach ($_POST as $key => $value) {
         if ($key == "excel" || $value === "" || strpos($key, "combobox") !== false) {
             continue;
         }
         $prefix = "";
         switch ($key) {
             case "FromStartDate":
             case "ToStartDate":
             case "FromEndDate":
             case "ToEndDate":
             case "FromLetterDate":
             case "ToLetterDate":
                 $value = DateModules::shamsi_to_miladi($value, "-");
                 break;
             case "FromAmount":
             case "ToAmount":
                 $value = preg_replace('/,/', "", $value);
                 break;
         }
         if (strpos($key, "From") === 0) {
             $where .= " AND " . $prefix . substr($key, 4) . " >= :{$key}";
         } else {
             if (strpos($key, "To") === 0) {
                 $where .= " AND " . $prefix . substr($key, 2) . " <= :{$key}";
             } else {
                 $where .= " AND " . $prefix . $key . " = :{$key}";
             }
         }
         $whereParam[":{$key}"] = $value;
     }
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:33,代码来源:totalReport.php

示例3: save

function save()
{
    $obj = new manage_professor_exe_posts();
    PdoDataAccess::FillObjectByArray($obj, $_POST);
    $postObj = new manage_posts($obj->post_id);
    if ($postObj->post_id == "") {
        echo Response::createObjectiveResponse(false, "کد پست وارد شده معتبر نمی باشد.");
        die;
    }
    if ($postObj->validity_start != "" && $postObj->validity_start != '0000-00-00' && DateModules::CompareDate($postObj->validity_start, str_replace("/", "-", DateModules::shamsi_to_miladi($obj->from_date))) > 0 || $postObj->validity_end != "" && $postObj->validity_end != '0000-00-00' && ($obj->to_date != "" && $obj->to_date != "0000-00-00") && DateModules::CompareDate($postObj->validity_end, str_replace("/", "-", DateModules::shamsi_to_miladi($obj->to_date))) < 0) {
        echo Response::createObjectiveResponse(false, "پست انتخابی از نظر تاریخ اعتبار و تاریخ های شروع و پایان وارد شده معتبر نمی باشد.");
        die;
    }
    if (empty($obj->row_no)) {
        $return = $obj->ADD();
    } else {
        $return = $obj->Edit();
    }
    if (!$return) {
        echo Response::createObjectiveResponse($return, ExceptionHandler::GetExceptionsToString());
        die;
    }
    if (isset($_POST["assign_post"])) {
        $return = $obj->assign_post();
    } else {
        $return = $obj->release_post();
    }
    echo Response::createObjectiveResponse($return, ExceptionHandler::GetExceptionsToString());
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:30,代码来源:exe_posts.data.php

示例4: simulate_bime

 public static function simulate_bime($pay_year, $pay_month, $payment_type = NULL)
 {
     $e_date = "31-" . $pay_month . "-" . $pay_year;
     $end_month_date = DateModules::shamsi_to_miladi($e_date);
     $s_date = "1-" . $pay_month . "-" . $pay_year;
     $start_month_date = DateModules::shamsi_to_miladi($s_date);
     $worker_month_day = 30;
     $actual_month_day = DateModules::get_month_dayno($pay_year, $pay_month);
     //...................................
     PdoDataAccess::runquery("DROP TABLE IF EXISTS temp_insure_include_sum ");
     PdoDataAccess::runquery(" DROP TABLE IF EXISTS temp_limit_staff ");
     PdoDataAccess::runquery(" CREATE TEMPORARY TABLE temp_limit_staff AS\r\n\t\t\t\t\t\t\t\tSELECT DISTINCT s.staff_id , s.person_type\r\n\t\t\t\t\t\t\t\tFROM staff s\r\n\t\t\t\t\t\t\t\t\tINNER JOIN staff_include_history si\r\n\t\t\t\t\t\t\t\t\t\tON (s.staff_id = si.staff_id AND si.start_date <= ('{$end_month_date}') AND (si.end_date IS NULL OR si.end_date >= ('{$end_month_date}'))) \r\n\t\t\t\t\t\t\t\tWHERE si.insure_include = 1 ");
     PdoDataAccess::runquery("ALTER TABLE temp_limit_staff ADD INDEX (staff_id)");
     PdoDataAccess::runquery(" CREATE TEMPORARY table temp_insure_include_sum AS\r\n\t\t\t\t\t\t\t\tSELECT s.staff_id ,\r\n\t\t\t\t\t\t\t\t\t\t0 value,\r\n\t\t\t\t\t\t\t\t\t\tsum(pi.pay_value) + CASE WHEN sum(pi.diff_pay_value * pi.diff_value_coef) < 0 THEN 0 ELSE sum(pi.diff_pay_value * pi.diff_value_coef) END param1 ,\r\n\t\t\t\t\t\t\t\t\t\t0 param2 ,\r\n\t\t\t\t\t\t\t\t\t\t0 param3 , \r\n\t\t\t\t\t\t\t\t\t\tCASE WHEN s.person_type = " . HR_WORKER . " THEN {$worker_month_day} ELSE {$actual_month_day} END month_days\r\n\t\t\t\t\t\t\t\tFROM payment_items pi\r\n\t\t\t\t\t\t\t\tINNER JOIN salary_item_types sit\r\n\t\t\t\t\t\t\t\t\tON (pi.salary_item_type_id = sit.salary_item_type_id AND \r\n\t\t\t\t\t\t\t\t\t\tsit.credit_topic = " . CREDIT_TOPIC_1 . " AND \r\n\t\t\t\t\t\t\t\t\t\tsit.insure_include = 1)\r\n\t\t\t\t\t\t\t\tINNER JOIN temp_limit_staff s\r\n\t\t\t\t\t\t\t\t\tON (s.staff_id = pi.staff_id)\r\n\t\t\t\t\t\t\t\tWHERE pi.pay_year = ({$pay_year}) AND \r\n\t\t\t\t\t\t\t\t\tpi.pay_month = ({$pay_month}) AND \r\n\t\t\t\t\t\t\t\t\tpi.payment_type = 1\r\n\t\t\t\t\t\t\t\t\t{$payment_type_where}\r\n\t\t\t\t\t\t\t\tGROUP BY\r\n\t\t\t\t\t\t\t\tstaff_id; ");
     PdoDataAccess::runquery("ALTER TABLE temp_insure_include_sum ADD INDEX (staff_id)");
     $max_daily_salary_insure_include = manage_salary_params::get_salaryParam_value("", 100, SPT_MAX_DAILY_SALARY_INSURE_INCLUDE, $start_month_date);
     PdoDataAccess::runquery(" UPDATE temp_insure_include_sum\r\n\t\t\t\t\t\t\t  SET param1 = {$max_daily_salary_insure_include} * {$worker_month_day} \r\n\t\t\t\t\t\t\t  WHERE param1 > {$max_daily_salary_insure_include} * {$worker_month_day} ");
     //استخراج درصد بیمه بیکاری سهم کارفرما
     $res = PdoDataAccess::runquery("SELECT value\r\n\t\t\t\t\t\t\t\t\tFROM salary_params\r\n\t\t\t\t\t\t\t\t\t\tWHERE from_date <= '" . $start_month_date . "' AND\r\n\t\t\t\t\t\t\t\t\t\t\tto_date >= '" . $end_month_date . "' AND person_type =100 AND \r\n\t\t\t\t\t\t\t\t\t\t\tparam_type = " . SPT_UNEMPLOYMENT_INSURANCE_VALUE);
     $unemployment_insurance_value = $res[0]['value'];
     //استخراج درصد بیمه سهم شخص
     $res = PdoDataAccess::runquery("SELECT value\r\n\t\t\t\t\t\t\t\t\tFROM salary_params\r\n\t\t\t\t\t\t\t\t\tWHERE from_date <= '" . $start_month_date . "' AND\r\n\t\t\t\t\t\t\t\t\t\t\tto_date >= '" . $end_month_date . "' AND person_type =100 AND \r\n\t\t\t\t\t\t\t\t\t\t\tparam_type = " . SPT_SOCIAL_SUPPLY_INSURE_PERSON_VALUE);
     $person_value = $res[0]['value'];
     //استخراج درصد بیمه سهم کارفرما
     $res = PdoDataAccess::runquery("SELECT value\r\n\t\t\t\t\t\t\t\t\tFROM salary_params\r\n\t\t\t\t\t\t\t\t\tWHERE from_date <= '" . $start_month_date . "' AND\r\n\t\t\t\t\t\t\t\t\t\t\tto_date >= '" . $end_month_date . "' AND person_type =100 AND \r\n\t\t\t\t\t\t\t\t\t\t\tparam_type = " . SPT_SOCIAL_SUPPLY_INSURE_EMPLOYER_VALUE);
     $employmer_value = $res[0]['value'];
     PdoDataAccess::runquery(" UPDATE temp_insure_include_sum\r\n\t\t\t\t\t\t\t\tSET value =  param1 * {$person_value} ,\r\n\t\t\t\t\t\t\t\t\tparam2 = param1 * {$employmer_value} ,\r\n\t\t\t\t\t\t\t\t\tparam3 = param1 * {$unemployment_insurance_value} \r\n\t\t\t\t\t\t\t\tWHERE (1=1)");
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:28,代码来源:salary_utils.php

示例5: SaveRequest

function SaveRequest()
{
    $obj = new ATN_requests();
    PdoDataAccess::FillObjectByArray($obj, $_POST);
    if ($obj->ReqType != "CORRECT") {
        if (!empty($obj->ToDate)) {
            $dt = PdoDataAccess::runquery("\r\n\t\t\t\tselect * from ATN_requests \r\n\t\t\t\twhere PersonID=:p AND RequestID<>:r \r\n\t\t\t\tAND ( (FromDate<=:f AND ToDate>=:f) OR (FromDate<=:t AND ToDate>=:t) )\r\n\t\t\t", array(":p" => $_SESSION["USER"]["PersonID"], ":r" => $obj->RequestID, ":f" => DateModules::shamsi_to_miladi($obj->FromDate, "-"), ":t" => DateModules::shamsi_to_miladi($obj->ToDate, "-")));
            if (count($dt) > 0) {
                echo Response::createObjectiveResponse(false, "در بازه زمانی وارد شده قبلا درخواستی ثبت شده است");
                die;
            }
        } else {
            $dt = PdoDataAccess::runquery("\r\n\t\t\t\tselect * from ATN_requests \r\n\t\t\t\twhere PersonID=:p AND RequestID<>:r \r\n\t\t\t\tAND (\r\n\t\t\t\t\t\t(FromDate<=:f AND ToDate>=:f) OR \r\n\t\t\t\t\t\t( if(ToDate is null,FromDate=:f,FromDate<=:f AND ToDate>=:f) AND \r\n\t\t\t\t\t\t\tStartTime<=:st AND EndTime>=:st) OR \r\n\t\t\t\t\t\t( if(ToDate is null,FromDate=:f,FromDate<=:f AND ToDate>=:f) AND \r\n\t\t\t\t\t\t\tStartTime<=:et AND EndTime>= :et) )\r\n\t\t\t", array(":p" => $_SESSION["USER"]["PersonID"], ":r" => $obj->RequestID, ":f" => DateModules::shamsi_to_miladi($obj->FromDate, "-"), ":st" => $obj->StartTime, ":et" => $obj->EndTime));
            //echo PdoDataAccess::GetLatestQueryString();die();
            if (count($dt) > 0) {
                echo Response::createObjectiveResponse(false, "در بازه زمانی وارد شده قبلا درخواستی ثبت شده است");
                die;
            }
        }
    }
    if (empty($obj->RequestID)) {
        $obj->PersonID = $_SESSION["USER"]["PersonID"];
        $obj->ReqDate = PDONOW;
        $result = $obj->Add();
    } else {
        $result = $obj->Edit();
    }
    //print_r(ExceptionHandler::PopAllExceptions());
    echo Response::createObjectiveResponse($result, "");
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:traffic.data.php

示例6: Add

 function Add($pdo = null)
 {
     $dt = self::Get(" AND ChequeNo=? AND ChequeDate=?", array($this->ChequeNo, DateModules::shamsi_to_miladi($this->ChequeDate)));
     if ($dt->rowCount() > 0) {
         ExceptionHandler::PushException("چک دیگری با این شماره و تاریخ قبلا ثبت شده است");
         return false;
     }
     return parent::Add($pdo);
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:9,代码来源:cheque.class.php

示例7: SaveContract

function SaveContract()
{
    $pdo = PdoDataAccess::getPdoObject();
    $pdo->beginTransaction();
    $CntObj = new CNT_contracts();
    PdoDataAccess::FillObjectByArray($CntObj, $_POST);
    if ($_POST["ContractID"] == "") {
        $CntObj->RegPersonID = $_SESSION['USER']["PersonID"];
        $CntObj->RegDate = PDONOW;
        $result = $CntObj->Add($pdo);
    } else {
        $result = $CntObj->Edit($pdo);
        /* removing values of contract items */
        CNT_ContractItems::RemoveAll($CntObj->ContractID, $pdo);
    }
    if (!$result) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        //echo PdoDataAccess::GetLatestQueryString();
        echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
        die;
    }
    /* Adding the values of Contract items */
    foreach ($_POST as $PostData => $val) {
        if (empty($val)) {
            continue;
        }
        if (!(substr($PostData, 0, 8) == "TplItem_")) {
            continue;
        }
        $items = explode('_', $PostData);
        $TemplateItemID = $items[1];
        $CntItemsObj = new CNT_ContractItems();
        $CntItemsObj->ContractID = $CntObj->ContractID;
        $CntItemsObj->TemplateItemID = $TemplateItemID;
        $TplItemObj = new CNT_TemplateItems($CntItemsObj->TemplateItemID);
        switch ($TplItemObj->ItemType) {
            case 'shdatefield':
                $CntItemsObj->ItemValue = DateModules::shamsi_to_miladi($val);
                break;
            default:
                $CntItemsObj->ItemValue = $val;
        }
        $result = $CntItemsObj->Add($pdo);
    }
    if (!$result) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        //echo PdoDataAccess::GetLatestQueryString();
        echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
        die;
    }
    $pdo->commit();
    echo Response::createObjectiveResponse(true, $CntObj->ContractID);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:56,代码来源:contract.data.php

示例8: SelectAllLetter

function SelectAllLetter()
{
    $where = "1=1";
    $param = array();
    foreach ($_POST as $field => $value) {
        if ($field == "excel" || empty($value) || strpos($field, "inputEl") !== false) {
            continue;
        }
        $prefix = "";
        switch ($field) {
            case "PersonID":
                $prefix = "l.";
                break;
            case "Customer":
                $prefix = "lc.";
                break;
            case "LetterID":
            case "LetterTitle":
                $prefix = "l.";
                break;
            case "FromSendDate":
            case "FromLetterDate":
            case "ToSendDate":
            case "ToLetterDate":
                $value = DateModules::shamsi_to_miladi($value, "-");
                break;
        }
        if ($field == "FromPersonID" || $field == "ToPersonID") {
            $where .= " AND s." . $field . " = :{$field}";
            $param[":{$field}"] = $value;
        } else {
            if (strpos($field, "From") === 0) {
                $where .= " AND " . $prefix . substr($field, 4) . " >= :{$field}";
                $param[":{$field}"] = $value;
            } else {
                if (strpos($field, "To") === 0) {
                    $where .= " AND " . $prefix . substr($field, 2) . " <= :{$field}";
                    $param[":{$field}"] = $value;
                } else {
                    $where .= " AND " . $prefix . $field . " like :{$field}";
                    $param[":{$field}"] = "%" . $value . "%";
                }
            }
        }
    }
    //echo $where;
    //print_r($param);
    $list = OFC_letters::FullSelect($where, $param, dataReader::makeOrder());
    print_r(ExceptionHandler::PopAllExceptions());
    //echo PdoDataAccess::GetLatestQueryString();
    $no = $list->rowCount();
    $list = PdoDataAccess::fetchAll($list, $_GET["start"], $_GET["limit"]);
    echo dataReader::getJsonData($list, $no, $_GET['callback']);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:55,代码来源:letter.data.php

示例9: LoanReport

function LoanReport()
{
    $BranchID = $_POST["BranchID"];
    $blockID = $_POST["BlockID"];
    $StartDate = $_POST["StartDate"];
    $EndDate = $_POST["EndDate"];
    $TafsiliID = $_POST["TafsiliID"];
    $where = "";
    $param = array($_SESSION["accounting"]["CycleID"], $blockID);
    if ($BranchID != "") {
        $where .= " AND BranchID =?";
        $param[] = $BranchID;
    }
    if ($TafsiliID != "") {
        $where .= " AND (TafsiliID=? or TafsiliID2=?)";
        $param[] = $TafsiliID;
        $param[] = $TafsiliID;
    }
    if ($StartDate != "") {
        $where .= " AND DocDate >=?";
        $param[] = DateModules::shamsi_to_miladi($StartDate, "-");
    }
    if ($EndDate != "") {
        $where .= " AND DocDate <=?";
        $param[] = DateModules::shamsi_to_miladi($EndDate, "-");
    }
    $dt = PdoDataAccess::runquery("\r\n\t\tselect cc.*,concat_ws(' - ',b1.BlockDesc,b2.BlockDesc,b3.BlockDesc) CostDesc,\r\n\t\t\t\tsum(CreditorAmount - DebtorAmount ) remain\r\n\t\tfrom ACC_DocItems di\r\n\t\t\tjoin ACC_docs using(DociD)\r\n\t\t\tjoin ACC_CostCodes cc using(CostID)\r\n\t\t\tjoin ACC_blocks b1 on(cc.level1=b1.BlockID)\r\n\t\t\tjoin ACC_blocks b2 on(cc.level2=b2.BlockID)\r\n\t\t\tleft join ACC_blocks b3 on(cc.level3=b3.BlockID)\r\n\t\t\t\r\n\t\twhere CycleID=? AND cc.level2 = ? " . $where . "\r\n\t\t\r\n\t\tgroup by di.CostID", $param);
    //print_r(ExceptionHandler::PopAllExceptions());
    function moneyRender($row, $val)
    {
        $BranchID = $_POST["BranchID"];
        $StartDate = $_POST["StartDate"];
        $EndDate = $_POST["EndDate"];
        $TafsiliID = $_POST["TafsiliID"];
        $params = "IncludeRaw=true&show=true";
        $params .= $BranchID != "" ? "&BranchID=" . $BranchID : "";
        $params .= $TafsiliID != "" ? "&TafsiliID=" . $TafsiliID : "";
        $params .= $row["level1"] != "" ? "&level1=" . $row["level1"] : "";
        $params .= $row["level2"] != "" ? "&level2=" . $row["level2"] : "";
        $params .= $row["level3"] != "" ? "&level3=" . $row["level3"] : "";
        $params .= $StartDate != "" ? "&fromDate=" . $StartDate : "";
        $params .= $EndDate != "" ? "&toDate=" . $EndDate : "";
        return "<a target=_blank href='../accounting/report/flow.php?" . $params . "'>" . number_format($val) . "</a>";
    }
    $rpg = new ReportGenerator();
    $rpg->mysql_resource = $dt;
    $col = $rpg->addColumn("کد حساب", "CostDesc");
    $col = $rpg->addColumn("مانده حساب", "remain", "moneyRender");
    $rpg->generateReport();
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:51,代码来源:LoanControl.php

示例10: DepositeProfit

function DepositeProfit()
{
    $Tafsilis = array();
    $keys = array_keys($_POST);
    foreach ($keys as $key) {
        if (strpos($key, "chk_") !== false) {
            $Tafsilis[] = substr($key, 4) * 1;
        }
    }
    if (count($Tafsilis) == 0) {
        echo Response::createObjectiveResponse(false, "هیچ ردیفی انتخاب نشده است");
        die;
    }
    $ToDate = DateModules::shamsi_to_miladi($_POST["ToDate"]);
    ComputeDepositeProfit($ToDate, $Tafsilis);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:17,代码来源:deposite.data.php

示例11: date_overlap

 private function date_overlap($PID)
 {
     $query = "\tselect count(*)\n\t\t\t\t\t\t\tfrom staff_include_history sih inner join staff s\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ton sih.staff_id = s.staff_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   inner join persons p\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ton s.personid = p.personid\n\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t\t((sih.start_date <=:fdate AND sih.end_date>=:fdate) OR (sih.start_date>=:fdate AND sih.start_date <=:tdate)) AND\n\t\t\t\t\t\t\t\t\t\t\t  p.personid =:pid  ";
     $whereParam = array();
     $whereParam[":fdate"] = str_replace('/', '-', DateModules::shamsi_to_miladi($this->start_date));
     $whereParam[":tdate"] = str_replace('/', '-', DateModules::shamsi_to_miladi($this->end_date));
     $whereParam[":pid"] = $PID;
     if ($this->include_history_id) {
         $query .= " and include_history_id != :ihid ";
         $whereParam[":ihid"] = $this->include_history_id;
     }
     $temp = PdoDataAccess::runquery($query, $whereParam);
     if ($temp[0][0] != 0) {
         parent::PushException(ER_DATE_RANGE_OVERLAP);
         return false;
     }
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:18,代码来源:staff_include_history.class.php

示例12: Edit

 function Edit()
 {
     $whereParams = array();
     $whereParams[":sid"] = $this->SalaryItemTypeID;
     $whereParams[":ptype"] = $this->PersonType;
     $whereParams[":FD"] = DateModules::shamsi_to_miladi($this->FromDate);
     $result = parent::update("SubtractItemInfo", $this, " SalaryItemTypeID=:sid AND PersonType=:ptype AND FromDate=:FD ", $whereParams);
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_update;
     $daObj->MainObjectID = $this->SalaryItemTypeID;
     $daObj->SubObjectID = $this->PersonType;
     $daObj->TableName = "SubtractItemInfo";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:18,代码来源:subtract_info.class.php

示例13: init

    private function init()
    {
        parent::runquery('TRUNCATE delete_payment_staff;');
        parent::runquery('DROP TABLE IF EXISTS temp_cancel_limit_staff;');
        parent::runquery('CREATE TABLE temp_cancel_limit_staff  AS
							SELECT DISTINCT s.staff_id , s.PersonID
							FROM staff s
								 INNER JOIN writs w
								 	   ON(s.last_writ_id = w.writ_id AND s.last_writ_ver = w.writ_ver AND s.staff_id = w.staff_id )
							     LEFT OUTER JOIN payment_items pit
							           ON(s.staff_id = pit.staff_id AND ' . $this->where_clause . ')
							WHERE ' . $this->staff_where . ' AND ' . '((pit.staff_id IS NOT NULL AND ' . $this->where_clause . ') OR ' . '(' . $this->writ_where . '))');
        parent::runquery('ALTER TABLE temp_cancel_limit_staff ADD INDEX(staff_id);');
        $this->end_date = DateModules::shamsi_to_miladi($this->year . '/' . $this->month . '/' . DateModules::DaysOfMonth($this->year, $this->month));
        $this->start_date = DateModules::shamsi_to_miladi($this->year . '/' . $this->month . '/01');
        $this->success_count = array();
        $this->unsuccess_count = 0;
    }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:18,代码来源:payment_cancel.class.php

示例14: MakeWhere

 function MakeWhere(&$where, &$whereParam)
 {
     foreach ($_POST as $key => $value) {
         if ($key == "excel" || $key == "OrderBy" || $key == "OrderByDirection" || $value === "" || strpos($key, "combobox") !== false) {
             continue;
         }
         $prefix = "";
         switch ($key) {
             case "CustomerWage":
                 $prefix = "p.";
                 break;
             case "fromRequestID":
             case "toRequestID":
                 $prefix = "r.";
                 break;
             case "fromReqDate":
             case "toReqDate":
             case "fromPartDate":
             case "toPartDate":
                 $value = DateModules::shamsi_to_miladi($value, "-");
                 break;
             case "fromReqAmount":
             case "toReqAmount":
             case "fromPartAmount":
             case "toPartAmount":
                 $value = preg_replace('/,/', "", $value);
                 break;
         }
         if (strpos($key, "from") === 0) {
             $where .= " AND " . $prefix . substr($key, 4) . " >= :{$key}";
         } else {
             if (strpos($key, "to") === 0) {
                 $where .= " AND " . $prefix . substr($key, 2) . " <= :{$key}";
             } else {
                 $where .= " AND " . $prefix . $key . " = :{$key}";
             }
         }
         $whereParam[":{$key}"] = $value;
     }
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:40,代码来源:total.php

示例15: selectBases

function selectBases()
{
    $where = " (1=1) ";
    $whereParam = array();
    $field = isset($_GET["fields"]) ? $_GET["fields"] : "";
    if (isset($_GET["query"]) && $_GET["query"] != "") {
        switch ($field) {
            case "title":
                $where .= " AND title LIKE :qry ";
                $whereParam[":qry"] = "%" . $_GET["query"] . "%";
                break;
            case "BaseValue":
                $where .= " AND BaseValue = :qry ";
                $whereParam[":qry"] = $_GET["query"];
                break;
            case "typeName":
                $where .= " AND i.Title like :qry ";
                $whereParam[":qry"] = "%" . $_GET["query"] . "%";
                break;
            case "fullName":
                $where .= " AND concat(pfname,' ',plname) like :qry ";
                $whereParam[":qry"] = "%" . $_GET["query"] . "%";
                break;
            case "ExecuteDate":
                $where .= " AND ExecuteDate = :qry ";
                $whereParam[":qry"] = DateModules::shamsi_to_miladi($_GET["query"]);
                break;
        }
    }
    $where .= dataReader::makeOrder();
    $temp = manage_bases::GetAll($where, $whereParam);
    $no = count($temp);
    $temp = array_slice($temp, $_GET["start"], $_GET["limit"]);
    echo dataReader::getJsonData($temp, $no, $_GET["callback"]);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:36,代码来源:bases.data.php


注:本文中的DateModules::shamsi_to_miladi方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。