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


PHP DateModules::miladi_to_shamsi方法代码示例

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


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

示例1: GetTreeNodes

function GetTreeNodes()
{
    $LetterID = $_REQUEST["LetterID"];
    $creator = PdoDataAccess::runquery("\r\n\t\tselect PersonID,\r\n\t\t\tconcat_ws(' ',fname, lname,CompanyName) text, \r\n\t\t\t'true' as leaf, 'true' expanded,'user' iconCls,\r\n\t\t\tl.RegDate\r\n\t\tfrom OFC_letters l join BSC_persons p using(PersonID) where LetterID=?", array($LetterID));
    $index = 1;
    $returnArray = array();
    $refArray = array();
    $creator[0]["id"] = $index++;
    $creator[0]["text"] .= " [ " . substr($creator[0]["RegDate"], 10, 6) . "    " . DateModules::miladi_to_shamsi($creator[0]["RegDate"]) . "\t]";
    $returnArray[] = $creator[0];
    $refArray[$creator[0]["PersonID"]] =& $returnArray[count($returnArray) - 1];
    $nodes = PdoDataAccess::runquery("\r\n\t\tselect FromPersonID ,ToPersonID, SendDate,\r\n\t\t\tconcat_ws(' ',fname, lname,CompanyName,' - ',InfoDesc) text, \r\n\t\t\tconcat('<b>توضیحات ارجاع : </b>' ,replace(SendComment,'\n','<br>')) qtip,\r\n\t\t\t'true' as leaf, 'true' expanded,'user' iconCls\r\n\t\tfrom OFC_send \r\n\t\t\tjoin BSC_persons p on(ToPersonID=PersonID) \r\n\t\t\tjoin BaseInfo bf on(bf.TypeID=12 AND SendType=InfoID)\r\n\t\twhere LetterID=?\r\n\t\torder by SendID", array($LetterID));
    foreach ($nodes as $row) {
        $row["id"] = $index++;
        $row["text"] .= " [ " . substr($row["SendDate"], 10, 6) . " &nbsp;&nbsp; " . DateModules::miladi_to_shamsi($row["SendDate"]) . " ]";
        $parentNode =& $refArray[$row["FromPersonID"]];
        if (!isset($parentNode["children"])) {
            $parentNode["children"] = array();
            $parentNode["leaf"] = "false";
        }
        $lastIndex = count($parentNode["children"]);
        $parentNode["children"][$lastIndex] = $row;
        $refArray[$row["ToPersonID"]] =& $parentNode["children"][$lastIndex];
    }
    $str = json_encode($returnArray);
    $str = str_replace('"children"', 'children', $str);
    $str = str_replace('"leaf"', 'leaf', $str);
    $str = str_replace('"iconCls"', 'iconCls', $str);
    $str = str_replace('"text"', 'text', $str);
    $str = str_replace('"id"', 'id', $str);
    $str = str_replace('"true"', 'true', $str);
    $str = str_replace('"false"', 'false', $str);
    echo $str;
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:35,代码来源:history.php

示例2: GetSavingLoanInfo

function GetSavingLoanInfo()
{
    if (isset($_SESSION["USER"]["portal"])) {
        $PersonID = $_SESSION["USER"]["PersonID"];
    } else {
        $PersonID = $_REQUEST["PersonID"];
    }
    //----------- check for all docs confirm --------------
    /*$dt = PdoDataAccess::runquery("select group_concat(distinct LocalNo) from ACC_docs 
    		join ACC_DocItems using(DocID) join ACC_tafsilis t using(TafsiliType,TafsiliID)
    		where TafsiliType=" . TAFTYPE_PERSONS . " 
    			AND ObjectID = ? AND CostID in(" . COSTID_saving . ")
    			AND DocType not in(" . DOCTYPE_STARTCYCLE . "," . DOCTYPE_ENDCYCLE . ")
    			AND DocStatus not in('CONFIRM','ARCHIVE')", array($PersonID));
    	if(count($dt) > 0 && $dt[0][0] != "")
    	{
    		$msg = "اسناد با شماره های [" . $dt[0][0] . "] تایید نشده اند.";
    		echo dataReader::getJsonData(array(), 0, $_GET["callback"], $msg);
    		die();
    	}*/
    //------------ get sum of savings ----------------
    $dt = PdoDataAccess::runquery("\n\t\tselect DocDate,sum(CreditorAmount-DebtorAmount) amount\n\t\tfrom ACC_DocItems di\n\t\t\tjoin ACC_docs d using(DocID)\n\t\t\tjoin ACC_tafsilis t using(TafsiliType,TafsiliID)\n\t\t\n\t\twhere TafsiliType=" . TAFTYPE_PERSONS . " \n\t\t\tAND ObjectID = ?\n\t\t\tAND CostID in(" . COSTID_saving . ")\n\t\t\tAND DocType not in(" . DOCTYPE_STARTCYCLE . "," . DOCTYPE_ENDCYCLE . ")\n\t\t\tAND BranchID=" . $_SESSION["accounting"]["BranchID"] . "\n\t\tgroup by DocDate\n\t\torder by DocDate", array($PersonID));
    if (count($dt) == 0) {
        $msg = "شخص مورد نظر فاقد حساب پس انداز می باشد";
        echo dataReader::getJsonData(array(), 0, $_GET["callback"], $msg);
        die;
    }
    //------------ get the Deposite amount -------------
    $totalAmount = 0;
    $totalDays = 0;
    for ($i = 1; $i < count($dt); $i++) {
        $days = DateModules::GDateMinusGDate($dt[$i]["DocDate"], $dt[$i - 1]["DocDate"]);
        $totalDays += $days;
        $totalAmount += $dt[$i - 1]["amount"] * $days;
    }
    $days = DateModules::GDateMinusGDate(DateModules::Now(), $dt[$i - 1]["DocDate"]);
    $totalDays += $days;
    $totalAmount += $dt[$i - 1]["amount"] * $days;
    $average = round($totalAmount / $totalDays);
    $returnArray = array("PersonID" => $PersonID, "FirstDate" => DateModules::miladi_to_shamsi($dt[0]["DocDate"]), "AverageAmount" => $average, "TotalMonths" => floor($totalDays / 30.5));
    echo dataReader::getJsonData($returnArray, 1, $_GET["callback"]);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:43,代码来源:saving.data.php

示例3: on

<?php

//---------------------------
// programmer:	Jafarkhani
// create Date:	95.08
//---------------------------
include "../header.inc.php";
require_once inc_component;
$IncomeChequeID = $_POST["IncomeChequeID"];
$query = "select h.*,\r\n\t\t\t\tconcat_ws(' ',fname, lname,CompanyName) fullname , \r\n\t\t\t\tt.TafsiliDesc StatusDesc\r\n\t\t\tfrom ACC_ChequeHistory h \r\n\t\t\t\tleft join ACC_tafsilis t on(t.TafsiliType=" . TAFTYPE_ChequeStatus . " AND StatusID=TafsiliID) \r\n\t\t\t\tjoin BSC_persons using(PersonID) \r\n\t\t\t\twhere h.IncomeChequeID=?\r\n\t\t\torder by RowID ";
$Logs = PdoDataAccess::runquery($query, array($IncomeChequeID));
$tbl_content = "";
if (count($Logs) == 0) {
    $tbl_content = "<tr><td>فرم مورد نظر فاقد گردش می باشد</td></tr>";
} else {
    for ($i = 0; $i < count($Logs); $i++) {
        $tbl_content .= "<tr " . ($i % 2 == 1 ? "style='background-color:#efefef'" : "") . ">\r\n\t\t\t<td width=250px>[" . ($i + 1) . "]" . ($i + 1 < 10 ? "&nbsp;" : "") . "&nbsp;\r\n\t\t\t\t<img align='top' src='/generalUI/ext4/resources/themes/icons/user_comment.gif'>&nbsp;\r\n\t\t\t\t" . $Logs[$i]["StatusDesc"] . "</td>\r\n\t\t\t<td  width=150px>" . $Logs[$i]["fullname"] . "</td>\r\n\t\t\t<td width=110px>" . substr($Logs[$i]["ATS"], 11) . " " . DateModules::miladi_to_shamsi($Logs[$i]["ATS"]) . "</td>\r\n\t\t</tr>";
    }
}
?>
<style>
.infotd td{border-bottom: solid 1px #e8e8e8;padding-right:4px; height: 21px;}
</style>
<div style="background-color:white;width: 100%; height: 100%">
	<table class="infotd" width="100%" bgcolor="white" cellpadding="0" cellspacing="0">
		<?php 
echo $tbl_content;
?>
	</table>
</div>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:30,代码来源:history.php

示例4: preg_split

			}	
			else echo "<td>&nbsp;</td>" ; 
                   
			if(!empty($res[$i]['contract_end_date']) && $res[$i]['contract_end_date'] !='0000-00-00' ){
				list($year,$month,$day) = preg_split('/[\/]/',DateModules::miladi_to_shamsi($res[$i]['contract_end_date']));		
				if ($year * $month == $res[$i]['pay_year'] * $res[$i]['pay_month']){
					
					$qry = " select  count(*) cn
								from writs
									where execute_date > '".$res[$i]['contract_end_date']."' and staff_id = ".$res[$i]['staff_id']."
							 order by execute_date
							 limit 1 " ; 
					$NWRes = PdoDataAccess::runquery($qry) ; 
					
						if($NWRes[0]['cn'] == 0 && $res[$i]['salary_pay_proc'] == 1 )									
							echo "<td> ".DateModules::miladi_to_shamsi($res[$i]['contract_end_date'])." </td>" ; 
				}
				else echo "<td>&nbsp;</td>" ; 
			}
			else echo "<td>&nbsp;</td>" ; 
			
			echo "<td>".$res[$i]['work_sheet']."</td>
				  <td>".number_format(round($res[$i]['daily_fee']), 0, '.', ',')."</td> 
				  <td>".number_format(round($res[$i]['monthly_fee']), 0, '.', ',')."</td>
				  <td>".number_format(round($res[$i]['monthly_premium']), 0, '.', ',')."</td>
				  <td>".number_format(round($res[$i]['monthly_insure_include']), 0, '.', ',')."</td>
				  <td>".number_format(round($res[$i]['pay']), 0, '.', ',')."</td>
				  <td>".number_format(round($res[$i]['worker_insure_include']), 0, '.', ',')."</td>
				  <td>".number_format(round($res[$i]['other_gets']), 0, '.', ',')."</td>
				  <td>".number_format(round($res[$i]['pure_pay']), 0, '.', ',')."</td>
				  <td>".$res[$i]['account_no']."</td>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:insure_diskette.php

示例5: dateRender

 function dateRender($row, $val)
 {
     return DateModules::miladi_to_shamsi($val);
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:4,代码来源:flow.php

示例6: on

<?php

//---------------------------
// programmer:	Mahdipour
// create Date:	91.04
//---------------------------
require_once '../header.inc.php';
require_once inc_dataReader;
require_once inc_manage_unit;
$whereDate = "";
$whereW = "";
if (!empty($_REQUEST['FDATE']) && $_REQUEST['FDATE'] != '0000-00-00') {
    $whereDate = " AND  tbl2.execute_date>='" . $_REQUEST['FDATE'] . "'";
    $whereW = " AND w.execute_date >= '" . $_REQUEST['FDATE'] . "'  ";
}
if (!empty($_REQUEST['TDATE']) && $_REQUEST['TDATE'] != '0000-00-00') {
    $whereDate .= " AND tbl2.execute_date<='" . $_REQUEST['TDATE'] . "'";
    $whereW .= " AND w.execute_date <= '" . $_REQUEST['TDATE'] . "'";
}
$qry = "  select tbl1.staff_id , tbl0.pfname , tbl0.plname , tbl0.national_code ,  tbl2.ouid , bi1.Title educatin_title , bi2.Title emp_state , tbl0.birth_date , \r\n                 bi3.Title marital_title ,  tbl2.children_count , sf.ptitle field_title  , tbl1.work_start_date , wt.title writ_type_title , wst.title sub_writ_title ,\r\n                 tbl2.writ_id , tbl2.writ_ver , bi4.Title emp_mode_title \r\n                 \r\n                from persons as tbl0\r\n                                        left join staff as tbl1 on(tbl0.PersonID=tbl1.PersonID )\r\n                                        left join (SELECT staff_id,\r\n                                                                    SUBSTRING_INDEX(SUBSTRING(max_execute_date,11),'.',1) writ_id,\r\n                                                                    SUBSTRING_INDEX(max_execute_date,'.',-1) writ_ver\r\n                                                                FROM (SELECT w.staff_id,\r\n                                                                             max( CONCAT(w.execute_date,w.writ_id,'.',w.writ_ver) ) max_execute_date\r\n                                                                FROM writs w\r\n                                                                        INNER JOIN staff ls\r\n                                                                                ON(w.staff_id = ls.staff_id)\r\n                                                                WHERE \r\n                                                                        w.history_only = 0 and w.person_type = " . $_REQUEST['pt'] . " " . $whereW . " \r\n                                                                GROUP BY w.staff_id ) med) as mtbl2 on(tbl1.staff_id=mtbl2.staff_id)\r\n\r\n                                                                inner join writs as tbl2 on mtbl2.staff_id = tbl2.staff_id and\r\n                                                                                    mtbl2.writ_id = tbl2.writ_id and mtbl2.writ_ver = tbl2.writ_ver \r\n                                                                inner join Basic_Info bi1 on bi1.InfoID = tbl2.education_level  and bi1.typeid = 6 \r\n                                                                inner join Basic_Info bi2 on bi2.InfoID = tbl2.emp_state  and bi2.typeid = 3 \r\n                                                                inner join Basic_Info bi3 on bi3.InfoID = tbl2.marital_status  and bi3.typeid = 15 \r\n                                                                inner join study_fields sf on sf.sfid =   tbl2.sfid  \r\n                                                                inner join writ_types wt on wt.writ_type_id = tbl2.writ_type_id and  wt.person_type = tbl2.person_type\r\n                                                                inner join writ_subtypes wst on  wst.person_type  = tbl2.person_type and  \r\n                                                                                                 wst.writ_type_id  = tbl2.writ_type_id and \r\n                                                                                                 wst.writ_subtype_id  = tbl2.writ_subtype_id \r\n                                                                inner join Basic_Info bi4 on bi4.InfoID = tbl2.emp_mode  and bi4.typeid = 4\r\n                                                                                                 \r\n\r\n\r\n                                       \r\n\r\n        where 1=1   AND tbl2.emp_mode = " . $_REQUEST['emp_mode'] . " \r\n                    AND tbl1.person_type = " . $_REQUEST['pt'] . " " . $whereDate . "\r\n      \r\n       \r\n    \r\n";
$data = PdoDataAccess::runquery($qry);
$record = "";
for ($i = 0; $i < count($data); $i++) {
    $record .= "<tr><td>" . $i . "</td><td>" . $data[$i]['staff_id'] . "</td><td>" . $data[$i]['pfname'] . "</td><td>" . $data[$i]['plname'] . "</td>\r\n                        <td>" . $data[$i]['national_code'] . "</td><td>" . manage_units::get_full_title($data[$i]['ouid']) . "</td><td>" . $data[$i]['educatin_title'] . "</td><td>" . $data[$i]['emp_state'] . "</td>\r\n                        <td>" . DateModules::miladi_to_shamsi($data[$i]['birth_date']) . "</td><td>" . $data[$i]['marital_title'] . "</td><td>" . $data[$i]['children_count'] . "</td><td>" . $data[$i]['field_title'] . "</td>\r\n                        <td>" . DateModules::miladi_to_shamsi($data[$i]['work_start_date']) . "</td><td>" . $data[$i]['writ_type_title'] . "</td><td>" . $data[$i]['sub_writ_title'] . "</td><td>" . $data[$i]['writ_id'] . "</td>\r\n                        <td>" . $data[$i]['writ_ver'] . "</td><td>" . $data[$i]['emp_mode_title'] . "</td>\r\n                    </tr>";
}
$tags = array('<!--record-->' => $record, '<!--now-->' => DateModules::shNow());
$content = file_get_contents("FullInformation.htm");
$content = str_replace(array_keys($tags), array_values($tags), $content);
echo $content;
开发者ID:jafarkhani,项目名称:rtfund,代码行数:29,代码来源:FullInformation.php

示例7: compute_salary_item5_33

	private function compute_salary_item5_33($writ_rec) {

		//param1 : مبلغ فوق العاده تعديل سال قبل
		//param2 : ضريب

		$this_writ_year = substr(DateModules::miladi_to_shamsi($writ_rec['execute_date']), 0, 4);

		$one_year_ago = $this_writ_year - 1;
		$one_year_ago_last_day = $one_year_ago . "/12/29";
		$Gone_year_ago_last_day = DateModules::shamsi_to_miladi($one_year_ago_last_day);

		//آخرين حکم قبل از سال شخص را استخراج مي کند.
		$prior_writObj = manage_writ::get_last_writ_by_date($writ_rec['staff_id'], $Gone_year_ago_last_day);

		//مقدار قلم فوق العاده تعديل آخرين حکم سال قبل را استخراج مي کند.
		//اين قلم بر اساس بخشنامه افزايش حقوق سال 87 اضافه شد.
		$this->param1 = manage_writ_item::get_writSalaryItem_value($prior_writObj->writ_id, $prior_writObj->writ_ver, $prior_writObj->staff_id, SIT5_STAFF_EXTRA_ADJUST);
		$this->param2 = 1.5;

		$value = $this->param1 * $this->param2;

		if (!($value > 0)) {
			return false;
		}

		return $value;
	}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:27,代码来源:writ_item.class.php

示例8: substr

$tbl_content = "";
if (count($Logs) == 0) {
    $tbl_content = "<tr><td>فرم مورد نظر فاقد گردش می باشد</td></tr>";
} else {
    for ($i = 0; $i < count($Logs); $i++) {
        $backgroundColor = $i % 2 == 1 ? "style='background-color:#efefef'" : "";
        $backgroundColor = $Logs[$i]["ActionType"] == "REJECT" ? "style='background-color:#ffccd1'" : $backgroundColor;
        $StepDesc = $Logs[$i]["StepDesc"];
        if ($Logs[$i]["ActionType"] == "CONFIRM") {
            $StepDesc = "تایید " . $StepDesc;
        } else {
            if ($Logs[$i]["ActionType"] == "REJECT") {
                $StepDesc = "رد " . $StepDesc;
            }
        }
        $tbl_content .= "<tr " . $backgroundColor . ">\r\n\t\t\t<td width=250px>[" . ($i + 1) . "]" . ($i + 1 < 10 ? "&nbsp;" : "") . "&nbsp;\r\n\t\t\t\t<img align='top' src='/generalUI/ext4/resources/themes/icons/user_comment.gif'>&nbsp;" . $StepDesc . " </td>\r\n\t\t\t<td  width=150px>" . $Logs[$i]["fullname"] . "</td>\r\n\t\t\t<td width=110px>" . substr($Logs[$i]["ActionDate"], 11) . " " . DateModules::miladi_to_shamsi($Logs[$i]["ActionDate"]) . "</td>\r\n\t\t\t<td><div style='cursor:pointer' class='qtip-target' data-qtip='" . $Logs[$i]["ActionComment"] . "'>" . String::ellipsis($Logs[$i]["ActionComment"], 48) . "</div></td>\r\n\t\t</tr>";
    }
    //------------------------ get next one ------------------------------------
    if ($Logs[$i - 1]["StepRowID"] == "" || $Logs[$i - 1]["IsOuter"] == "NO") {
        $StepID = ($Logs[$i - 1]["StepID"] == "" ? 0 : $Logs[$i - 1]["StepID"]) + 1;
        $query = "select StepDesc,po.PostName,\r\n\t\t\t\t\tconcat_ws(' ',fname, lname,CompanyName) fullname\r\n\t\t\t\tfrom WFM_FlowSteps fs\r\n\t\t\t\tleft join BSC_posts po using(PostID)\r\n\t\t\t\tleft join BSC_persons p on(if(fs.PersonID>0,fs.PersonID=p.PersonID,po.PostID=p.PostID))\r\n\t\t\t\twhere fs.IsActive='YES' AND fs.FlowID=? AND fs.StepID=?";
        $nextOne = PdoDataAccess::runquery($query, array($FlowID, $StepID));
        if (count($nextOne) > 0) {
            $str = "";
            foreach ($nextOne as $row) {
                $str .= $row["fullname"] . ($row["PostName"] != "" ? " [ پست : " . $row["PostName"] . " ]" : "") . " و ";
            }
            $str = substr($str, 0, strlen($str) - 3);
            $tbl_content .= "<tr style='background-color:#A9E8E8'>\r\n\t\t\t\t\t<td colspan=4 align=center>در حال حاضر فرم در مرحله <b>" . $nextOne[0]["StepDesc"] . "</b>  در کارتابل <b>" . $str . "</b> می باشد.</td>\r\n\t\t\t\t</tr>";
        } else {
            $tbl_content .= "<tr style='background-color:#A9E8E8'>\r\n\t\t\t\t<td colspan=4 align=center><b>گردش فرم پایان یافته است.</b></td>\r\n\t\t\t\t<tr>";
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:history.php

示例9: IsEditable

 static function IsEditable($row_no)
 {
     $dt = PdoDataAccess::runquery("select * from person_subtracts join person_subtract_flows using(subtract_id) where row_no=?", array($row_no));
     if ($dt[0]["IsFinished"] == "1") {
         return false;
     }
     $subtract_id = $dt[0]["subtract_id"];
     $flow_date = DateModules::miladi_to_shamsi($dt[0]["flow_date"]);
     $year = DateModules::GetYear($flow_date);
     $month = DateModules::GetMonth($flow_date);
     $dt = PdoDataAccess::runquery("select * from payment_items join payments using(payment_type,staff_id,pay_year,pay_month)\n\t\t\t\twhere param1 in('LOAN','FIX_FRACTION','FIX_BENEFIT')\n\t\t\t\t\tAND param2 = {$subtract_id} \n\t\t\t\t\tAND pay_year>={$year} \n\t\t\t\t\tAND if(pay_year={$year}, pay_month>={$month}, 1=1) \n\t\t\t\t\tAND\tif(pay_year={$year} AND pay_month={$month}, calc_date > '" . $dt[0]["flow_date"] . "', 1=1)");
     if (count($dt) > 0) {
         return false;
     }
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:16,代码来源:subtracts.class.php

示例10: join

                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
if (!empty($_GET['item36']) && $_GET['item36'] == 1) {
    $query = " select  s.staff_id , p.pfname , p.plname , bi1.Title emp_state_title,bi2.Title emp_mode_title , bi3.Title person_type_title ,w.ouid ,w.emp_mode\r\n            \r\n                            from staff s inner join (SELECT    staff_id,\r\n                                                    SUBSTRING_INDEX(SUBSTRING(max_execute_date,11),'.',1) writ_id,\r\n                                                    SUBSTRING_INDEX(max_execute_date,'.',-1) writ_ver\r\n                                                                    FROM (SELECT w.staff_id,\r\n                                                                                max( CONCAT(w.execute_date,w.writ_id,'.',w.writ_ver) ) max_execute_date\r\n                                                                            FROM writs w\r\n                                                                                    INNER JOIN staff ls\r\n                                                                                            ON(w.staff_id = ls.staff_id)\r\n                                                                            WHERE w.history_only = 0 " . $whereW . "\r\n                                                                            GROUP BY w.staff_id)tbl2) tbl1\r\n                                                                on s.staff_id = tbl1.staff_id   \r\n                                         inner join writs w\r\n                                                    on  tbl1.writ_id = w.writ_id and\r\n                                                        tbl1.writ_ver = w.writ_ver and\r\n                                                        tbl1.staff_id = w.staff_id      \r\n\r\n                                        left join payments pa \r\n                                                    on pa.staff_id = s.staff_id and pa.payment_type = 1 and pa.pay_year = " . substr(DateModules::miladi_to_shamsi($salaryDate), 0, 4) . " and\r\n                                                                                                          pa.pay_month = " . substr(DateModules::miladi_to_shamsi($salaryDate), 5, 2) . "\r\n                                        \r\n                                        inner join persons p on p.personid = s.personid\r\n                                        inner join Basic_Info bi1 on bi1.typeid = 3 and w.emp_state = bi1.infoid\r\n                                        inner join Basic_Info bi2 on bi2.typeid = 4 and w.emp_mode = bi2.infoid\r\n                                        inner join Basic_Info bi3 on bi3.typeid = 16 and s.person_type = bi3.infoid\r\n\r\n                    where s.person_type in (2,3,5) and pa.staff_id is null " . $whereW . "\r\n                   \r\n                    ";
    $data = PdoDataAccess::runquery($query);
}
?>
<html dir='rtl'>
	<head>
		<style>
		.reportGenerator {border-collapse: collapse;border: 1px solid black;font-family: tahoma;font-size: 8pt;
			text-align: center;width: 70%;padding: 2px;}
		.reportGenerator .header {color: white;font-weight: bold;background-color:#3F5F96}
		.reportGenerator td {border: 1px solid #555555;height: 20px;}
		</style>
		<title>تعداد کل کارکنان رسمی قطعی شاغل </title>
		<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
		<link rel=stylesheet href="/HumanResources/css/writ.css">
	</head>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:detailReport.php

示例11: corrective_writ_detail

function corrective_writ_detail($writ_id, $writ_ver, $staff_id, $execute_date)
{
    ob_start();
    // get corrected writs by a specfied writ
    $query = "SELECT w.* ,  wst.* , wsi.param3 \n\n        FROM   writs w\n        \t   LEFT OUTER JOIN writ_subtypes wst\n               \t\tON ((w.writ_type_id = wst.writ_type_id) AND\n                    \t(w.writ_subtype_id = wst.writ_subtype_id) AND\n                        (w.person_type = wst.person_type))\n\t\t\t   LEFT JOIN writ_salary_items wsi \n\t\t\t\t\tON w.staff_id = wsi.staff_id  AND w.writ_id = wsi.writ_id AND w.writ_ver = wsi.writ_ver AND wsi.salary_item_type_id = 10364 \n\t\t\t\t\t\n        WHERE  w.corrective_writ_id = {$writ_id}   AND\n               w.corrective_writ_ver = {$writ_ver} AND\n\t\t\t   w.staff_id = {$staff_id} AND\n               w.writ_ver > 1\n        ORDER BY execute_date";
    $corrected_writs = PdoDataAccess::runquery($query);
    $writ_count = count($corrected_writs);
    if ($writ_count == 0) {
        return;
    }
    $persent = 75 / $writ_count;
    echo "<tr>\n\t\t\t<td style='border-top:1px solid black' colspan=2>نوع حکم</td>";
    $width = round(400 / count($corrected_writs));
    for ($i = 0; $i < count($corrected_writs); $i++) {
        echo "<td style='border-top:1px solid black;width:" . $width . "px'>" . $corrected_writs[$i]["print_title"] . "</td>";
    }
    echo "</tr>";
    //----------- get all writ salary items of specified person_type -----------
    $minExecuteDate = $corrected_writs[0]["execute_date"];
    $writs = "";
    $prevwrit = "";
    for ($i = 0; $i < count($corrected_writs); $i++) {
        $writs .= "'" . $corrected_writs[$i]["staff_id"] . "-" . $corrected_writs[$i]["writ_id"] . "-" . $corrected_writs[$i]["writ_ver"] . "',";
        $prevwrit .= "'" . $corrected_writs[$i]["staff_id"] . "-" . $corrected_writs[$i]["writ_id"] . "-" . ($corrected_writs[$i]["writ_ver"] - 1) . "',";
        /*$minExecuteDate = DateModules::CompareDate($corrected_writs[$i]["execute_date"], $minExecuteDate) < 0 ?
        		$corrected_writs[$i]["execute_date"] : $minExecuteDate;*/
    }
    /*$query = "SELECT *
         FROM   salary_item_types sit
         WHERE  person_type = " . $corrected_writs[0]["person_type"] . " AND
         	   compute_place = " . SALARY_ITEM_COMPUTE_PLACE_WRIT . " AND
         	   validity_start_date <= '" . $execute_date . "' AND
         	   (validity_end_date IS NULL OR validity_end_date = '0000-00-00' OR
    		(validity_end_date >= '" . $minExecuteDate . "' AND validity_end_date >= '" . $execute_date . "'))
         ORDER BY print_order";*/
    $writs = substr($writs, 0, strlen($writs) - 1);
    $prevwrit = substr($prevwrit, 0, strlen($prevwrit) - 1);
    $query = "select distinct sit.* from writ_salary_items si join salary_item_types sit using(salary_item_type_id)\n\t\t\t\twhere concat(si.staff_id,'-',si.writ_id,'-',si.writ_ver) in (" . $writs . "," . $prevwrit . ")\n\t\t\t\t\t\t\t\tAND compute_place = " . SALARY_ITEM_COMPUTE_PLACE_WRIT . "\n\t\t\t\t\t\t\t\tAND person_type in (" . $corrected_writs[0]["person_type"] . " , 101 ) ORDER BY print_order";
    $salary_item_types = PdoDataAccess::runquery($query);
    //--------------------------------------------------------------------------
    $current_execute_date = $prior_execute_date = $current_field = $prior_field = $field_title = "";
    $current_writ_items = $prior_writ_items = array();
    $current_item_sum = $prior_item_sum = "";
    $field_title2 = "";
    for ($i = 0; $i < count($corrected_writs); $i++) {
        $current_writ = $corrected_writs[$i];
        if ($current_writ['writ_ver'] > 1) {
            $prior_writ = new manage_writ($current_writ["writ_id"], $current_writ["writ_ver"] - 1, $current_writ["staff_id"]);
            if ($current_writ["person_type"] != 1) {
                $qry = " select param3 from writ_salary_items\n\t\t\t\t\t\t\t\twhere writ_id= " . $current_writ["writ_id"] . " and \n\t\t\t\t\t\t\t\t\t\twrit_ver = " . ($current_writ["writ_ver"] - 1) . " and staff_id = " . $current_writ["staff_id"] . " and salary_item_type_id = 10364 ";
                $ResPrev = PdoDataAccess::runquery($qry);
                if (empty($ResPrev[0]['param3'])) {
                    $ResPrev[0]['param3'] = ' ';
                }
            }
            $current_execute_date .= "<td>" . DateModules::miladi_to_shamsi($current_writ["execute_date"]) . "</td>";
            $prior_execute_date .= "<td>" . DateModules::miladi_to_shamsi($prior_writ->execute_date) . "</td>";
            if ($current_writ["person_type"] == HR_EMPLOYEE || $current_writ["person_type"] == HR_PROFESSOR) {
                if ($current_writ["person_type"] == HR_EMPLOYEE && DateModules::CompareDate($execute_date, "2009-03-21") >= 0 && (DateModules::CompareDate($execute_date, "2013-02-19") < 0 || DateModules::CompareDate($execute_date, "2013-03-20") > 0 && DateModules::CompareDate($execute_date, "2014-03-20") < 0)) {
                    $field_title = 'طبقه';
                    $current_field .= "<td>" . ($current_writ["cur_group"] - 4) . "</td>";
                    $prior_field .= "<td>" . ($prior_writ->cur_group - 4) . "</td>";
                } else {
                    if ($current_writ["person_type"] == HR_EMPLOYEE && DateModules::CompareDate($execute_date, "2009-03-21") < 0) {
                        $field_title = 'گروه';
                        $current_field .= "<td>" . $current_writ["cur_group"] . "</td>";
                        $prior_field .= "<td>" . $prior_writ->cur_group . "</td>";
                    } else {
                        $field_title2 = "";
                        $field_title = 'پایه';
                        $current_writ["base"] = DateModules::CompareDate($current_writ["execute_date"], "2013-02-19") >= 0 && $current_writ["person_type"] != 1 ? substr($current_writ["param3"], 0, 2) : $current_writ["base"];
                        $prior_writ_base = DateModules::CompareDate($current_writ["execute_date"], "2013-02-19") >= 0 && $current_writ["person_type"] != 1 ? substr($ResPrev[0]['param3'], 0, 2) : $prior_writ->base;
                        $cf = DateModules::CompareDate($current_writ["execute_date"], "2013-02-19") < 0 && $current_writ["person_type"] == HR_EMPLOYEE ? "-" : $current_writ["base"];
                        $pf = DateModules::CompareDate($prior_writ->execute_date, "2013-02-19") < 0 && $current_writ["person_type"] == HR_EMPLOYEE ? "-" : $prior_writ_base;
                        $current_field .= "<td>" . $cf . "</td>";
                        $prior_field .= "<td>" . $pf . "</td>";
                        if (DateModules::CompareDate($current_writ["execute_date"], "2013-02-19") < 0 || DateModules::CompareDate($execute_date, "2013-03-20") > 0 && DateModules::CompareDate($execute_date, "2014-03-20") < 0) {
                            $field_title2 = 'طبقه';
                            $cf2 = DateModules::CompareDate($current_writ["execute_date"], "2013-02-19") < 0 || DateModules::CompareDate($execute_date, "2013-03-20") > 0 && DateModules::CompareDate($execute_date, "2014-03-20") < 0 ? $current_writ["cur_group"] - 4 : "-";
                            $pf2 = DateModules::CompareDate($prior_writ->execute_date, "2013-02-19") < 0 || DateModules::CompareDate($execute_date, "2013-03-20") > 0 && DateModules::CompareDate($execute_date, "2014-03-20") < 0 ? $prior_writ->cur_group - 4 : "-";
                            $current_field2 .= "<td>" . $cf2 . "</td>";
                            $prior_field2 .= "<td>" . $pf2 . "</td>";
                        } elseif ((DateModules::CompareDate($current_writ["execute_date"], "2013-02-19") >= 0 || DateModules::CompareDate($execute_date, "2013-03-21") < 0 || DateModules::CompareDate($execute_date, "2014-03-20") >= 0) && $field_title2 != "") {
                            $current_field2 .= "<td>" . "-" . "</td>";
                            $prior_field2 .= "<td>" . "-" . "</td>";
                        }
                    }
                }
            } else {
                $field_title = "";
                $field_title2 = "";
            }
            $sum1 = $sum2 = 0;
            $item46 = $item10374 = 0;
            $item10329 = $item10370 = $item51 = 0;
            $item10330 = $item10371 = $item50 = 0;
            foreach ($salary_item_types as $element) {
                if (in_array("46", $element)) {
                    $item46 = 1;
                }
//.........这里部分代码省略.........
开发者ID:jafarkhani,项目名称:rtfund,代码行数:101,代码来源:print_writ.php

示例12:

									order by execute_date limit 1 " ;
				$resExe = PdoDataAccess::runquery($qry) ; 
				
				$date = $resExe[0]['execute_date'] ; 
				$result [$key]['staff_id']		 	 =$rec['staff_id'];
				$result [$key]['writ_id']			 =$rec['writ_id'];
				$result [$key]['emp_mode']			 =$rec['emp_mode'];
				$result [$key]['pfname']			 =$rec['pfname'];
				$result [$key]['plname']			 =$rec['plname'];
				$result [$key]['unit_title']		 =$rec['unit_title'];
				$result [$key]['sub_title']			 =$rec['sub_title'];
				$result [$key]['ptitle']			 =$rec['ptitle'];
				$result [$key]['pre_sience_level']   =$tp;
				$result [$key]['ouid']			     =$rec['ouid'];
				$result [$key]['science_title']		 =$rec['science_level_title'];
				$result [$key]['execute_date']		 =DateModules::miladi_to_shamsi($date);
				$key++;
			}
						
		}


		
?>

<html dir='rtl'>
	<head>
		<style>
		.reportGenerator {border-collapse: collapse;border: 1px solid black;font-family: tahoma;font-size: 8pt;
						  text-align: center;width: 50%;padding: 2px;}
		.reportGenerator .header {color: white;font-weight: bold;background-color:#3F5F96}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:person_gradation_report.php

示例13: ShowReport


//.........这里部分代码省略.........
		"lastAbsence" => 0,
		"extra" => 0,
		"Off" => 0,
		"mission" => 0,
		"DailyOff_1" => 0,
		"DailyOff_2" => 0,
		"DailyOff_3" => 0,
		"DailyMission" => 0,
		"DailyAbsence" => 0
	);
	
	for($i=0; $i < count($returnArr); $i++)
	{
		if(!$returnArr[$i]["holiday"])
		{
			//........... Daily off and mission ...................
			$requests = PdoDataAccess::runquery("
				select t.*, InfoDesc OffTypeDesc from ATN_requests t
					left join BaseInfo on(TypeID=20 AND InfoID=OffType)
				where ReqStatus=2 AND PersonID=:p AND FromDate <= :td 
					AND if(ToDate is not null, ToDate >= :td, 1=1)
				order by ToDate desc,StartTime asc
			", array(
				":p" => $PersonID,
				":td" => $returnArr[$i]["TrafficDate"]
			));

			if(count($requests) > 0)
			{
				if($requests[0]["ReqType"] == "DayOFF")
				{
					$returnStr .= 
						"<td>" . DateModules::$JWeekDays[ DateModules::GetWeekDay($returnArr[$i]["TrafficDate"], "N") ] . "</td>
						<td>" . DateModules::miladi_to_shamsi($returnArr[$i]["TrafficDate"]) . "</td>
						<td colspan=8> مرخصی " . $requests[0]["OffTypeDesc"] . "<td></tr>";
					$SUM["DailyOff_" . $requests[0]["OffType"] ]++;

					$currentDay = $returnArr[$i]["TrafficDate"];
					while($i < count($returnArr) && $currentDay == $returnArr[$i]["TrafficDate"])
						$i++;
					$i--;
					continue;
				}
				if($requests[0]["ReqType"] == "DayMISSION")
				{
					$returnStr .= 
						"<td>" . DateModules::$JWeekDays[ DateModules::GetWeekDay($returnArr[$i]["TrafficDate"], "N") ] . "</td>
						<td>" . DateModules::miladi_to_shamsi($returnArr[$i]["TrafficDate"]) . "</td>
						<td colspan=8> ماموریت " . $requests[0]["MissionSubject"] . "<td></tr>";
					$SUM["DailyMission"]++;

					$currentDay = $returnArr[$i]["TrafficDate"];
					while($i < count($returnArr) && $currentDay == $returnArr[$i]["TrafficDate"])
						$i++;
					$i--;
					continue;
				}
			}
		}
		//....................................................
		if( DateModules::GetWeekDay($returnArr[$i]["TrafficDate"], "l") == "Thursday")
		{
			$returnArr[$i]["FromTime"] = $returnArr[$i]["ExceptFromTime"];
			$returnArr[$i]["ToTime"] = $returnArr[$i]["ExceptToTime"];
		}
		//....................................................
开发者ID:jafarkhani,项目名称:rtfund,代码行数:67,代码来源:TraceTraffic.php

示例14: list

     $FirstRec .= "," . "محمد";
     $FirstRec .= "," . "کافی";
     $FirstRec .= "," . "رئیس دانشگاه";
     $FirstRec .= "," . "0932891608";
     $FirstRec .= "," . "ابوالفضل";
     $FirstRec .= "," . "باباخانی";
     $FirstRec .= "," . "معاون اداری مالی" . "\r\n";
     $Sitem_4 += $item_20 + $item_28;
     $Sitem_5 += $dataTable[$i]["item_32"];
     $Sitem_6 += $dataTable[$i]["item_33"];
     $Sitem_9 += $dataTable[$i]["item_34"];
     $record .= $dataTable[$i]["item_1"] . "," . $dataTable[$i]["item_2"] . "," . $dataTable[$i]["item_3"] . "," . $dataTable[$i]["item_4"] . "," . $dataTable[$i]["item_5"] . "," . $dataTable[$i]["item_6"] . "," . $dataTable[$i]["item_7"] . "," . $dataTable[$i]["item_8"] . "," . $dataTable[$i]["item_9"] . "," . $dataTable[$i]["item_10"] . "," . $item_11 . "," . $dataTable[$i]["item_12"] . "," . $item_13 . "," . $item_14 . ", ," . $item_16 . "," . $dataTable[$i]["item_17"] . "," . $dataTable[$i]["item_18"] . ",0," . $item_20 . ",0," . $item_22 . ",0,0,0,0,0," . $item_28 . "," . $item_29 . "," . $item_30 . "," . $item_31 . "," . $item_32 . "," . $dataTable[$i]["item_33"] . ",0" . "\r\n";
 }
 PdoDataAccess::runquery("SET NAMES 'utf8'");
 if (isset($_REQUEST["summary"])) {
     list($eyear, $emonth, $eday) = preg_split('/[\\/]/', DateModules::miladi_to_shamsi($month_end));
     list($cyear, $cmonth, $cday) = preg_split('/[\\/]/', $_POST["check_date"]);
     $SRec = "101902103472" . "," . $_POST["pay_year"] . "," . str_pad($_POST["pay_month"], 2, "0", STR_PAD_LEFT) . "," . $Sitem_4 . "," . $Sitem_5 . "," . $Sitem_6 . ",0,0," . $Sitem_9 . ",0,0,0,0,0,0," . $eyear . "" . $emonth . "" . $eday . "," . count($dataTable) . ",0,2," . $_POST["check-serial"] . "," . $cyear . "" . $cmonth . "" . $cday . "," . $_POST["BankCode"] . "," . $_POST["BankTitle"] . "," . $_POST["account_no"] . "," . $_POST["PayVal"];
     $file = "WK" . $_POST["pay_year"] . str_pad($_POST["pay_month"], 2, "0", STR_PAD_LEFT) . ".TXT";
     //$filename = "/mystorage/attachments/sadaf/HRProcess/".$file ;
     $filename = "../../../HRProcess/" . $file;
     $fp = fopen($filename, 'w');
     fwrite($fp, $SRec);
     fclose($fp);
     header('Content-disposition: filename="' . $file . '"');
     header('Content-type: application/file');
     header('Pragma: no-cache');
     header('Expires: 0');
     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
     header('Pragma: public');
     echo file_get_contents("../../../HRProcess/" . $file);
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:tax_salary_report.php

示例15: array

$col->align = "center";
$dg->emptyTextOfHiddenColumns = true;
$dg->EnablePaging = false;
$dg->height = 150;
$dg->width = 790;
$dg->EnablePaging = false;
$dg->EnableSearch = false;
$dg->autoExpandColumn = "fullname";
$grid = $dg->makeGrid_returnObjects();
//.....................................................
$expertStr = "";
$dt = PLN_experts::Get(" AND e.PersonID=? AND StatusDesc='RAW'", array($_SESSION["USER"]["PersonID"]));
if ($dt->rowCount() > 0) {
    $dt = $dt->fetchAll();
    foreach ($dt as $row) {
        $expertStr .= "<div class=arrow_left style=width:16px;height:16px;float:right></div>" . "طرح شماره " . "<a href=javascript:void(1); onclick='framework.OpenPage\r\n\t\t\t\t(\"../plan/plan/PlanInfo.php\", \"جداول اطلاعاتی طرح\",{PlanID : " . $row["PlanID"] . "});'>[ " . $row["PlanID"] . " ]</a> جهت کارشناسی " . $row["ScopeDesc"] . " برای شما ارسال شده است و مهلت کارشناسی " . DateModules::miladi_to_shamsi($row["EndDate"]) . " می باشد." . "<br>";
    }
    $expertStr .= "<br>";
}
?>
<script>

PlanStartPage.prototype = {
	TabID : '<?php 
echo $_REQUEST["ExtTabID"];
?>
',
	address_prefix : "<?php 
echo $js_prefix_address;
?>
",
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:FirstPage.php


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