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


PHP cdate函数代码示例

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


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

示例1: point_ranking_month

 public function point_ranking_month($year = 0, $month = 0, $limit = 0)
 {
     $year = (int) $year;
     if ($year < 1000 or $year > 2999) {
         $year = cdate('Y');
     }
     $month = (int) $month;
     if ($month < 1 or $month > 12) {
         $month = (int) cdate('m');
     }
     $month = sprintf("%02d", $month);
     $start_datetime = $year . '-' . $month . '-01 00:00:00';
     $end_datetime = $year . '-' . $month . '-31 23:59:59';
     if (empty($limit)) {
         $limit = 100;
     }
     $this->db->select_sum('poi_point');
     $this->db->select('member.mem_id, member.mem_userid, member.mem_nickname, member.mem_is_admin, member.mem_icon');
     $this->db->join('member', 'point.mem_id = member.mem_id', 'inner');
     $this->db->where('member.mem_denied', 0);
     $this->db->where('member.mem_is_admin', 0);
     $this->db->where('point.poi_datetime >=', $start_datetime);
     $this->db->where('point.poi_datetime <=', $end_datetime);
     $this->db->where('poi_point >', 0);
     $this->db->group_by('member.mem_id');
     $this->db->order_by('poi_point', 'DESC');
     $this->db->limit($limit);
     $qry = $this->db->get('point');
     $result = $qry->result_array();
     return $result;
 }
开发者ID:smboy86,项目名称:zzing,代码行数:31,代码来源:Point_model.php

示例2: add_visit_date

 public function add_visit_date()
 {
     $sql = 'INSERT INTO ' . $this->db->dbprefix($this->_table);
     $sql .= " (scd_date, scd_count) VALUES ('" . cdate('Y-m-d') . "', 1) ";
     $sql .= " ON DUPLICATE KEY UPDATE scd_count= scd_count + 1 ";
     return $this->db->query($sql);
 }
开发者ID:smboy86,项目名称:zzing,代码行数:7,代码来源:Stat_count_date_model.php

示例3: add_visit_board

 public function add_visit_board($brd_id = 0)
 {
     $brd_id = (int) $brd_id;
     if (empty($brd_id) or $brd_id < 1) {
         return false;
     }
     $sql = 'INSERT INTO ' . $this->db->dbprefix($this->_table);
     $sql .= " (scb_date, brd_id, scb_count) VALUES ('" . cdate('Y-m-d') . "', '" . $brd_id . "', 1) ";
     $sql .= " ON DUPLICATE KEY UPDATE scb_count= scb_count + 1 ";
     return $this->db->query($sql);
 }
开发者ID:smboy86,项目名称:zzing,代码行数:11,代码来源:Stat_count_board_model.php

示例4: get_current_count

 public function get_current_count($curdatetime = '')
 {
     if (empty($curdatetime)) {
         $curdatetime = cdate('Y-m-d H:i:s', ctimestamp() - 600);
     }
     $this->db->select('count(*) as rownum');
     $this->db->join('member', 'currentvisitor.mem_id = member.mem_id', 'left');
     $this->db->where(array('cur_datetime >' => $curdatetime));
     $this->db->group_start();
     $this->db->where(array('member.mem_is_admin' => 0));
     $this->db->or_where(array('member.mem_is_admin' => null));
     $this->db->group_end();
     $qry = $this->db->get($this->_table);
     $rows = $qry->row_array();
     return $rows['rownum'];
 }
开发者ID:smboy86,项目名称:zzing,代码行数:16,代码来源:Currentvisitor_model.php

示例5: get_id

 public function get_id($ip)
 {
     $this->db->query('LOCK TABLE ' . $this->db->dbprefix . $this->_table . ' WRITE');
     while (true) {
         $key = cdate('YmdHis') . str_pad((int) (microtime() * 100), 2, "0", STR_PAD_LEFT);
         $insertdata = array('unq_id' => $key, 'unq_ip' => $ip);
         $result = $this->db->insert($this->_table, $insertdata);
         if ($result) {
             break;
             // 쿼리가 정상이면 빠진다.
         }
         usleep(10000);
         // 100분의 1초를 쉰다
     }
     $this->db->query('UNLOCK TABLES');
     return $key;
 }
开发者ID:smboy86,项目名称:zzing,代码行数:17,代码来源:Unique_id_model.php

示例6: insert_point

 /**
  * 포인트를 추가합니다
  */
 public function insert_point($mem_id = 0, $point = 0, $content = '', $poi_type = '', $poi_related_id = '', $poi_action = '')
 {
     // 포인트 사용을 하지 않는다면 return
     if (!$this->CI->cbconfig->item('use_point')) {
         return false;
     }
     // 포인트가 없다면 업데이트 할 필요 없음
     $point = (int) $point;
     if (empty($point)) {
         return false;
     }
     // 회원아이디가 없다면 업데이트 할 필요 없음
     $mem_id = (int) $mem_id;
     if (empty($mem_id) or $mem_id < 1) {
         return false;
     }
     if (empty($content)) {
         return false;
     }
     if (empty($poi_type) && empty($poi_related_id) && empty($poi_action)) {
         return false;
     }
     $member = $this->CI->Member_model->get_by_memid($mem_id, 'mem_id');
     if (!element('mem_id', $member)) {
         return false;
     }
     $this->CI->load->model('Point_model');
     // 이미 등록된 내역이라면 건너뜀
     if ($poi_type or $poi_related_id or $poi_action) {
         $where = array('mem_id' => $mem_id, 'poi_type' => $poi_type, 'poi_related_id' => $poi_related_id, 'poi_action' => $poi_action);
         $cnt = $this->CI->Point_model->count_by($where);
         if ($cnt > 0) {
             return false;
         }
     }
     $insertdata = array('mem_id' => $mem_id, 'poi_datetime' => cdate('Y-m-d H:i:s'), 'poi_content' => $content, 'poi_point' => $point, 'poi_type' => $poi_type, 'poi_related_id' => $poi_related_id, 'poi_action' => $poi_action);
     $this->CI->Point_model->insert($insertdata);
     $sum = $this->CI->Point_model->get_point_sum($mem_id);
     $updatedata = array('mem_point' => $sum);
     $this->CI->Member_model->update($mem_id, $updatedata);
     return $sum;
 }
开发者ID:smboy86,项目名称:zzing,代码行数:45,代码来源:Point.php

示例7: listGuests

function listGuests($rGuests, $noMsg)
{
    global $showIPs;
    if (!NumRows($rGuests)) {
        return "<tr class=\"cell0\"><td colspan=\"6\">{$noMsg}</td></tr>";
    }
    $i = 1;
    while ($guest = Fetch($rGuests)) {
        $cellClass = ($cellClass + 1) % 2;
        if ($guest['date']) {
            $lastUrl = "<a href=\"" . FilterURL($guest['lasturl']) . "\">" . FilterURL($guest['lasturl']) . "</a>";
        } else {
            $lastUrl = __("None");
        }
        $guestList .= "\n\t\t<tr class=\"cell{$cellClass}\">\n\t\t\t<td>{$i}</td>\n\t\t\t<td colspan=\"2\" title=\"" . htmlspecialchars($guest['useragent']) . "\">" . htmlspecialchars(substr($guest['useragent'], 0, 65)) . "</td>\n\t\t\t<td>" . cdate("d-m-y G:i:s", $guest['date']) . "</td>\n\t\t\t<td>{$lastUrl}</td>";
        if ($showIPs) {
            $guestList .= "<td>" . formatIP($guest['ip']) . "</td>";
        }
        $guestList .= "</tr>";
        $i++;
    }
    return $guestList;
}
开发者ID:knytrune,项目名称:ABXD,代码行数:23,代码来源:online.php

示例8: get_banner

 public function get_banner($position = '', $type = '', $limit = '')
 {
     if (empty($position)) {
         return;
     }
     if (strtolower($type) !== 'order') {
         $type = 'random';
     }
     $cachename = 'banner-' . $position . '-' . cdate('Y-m-d');
     if (!($result = $this->cache->get($cachename))) {
         $this->db->from($this->_table);
         $this->db->where('bng_name', $position);
         $this->db->where('ban_activated', 1);
         $this->db->group_start();
         $this->db->where(array('ban_start_date <=' => cdate('Y-m-d')));
         $this->db->or_where(array('ban_start_date' => null));
         $this->db->group_end();
         $this->db->group_start();
         $this->db->where('ban_end_date >=', cdate('Y-m-d'));
         $this->db->or_where('ban_end_date', '0000-00-00');
         $this->db->or_where(array('ban_end_date' => ''));
         $this->db->or_where(array('ban_end_date' => null));
         $this->db->group_end();
         $this->db->order_by('ban_order', 'DESC');
         $res = $this->db->get();
         $result = $res->result_array();
         $this->cache->save($cachename, $result, $this->cache_time);
     }
     if ($type === 'random') {
         shuffle($result);
     }
     if ($limit) {
         $result = array_slice($result, 0, $limit);
     }
     return $result;
 }
开发者ID:smboy86,项目名称:zzing,代码行数:36,代码来源:Banner_model.php

示例9: listGuests

function listGuests($rGuests)
{
    global $showIPs;
    $guestList = array();
    $i = 1;
    while ($guest = Fetch($rGuests)) {
        $gdata = array();
        $gdata['num'] = $i++;
        if ($showIPs) {
            $gdata['userAgent'] = '<span title="' . htmlspecialchars($guest['useragent']) . '">' . htmlspecialchars(substr($guest['useragent'], 0, 65)) . '</span>';
        }
        $gdata['lastView'] = cdate("d-m-y G:i:s", $guest['date']);
        if ($guest['date']) {
            $gdata['lastURL'] = "<a href=\"" . FilterURL($guest['lasturl']) . "\">" . FilterURL($guest['lasturl']) . "</a>";
        } else {
            $gdata['lastURL'] = __("None");
        }
        if ($showIPs) {
            $gdata['ip'] = formatIP($guest['ip']);
        }
        $guestList[] = $gdata;
    }
    return $guestList;
}
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:24,代码来源:online.php

示例10: Format

            for ($i = 1; $i < $n; $i++) {
                $pl .= " <a href=\"thread.php?id=" . $thread['id'] . "&amp;from=" . $i * $ppp . "\">" . ($i + 1) . "</a>";
            }
            $pl .= " &hellip; ";
            for ($i = $numpages - $n + 1; $i <= $numpages; $i++) {
                $pl .= " <a href=\"thread.php?id=" . $thread['id'] . "&amp;from=" . $i * $ppp . "\">" . ($i + 1) . "</a>";
            }
        }
        if ($pl) {
            $pl = " <span class=\"smallFonts\">[<a href=\"thread.php?id=" . $thread['id'] . "\">1</a>" . $pl . "]</span>";
        }
        $lastLink = "";
        if ($thread['lastpostid']) {
            $lastLink = " <a href=\"thread.php?pid=" . $thread['lastpostid'] . "#" . $thread['lastpostid'] . "\">&raquo;</a>";
        }
        $forumList .= Format("\n\t\t<tr class=\"cell{0}\">\n\t\t\t<td class=\"cell2 threadIcon\">{1}</td>\n\t\t\t<td class=\"threadIcon\" style=\"border-right: 0px none;\">\n\t\t\t\t{2}\n\t\t\t</td>\n\t\t\t<td style=\"border-left: 0px none;\">\n\t\t\t\t{3}\n\t\t\t\t<a href=\"thread.php?id={4}\">\n\t\t\t\t\t{5}\n\t\t\t\t</a>\n\t\t\t\t{6}\n\t\t\t\t{7}\n\t\t\t</td>\n\t\t\t<td class=\"center\">\n\t\t\t\t{8}\n\t\t\t</td>\n\t\t\t<td class=\"center\">\n\t\t\t\t{9}\n\t\t\t</td>\n\t\t\t<td class=\"center\">\n\t\t\t\t{10}\n\t\t\t</td>\n\t\t\t<td class=\"smallFonts center\">\n\t\t\t\t{11}<br />\n\t\t\t\t" . __("by") . " {12} {13}</td>\n\t\t</tr>\n", $cellClass, $NewIcon, $ThreadIcon, $poll, $thread['id'], strip_tags($thread['title']), $pl, $tags, UserLink($starter), $thread['replies'], $thread['views'], cdate($dateformat, $thread['lastpostdate']), UserLink($last), $lastLink);
    }
    Write("\n\t<table class=\"outline margin width100\">\n\t\t<tr class=\"header1\">\n\t\t\t<th style=\"width: 20px;\">&nbsp;</th>\n\t\t\t<th style=\"width: 16px;\">&nbsp;</th>\n\t\t\t<th style=\"width: 60%;\">" . __("Title") . "</th>\n\t\t\t<th>" . __("Started by") . "</th>\n\t\t\t<th>" . __("Replies") . "</th>\n\t\t\t<th>" . __("Views") . "</th>\n\t\t\t<th>" . __("Last post") . "</th>\n\t\t</tr>\n\t\t{0}\n\t</table>\n", $forumList);
} else {
    if ($forum['minpowerthread'] > $loguser['powerlevel']) {
        Alert(__("You cannot start any threads here."), __("Empty forum"));
    } elseif ($loguserid) {
        Alert(format(__("Would you like to {0}post something{1}?"), "<a href=\"newthread.php?id=" . $fid . "\">", "</a>"), __("Empty forum"));
    } else {
        Alert(format(__("{0}Log in{1} so you can post something."), "<a href=\"login.php\">", "</a>"), __("Empty forum"));
    }
}
if ($pagelinks) {
    Write("<div class=\"smallFonts pages\">" . __("Pages:") . " {0}</div>", $pagelinks);
}
MakeCrumbs(array(__("Main") => "./", $forum['title'] => "forum.php?id=" . $fid), $links);
开发者ID:RoadrunnerWMC,项目名称:ABXD-legacy,代码行数:31,代码来源:forum.php

示例11: __

}
if (IsAllowed("viewOnline")) {
    print "<li><a href=\"online.php\">" . __("Online users") . "</a></li>";
}
if (IsAllowed("search")) {
    print "<li><a href=\"search.php\">" . __("Search") . "</a></li>";
}
print "<li><a href=\"lastposts.php\">" . __("Last posts") . "</a></li>";
$bucket = "topMenu";
include "./lib/pluginloader.php";
?>
					</ul>
				</td>
				<td rowspan="2" class="smallFonts" style="text-align: center; width: 10%;">
					<?php 
print cdate($dateformat) . "\n";
?>
				</td>
			</tr>
			<tr class="cell2">
				<td class="smallFonts" style="text-align: center">
					<?php 
if ($loguserid) {
    print UserLink($loguser) . ": ";
    print "<ul class=\"pipemenu\">";
    print "<li><a href=\"#\" onclick=\"if(confirm('" . __("Are you sure you want to log out?") . "')) document.forms[0].submit();\">" . __("Log out") . "</a></li>";
    if (IsAllowed("editProfile")) {
        print "<li><a href=\"editprofile.php\">" . __("Edit profile") . "</a></li>";
    }
    if (IsAllowed("viewPM")) {
        print "<li><a href=\"private.php\">" . __("Private messages") . "</a></li>";
开发者ID:RoadrunnerWMC,项目名称:ABXD-legacy,代码行数:31,代码来源:header.php

示例12: generatePrintablePackingSlip

/**
 * Given some details, generate a printable packing slip.
 *
 * @param string $title Title of the packing slip.
 * @param array $details Array of details about the packing slip.
 * @param array $products Array of products for the packing slip.
 * @return string Generated HTML packing slip.
 */
function generatePrintablePackingSlip($title, $details, $products)
{
	$db = $GLOBALS['ISC_CLASS_DB'];

	$template = new TEMPLATE('ISC_LANG');
	$template->frontEnd();
	$template->setTemplateBase(ISC_BASE_PATH . "/templates");
	$template->panelPHPDir = ISC_BASE_PATH . "/includes/display/";
	$template->templateExt = "html";
	$template->setTemplate(getConfig("template"));

	$template->assign('PackingSlipTitle', $title);
	$template->assign('OrderId', $details['shiporderid']);
	$template->assign('OrderDate', cdate($details['shiporderdate']));

	if(!empty($details['shipmethod'])) {
		$template->assign('ShippingMethod', isc_html_escape($details['shipmethod']));
	}
	else {
		$template->assign('HideShippingMethod', 'display: none');
	}

	if(!empty($details['shiptrackno'])) {
		$template->assign('TrackingNo', isc_html_escape($details['shiptrackno']));
	}
	else {
		$template->assign('HideTrackingNo', 'display: none');
	}

	if(!empty($details['shipcomments'])) {
		$template->assign('Comments', nl2br(isc_html_escape($details['shipcomments'])));
		$template->assign('HideComments', '');
	}
	else {
		$template->assign('Comments', '');
		$template->assign('HideComments', 'display: none');
	}

	if(!empty($details['shipdate'])) {
		$template->assign('DateShipped', cDate($details['shipdate']));
	}
	else {
		$template->assign('HideShippingDate', 'display: none');
	}

	if(empty($products)) {
		return false;
	}

	$query = "
		SELECT customerid, CONCAT(custconfirstname, ' ', custconlastname) AS ordcustname, custconemail AS ordcustemail, custconphone AS ordcustphone
		FROM [|PREFIX|]customers
		WHERE customerid = '".$db->Quote($details['shipcustid'])."'
	";
	$query .= $db->AddLimit(0, 1);
	$result = $db->Query($query);

	$template->assign('CustomerName', '');
	$template->assign('CustomerEmail', '');
	$template->assign('CustomerPhone', '');

	if($customer = $db->Fetch($result)) {
		// Format the customer details
		$template->assign('CustomerName', isc_html_escape($customer['ordcustname']));
		$template->assign('CustomerEmail', isc_html_escape($customer['ordcustemail']));
		$template->assign('CuastomerPhone', isc_html_escape($customer['ordcustphone']));
		$template->assign('CustomerId', $customer['customerid']);
	}
	else {
		$template->assign('HideCustomerDetails', 'display: none');
	}

	$template->assign('StoreAddressFormatted', nl2br(GetConfig('StoreAddress')));

	$addressDetails = array(
		'shipfirstname'	=> $details['shipbillfirstname'],
		'shiplastname'	=> $details['shipbilllastname'],
		'shipcompany'	=> $details['shipbillcompany'],
		'shipaddress1'	=> $details['shipbillstreet1'],
		'shipaddress2'	=> $details['shipbillstreet2'],
		'shipcity'		=> $details['shipbillsuburb'],
		'shipstate'		=> $details['shipbillstate'],
		'shipzip'		=> $details['shipbillzip'],
		'shipcountry'	=> $details['shipbillcountry'],
		'countrycode'	=> $details['shipbillcountrycode'],
	);
	$template->assign('BillingAddress', ISC_ADMIN_ORDERS::buildOrderAddressDetails($addressDetails, false));
	$template->assign('BillingPhone', isc_html_escape($details['shipbillphone']));
	if(!$details['shipbillphone']) {
		$template->assign('HideBillingPhone', 'display: none');
	}
	$template->assign('BillingEmail', isc_html_escape($details['shipbillemail']));
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:order.printing.php

示例13: write

    write("\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Sort by") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t<ul class=\"pipemenu\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{1}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{2}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{3}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{4}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{5}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Order") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t<ul class=\"pipemenu\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{6}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{7}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Sex") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t<ul class=\"pipemenu\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{8}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{9}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{10}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{11}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Power") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t<ul class=\"pipemenu\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{12}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{13}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{14}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{15}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{16}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{17}\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t{18}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Name") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t<ul class=\"pipemenu\">\n\t\t\t\t\t{19}\n\t\t\t\t</ul>\n\t\t\t</td>\n\t\t</tr>\n", null, mlink("", $sex, $pow, $tpp, $letter, $dir) . __("Posts") . "</a>", mlink("id", $sex, $pow, $tpp, $letter) . __("ID") . "</a>", mlink("name", $sex, $pow, $tpp, $letter, $dir) . __("Username") . "</a>", mlink("karma", $sex, $pow, $tpp, $letter, $dir) . __("Karma") . "</a>", mlink("reg", $sex, $pow, $tpp, $letter, $dir) . __("Registration date") . "</a>", mlink($sort, $sex, $pow, $tpp, $letter, "asc") . __("Ascending") . "</a>", mlink($sort, $sex, $pow, $tpp, $letter, "desc") . __("Descending") . "</a>", mlink($sort, "m", $pow, $tpp, $letter, $dir) . __("Male") . "</a>", mlink($sort, "f", $pow, $tpp, $letter, $dir) . __("Female") . "</a>", mlink($sort, "n", $pow, $tpp, $letter, $dir) . __("N/A") . "</a>", mlink($sort, "", $pow, $tpp, $letter, $dir) . __("All") . "</a>", mlink($sort, $sex, "-1", $tpp, $letter, $dir) . __("Banned") . "</a>", mlink($sort, $sex, "0", $tpp, $letter, $dir) . __("Normal") . "</a>", mlink($sort, $sex, "1", $tpp, $letter, $dir) . __("Local moderator") . "</a>", mlink($sort, $sex, "2", $tpp, $letter, $dir) . __("Full moderator") . "</a>", mlink($sort, $sex, "3", $tpp, $letter, $dir) . __("Administrator") . "</a>", mlink($sort, $sex, "4", $tpp, $letter, $dir) . __("Root") . "</a>", mlink($sort, $sex, "", $tpp, $letter, $dir) . __("All") . "</a>", $alphabet);
}
if ($pagelinks) {
    write("\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Page") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t{0}\n\t\t\t</td>\n\t\t</tr>\n", $pagelinks);
}
$memberList = "";
if ($numUsers) {
    while ($user = Fetch($rUsers)) {
        $bucket = "userMangler";
        include "./lib/pluginloader.php";
        $daysKnown = (time() - $user['regdate']) / 86400;
        $user['average'] = sprintf("%1.02f", $user['posts'] / $daysKnown);
        $userPic = "";
        if ($user['picture'] && $hacks['themenames'] != 3) {
            $userPic = "<img src=\"" . str_replace("img/avatars/", "img/avatars/", $user['picture']) . "\" alt=\"\" style=\"width: 60px;\" />";
        }
        $cellClass = ($cellClass + 1) % 2;
        $memberList .= format("\n\t\t<tr class=\"cell{0}\">\n\t\t\t<td>{1}</td>\n\t\t\t<td>{2}</td>\n\t\t\t<td>{3}</td>\n\t\t\t<td>{4}</td>\n\t\t\t<td>{5}</td>\n\t\t\t<td>{6}</td>\n\t\t\t<td>{7}</td>\n\t\t\t<td>{8}</td>\n\t\t</tr>\n", $cellClass, $user['id'], $userPic, UserLink($user), $user['posts'], $user['average'], $user['karma'], $user['birthday'] ? cdate("M jS", $user['birthday']) : "&nbsp;", cdate("M jS Y", $user['regdate']));
    }
} else {
    $memberList = format("\n\t\t<tr class=\"cell0\">\n\t\t\t<td colspan=\"8\">\n\t\t\t\t" . __("Nothing here.") . "\n\t\t\t</td>\n\t\t</tr>\n");
}
write("\n\t\t<tr class=\"header1\">\n\t\t\t<th style=\"width: 30px; \">#</th>\n\t\t\t<th style=\"width: 62px; \">" . __("Picture") . "</th>\n\t\t\t<th>" . __("Name") . "</th>\n\t\t\t<th style=\"width: 50px; \">" . __("Posts") . "</th>\n\t\t\t<th style=\"width: 50px; \">" . __("Average") . "</th>\n\t\t\t<th style=\"width: 50px; \">" . __("Karma") . "</th>\n\t\t\t<th style=\"width: 80px; \">" . __("Birthday") . "</th>\n\t\t\t<th style=\"width: 130px; \">" . __("Registered on") . "</th>\n\t\t</tr>\n\t\t{0}\n", $memberList);
if ($pagelinks) {
    write("\n\t\t<tr class=\"cell2 smallFonts\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t" . __("Page") . "\n\t\t\t</td>\n\t\t\t<td colspan=\"6\">\n\t\t\t\t{0}\n\t\t\t</td>\n\t\t</tr>\n", $pagelinks);
}
write("\n\t</table>\n");
function mlink($sort, $sex, $pow, $tpp, $letter = "", $dir = "", $from = 1)
{
    return "<a href=\"memberlist.php?" . ($sort ? "sort={$sort}" : "") . ($sex ? "&amp;sex={$sex}" : "") . (isset($pow) ? "&amp;pow={$pow}" : "") . ($letter != "" ? "&amp;letter={$letter}" : "") . ($dir ? "&dir={$dir}" : "") . ($from != 1 ? "&amp;from={$from}" : "") . "\" rel=\"nofollow\">";
}
开发者ID:RoadrunnerWMC,项目名称:ABXD-legacy,代码行数:31,代码来源:memberlist.php

示例14: CheckPermission

CheckPermission('admin.ipsearch');
$ip = $_GET["id"];
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
    Kill("Invalid IP");
}
$links = array();
$links[] = "<a href=\"http://dnsquery.org/ipwhois/{$ip}\" target=\"_blank\">Whois Query</a>";
$links[] = "<a onclick=\"if(confirm('Are you sure you want to IP-ban {$ip}?')) {document.getElementById('banform').submit();} return false;\" href=\"#\">IP Ban</a>";
MakeCrumbs(array(actionLink("admin") => __("Admin"), actionLink("ipbans") => __("IP ban manager"), '' => $ip), $links);
$rUsers = Query("select * from {users} where lastip={0}", $ip);
echo "<h3>Users with this IP</h3>";
$userList = "";
$ipBanComment = "";
$i = 1;
if (NumRows($rUsers)) {
    while ($user = Fetch($rUsers)) {
        $ipBanComment .= $user["name"] . " ";
        $cellClass = ($cellClass + 1) % 2;
        if ($user['lasturl']) {
            $lastUrl = "<a href=\"" . $user['lasturl'] . "\">" . $user['lasturl'] . "</a>";
        } else {
            $lastUrl = __("None");
        }
        $userList .= format("\n\t\t<tr class=\"cell{0}\">\n\t\t\t<td>\n\t\t\t\t{1}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{2}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{3}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{4}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{5}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{6}\n\t\t\t</td>\n\t\t</tr>\n\t", $cellClass, $i, UserLink($user), cdate("d-m-y G:i:s", $user['lastactivity']), $user['lastposttime'] ? cdate("d-m-y G:i:s", $user['lastposttime']) : __("Never"), $lastUrl, formatIP($user['lastip']));
        $i++;
    }
} else {
    $userList = "<tr class=\"cell0\"><td colspan=\"6\">" . __("No users") . "</td></tr>";
}
echo "<form id=\"banform\" action=\"" . htmlentities(actionLink('ipbans')) . "\" method=\"post\">\n\t<input type=\"hidden\" name=\"ip\" value=\"{$ip}\">\n\t<input type=\"hidden\" name=\"reason\" value=\"" . htmlentities($ipBanComment) . "\">\n\t<input type=\"hidden\" name=\"days\" value=\"0\">\n\t<input type=\"hidden\" name=\"actionadd\" value=\"yes, do it!\">\n</form>";
echo "\n\t<table class=\"outline margin\">\n\t\t<tr class=\"header1\">\n\t\t\t<th style=\"width: 30px;\">\n\t\t\t\t#\n\t\t\t</th>\n\t\t\t<th>\n\t\t\t\t" . __("Name") . "\n\t\t\t</th>\n\t\t\t<th style=\"width: 140px;\">\n\t\t\t\t" . __("Last view") . "\n\t\t\t</th>\n\t\t\t<th style=\"width: 140px;\">\n\t\t\t\t" . __("Last post") . "\n\t\t\t</th>\n\t\t\t<th>\n\t\t\t\t" . __("URL") . "\n\t\t\t</th>\n\t\t\t<th style=\"width: 140px;\">\n\t\t\t\t" . __("IP") . "\n\t\t\t</th>\n\t\t</tr>\n\t\t{$userList}\n\t</table>";
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:31,代码来源:ipquery.php

示例15: formatdatenow

function formatdatenow()
{
    return cdate(getdateformat());
}
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:4,代码来源:snippets.php


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