本文整理汇总了PHP中access::html_class方法的典型用法代码示例。如果您正苦于以下问题:PHP access::html_class方法的具体用法?PHP access::html_class怎么用?PHP access::html_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类access
的用法示例。
在下文中一共展示了access::html_class方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
public static function main()
{
echo '
<p class="minside_toplinks sublinks">
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/information.png" alt="" />Info', "") . '
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/money.png" alt="" />Pluss-tjenester', "pluss") . '
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/group.png" alt="" />Vervede', "vervede") . (page_min_side::$active_own || access::has("mod") ? '
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/computer.png" alt="" />Økter', "ses") . '
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/asterisk_orange.png" alt="" />Innstillinger', "set") : '');
if (page_min_side::$active_user->active && (page_min_side::$active_own || access::has("mod"))) {
echo '
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/delete.png" alt="" />Deaktiver', "deact");
}
if (access::has("crewet")) {
echo '
' . page_min_side::link('<img src="' . STATIC_LINK . '/icon/key.png" alt="" />Crew', "crew");
}
// spesielle tilganger?
$access = "";
if (page_min_side::$active_user->data['u_access_level'] != 0 && page_min_side::$active_user->data['u_access_level'] != 1) {
$type = access::type(page_min_side::$active_user->data['u_access_level']);
$type_name = access::name($type);
if (!empty($type_name)) {
$class = access::html_class($type);
$access .= '<span class="' . $class . '">' . htmlspecialchars($type_name) . '</span>';
}
}
ess::$b->page->add_css('
.minside_access {
text-align: center;
font-size: 15px;
margin: 1em 0;
}
');
echo '
</p>
<div id="page_user_info" class="user">' . (page_min_side::$active_own ? '' : '
<h1>' . htmlspecialchars(page_min_side::$active_user->data['u_email']) . ' (#' . page_min_side::$active_user->id . ')' . (page_min_side::$active_user->data['u_access_level'] != 0 ? '' : '<br />(deaktivert ' . ess::$b->date->get(page_min_side::$active_user->data['u_deactivated_time'])->format(date::FORMAT_NOTIME) . ')') . '<br />
' . page_min_side::$active_player->profile_link() . ' (#' . page_min_side::$active_player->id . ')</h1>') . ($access != "" ? '
<div class="minside_access">' . $access . '</div>' : '');
// informasjon
if (page_min_side::$subpage == "") {
self::page_default();
} elseif (page_min_side::$subpage == "pluss") {
self::page_pluss();
} elseif (page_min_side::$subpage == "vervede") {
self::page_vervede();
} elseif (page_min_side::$subpage == "ses" && (page_min_side::$active_own || access::has("mod"))) {
self::page_ses();
} elseif (page_min_side::$subpage == "set" && (page_min_side::$active_own || access::has("mod"))) {
self::page_set();
} elseif (page_min_side::$subpage == "crewlog" && access::has("crewet", NULL, NULL, "login")) {
self::page_crewlog();
} elseif (page_min_side::$subpage == "deact" && access::has("mod")) {
self::page_deact_mod();
} elseif (page_min_side::$subpage == "cdeact" && access::has("mod")) {
self::page_cdeact();
} elseif (page_min_side::$subpage == "deact" && page_min_side::$active_own) {
self::page_deact();
} elseif (page_min_side::$subpage == "activate" && access::has("mod")) {
self::page_activate();
} elseif (page_min_side::$subpage == "crew" && access::has("crewet", NULL, NULL, "login")) {
self::page_crew();
} elseif (page_min_side::$subpage == "up" && (page_min_side::$active_own || access::is_nostat())) {
self::page_up();
} else {
redirect::handle(page_min_side::addr(""));
}
echo '
</div>';
}
示例2: time
$expire = time() - 604800;
// 1 uke
$last_visitors_limit = 7;
$last_visitors = \Kofradia\DB::get()->query("\n\tSELECT up_id, up_name, up_access_level, time\n\tFROM users_views JOIN users_players ON up_id = uv_visitor_up_id\n\tWHERE uv_up_id = {$player->id} AND time > {$expire}\n\tORDER BY time DESC LIMIT {$last_visitors_limit}");
$last_visitor_anon = $player->data['up_profile_anon_time'] && $player->data['up_profile_anon_time'] > $expire ? $player->data['up_profile_anon_time'] : false;
// sett opp navnet
$name = htmlspecialchars($player->data['up_name']);
// drept?
if ($player->data['up_access_level'] == 0 && $player->data['up_deactivated_dead'] != 0) {
$name .= ' <span class="c_deactivated">[Død]</span>';
} else {
$types = access::types($player->data['up_access_level']);
if (!in_array("none", $types)) {
$type = access::type($player->data['up_access_level']);
$type_name = access::name($type);
$class = access::html_class($type);
$name .= ' <span class="' . $class . '">[' . htmlspecialchars($type_name) . ']</span>';
}
}
// finn ut rankplassering denne timen
$result = \Kofradia\DB::get()->query("\n\tSELECT COUNT(ref.uhi_up_id)+1, SUM(users_hits.uhi_points)\n\tFROM users_hits LEFT JOIN users_hits ref ON ref.uhi_points > users_hits.uhi_points AND ref.uhi_secs_hour = users_hits.uhi_secs_hour\n\tWHERE users_hits.uhi_secs_hour = " . login::get_secs_hour() . " AND users_hits.uhi_up_id = {$player->id}\n\tGROUP BY users_hits.uhi_secs_hour, users_hits.uhi_up_id");
$row = $result->fetch(\PDO::FETCH_NUM);
$rank_hour_pos = $row ? $row[1] == 0 ? 'Ingen' : '#' . game::format_number($row[0]) : 'Ingen';
// pengerank
$result = \Kofradia\DB::get()->query("SELECT COUNT(up_id)+1 FROM users_players WHERE up_cash+up_bank > CAST({$player->data['up_cash']} AS UNSIGNED)+CAST({$player->data['up_bank']} AS UNSIGNED) AND up_access_level < {$_game['access_noplay']} AND up_access_level != 0");
$pengeplassering = $result->fetchColumn(0);
$pengerank = "Ubetydelig";
if ($pengeplassering == 1) {
$pengerank = $_game['cash_ranks'][0];
} elseif ($pengeplassering <= 5) {
$pengerank = $_game['cash_ranks'][1];
示例3: profile_link
public static function profile_link($up_id = false, $name = "", $access_level = 1, $link = true, $linkurl = NULL)
{
global $__server;
if ($name === "") {
if (!login::$logged_in) {
return "anonym";
}
$up_id = login::$user->player->id;
$name = login::$user->player->data['up_name'];
$access_level = login::$user->player->data['up_access_level'];
}
$at = access::type($access_level);
$color_class = access::html_class($at);
$name_f = ($format = access::html_format($at)) ? str_replace("%user", htmlspecialchars($name), $format) : htmlspecialchars($name);
$icons = '';
$icons_right = '';
$contacts = login::$logged_in ? login::$info['contacts'] : false;
if ($contacts) {
if ($up_id == login::$user->player->id) {
$icons .= '<img src="' . STATIC_LINK . '/other/myself_contact_small.gif" alt="(meg selv)" title="Deg selv" />';
} elseif (isset($contacts[1][$up_id])) {
$icons .= '<img src="' . STATIC_LINK . '/other/user_small.gif" alt="(kontakt)" title="Din kontakt" />';
}
if (isset($contacts[2][$up_id])) {
$icons .= '<img src="' . STATIC_LINK . '/other/block.png" alt="(blokkert)" title="Blokkert" />';
}
}
// deaktivert?
if ($access_level == 0) {
$icons_right .= '<img src="' . STATIC_LINK . '/other/kors_lite.png" alt="(deaktivert)" title="Deaktivert" class="deactivated" />';
}
// link
if ($link) {
$p = "";
if (!$linkurl) {
$linkurl = $__server['relative_path'] . '/p/' . rawurlencode($name) . '/' . $up_id;
$p = ' title="Vis profil"';
}
return '<a href="' . $linkurl . '"' . $p . ' rel="' . $up_id . '" class="profile_link' . ($color_class ? ' ' . $color_class : '') . '">' . $icons . '<span>' . $name_f . '</span>' . $icons_right . '</a>';
}
// tekst
return '<span rel="' . $up_id . '" class="profile_link' . ($color_class ? ' ' . $color_class : '') . '">' . $icons . '<span>' . $name_f . '</span>' . $icons_right . '</span>';
}