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


PHP GetDateTime函数代码示例

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


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

示例1: while

                <input type="hidden" name="aid" id="aid" value="<?php 
    echo $id;
    ?>
" />
				<input type="hidden" name="molds" id="molds" value="2" />
			</div>
			<!-- 相关文章结束 -->
			<?php 
    if ($cfg_comment == 'Y') {
        ?>
			<!-- 评论区域开始 -->
			<ul class="commlist">
				<?php 
        $dosql->Execute("SELECT * FROM `#@__usercomment` WHERE molds=2 AND aid={$id} AND isshow=1 ORDER BY id DESC");
        while ($row = $dosql->GetArray()) {
            echo '<li><span class="uname">' . $row['uname'] . '</span><p>' . $row['body'] . '</p><span class="time">' . GetDateTime($row['time']) . '</span></li>';
        }
        ?>
			</ul>
			<div class="commnum">
				<span>
					<i>
					<?php 
        $r = $dosql->GetOne("SELECT COUNT(id) as n FROM `#@__usercomment` WHERE molds=2 AND aid={$id} AND isshow=1 ORDER BY id DESC");
        echo $r['n'];
        ?>
					</i>
					条评论
				</span>
			</div>
			<div class="commnet">
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:caseshow.php

示例2: mt_rand

			<td><input type="text" name="hits" id="hits" class="inputos" value="<?php 
echo mt_rand(50, 200);
?>
" /></td>
		</tr>
		<tr>
			<td height="40" align="right">排列排序:</td>
			<td><input type="text" name="orderid" id="orderid" class="inputos" value="<?php 
echo GetOrderID('#@__infoimg');
?>
" /></td>
		</tr>
		<tr>
			<td height="40" align="right">更新时间:</td>
			<td><input name="posttime" type="text" id="posttime" class="inputms" value="<?php 
echo GetDateTime(time());
?>
" readonly="readonly" />
				<script type="text/javascript">
				date = new Date();
				Calendar.setup({
					inputField     :    "posttime",
					ifFormat       :    "%Y-%m-%d %H:%M:%S",
					showsTime      :    true,
					timeFormat     :    "24"
				});
				</script></td>
		</tr>
		<tr class="nb">
			<td height="40" align="right">审 核:</td>
			<td><input type="radio" name="checkinfo" value="true" checked="checked"  />
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:infoimg_add.php

示例3: ClearHtml

    ?>
" /></td>
			<td><?php 
    echo $row['id'];
    ?>
</td>
			<td><?php 
    echo ClearHtml($row['content']) . $content;
    ?>
</td>
			<td><?php 
    echo $row['nickname'];
    ?>
</td>
			<td class="number"><?php 
    echo GetDateTime($row['posttime']);
    ?>
</td>
			<td><?php 
    echo $row['ip'];
    ?>
</td>
			<td class="action endCol"><span><a href="message_save.php?id=<?php 
    echo $row['id'];
    ?>
&action=check&checkinfo=<?php 
    echo $row['checkinfo'];
    ?>
" title="点击进行审核与未审操作"><?php 
    echo $checkinfo;
    ?>
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:message.php

示例4: DisplayError

 function DisplayError($msg, $t = 0)
 {
     global $cfg_diserror;
     //向浏览器输出错误
     switch ($t) {
         case 0:
             $title = '安全警告:MySql Error!';
             break;
         case 1:
             $title = '安全警告:请检查您的SQL语句是否合法,您的操作将被强制停止!';
             break;
         default:
     }
     $str = '<div style="font-family:\'微软雅黑\';font-size:12px;">';
     $str .= '<h3 style="margin:0;padding:0;line-height:30px;color:red;">' . $title . '</h3>';
     $str .= '<strong>错误文件</strong>:' . GetCurUrl() . '<br />';
     $str .= '<strong>错误信息</strong>:' . $msg . '';
     $str .= '</div>';
     //判断是否输出错误提示
     if ($cfg_diserror == 'Y') {
         echo $str;
     }
     //保存MySql错误日志
     $userIP = GetIP();
     $getUrl = GetCurUrl();
     $getTime = GetDateTime(time());
     $logfile = dirname(__FILE__) . '/../data/error/mysql_error_trace.php';
     $savemsg = '<?php exit(); ?> Time: ' . $getTime . '. || Page: ' . $getUrl . ' || IP: ' . $userIP . ' || Error: ' . $msg . "\r\n";
     Writef($logfile, $savemsg, 'a+');
     //危险错误,强制停止
     if ($t == 1) {
         exit;
     }
 }
开发者ID:EvlinLee,项目名称:android,代码行数:34,代码来源:mysql.class.php

示例5: GetDateTime

    ?>
	<tr align="left" class="dataTr">
		<td height="36" class="firstCol"><?php 
    echo $row['id'];
    ?>
</td>
		<td><?php 
    echo $row['username'];
    ?>
</td>
		<td><?php 
    echo $groupname;
    ?>
</td>
		<td class="number"><?php 
    echo GetDateTime($row['logintime']);
    ?>
</td>
		<td><?php 
    echo $row['loginip'];
    ?>
</td>
		<td class="action endCol"><span><?php 
    echo $checkstr;
    ?>
</span> | <span><a href="admin_update.php?id=<?php 
    echo $row['id'];
    ?>
">修改</a></span> | <span class="nb"><?php 
    echo $delstr;
    ?>
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:admin.php

示例6: GetLastEventTime

function GetLastEventTime($m = '')
{
    global $dosql;
    $r = $dosql->GetOne("SELECT MAX(posttime) as time FROM `#@__sysevent` WHERE `id`<>0 AND `model`='{$m}'");
    if (isset($r['time'])) {
        return GetDateTime($r['time']);
    } else {
        return '暂无最新更新';
    }
}
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:10,代码来源:syscount.php

示例7: time

         $uid = '-1';
         $uname = '游客';
     } else {
         $r = $dosql->GetOne("SELECT `id`,`expval`,`integral` FROM `#@__member` WHERE `username`='{$c_uname}'");
         $uid = $r['id'];
         $uname = $c_uname;
     }
     $time = time();
     $ip = GetIP();
     $dosql->ExecNoneQuery("INSERT INTO `#@__usercomment` (aid,molds,uid,uname,body,reply,link,time,ip,isshow) VALUES ('{$aid}','{$molds}','{$uid}','{$uname}','{$body}','{$reply}','{$link}','{$time}','{$ip}','1')");
     $r = $dosql->GetOne("SELECT `id` FROM `#@__usercomment` WHERE `aid`='{$aid}' AND `molds`='{$molds}' AND `uid`='{$uid}'");
     if (empty($r['id']) && !empty($c_uname) && $uid != '-1') {
         //评论一条增加1经验值2积分
         $dosql->ExecNoneQuery("UPDATE `#@__member` SET expval='" . ($r['expval'] + 1) . "', integral='" . ($r['integral'] + 2) . "' WHERE `username`='{$c_uname}'");
     }
     echo json_encode(array('1', $uname, $body, GetDateTime($time)));
     exit;
 } else {
     if ($a == 'delcomment') {
         //是否开去文章评论功能
         if ($cfg_comment == 'N') {
             exit;
         }
         if (is_array($checkid)) {
             foreach ($checkid as $v) {
                 //参数过滤
                 $v = intval($v);
                 $dosql->ExecNoneQuery("DELETE FROM `#@__usercomment` WHERE `id`={$v} AND `uname`='{$c_uname}'");
             }
         }
         header('location:?c=comment');
开发者ID:CQHanSa,项目名称:lingang,代码行数:31,代码来源:member.php

示例8: GetDiyField


//.........这里部分代码省略.........
                                            $checked = '';
                                        }
                                        $reStr .= '<input type="checkbox" name="' . $r['fieldname'] . '[]" id="' . $r['fieldname'] . '[]" value="' . $fieldsel_val[1] . '" ' . $checked . ' />&nbsp;' . $fieldsel_val[0];
                                        if ($k < count($fieldsel) - 1) {
                                            $reStr .= '&nbsp;&nbsp;&nbsp;';
                                        }
                                    }
                                }
                                if (!empty($r['fieldcheck'])) {
                                    $reStr .= '&nbsp;<span class="maroon">*</span>';
                                }
                                $reStr .= '<span class="cnote">' . $r['fielddesc'] . '</span>';
                            }
                        } else {
                            if ($r['fieldtype'] == 'select') {
                                if (!empty($r['fieldsel'])) {
                                    $reStr .= '<select name="' . $r['fieldname'] . '" id="' . $r['fieldname'] . '">';
                                    $fieldsel = explode(',', $r['fieldsel']);
                                    foreach ($fieldsel as $k => $fieldsel_arr) {
                                        if ($fieldsel_arr != '') {
                                            $fieldsel_val = explode('=', $fieldsel_arr);
                                            $fieldsel_val[1] = isset($fieldsel_val[1]) ? $fieldsel_val[1] : '';
                                            if ($fieldvalue != '') {
                                                if ($fieldsel_val[1] == $fieldvalue) {
                                                    $selected = 'selected="selected"';
                                                } else {
                                                    $selected = '';
                                                }
                                            } else {
                                                $selected = '';
                                            }
                                            $fieldsel_val = explode('=', $fieldsel_arr);
                                            $reStr .= '<option name="' . $r['fieldname'] . '" id="' . $r['fieldname'] . '" value="' . $fieldsel_val[1] . '"' . $selected . '>' . $fieldsel_val[0] . '</option>';
                                            if ($k < count($fieldsel) - 1) {
                                                $reStr .= '&nbsp;&nbsp;&nbsp;';
                                            }
                                        }
                                    }
                                    $reStr .= '</select>';
                                    if (!empty($r['fieldcheck'])) {
                                        $reStr .= '&nbsp;<span class="maroon">*</span>';
                                    }
                                    $reStr .= '<span class="cnote">' . $r['fielddesc'] . '</span>';
                                }
                            } else {
                                if ($r['fieldtype'] == 'file') {
                                    $reStr .= '<input type="text" name="' . $r['fieldname'] . '" id="' . $r['fieldname'] . '" class="input" value="' . $fieldvalue . '" />';
                                    $reStr .= '&nbsp;<span class="cnote"><span class="grayBtn" onclick="GetUploadify(\'uploadify\',\'' . $r['fieldtitle'] . '\',\'all\',\'all\',1,' . $cfg_max_file_size . ',\'' . $r['fieldname'] . '\')">上 传</span></span>';
                                    if (!empty($r['fieldcheck'])) {
                                        $reStr .= '&nbsp;<span class="maroon">*</span>';
                                    }
                                    if (!empty($r['fielddesc'])) {
                                        $reStr .= '<span class="cnote">' . $r['fielddesc'] . '</span>';
                                    }
                                } else {
                                    if ($r['fieldtype'] == 'fileall') {
                                        $reStr .= '<fieldset class="picarr"><legend>列表</legend><div>最多可以上传<strong>50</strong>个附件<span onclick="GetUploadify(\'uploadify2\',\'' . $r['fieldtitle'] . '\',\'all\',\'all\',50,' . $cfg_max_file_size . ',\'' . $r['fieldname'] . '\',\'' . $r['fieldname'] . '_area\')">开始上传</span></div><ul id="' . $r['fieldname'] . '_area">';
                                        if (isset($fieldvalue)) {
                                            if (!empty($fieldvalue)) {
                                                $picarr = unserialize($fieldvalue);
                                                if (isset($picarr) && is_array($picarr)) {
                                                    foreach ($picarr as $v) {
                                                        $v = explode(',', $v);
                                                        $reStr .= '<li rel="' . $v[0] . '"><input type="text" name="' . $r['fieldname'] . '[]" value="' . $v[0] . '"><a href="javascript:void(0);" onclick="ClearPicArr(\'' . $v[0] . '\')">删除</a><br /><input type="text" name="' . $r['fieldname'] . '_txt[]" value="' . $v[1] . '"><span>描述</span></li>';
                                                    }
                                                }
                                            }
                                        }
                                        $reStr .= '</ul></fieldset>';
                                    } else {
                                        if ($r['fieldtype'] == 'datetime') {
                                            if (!empty($fieldvalue)) {
                                                $dtime = GetDateTime($fieldvalue);
                                            } else {
                                                $dtime = GetDateTime(time());
                                            }
                                            $reStr .= '<input type="text" name="' . $r['fieldname'] . '" id="' . $r['fieldname'] . '" class="inputms" value="' . $dtime . '" readonly="readonly" />';
                                            if (!empty($r['fieldcheck'])) {
                                                $reStr .= '&nbsp;<span class="maroon">*</span>';
                                            }
                                            $reStr .= '<span class="cnote">' . $r['fielddesc'] . '</span>';
                                            $reStr .= '<script type="text/javascript">Calendar.setup({inputField:"' . $r['fieldname'] . '",ifFormat:"%Y-%m-%d %H:%M:%S",showsTime:true,timeFormat:"24"});</script>';
                                        } else {
                                            if ($r['fieldtype'] == 'mediumtext') {
                                                $reStr .= '<textarea name="' . $r['fieldname'] . '" id="' . $r['fieldname'] . '" class="kindeditor">' . $fieldvalue . '</textarea>';
                                                $reStr .= '<script type="text/javascript">var editor;KindEditor.ready(function(K) {editor = K.create(\'textarea[name="' . $r['fieldname'] . '"]\', {allowFileManager:true,width:\'667px\',height:\'280px\',extraFileUploadParams:{sessionid:\'' . session_id() . '\'}});});</script>';
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            $reStr .= '</td></tr></table>';
        }
    }
    return $reStr;
}
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:101,代码来源:admin.func.php

示例9: SelectQuestion

                // if the previous page was the homepage
                $id = (int) $_GET['id'];
                $result = SelectQuestion($conn, $id);
                if ($result->num_rows > 0) {
                    // output data of each row
                    while ($row = $result->fetch_assoc()) {
                        $name = $row["name"];
                        $email = $row["email"];
                        $topic = $row["topic"];
                        $content = $row["content"];
                        $vote = $row["vote"];
                    }
                } else {
                    echo "0 results";
                }
                $datetime = GetDateTime($conn, $id);
            }
        }
    }
}
// set session for question id
if (isset($id)) {
    $_SESSION['questionid'] = $id;
    $edit = "edit.php?id=" . $id;
    $delete = "delete.php?id=" . $id;
    $votequp = "VoteQuestionUp(" . $id . ")";
    $voteqdown = "VoteQuestionDown(" . $id . ")";
}
?>
		
	</head>
开发者ID:vennylaras,项目名称:IF3110-2015-T1,代码行数:31,代码来源:question.php

示例10: basename

             $files['name'] = basename($name);
             $files['size'] = GetRealSize(filesize($name));
             $files['mktime'] = GetDateTime(filemtime($name));
             $files_size += filesize($name);
             $bfiles[] = $files;
         }
     }
     require_once 'database_sqldir.php';
     exit;
 } else {
     $handler = opendir($backup_dir);
     $i = $total_size = 0;
     while (($fname = readdir($handler)) !== false) {
         if ($fname != '.' && $fname != '..' && $fname != 'index.htm' && $fname != 'index.html') {
             $files['name'] = $fname;
             $files['mktime'] = GetDateTime(filemtime($backup_dir . $fname));
             $backup_file = glob($backup_dir . $fname . '/*.txt');
             $files_size = 0;
             foreach ($backup_file as $name) {
                 $files_size += filesize($name);
             }
             $files['size'] = GetRealSize($files_size);
             $total_size += $files_size;
             $bfiles[] = $files;
         }
         $i++;
     }
     closedir($handler);
     require_once 'database_import.php';
     exit;
 }
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:database_backup.php

示例11: GetDateTime

    echo $row['link'];
    ?>
" target="_blank" title="点击访问"><?php 
    echo $r['title'];
    ?>
</a></td>
			<td><?php 
    echo $row['molds'];
    ?>
</td>
			<td><?php 
    echo $row['aid'];
    ?>
</td>
			<td class="number"><?php 
    echo GetDateTime($row['time']);
    ?>
</td>
			<td><?php 
    echo $row['ip'];
    ?>
</td>
			<td class="action endCol"><a href="userfavorite_save.php?action=del2&amp;id=<?php 
    echo $row['id'];
    ?>
" onclick="return ConfDel(0);">删除</a></td>
		</tr>
		<?php 
}
?>
	</table>
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:userfavorite.php

示例12: isset

		$("#picurl").val(arr[1]);
		$("#posttime").val(arr[2]);

		//设置编辑器内容
		editor.html(arr[0]);
	}
	$("#loading2").attr("class","undis");
}
</script>
</head>
<body>
<?php 
$row = $dosql->GetOne("SELECT * FROM `#@__info` WHERE `classid`={$id} AND `mainid`=-1");
$content = isset($row['content']) ? $row['content'] : '';
$picurl = isset($row['picurl']) ? $row['picurl'] : '';
$posttime = isset($row['posttime']) ? GetDateTime($row['posttime']) : GetDateTime(time());
?>
<div class="formHeader"> <span class="title">修改单页信息</span> <a href="javascript:location.reload();" class="reload">刷新</a> </div>
<form name="form" id="form" method="post" action="info_save.php">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
		<tr>
			<td width="25%" height="40" align="right">栏目名称:</td>
			<td width="75%"><strong>
				<?php 
$r = $dosql->GetOne("SELECT `classname` FROM `#@__infoclass` WHERE `id`={$id}");
if (isset($r['classname'])) {
    echo $r['classname'];
}
?>
				</strong><span class="cnote">带<span class="maroon">*</span>号表示为必填项</span></td>
		</tr>
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:info_update.php

示例13: while

while (($filename = readdir($handler)) !== false) {
    if ($filename != '.' && $filename != '..' && !is_dir($dir . $filename)) {
        $gbfilename = mb_convert_encoding($filename, 'utf-8', 'gb2312');
        if ($cfg_editfile == 'Y') {
            $editstr = '<a href="editfile_update.php?filename=' . urlencode($gbfilename) . '">修改</a>';
        } else {
            $editstr = '<i style="font-style:normal;" title="不允许直接编辑PHP文件">修改</i>';
        }
        ?>
	<tr align="left" class="dataTr">
		<td height="36" class="firstCol"><?php 
        echo $gbfilename;
        ?>
</td>
		<td class="number"><?php 
        echo GetDateTime(filemtime($dir . $filename));
        ?>
</td>
		<td><?php 
        echo GetRealSize(filesize($dir . $filename));
        ?>
</td>
		<td class="action endCol"><?php 
        echo $editstr;
        ?>
</td>
	</tr>
	<?php 
        $i++;
    }
}
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:editfile.php

示例14: GetDateTime

</td>
		</tr>
		<tr>
			<td height="40" align="right">登录信息:</td>
			<td>TIME <?php 
echo GetDateTime($row['logintime']);
?>
&nbsp;-&nbsp;IP <?php 
echo $row['loginip'];
?>
</td>
		</tr>
		<tr class="nb">
			<td height="40" align="right">注册信息:</td>
			<td>TIME <?php 
echo GetDateTime($row['regtime']);
?>
&nbsp;-&nbsp;IP <?php 
echo $row['regip'];
?>
</td>
		</tr>
	</table>
	<div class="formSubBtn">
		<input type="submit" class="submit" value="提交" />
		<input type="button" class="back" value="返回" onclick="history.go(-1);" />
		<input type="hidden" name="action" id="action" value="update" />
		<input type="hidden" name="id" id="id" value="<?php 
echo $row['id'];
?>
" />
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:member_update.php

示例15: while

    if ($dosql->GetTotalRow() == 0) {
        echo '暂无内容';
        exit;
    } else {
        while ($row = $dosql->GetArray()) {
            $r = $dosql->GetOne("SELECT `classname` FROM `#@__infoclass` WHERE id=" . $row['classid']);
            if (isset($r['classname'])) {
                $classname = $r['classname'] . ' [' . $row['classid'] . ']';
            } else {
                $classname = '分类已删 [' . $row['classid'] . ']';
            }
            echo '<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="dataTable">
					<tr align="left" class="dataTr" onmouseover="this.className=\'dataTrOn\'" onmouseout="this.className=\'dataTr\'">
					 <td width="30" height="28" class="firstCol"><input type="checkbox" name="checkid[]" id="checkid[]" value="' . $row['id'] . '" /></td>
					 <td width="30">' . $row['id'] . '</td>
					 <td><span class="title" title="删除日期:' . GetDateTime($row['deltime']) . "\n" . '所属栏目:' . $classname . '">' . $row['title'] . '</span></td>
					 <td width="90" class="action endCol"><span><a href="javascript:;" onclick="RecycleRe(\'reset\',' . $row['id'] . ')">还原</a></span><span class="nb"><a href="javascript:;" onclick="RecycleRe(\'del\',' . $row['id'] . ')">删除</a></span></td>
			  	 </tr>
		      	</table>';
        }
        exit;
    }
}
//管理首页
//是否保存便签
if ($action == 'adminnotes') {
    $uname = $_SESSION['admin'];
    $body = trim($body);
    $posttime = time();
    $postip = GetIP();
    if ($dosql->GetOne("SELECT `uname` FROM `#@__adminnotes` WHERE uname='{$uname}'")) {
开发者ID:beijizhou,项目名称:xinjiang001,代码行数:31,代码来源:ajax_do.php


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