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


PHP gettime函数代码示例

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


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

示例1: etime

function etime($txt = '')
{
    global $TEST_TIME;
    $stop_time = gettime();
    $diff_time = substr($stop_time - $TEST_TIME, 0, 8);
    global $TTALL;
    if ($diff_time < 1) {
        $TTALL += $diff_time;
    }
    echo $txt . ': ' . $diff_time . '   (' . $TTALL . ')<br/>';
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:11,代码来源:game.php

示例2: write_sessions

function write_sessions(){
// 	$database = 'fscontent';
// 	$host = 'localhost';
// 	$user = 'fscontent';
// 	$password = '';
	$database = $GLOBALS["database"];;
	$host = $GLOBALS["host"];
	$user = $GLOBALS["user"];
	$password = $GLOBALS["password"];

	$i = 0;
	
	//print('Database:'.$database.', Host:'.$host.', User:.'.$user.', Password:'.$password);

	$connection = mysql_connect($host,$user,$password)
     		or die ("Imposible conectar al servidor, verifique que escribio el host correcto");
	$db = mysql_select_db($database,$connection)
     		or die ("Imposible seleccionar base de datos, Verifique que escribio el nombre correcto");

	$query = "SELECT * FROM sesion;";
	$result = mysql_query($query)
		or die ("Imposible ejecutar Consulta.");
	while($row = mysql_fetch_array($result)){
		/*Color de fila*/
		if($i%2 == 0){
		?>
		<tr
		style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;">
		<?
		}
		else{
		?>
			<tr>	
		<?
		}/*Imprimimos datos*/
		?>			
		<td><?echo '<a href="reportes.php?session_id='.$row['ID'].'">'.gettime($row['ID']).'</a>';?></td>
		<td><?echo $row['PARTICION'];?></td>
		<td><?echo $row['TIEMPO_ANALISIS'];?> s</td>
		<td><?echo $row['NUM_ELEMENTOS'];?></td>
		<td><?echo $row['NUM_INSERCIONES'];?></td>
		</tr>

		<?
		$i++;
	}
}
开发者ID:Jona0712,项目名称:proyectos-kreig-usac,代码行数:47,代码来源:sesiones.php

示例3: info

 public function info()
 {
     $itemid = I('get.id');
     //项目详情
     $info = D('User/item')->getInfo(array('a.id' => $itemid, 'a.status' => 1));
     if (!$info) {
         $this->error('缺少参数!');
     }
     $info['last_time'] = gettime($info['end_time'] - time());
     $info['content'] = htmlspecialchars_decode($info['content']);
     $info['success_rate'] = D('User/ItemWithOrder')->successRate($itemid);
     // 完成率
     $info['count_money'] = D('User/ItemWithOrder')->countMoney($itemid);
     // 现已融资
     $info['invest_money'] = $info['raising_money'] - $info['has_investment'];
     //投资方共融资
     $this->iteminfo = $info;
     //面包屑导航组装
     $bread = '<ul class="x12 bread padding-big-top">
                     <li><a href="' . __ROOT__ . '/" class="icon-home"> 首页</a></li>
                     <li><a href="' . item_category($info['cid'], 'url') . '">' . item_category($info['cid'], 'name') . '</a></li>
                 </ul>';
     $this->bread = $bread;
     //问答内容
     $questionsList = D('Home/ItemQuestions')->loadList(array('itemid' => $itemid));
     foreach ($questionsList as $key => $value) {
         $questionsList[$key]['u_name'] = user($value['uin'], 'name');
         $questionsList[$key]['header'] = user($value['uin'], 'header');
     }
     $this->questionsList = $questionsList;
     //投资列表
     $this->invest = D('User/ItemWithOrder')->loadList(array('a.itemid' => $itemid));
     //项目动态
     $itemLog = M('item_log')->where(array('itemid' => $itemid))->select();
     $this->log = $itemLog;
     //领投人列表
     $leadUser = D('User/ItemLeadUser')->loadList(array('a.itemid' => $itemid));
     foreach ($leadUser as $key => $value) {
         $leadUser[$key]['countmoney'] = D('User/ItemWithOrder')->countMoney($itemid, $value['uin']);
     }
     //视频列表
     $this->video = D('User/ItemVideo')->loadList($itemid, 'RIGHT');
     $this->leaduser = $leadUser;
     $this->display();
 }
开发者ID:ysc8620,项目名称:zhima,代码行数:45,代码来源:ItemController.class.php

示例4: stderr

} else {
    $user = $CURUSER;
}
if ($user["status"] == "pending") {
    stderr($lang_userdetails['std_sorry'], $lang_userdetails['std_user_not_confirmed']);
}
if ($user[added] == "0000-00-00 00:00:00") {
    $joindate = $lang_userdetails['text_not_available'];
} else {
    $joindate = $user[added] . " (" . gettime($user["added"], true, false, true) . ")";
}
$lastseen = $user["last_access"];
if ($lastseen == "0000-00-00 00:00:00") {
    $lastseen = $lang_userdetails['text_not_available'];
} else {
    $lastseen .= " (" . gettime($lastseen, true, false, true) . ")";
}
$res = sql_query("SELECT COUNT(*) FROM comments WHERE user=" . $user[id]) or sqlerr();
$arr3 = mysql_fetch_row($res);
$torrentcomments = $arr3[0];
$res = sql_query("SELECT COUNT(*) FROM posts WHERE userid=" . $user[id]) or sqlerr();
$arr3 = mysql_fetch_row($res);
$forumposts = $arr3[0];
$arr = get_country_row($user[country]);
$country = "<img src=\"pic/flag/" . $arr[flagpic] . "\" alt=\"" . $arr[name] . "\" style='margin-left: 8pt' />";
$arr = get_downloadspeed_row($user[download]);
$download = "<img class=\"speed_down\" src=\"pic/trans.gif\" alt=\"Downstream Rate\" title=\"" . $lang_userdetails['title_download'] . $arr[name] . "\" /> " . $arr[name];
$arr = get_uploadspeed_row($user[upload]);
$upload = "<img class=\"speed_up\" src=\"pic/trans.gif\" alt=\"Upstream Rate\" title=\"" . $lang_userdetails['title_upload'] . $arr[name] . "\" /> " . $arr[name];
$arr = get_isp_row($user[isp]);
$isp = $arr[name];
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:userdetails.php

示例5: gen_footer

function gen_footer()
{
    $f2 = '';
    // profilirovanie scenarija:
    global $TIME_START;
    $stop_time = gettime();
    $diff_time = substr($stop_time - $TIME_START, 0, 6);
    $f2 .= '<p><small>' . $diff_time . 'сек.</small></p>';
    $f2 .= '<div class="y" id="ladh654">&#169;_himura_</div>';
    $f2 .= '</body></html>';
    // pqjanstvo
    global $AFF;
    if (is_in('pqjan', $AFF)) {
        global $f;
        $c = strlen($f);
        $sym = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
        //for ($i = 0; $i < $c; $i++)
        //  if ($f[$i] >= 'А' && $f[$i] <= 'Я' || $f[$i] >= 'а' && $f[$i] <= 'я') $f[$i] = $sym[((int)$f[$i] % 10)];
        $temp = $f;
        $temp = str_replace('Э', '0', $temp);
        $temp = str_replace('Ю', '1', $temp);
        $temp = str_replace('Я', '2', $temp);
        $temp = str_replace('Ж', '3', $temp);
        $temp = str_replace('Ч', '4', $temp);
        $temp = str_replace('Ш', '5', $temp);
        $temp = str_replace('Ц', '6', $temp);
        $temp = str_replace('э', '7', $temp);
        $temp = str_replace('ю', '8', $temp);
        $temp = str_replace('Я', '9', $temp);
        $temp = str_replace('ж', '0', $temp);
        $temp = str_replace('ч', '1', $temp);
        $temp = str_replace('ш', '2', $temp);
        $temp = str_replace('щ', '3', $temp);
        $temp = str_replace('б', '4', $temp);
        $temp = str_replace('в', '5', $temp);
        $temp = str_replace('г', '6', $temp);
        $temp = str_replace('д', '7', $temp);
        $temp = str_replace('з', '8', $temp);
        $temp = str_replace('й', '9', $temp);
        $temp = str_replace('л', '0', $temp);
        $temp = str_replace('м', '1', $temp);
        $temp = str_replace('н', '2', $temp);
        $temp = str_replace('п', '3', $temp);
        $temp = str_replace('р', '4', $temp);
        $temp = str_replace('т', '5', $temp);
        $temp = str_replace('ф', '6', $temp);
        $temp = str_replace('ц', '7', $temp);
        $temp = str_replace('ъ', '8', $temp);
        $temp = str_replace('у', '9', $temp);
        $temp = str_replace('ь', '0', $temp);
        $temp = str_replace('Б', '1', $temp);
        $temp = str_replace('В', '2', $temp);
        $temp = str_replace('Г', '3', $temp);
        $temp = str_replace('Д', '4', $temp);
        $temp = str_replace('З', '5', $temp);
        $temp = str_replace('И', '6', $temp);
        $temp = str_replace('Й', '7', $temp);
        $temp = str_replace('Л', '8', $temp);
        $temp = str_replace('П', '9', $temp);
        $temp = str_replace('Р', '0', $temp);
        $temp = str_replace('Ф', '1', $temp);
        $temp = str_replace('Ц', '2', $temp);
        $temp = str_replace('Ъ', '3', $temp);
        $temp = str_replace('Ы', '4', $temp);
        $temp = str_replace('Ь', '5', $temp);
        $temp = str_replace('у', '6', $temp);
        $temp = str_replace('и', '7', $temp);
        $temp = str_replace('с', '8', $temp);
        $temp = str_replace('х', '9', $temp);
        $temp = str_replace('У', '0', $temp);
        $temp = str_replace('С', '1', $temp);
        $temp = str_replace('Х', '2', $temp);
        $temp = str_replace('Н', '3', $temp);
        $f = $temp;
    }
    global $dbcnx;
    mysql_close($dbcnx);
    return $f2;
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:79,代码来源:f_game.php

示例6: srt

 //print("<tr><td class=colhead align=center>".$lang_log['text_previous_polls']."</td></tr>\n");
 function srt($a, $b)
 {
     if ($a[0] > $b[0]) {
         return -1;
     }
     if ($a[0] < $b[0]) {
         return 1;
     }
     return 0;
 }
 while ($poll = mysql_fetch_assoc($polls)) {
     $o = array($poll["option0"], $poll["option1"], $poll["option2"], $poll["option3"], $poll["option4"], $poll["option5"], $poll["option6"], $poll["option7"], $poll["option8"], $poll["option9"], $poll["option10"], $poll["option11"], $poll["option12"], $poll["option13"], $poll["option14"], $poll["option15"], $poll["option16"], $poll["option17"], $poll["option18"], $poll["option19"]);
     print "<tr><td align=center>\n";
     print "<p class=sub>";
     $added = gettime($poll['added'], true, false);
     print $added;
     if (get_user_class() >= $pollmanage_class) {
         print " - [<a href=makepoll.php?action=edit&pollid={$poll['id']}><b>" . $lang_log['text_edit'] . "</b></a>]\n";
         print " - [<a href=?action=poll&do=delete&pollid={$poll['id']}><b>" . $lang_log['text_delete'] . "</b></a>]\n";
     }
     print "<a name={$poll['id']}>";
     print "</p>\n";
     print "<table class=main border=1 cellspacing=0 cellpadding=5><tr><td class=text>\n";
     print "<p align=center><b>" . $poll["question"] . "</b></p>";
     $pollanswers = sql_query("SELECT selection FROM pollanswers WHERE pollid=" . $poll["id"] . " AND  selection < 20") or sqlerr();
     $tvotes = mysql_num_rows($pollanswers);
     $vs = array();
     // count for each option ([0]..[19])
     $os = array();
     // votes and options: array(array(123, "Option 1"), array(45, "Option 2"))
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:log.php

示例7: rr_post_vars

function rr_post_vars()
{
    global $soa, $rr_active_types;
    $rr = array();
    $rr['id'] = (int) postvar('id');
    $rr['active'] = $rr_active_types[gettrinary(postvar('active'))];
    $rr['serial'] = postvar('serial');
    $rr['stamp'] = postvar('stamp');
    $rr['name'] = trim(postvar('name'));
    $rr['ttl'] = gettime(postvar('ttl'));
    $rr['type'] = strtoupper(trim(postvar('type')));
    $rr['aux'] = (int) postvar('aux');
    $rr['data'] = trim(postvar('data'));
    if (!strlen($rr['name'])) {
        $rr['name'] = $soa['origin'];
    }
    return $rr;
}
开发者ID:evmuc,项目名称:mydns-ng,代码行数:18,代码来源:admin.php

示例8: get_style_addicode

<script src="curtain_imageresizer.js" type="text/javascript"></script><style type="text/css">body {overflow-y:scroll; overflow-x: hidden}</style>
</head><body class='inframe'>
<?php 
    print get_style_addicode();
    if (!($row = $Cache->get_value('current_fun_content'))) {
        $result = sql_query("SELECT fun.*, IF(ADDTIME(added, '1 0:0:0') < NOW(),true,false) AS neednew FROM fun WHERE status != 'banned' AND status != 'dull' ORDER BY added DESC LIMIT 1") or sqlerr(__FILE__, __LINE__);
        $row = mysql_fetch_array($result);
        $Cache->cache_value('current_fun_content', $row, 1043);
    }
    if ($row) {
        $title = $row['title'];
        $username = get_username($row["userid"], false, true, true, true, false, false, "", false);
        if ($CURUSER['timetype'] != 'timealive') {
            $time = $lang_fun['text_on'] . $row['added'];
        } else {
            $time = $lang_fun['text_blank'] . gettime($row['added'], true, false);
        }
        $Cache->new_page('current_fun', 874, true);
        if (!$Cache->get_page()) {
            $Cache->add_row();
            $Cache->add_part();
            print "<table border=0 cellspacing=0 cellpadding=2 width='100%'><tr><td class=shoutrow align=center><font class=big>" . $title . "</font><font class=small>" . $lang_fun['text_posted_by'];
            $Cache->end_part();
            $Cache->add_part();
            print "</font></td></tr><tr><td class=shoutrow>\n";
            print format_comment($row['body'], true, true, true) . "</td></tr></table>";
            $Cache->end_part();
            $Cache->end_row();
            $Cache->cache_page();
        }
        while ($Cache->next_row()) {
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:fun.php

示例9: begin_frame

 begin_frame();
 while ($arr = mysql_fetch_assoc($res)) {
     $commentid = $arr["id"];
     $torrent = $arr["name"];
     // make sure the line doesn't wrap
     if (strlen($torrent) > 55) {
         $torrent = substr($torrent, 0, 52) . "...";
     }
     $torrentid = $arr["t_id"];
     //find the page; this code should probably be in details.php instead
     $subres = sql_query("SELECT COUNT(*) FROM comments WHERE torrent = {$torrentid} AND id < {$commentid}") or sqlerr(__FILE__, __LINE__);
     $subrow = mysql_fetch_row($subres);
     $count = $subrow[0];
     $comm_page = floor($count / 20);
     $page_url = $comm_page ? "&page={$comm_page}" : "";
     $added = gettime($arr["added"], true, false, false);
     print "<p class=sub><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>" . "{$added}&nbsp;---&nbsp;" . $lang_userhistory['text_torrent'] . ($torrent ? "<a href=details.php?id={$torrentid}&tocomm=1&hit=1>{$torrent}</a>" : " [Deleted] ") . "&nbsp;---&nbsp;" . $lang_userhistory['text_comment'] . "</b>#<a href=details.php?id={$torrentid}&tocomm=1&hit=1{$page_url}>{$commentid}</a>\n\t  </td></tr></table></p>\n";
     print "<br />";
     print "<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n";
     $body = format_comment($arr["text"]);
     print "<tr valign=top><td class=comment>{$body}</td></tr>\n";
     print "</td></tr></table>\n";
     print "<br />";
 }
 end_frame();
 end_main_frame();
 if ($commentcount > $perpage) {
     echo $pagerbottom;
 }
 stdfoot();
 die;
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:userhistory.php

示例10: sql_query

            }
            break;
        case "subtitle":
            $type = $lang_reports['text_subtitle'];
            $res = sql_query("SELECT id, torrent_id, title FROM subs WHERE id=" . sqlesc($row['reportid']));
            if (mysql_num_rows($res) == 0) {
                $reporting = $lang_reports['text_subtitle_does_not_exist'];
            } else {
                $arr = mysql_fetch_array($res);
                $reporting = "<a href=\"downloadsubs.php?torrentid=" . $arr['torrent_id'] . "&subid=" . $arr['id'] . "\">" . htmlspecialchars($arr['title']) . "</a>" . $lang_reports['text_for_torrent_id'] . "<a href=\"details.php?id=" . $arr['torrent_id'] . "\">" . $arr['torrent_id'] . "</a>";
            }
            break;
        default:
            break;
    }
    print "<tr><td class=rowfollow><nobr>" . gettime($row['added']) . "</nobr></td><td class=rowfollow>" . get_username($row['addedby']) . "</td><td class=rowfollow>" . $reporting . "</td><td class=rowfollow><nobr>" . $type . "</nobr></td><td class=rowfollow>" . htmlspecialchars($row['reason']) . "</td><td class=rowfollow><nobr>" . $dealtwith . "</nobr></td><td class=rowfollow><input type=\"checkbox\" name=\"delreport[]\" value=\"" . $row[id] . "\" /></td></tr>\n";
}
?>
<tr><td class="colhead" colspan="7" align="right"><input type="submit" name="setdealt" value="<?php 
echo $lang_reports['submit_set_dealt'];
?>
" /><input type="submit" name="delete" value="<?php 
echo $lang_reports['submit_delete'];
?>
" /></td></tr> 
</form>
<?php 
print "</table>";
print $pagerbottom;
end_main_frame();
stdfoot();
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:reports.php

示例11: tr

         $s .= "</table>\n";
         tr("<a href=\"javascript: klappe_news('othercopy')\"><span class=\"nowrap\"><img class=\"" . ($copies_count > 5 ? "plus" : "minus") . "\" src=\"pic/trans.gif\" alt=\"Show/Hide\" id=\"picothercopy\" title=\"" . $lang_detail['title_show_or_hide'] . "\" /> " . $lang_details['row_other_copies'] . "</span></a>", "<b>" . $copies_count . $lang_details['text_other_copies'] . " </b><br /><div id='kothercopy' style=\"" . ($copies_count > 5 ? "display: none;" : "display: block;") . "\">" . $s . "</div>", 1);
     }
 }
 if ($row["type"] == "multi") {
     $files_info = "<b>" . $lang_details['text_num_files'] . "</b>" . $row["numfiles"] . $lang_details['text_files'] . "<br />";
     $files_info .= "<span id=\"showfl\"><a href=\"javascript: viewfilelist(" . $id . ")\" >" . $lang_details['text_see_full_list'] . "</a></span><span id=\"hidefl\" style=\"display: none;\"><a href=\"javascript: hidefilelist()\">" . $lang_details['text_hide_list'] . "</a></span>";
 }
 function hex_esc($matches)
 {
     return sprintf("%02x", ord($matches[0]));
 }
 if ($enablenfo_main == 'yes') {
     tr($lang_details['row_torrent_info'], "<table><tr>" . ($files_info != "" ? "<td class=\"no_border_wide\">" . $files_info . "</td>" : "") . "<td class=\"no_border_wide\"><b>" . $lang_details['row_info_hash'] . ":</b>&nbsp;" . preg_replace_callback('/./s', "hex_esc", hash_pad($row["info_hash"])) . "</td>" . (get_user_class() >= $torrentstructure_class ? "<td class=\"no_border_wide\"><b>" . $lang_details['text_torrent_structure'] . "</b><a href=\"torrent_info.php?id=" . $id . "\">" . $lang_details['text_torrent_info_note'] . "</a></td>" : "") . "</tr></table><span id='filelist'></span>", 1);
 }
 tr($lang_details['row_hot_meter'], "<table><tr><td class=\"no_border_wide\"><b>" . $lang_details['text_views'] . "</b>" . $row["views"] . "</td><td class=\"no_border_wide\"><b>" . $lang_details['text_hits'] . "</b>" . $row["hits"] . "</td><td class=\"no_border_wide\"><b>" . $lang_details['text_snatched'] . "</b><a href=\"viewsnatches.php?id=" . $id . "\"><b>" . $row["times_completed"] . $lang_details['text_view_snatches'] . "</td><td class=\"no_border_wide\"><b>" . $lang_details['row_last_seeder'] . "</b>" . gettime($row["last_action"]) . "</td></tr></table>", 1);
 $bwres = sql_query("SELECT uploadspeed.name AS upname, downloadspeed.name AS downname, isp.name AS ispname FROM users LEFT JOIN uploadspeed ON users.upload = uploadspeed.id LEFT JOIN downloadspeed ON users.download = downloadspeed.id LEFT JOIN isp ON users.isp = isp.id WHERE users.id=" . $row['owner']);
 $bwrow = mysql_fetch_array($bwres);
 if ($bwrow['upname'] && $bwrow['downname']) {
     tr($lang_details['row_uploader_bandwidth'], "<img class=\"speed_down\" src=\"pic/trans.gif\" alt=\"Downstream Rate\" /> " . $bwrow['downname'] . "&nbsp;&nbsp;&nbsp;&nbsp;<img class=\"speed_up\" src=\"pic/trans.gif\" alt=\"Upstream Rate\" /> " . $bwrow['upname'] . "&nbsp;&nbsp;&nbsp;&nbsp;" . $bwrow['ispname'], 1);
 }
 /*
 		// Health
 		$seedersTmp = $row['seeders'];
 		$leechersTmp = $row['leechers'];
 		if ($leechersTmp >= 1)	// it is possible that there's traffic while have no seeders
 		{
 			$progressPerTorrent = 0;
 			$i = 0;
 			$subres = sql_query("SELECT seeder, finishedat, downloadoffset, uploadoffset, ip, port, uploaded, downloaded, to_go, UNIX_TIMESTAMP(started) AS st, connectable, agent, peer_id, UNIX_TIMESTAMP(last_action) AS la, userid FROM peers WHERE torrent = $row[id]") or sqlerr();
 
开发者ID:skygunner,项目名称:ekucms,代码行数:30,代码来源:details1.php

示例12: count

$smarty->assign("page_title", @$page_title);
$smarty->assign("meta_keywords", @$meta_keywords);
$smarty->assign("meta_description", @$meta_description);
if (!empty($_COOKIE['order_later'])) {
    $productsOrderLater = @unserialize($_COOKIE['order_later']);
    if (!empty($productsOrderLater)) {
        $smarty->assign('order_later_count', count($productsOrderLater));
        $smarty->assign('order_later_array', $productsOrderLater);
    }
}
if (!empty($page_content['id'])) {
    $files_list = $db->get_all("SELECT id,ext,title FROM fw_tree_files WHERE parent='" . $page_content['id'] . "'");
    $smarty->assign("files_list", $files_list);
}
/*-------------------пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ-------------------- */
$t_endtime = gettime();
$t_result = $t_endtime - $t_starttime;
$pgt = substr($t_result, 0, 5);
/*----------пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ--------- */
if ($deny_access) {
    $template = BASE_PATH . '/templates/access_denided.html';
} elseif ($page_found) {
    $template = BASE_PATH . '/modules/' . $module_name . '/front/templates/' . $template;
} else {
    //$template=BASE_PATH.'/templates/404.html';
    $main_template = BASE_PATH . '/templates/404.html';
    //$navigation[]=array("url"=>"/","title"=>"пїЅпїЅпїЅпїЅпїЅпїЅ 404. пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ");
}
$temp = '';
//print_r($navigation);
for ($i = 0; $i < count($navigation); $i++) {
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:index.php

示例13: gettime

<td width="50%" class="colhead" align="left"><?php 
    echo $from;
    ?>
</td>
<td width="50%" class="colhead" align="left"><?php 
    echo $lang_messages['col_date'];
    ?>
</td>
</tr>
<tr>
<td class="rowfollow" align="left"><?php 
    echo $sender;
    ?>
</td>
<td class="rowfollow" align="left"><?php 
    echo gettime($added, true, false);
    ?>
&nbsp;&nbsp;<?php 
    echo $unread;
    ?>
</td>
</tr>
<tr>
<td colspan="2" align="left"><?php 
    echo $body;
    ?>
</td>
</tr>
<tr>
<td align=left>
<?php 
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:messages.php

示例14: mysql_real_escape_string

if (isUserLoggedIn()) {
    echo '<meta http-equiv="refresh" content="0; URL=index.php?page=account">';
    die;
}
if (isLoginDisabled()) {
    echo "Logins are currently disabled.";
} else {
    if (!empty($_POST)) {
        if ($_SESSION["Login_Attempts"] > 4) {
            $account = mysql_real_escape_string(strip_tags($loggedInUser->display_username));
            $uagent = mysql_real_escape_string(getuseragent());
            //get user agent
            $ip = mysql_real_escape_string(getIP());
            //get user ip
            if (isUserLoggedIn) {
                if ($account != null) {
                    $account = mysql_real_escape_string($loggedInUser->display_username);
                } else {
                    $account = mysql_real_escape_string("Guest/Not Logged In");
                }
            }
            $date = mysql_real_escape_string(gettime());
            $sql = @mysql_query("INSERT INTO access_violations (username, ip, user_agent, time) VALUES ('{$account}', '{$ip}', '{$uagent}', '{$date}');");
            $captcha = md5($_POST["captcha"]);
            if ($captcha != $_SESSION['captcha']) {
                $errors[] = lang("CAPTCHA_FAIL");
            }
        }
        $errors = array();
        $username = trim($_POST["username"]);
        $password = trim($_POST["password"]);
开发者ID:nekushi-cororo,项目名称:openex,代码行数:31,代码来源:login.php

示例15: unset

print "<br />";
print "<h2 align=left><a name=\"friends\">" . $lang_friends['text_friendlist'] . "</a></h2>\n";
print "<table width=737 border=1 cellspacing=0 cellpadding=5><tr class=tablea><td>";
$i = 0;
unset($friend_id_arr);
$res = sql_query("SELECT f.friendid as id, u.last_access, u.class, u.avatar, u.title FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid={$userid} ORDER BY id") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
    $friends = $lang_friends['text_friends_empty'];
} else {
    while ($friend = mysql_fetch_array($res)) {
        $friend_id_arr[] = $friend["id"];
        $title = $friend["title"];
        if (!$title) {
            $title = get_user_class_name($friend["class"], false, true, true);
        }
        $body1 = get_username($friend["id"]) . " ({$title})<br /><br />" . $lang_friends['text_last_seen_on'] . gettime($friend['last_access'], true, false);
        $body2 = "<a href=friends.php?id={$userid}&action=delete&type=friend&targetid=" . $friend['id'] . ">" . $lang_friends['text_remove_from_friends'] . "</a>" . "<br /><br /><a href=sendmessage.php?receiver=" . $friend['id'] . ">" . $lang_friends['text_send_pm'] . "</a>";
        $avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars($friend["avatar"]) : "";
        if (!$avatar) {
            $avatar = "pic/default_avatar.png";
        }
        if ($i % 2 == 0) {
            print "<table width=100% style='padding: 0px'><tr><td class=bottom style='padding: 5px' width=50% align=center>";
        } else {
            print "<td class=bottom style='padding: 5px' width=50% align=center class=tablea>";
        }
        print "<table class=main width=100% height=75px class=tablea>";
        print "<tr valign=top class=tableb><td width=75 align=center style='padding: 0px'>" . ($avatar ? "<div style='width:75px;height:75px;overflow: hidden'><img width=75px src=\"{$avatar}\"></div>" : "") . "</td><td>\n";
        print "<table class=main>";
        print "<tr><td class=embedded style='padding: 5px' width=80%>{$body1}</td>\n";
        print "<td class=embedded style='padding: 5px' width=20%>{$body2}</td></tr>\n";
开发者ID:chenrizhi,项目名称:mtpt,代码行数:31,代码来源:friends.php


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