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


PHP getDatetime函数代码示例

本文整理汇总了PHP中getDatetime函数的典型用法代码示例。如果您正苦于以下问题:PHP getDatetime函数的具体用法?PHP getDatetime怎么用?PHP getDatetime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _execute

function _execute($sql, $values = null, $insert_id = false)
{
    if ($values != null && count($values) == 0) {
        $values = null;
    }
    #log
    error_log(getDatetime() . " db->sql:" . $sql . " ->values:" . json_encode($values) . "\n", "3", getPath() . "console.log");
    #con
    $con = getConnection();
    $stmt = $con->prepare($sql);
    #bind param
    if ($values) {
        $args = "";
        for ($i = 0; $i < count($values); $i++) {
            $value = $values[$i];
            if (is_integer($value)) {
                $args .= 'i';
            } else {
                if (is_double($value) || is_float($value)) {
                    $args .= 'd';
                } else {
                    if (is_string($value)) {
                        $args .= 's';
                    } else {
                        $args .= 'b';
                    }
                }
            }
        }
        if (!empty($args) && !empty($stmt)) {
            call_user_func_array(array($stmt, 'bind_param'), array_merge((array) $args, $values));
        }
    }
    $stmt->execute();
    if ($insert_id) {
        $id = $stmt->insert_id;
        #close
        $stmt->close();
        closeConnection($con);
        #return
        return $id;
    } else {
        #close
        $stmt->close();
        closeConnection($con);
    }
}
开发者ID:qiyulin,项目名称:php_workspace,代码行数:47,代码来源:common.php

示例2: getdeptDetail

                    <td align="center">
                        <?php 
echo getdeptDetail('department_name', 'rec_id', $row["dept_id"]);
?>
                    </td>
                    <td align="center">
                        <?php 
echo getDatetime($row["from_date"]);
?>
                    </td>
                    <td align="center">
                        <?
                        if ($row["to_date"] == '0000-00-00') {
                            echo 'TODAY';
                        } else {
                            echo getDatetime($row["to_date"]);
                        }
                        ?>
                    </td>
                    <td align="center"><a href="javascript:;" onClick="get_frm('edit_department_list.php', '<?php 
echo $row["department_id"];
?>
', 'div_edit', '')"><img src="images/Modify.png" alt="Edit" title="Edit" border="0"></a>
                    </td>
                    <td align="center"><a href="javascript:;" onClick="overlay(<?php 
echo $row["department_id"];
?>
);">
                            <img src="images/Delete.png" alt="Delete" title="Delete" border="0"></a>
                    </td>  
                </tr>
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:employee_list_department-GS.php

示例3: getDatetime

    if ($id == 0) {
        ?>
        <form action="" method="post" name="frm_releaving" id="frm_releaving">
	<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
	<tr>
    	<td colspan="2" class="blackHead">Releaving Detail</td>
    </tr>
	<tr>
    	<td align="left" valign="top">
        	<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
            	<tr>
                	<td class="text_1">Date of Leaving</td>
                    
                    <!-- my code -->
                     <!--<td><input type="text" name="releaving_date" id="releaving_date" style="width:150px; height:20px;" value="<?php 
        echo getDatetime($date_releaving);
        ?>
" data-beatpicker="true" data-beatpicker-position="['right','*']" data-beatpicker-format="['DD','MM','YYYY']" /></td> --> 
                    <!--My code End Here -->
                    
                    <td><input type="text" name="releaving_date" id="releaving_date" style="width:180px; height:20px;" readonly="readonly" value="<?php 
        //=getDatetime($date_releaving)
        ?>
" data-beatpicker="true" data-beatpicker-position="['right','*']" data-beatpicker-format="['DD','MM','YYYY']" />
                   <a href="javascript:void(0)" onclick="gfPop.fPopCalendar(document.frm_releaving.releaving_date);"><img name="popcal" align="absbottom" src="./calendar/calbtn.gif" width="27" height="22" border="0" alt=""/></a></td>
                </tr>
            </table>
        </td>
        <td>
            <table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
                <tr>
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:releaving_update.php

示例4: getdesignationMaster

                                	<td>
                                    	<?php 
echo $row_emp['first_name'];
?>
 <?php 
echo $row_emp['last_name'];
?>
                                   	</td>
                                    <td>
                                    	<?php 
echo getdesignationMaster('designation_name', 'rec_id', getdesignationDetail('designation_id', $row_emp['emp_id'], $db_date));
?>
                                    </td>
                                    <td>
                                    	<?php 
echo getDatetime($row_emp['date_joining']);
?>
                                    </td>
                                </tr>                                
                                <?		
								$s++;
								}
						}		
								}	
						}		
				}
		}
				?>		                                              	
            </table>
        </td>
    </tr>
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:employee_list_report_excel.php

示例5: getDatetime

                </tr>
            </table>
        </td>
        <td valign="top">
        	<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0">
                <tr>
                    <td width="50%" class="text_1">Other Deduction's</td>
                    <td width="50%"><input type="text" name="other_deduction" id="other_deduction" style="width:180px; height:20px;" value="<?php 
echo $other_deductions;
?>
" onblur="sum_salary()"/></td>
              </tr>
              <tr>
                    <td width="50%" class="text_1">Effective Date</td>
                    <td width="50%"><form name="frm_emp_list" id="frm_emp_list"><input type="text" name="from_date" id="from_date" style="width:130px; height:20px;" value="<?php 
echo getDatetime($from_date);
?>
"/>	 <a href="javascript:void(0)" onclick="gfPop.fPopCalendar(document.frm_emp_list.from_date);"><img name="popcal" align="absbottom" src="./calendar/calbtn.gif" width="27" height="22" border="0" alt=""/></a> </form>
                    </td>
              </tr>
            </table>
        </td>
    </tr>
     <tr>
    	<td>
        	<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0">
                <tr>
                    <td width="49%" class="text_1"><strong>Earnings</strong></td>
                    <td width="51%"><input type="text" name="total_earning" id="total_earning" style="width:180px; height:20px;" value="<?php 
echo $total_earning;
?>
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:salary_detail.php

示例6: mysql_query

$designation_from_date = "";
$sql = "SELECT * FROM  mpc_designation_employee where emp_id = '{$id}' and to_date='0000-00-00'";
$result = mysql_query($sql) or die("Error in : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
if (mysql_num_rows($result) > 0) {
    while ($row = mysql_fetch_array($result)) {
        $designation_id = $row['designation_id'];
        $designation_from_date = getDatetime($row['from_date']);
    }
}
$sql = "SELECT * FROM  mpc_department_employee where emp_id = '{$id}' and to_date='0000-00-00'";
$result = mysql_query($sql) or die("Error in : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
if (mysql_num_rows($result) > 0) {
    while ($row = mysql_fetch_array($result)) {
        $dept_id = $row['dept_id'];
        $main_dept_id = getdeptDetail('reference_id', 'rec_id', $dept_id);
        $dept_from_date = getDatetime($row['from_date']);
    }
}
?>
<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
	<tr>
    	<td colspan="2" class="blackHead">Department / Designation Detail</td>
    </tr>
	<tr>
    	<td align="left">
        	<div id="div_department_edit">
        	<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
            	<tr>
                	<td class="text_1" width="40%">Department</td>
                    <td align="left" width="60%">
                    	<?php 
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:dept_designation.php

示例7: while

                                        </tr>
                                        <?
                                        while ($row = mysql_fetch_array($result_prj)) {
                                            $present = 0;
                                            $absent = 0;
                                            $h = 0;
                                            $wo = 0;
                                            $Pl = 0;
                                            $Cl = 0;
                                            $HalfCl = 0;
                                            $Total = 0;
                                            ?>
                                            <tr <? if ($sno % 2 == 1) { ?> bgcolor="#F8F8F8" <? } ?> class="tableTxt">
                                                <td align="center"><?= $sno ?><br/><?= $off_day = getweeklyoffDetail('off_day', $row['id'], $start_date) ?></td>
                                                <td align="center"><?= $row['ticket_no'] ?></td>
                                                <td align="left" ><?= $row['first_name'] ?> <?= getfamilyDetail('father_name', $row['id']) ?><br/><?= getDatetime(getofficeDetail('date_joining', $row['id'])) ?>/<?= getdesignationMaster('designation_name', 'rec_id', getdesignationDetail('designation_id', $row['id'], $start_date)); ?></td>
                                                <?
                                                $start_date = "01";

                                                $day1 = $start_date;
                                                $month1 = $month;
                                                $year1 = $year;

                                                $day1 = $day1 + 1;

                                                $end_date = date("t", strtotime($year . "-" . $month . "-01"));

                                                $day2 = $end_date;
                                                $month2 = $month;
                                                $year2 = $year;
开发者ID:shailendra999,项目名称:hr_admin,代码行数:30,代码来源:attendance_info.php

示例8: include

<? include ("inc/function.php");?>
<?
$url = "list_advance.php";
$advance = "";
$ad_date = "";
$adv_id = "";
if(isset($_GET["id"]))
{
	$adv_id = $_GET["id"];
	
	$sql = "select * from mpc_advance_employee where rec_id = '$adv_id'";
	$result = mysql_query($sql) or die("Error in sql : ".mysql_errno()." : ".mysql_error()." : ".$sql);	
	$row = mysql_fetch_array($result);
	
	$advance = $row["advance"];
	$ad_date = getDatetime($row["ad_date"]);	
}
?>
<form name="frm" action="<?php 
echo $url;
?>
" method="post">
<table width="60%" cellpadding="0" cellspacing="0" border="0" align="center">
	<tr>
		<td align="center" valign="middle">
			<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left" class="text_1" style="padding-left:15px;"><b>Advance</b></td>
                    <td align="left"><input type="text" name="txt_advance" id="txt_advance" value="<?php 
echo $advance;
?>
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:edit_advance.php

示例9: valid_customer

    <div <?php 
if ($mode == 'education_detail') {
    echo 'class="current"';
} else {
    echo 'class="simpleTabsContent"';
}
?>
>
      <form name="offical_profile" id="offical_profile" action="employee_detail.php" method="post" enctype="multipart/form-data" onSubmit="return valid_customer(this);">
        <table align="center" width="100%" cellpadding="2" cellspacing="2" class="border" border="0" style="padding-top:10px;">
          <tr>
            <td width="50%" valign="top"><table align="center" width="100%" cellpadding="2" cellspacing="2" class="border">
                <tr>
                  <td class="text_1">Date of Joining</td>
                  <td align="left"><input type="text" name="date_joining" id="date_joining" style="width:150px; height:20px;" value="<?php 
echo getDatetime($date_joining);
?>
"/>
                    <a href="javascript:void(0)" onClick="gfPop.fPopCalendar(document.offical_profile.date_joining);" HIDEFOCUS><img name="popcal" align="absbottom" src="./calendar/calbtn.gif" width="34" height="22" border="0" alt=""></a></td>
                </tr>
                <tr>
                  <td class="text_1">Plant</td>
                  <td  align="left"><?php 
$sql = "SELECT * FROM mpc_plant_master order by plant_name";
$result = mysql_query($sql) or die("Error in sql : " . $sql . " : " . mysql_errno() . " : " . mysql_error());
?>
                    <select name="plant_name" id="plant_name" style="width:150px; height:20px;">
                      <option value="">Select</option>
                      <?php 
while ($row = mysql_fetch_array($result)) {
    ?>
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:employee_detail_17-09.php

示例10: getDatetime

                    <td><input type="text" name="pf_no" id="pf_no" style="width:180px; height:20px;" value="<?php 
echo $pf_number;
?>
"/></td>
                  </tr>
                  <tr>
                    <td class="text_1">PF Rate</td>
                    <td><input type="text" name="pf_rate" id="pf_rate" style="width:180px; height:20px;" value="<?php 
echo $pf_rate;
?>
"/></td>
                  </tr>
                  <tr>
                    <td class="text_1">Date of PF Membership</td>
                    <td align="left"><input type="text" name="date_pf" id="date_pf" style="width:150px; height:20px;" value="<?php 
echo getDatetime($date_pf);
?>
" data-beatpicker="true" />
                      </td>
                  </tr>
                </table></td>
              <td width="50%"><table width="100%" height="100px" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
                  <tr>
                    <td class="text_1">PF Nominee</td>
                    <td><input type="text" name="pf_nominee" id="pf_nominee" style="width:180px; height:20px;" value="<?php 
echo $pf_nominee;
?>
"/></td>
                  </tr>
                  <tr>
                    <td class="text_1">RelationShip</td>
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:official_profile_test.php

示例11: getemployeeDetail

                    <td>
                    	:<?php 
echo getemployeeDetail('first_name', $emp_id);
?>
 <?php 
echo getemployeeDetail('last_name', $emp_id);
?>
                    </td>
                </tr>
                <tr>
                	<td>
                    	DATE OF JOINING
                    </td>
                    <td>
                    	:<?php 
echo getDatetime(getofficeDetail('date_joining', $emp_id));
?>
                    </td>
                </tr>
            </table>
        </td>
        <td>
        	DESIGNATION :<?php 
echo getdesignationMaster('designation_name', 'rec_id', getdesignationDetail('designation_id', $emp_id, $date_month));
?>
        </td>
        <td>
        	DEPARTMENT:<?php 
echo getdeptDetail('department_name', 'rec_id', getdepartmentDetail('dept_id', $emp_id, $date_month));
?>
        </td>
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:leave_yearly_detail.php

示例12: mysql_query

<?
$url = "list_advance_deduction.php";
$txt_deduction = "";
$deduction_by = "";
$deduction_date = "";
$ded_id = "";
if(isset($_GET["id"]))
{
	$ded_id = $_GET["id"];
	
	$sql = "select * from mpc_advance_employee where rec_id = '$ded_id'";
	$result = mysql_query($sql) or die("Error in sql : ".mysql_errno()." : ".mysql_error()." : ".$sql);	
	$row = mysql_fetch_array($result);
	
	$txt_deduction = $row["deduction"];
	$deduction_date = getDatetime($row["deduction_date"]);	
	$deduction_by = $row["deduction_by"];
}
?>
<form name="frm" action="<?php 
echo $url;
?>
" method="post">
<table width="60%" cellpadding="0" cellspacing="0" border="0" align="center">
	<tr>
		<td align="center" valign="middle">
			<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left" class="text_1" style="padding-left:15px;"><b>Advance Deduction</b></td>
                    <td align="left"><input type="text" name="txt_deduction" id="txt_deduction" value="<?php 
echo $txt_deduction;
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:edit_advance_deduction.php

示例13: getSalaryDetail

                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getSalaryDetail('basic', $emp_id, getdbDateSepretoe($txt_from_date));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getDatetime(getofficeDetail('date_joining', $emp_id));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getDatetime($row['dob']);
?>
&nbsp;
                                                                </td>
                                                              </tr>
                                                              
                                                                <?
																	$sno++;
																}	
																?>	
                                                                </tbody>													 
                                                            </table>                                                             </div>  
                                                        </td>
                                                   </tr> 
                                                    <?
                                                     }	 
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:form5_report.php

示例14: mysql_query

if (isset($_POST["btn_delete"])) {
    $PageKeyValue = $_POST["hidden_overlay"];
    $sql = "delete from ms_purchase_product_master where {$PageKey} = '" . $PageKeyValue . "'";
    mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    $Message = "{$PageFor} Sucessfully Deleted";
    redirect("{$Page}?Message={$Message}");
}
if (isset($_GET[$PageKey])) {
    $sql = "select * from ms_purchase_product_master where {$PageKey} = '" . $_GET[$PageKey] . "'";
    $result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $PageKeyValue = $row[$PageKey];
        $name = $row["product_name"];
        $existing_stock = $row["opening_stock"];
        $opening_date = getDatetime($row["opening_date"]);
    }
}
?>

<table width="98%" cellpadding="0" cellspacing="0" align="center" border="0">
    <tr>
    	<td align="left" valign="top" width="230px" style="padding-top:5px;">
			<?php 
include "inc/purchase_snb.php";
?>
        </td>        
        <td style="padding-left:5px; padding-top:5px;">
        	<table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
            	<tr>
                	<td align="center" class="gray_bg"><img src="images/bullet.gif" width="15" height="22"/>&nbsp; Add Product</td>
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:purchase_add_product.php

示例15: mysql_query

<?
$url = "list_loan_installment.php";
$txt_deduction = "";
$deduction_by = "";
$deduction_date = "";
$install_id = "";
if(isset($_GET["id"]))
{
	$install_id = $_GET["id"];
	
	$sql = "select * from mpc_loan_installments where rec_id = '$install_id'";
	$result = mysql_query($sql) or die("Error in sql : ".mysql_errno()." : ".mysql_error()." : ".$sql);	
	$row = mysql_fetch_array($result);
	
	$installments = $row["installments"];
	$installment_date = getDatetime($row["installment_date"]);	
	$installment_by = $row["installment_by"];
}
?>
<form name="frm" action="<?php 
echo $url;
?>
" method="post">
<table width="60%" cellpadding="0" cellspacing="0" border="0" align="center">
	<tr>
		<td align="center" valign="middle">
			<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left" class="text_1" style="padding-left:15px;"><b>Loan Deduction</b></td>
                    <td align="left"><input type="text" name="txt_installments" id="txt_installments" value="<?php 
echo $installments;
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:edit_loan_installl.php


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