本文整理汇总了PHP中cute_number函数的典型用法代码示例。如果您正苦于以下问题:PHP cute_number函数的具体用法?PHP cute_number怎么用?PHP cute_number使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cute_number函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fp_modules_list
function fp_modules_list($modules)
{
$o .= '<form method="post" class="fp_module_admin_list">' . "\n";
$o .= '<input type="hidden" name="action" value="update_modules" />' . "\n";
$o .= '<input type="submit" value="spara" />' . "\n";
$o .= '<ol>' . "\n";
foreach ($modules as $module) {
$module_ids[] = $module['id'];
$o .= '<li>' . "\n";
$o .= '<p>' . $module['score'] . 'p / ' . cute_number($module['clicks']) . ' klick</p>' . "\n";
$o .= '<h3><a href="/site_admin/fp_module.php?action=edit&id=' . $module['id'] . '">' . $module['name'] . '</a></h3>' . "\n";
$o .= '<br style="clear: both;" />' . "\n";
$o .= '<label>Release</label><label>Removal</label><label>Prio</label>' . "\n";
$o .= '<input type="text" name="' . $module['id'] . '_launch" value="' . date('Y-m-d H:i', $module['launch']) . '" />' . "\n";
$o .= '<input type="text" name="' . $module['id'] . '_removal" value="' . date('Y-m-d H:i', $module['removal']) . '" />' . "\n";
$o .= '<input type="text" name="' . $module['id'] . '_priority" id="prio_' . $module['id'] . '" value="' . $module['priority'] . '" class="prio" />' . "\n";
$o .= '</li>' . "\n";
}
$o .= '<input type="hidden" name="module_ids" value="' . implode(',', $module_ids) . '" />' . "\n";
$o .= '</ol>' . "\n";
$o .= '</form>' . "\n";
return $o;
}
示例2: date
}
$out .= '<br style="font-size: 0px; height: 0px; clear: both; line-height: 0px;" />' . "\n";
if ($module['commenting'] == 'true' || $module['published'] == 'true' || $module['grading'] == 'true') {
$out .= '<div class="controls">' . "\n";
if ($module['published'] == 'true') {
$out .= '<p class="fp_module_published">Upplagd ' . date('Y-m-d', $module['launch']) . '</p>' . "\n";
}
if ($module['grading'] == 'true') {
if (login_checklogin() && !in_array($module['id'], $_SESSION['fp_module_votes'])) {
$out .= '<img src="http://images.hamsterpaj.net/discussion_forum/thread_voting_plus.png" class="fp_vote" id="fp_vote_plus_' . $module['id'] . '" />' . "\n";
$out .= '<img src="http://images.hamsterpaj.net/discussion_forum/thread_voting_minus.png" class="fp_vote" id="fp_vote_minu_' . $module['id'] . '" />' . "\n";
}
$out .= '<p class="fp_module_score"><span id="fp_module_score_' . $module['id'] . '">' . $module['score'] . '</span>p</p>' . "\n";
}
if ($module['clicks'] > 0) {
$out .= '<p>' . cute_number($module['clicks']) . ' klick</p>' . "\n";
}
$out .= '</div>' . "\n";
}
if ($module['format'] == '2_3') {
$out .= '</div>' . "\n";
$out .= '<div class="puff">' . "\n";
$puff_query = 'SELECT * FROM fp_puffs ORDER BY id ASC';
$puffs = query_cache(array('category' => 'fp_puffs', 'max_limit' => 600, 'query' => $puff_query));
$puff_key = (date('z') + $puff_no) % count($puffs);
$out .= $puffs[$puff_key]['content'];
$out .= '</div>' . "\n";
}
$out .= '</li>' . "\n";
}
$out .= '</ol>' . "\n";
示例3: elseif
} elseif ($data['regtimestamp'] < time() - 86400 * 356) {
$specialstatus = 'Stammis';
} elseif ($data['regtimestamp'] > time() - 86400 * 7) {
$specialstatus = 'Nykomling';
}
$user_levels_readable = array(1 => 'Vanlig anv.', 2 => 'Medhjälpare', 3 => 'Ordningsvakt', 4 => 'Administratör', 5 => 'Sysop');
if ($data['user_birthday'] != '' && $data['user_birthday'] != "0000-00-00") {
$extra1 = '<th>Födelsedag</th>';
$extra2 = '<td>' . $data['user_birthday'] . '</td>';
}
$output .= rounded_corners_tabs_top();
$out .= '<table>' . "\n";
$out .= '<tr><th>Medlem sedan</th><th>Specialstatus</th>' . $extra1 . '</tr>' . "\n";
$out .= '<tr><td>' . date('Y-m-d', $data['regtimestamp']) . '</td><td>' . $specialstatus . '</td>' . $extra2 . '</tr>' . "\n";
$out .= '<tr><th>Inlägg i forumet</th><th>Spam i forumet</th><th>Gästboksinlägg</th></tr>' . "\n";
$out .= '<tr><td>' . cute_number($data['forum_posts']) . '</td><td>' . cute_number($data['forum_spam']) . '</td><td>' . cute_number($data['guestbook_entries']) . '</td></tr>' . "\n";
$out .= '</table>' . "\n";
echo $out;
$output .= rounded_corners_tabs_bottom();
if (is_privilegied('ip_ban_admin') || is_privilegied('remove_user')) {
$query = 'SELECT lastlogon, lastip, regip, lastusername FROM login WHERE id LIKE "' . $params['user_id'] . '" LIMIT 1';
$result = mysql_query($query) or report_sql_error($query);
$user_ips = mysql_fetch_assoc($result);
$out_ip = 'Senaste inloggning <strong>' . fix_time($user_ips['lastlogon']) . '</strong>';
$out_ip .= ' Från IP <strong>' . $user_ips['lastip'] . '</strong>' . "\n";
// Fetch all user with that IP
$query = 'SELECT DISTINCT login_log.ip, login_log.user_id, login.id, login.username FROM login_log, login WHERE login_log.ip = "' . ip2long($user_ips['lastip']) . '" AND login_log.user_id = login.id AND login_log.user_id != "' . $params['user_id'] . '" AND login.is_removed = 0';
$ip_users = mysql_query($query) or report_sql_error($query);
$out_ip .= '| Andra med IPt:' . "\n";
while ($ip_user = mysql_fetch_assoc($ip_users)) {
$out_ip .= '<a href="http://www.hamsterpaj.net/traffa/profile.php?user_id=' . $ip_user['id'] . '">' . $ip_user['username'] . '</a>' . "\n";
示例4: digga_view
function digga_view($artist_id)
{
$artist_info = digga_fetch_info($artist_id);
echo '<h1>Digga ger dig info om ' . $artist_info['name'] . '</h1>' . "\n";
echo '<h3>' . cute_number($artist_info['popularity']) . ' Hamsterpajare diggar ' . $artist_info['name'] . '!</h3>' . "\n";
if (strlen($artist_info['description']) > 0) {
echo '<p class="digga_description">' . "\n";
echo nl2br($artist_info['description']);
echo '</p>' . "\n";
} else {
echo '<p class="digga_no_description">' . "\n";
echo 'Vi har tyvärr ingen beskrivning om ' . $artist_info['name'] . ' än. Om du känner att du kan mycket om det ';
echo 'här bandet eller den här artisten så får du hemskt gärna skriva en egen beskrivning och skicka den som ett ';
echo 'privat meddelande till <a href="/traffa/profile.php?id=774586">Joar</a>. Glöm inte att tala om vilken artist ';
echo 'det gäller!' . "\n";
echo '</p>' . "\n";
}
if (is_privilegied('digga_admin')) {
echo 'Du kan <a href="?action=edit&artist_id=' . $artist_id . '">';
echo 'ändra beskrivningen och namnet</a>';
}
$diggers = digga_fetch_diggers($artist_id);
if (count($diggers) > 0) {
echo '<div id="digga_diggers">' . "\n";
echo '<h2>Hamsterpajare som diggar ' . $artist_info['name'] . '</h2>' . "\n";
echo '<table>' . "\n";
foreach ($diggers as $digger) {
echo '<tr>' . "\n";
echo '<td><a href="/traffa/profile.php?id=' . $digger['id'] . '">' . $digger['username'] . '</a></td>' . "\n";
echo '<td>' . $digger['gender'] . date_get_age($digger['birthday']) . '</td>' . "\n";
echo '<td>';
echo $digger['lastaction'] > time() - 900 ? 'online' : 'offline';
echo '</td>' . "\n";
echo '</tr>' . "\n";
}
echo '</table>' . "\n";
echo '</div>' . "\n";
}
echo '<div id="digga_songs">' . "\n";
echo '<h2>Låtar av ' . $artist_info['name'] . '</h2>' . "\n";
$query = 'SELECT title FROM songs WHERE artist = "' . $artist_id . '" ORDER BY popularity DESC';
$result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
echo '<ul style="list-style-type: none;">' . "\n";
while ($data = mysql_fetch_assoc($result)) {
echo '<li>' . $data['title'] . '</li>' . "\n";
}
echo '</ul>' . "\n";
echo '</div>' . "\n";
}
示例5: list_entries
function list_entries($recipient, $entries, $offset = 0, $filter = 0)
{
global $hp_includepath;
if ($offset < 1 || !is_numeric($offset)) {
$offset = 0;
}
$list_sql = 'SELECT gb.id, gb.timestamp, gb.message, gb.sender, gb.read, gb.answered, gb.forum_post, login.username, info.image, ';
$list_sql .= 'info.birthday, info.gender, is_private, zip_codes.* ';
$list_sql .= 'FROM traffa_guestbooks AS gb, login, userinfo AS info, zip_codes ';
if ($filter > 0) {
$list_sql .= 'WHERE (';
$list_sql .= '(gb.recipient ="' . $recipient . '" AND gb.sender = "' . $filter . '") ';
$list_sql .= 'OR (gb.recipient = "' . $filter . '" AND gb.sender = "' . $recipient . '") ';
$list_sql .= ') AND login.id = gb.sender AND info.userid = gb.sender AND zip_codes.zip_code = info.zip_code ';
} else {
$list_sql .= 'WHERE gb.recipient = "' . $recipient . '" AND zip_codes.zip_code = info.zip_code ';
}
$list_sql .= 'AND login.id = gb.sender AND info.userid = gb.sender AND deleted = 0 ';
if (isset($_SESSION['login']['id'])) {
$list_sql .= 'AND (gb.is_private = 0 OR gb.sender = ' . $_SESSION['login']['id'] . ' OR gb.recipient = ' . $_SESSION['login']['id'] . ') ';
} else {
$list_sql .= 'AND gb.is_private = 0 ';
}
if ($filter > 0) {
$list_sql .= 'ORDER BY gb.id DESC';
} else {
$list_sql .= 'ORDER BY gb.id DESC LIMIT ' . $offset . ', ' . GUESTBOOK_MESSAGES_PER_PAGE;
}
$list_result = mysql_query($list_sql) or die(report_sql_error($list_sql));
if ($filter == 0) {
echo '<p class="subtitle">Gästbok - ' . cute_number($entries) . ' inlägg</p>' . "\n";
} else {
echo '<p class="subtitle">Gästbok - Visar historik</p>' . "\n";
}
if ($offset > 0) {
echo ' - sida ' . intval($offset / GUESTBOOK_MESSAGES_PER_PAGE + 1) . ' av ' . intval($entries / GUESTBOOK_MESSAGES_PER_PAGE + 1);
}
echo '</p>' . "\n";
$unread = array();
if (true) {
while ($entry = mysql_fetch_assoc($list_result)) {
if ($entry['read'] != 1) {
rounded_corners_top(array('color' => 'orange_deluxe', 'id' => 'gb_entry_' . $entry['id']));
} else {
rounded_corners_top(array('color' => 'blue_deluxe', 'id' => 'gb_entry_' . $entry['id']));
$button_color = 'blue_';
}
echo '<div class="entry_picture">' . "\n";
if ($entry['image'] == 1 || $entry['image'] == 2) {
echo ui_avatar($entry['sender']);
}
echo '</div>' . "\n";
echo '<div class="entry_main">' . "\n";
echo '<div class="entry_info">' . "\n";
echo '<span class="gb_private" id="gb_private_' . $entry['id'] . '_label">';
echo $entry['is_private'] == 1 ? 'Detta inlägg är privat' : '';
echo '</span>' . "\n";
echo '<span class="gb_unanswered" id="gb_unanswered_' . $entry['id'] . '_label">';
echo $entry['answered'] != 'Y' ? 'Obesvarat' : '';
echo '</span>' . "\n";
echo '<span class="timestamp">Skrevs ' . fix_time($entry['timestamp']) . '</span>';
echo '<a href="/traffa/profile.php?id=' . $entry['sender'] . '">' . $entry['username'] . '</a>' . "\n";
echo $entry['gender'] == 'm' ? ' Pojke' : '';
echo $entry['gender'] == 'f' ? ' Flicka' : '';
echo $entry['birthday'] != '0000-00-00' ? ' ' . date_get_age($entry['birthday']) . ' år' : '';
echo strlen($entry['spot']) > 0 ? ' från <a style="cursor: pointer;" onclick="window.open(\'http://www.hitta.se/LargeMap.aspx?ShowSatellite=false&pointX=' . $entry['y_rt90'] . '&pointY=' . $entry['x_rt90'] . '&cx=' . $entry['y_rt90'] . '&cy=' . $entry['x_rt90'] . '&z=6&name=' . $entry['username'] . '%20i%20' . urlencode($entry['spot']) . '\', \'user_map_3\', \'location=false, width=750, height=500\');">' . $entry['spot'] . '</a>' : '';
echo '</div>' . "\n";
echo '<p>' . "\n";
echo setsmilies(nl2br($entry['message']));
// preint_r($entry);
echo '</p>' . "\n";
echo '</div>' . "\n";
echo '<div class="entry_controls">' . "\n";
echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<a href="/hamsterpaj/abuse.php?report_type=guestbook_entry&reference_id=' . $entry['id'] . '" class="abuse_button"><img src="http://images.hamsterpaj.net/abuse.png" /></a> ' . "\n" : '';
echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button class="' . $button_color . 'button_70" onclick="gb_block_user(\'' . $entry['username'] . '\');">Blockera</button> ' . "\n" : '';
echo $recipient == $_SESSION['login']['id'] || $entry['sender'] == $_SESSION['login']['id'] ? '<button id="gb_private_' . $entry['id'] . '" class="' . $button_color . 'button_80" onclick="gb_private(' . $entry['id'] . ');"' . ($entry['is_private'] == 1 ? ' style="display: none;"' : '') . '>Privatisera</button> ' . "\n" : '';
echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button id="gb_unprivate_' . $entry['id'] . '" class="' . $button_color . 'button_90" onclick="gb_unprivate(' . $entry['id'] . ');"' . ($entry['is_private'] == 1 ? '' : ' style="display: none;"') . '>Avprivatisera</button> ' . "\n" : '';
echo '<button class="' . $button_color . 'button_70" onclick="gb_history(' . $recipient . ', ' . $entry['sender'] . ');">Historik</button> ' . "\n";
echo '<button class="' . $button_color . 'button_60" onclick="gb_goto(' . $entry['sender'] . ');">Gå till</button> ' . "\n";
echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button class="' . $button_color . 'button_60" onclick="gb_remove(' . $entry['id'] . ', \'' . $entry['username'] . '\', \'' . fix_time($entry['timestamp']) . '\');">Ta bort</button> ' . "\n" : '';
echo $recipient == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<button class="' . $button_color . 'button_50" onclick="gb_answer(\'' . $entry['username'] . '\', ' . $entry['sender'] . ', ' . $entry['id'] . ');">Svara</button> ' . "\n" : '';
echo '</div>' . "\n";
if ($entry['read'] != 1) {
rounded_corners_bottom(array('color' => 'orange_deluxe'));
} else {
rounded_corners_bottom(array('color' => 'blue_deluxe'));
}
if ($entry['read'] == 0) {
array_push($unread, $entry['id']);
}
}
} else {
while ($list_data = mysql_fetch_assoc($list_result)) {
if ($list_data['read'] == 1) {
echo '<div style="background: #f7f7f7">' . "\n";
} else {
echo '<div style="background: #ffc777">' . "\n";
}
echo '<table class="body"><tr><td style="width: 80px; vertical-align: top;">' . "\n";
if ($list_data['image'] == 1 || $list_data['image'] == 2) {
//.........这里部分代码省略.........
示例6: guestbook_list
function guestbook_list($entries)
{
$out .= '<ul class="guestbook_entries">' . "\n";
foreach ($entries as $entry) {
$out .= "\n\n";
$out .= '<!-- Post #' . cute_number($entry['id']) . ' by ' . $entry['username'] . ' at ' . date('Y-m-d H:i:s', $entry['timestamp']) . '-->' . "\n";
/*
$class = ($entry['read'] == 0) ? ' class="unread"': '';
$out .= '<li' . $class . '>' . "\n";
if($entry['image'] == 1 || $entry['image'] == 2)
{
$out .= '<img src="http://images.hamsterpaj.net/images/users/thumb/' . $entry['sender'] . '.jpg" class="user_avatar" id="entry_' . $entry['id'] . '_photo" />' . "\n";
}
else
{
$out .= '<img src="http://images.hamsterpaj.net/images/users/no_image_mini.png" class="user_avatar" id="entry_' . $entry['id'] . '_photo" />' . "\n";
}
$out .= '<div class="container">' . "\n";
$out .= '<div class="top_bg">' . "\n";
$out .= '<div class="bottom_bg">' . "\n";
*/
$options['user_id'] = $entry['sender'];
$options['type'] = $entry['read'] == 0 ? 'unread' : 'standard';
$out .= message_top($options);
$out .= '<div id="guestbook_entry_' . $entry['id'] . '">' . "\n";
$out .= '<span class="timestamp">' . fix_time($entry['timestamp']) . '</span>' . "\n";
$out .= '<a href="/traffa/profile.php?id=' . $entry['sender'] . '">' . $entry['username'] . '</a> ' . "\n";
$genders = array('f' => 'F', 'm' => 'P');
$out .= $genders[$entry['gender']];
$out .= date_get_age($entry['birthday']) > 0 ? date_get_age($entry['birthday']) : '';
$out .= '<span class="unanswered" id="unanswered_label_' . $entry['id'] . '"' . $style . '>' . "\n";
$out .= $entry['answered'] != 'Y' ? '(Obesvarat)' : '';
$out .= '</span>' . "\n";
$style = $entry['is_private'] == 0 ? ' style="display: none;"' : '';
$out .= '<span class="private" id="private_label_' . $entry['id'] . '"' . $style . '>(Privat)</span>' . "\n";
$out .= '<p>' . setSmilies(nl2br($entry['message'])) . '</p>' . "\n";
$out .= '<p class="gb_entry_controls">' . "\n";
$out .= login_checklogin() && $entry['recipient'] == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id'] ? '<a href="/traffa/guestbook.php?view=' . $entry['sender'] . '" class="gb_reply_control" id="reply_control_' . $entry['id'] . '">Svara</a>' . "\n" : '';
$out .= '<a href="/traffa/guestbook.php?view=' . $entry['sender'] . '&history=' . $entry['recipient'] . '">Historik</a>' . "\n";
$out .= '<a href="/traffa/guestbook.php?view=' . $entry['sender'] . '">Gå till</a>' . "\n";
$out .= $entry['recipient'] == $_SESSION['login']['id'] ? '<a href="/installningar/userblock.php?action=block&username=' . $entry['username'] . '" class="gb_block_control">Blockera</a>' . "\n" : '';
if (login_checklogin() && $entry['recipient'] == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id']) {
$out .= '<a href="/traffa/guestbook.php?view=' . $entry['sender'] . '" class="gb_delete_control" id="delete_control_' . $entry['id'] . '">Ta bort</a>' . "\n";
}
if (login_checklogin() && $entry['recipient'] == $_SESSION['login']['id'] && $entry['sender'] != $_SESSION['login']['id']) {
$private_style = $entry['is_private'] == 1 ? ' style="display: none;"' : '';
$unprivate_style = $entry['is_private'] == 0 ? ' style="display: none;"' : '';
$out .= '<a href="/traffa/guestbook.php?view=' . $entry['sender'] . '" class="gb_private_control" id="private_control_' . $entry['id'] . '"' . $private_style . '>';
$out .= 'Gör privat</a>' . "\n";
$out .= '<a href="/traffa/guestbook.php?view=' . $entry['sender'] . '" class="gb_unprivate_control" id="unprivate_control_' . $entry['id'] . '"' . $unprivate_style . '>';
$out .= 'Gör offentligt</a>' . "\n";
$out .= '<a href="/hamsterpaj/abuse.php?report_type=guestbook_entry&reference_id=' . $entry['id'] . '" class="abuse_button"><img src="http://images.hamsterpaj.net/abuse.png" /></a>' . "\n";
}
$out .= '</p>' . "\n";
$out .= guestbook_form(array('recipient' => $entry['sender'], 'reply-to' => $entry['id'], 'form_id' => 'gb_reply_form_' . $entry['id']));
$out .= '</div>' . "\n";
$out .= message_bottom();
/*
$out .= '</div>' . "\n";
$out .= '</div>' . "\n";
$out .= '</div>' . "\n";
$out .= '</li>' . "\n";
*/
}
$out .= '</ul>' . "\n";
return $out;
}
示例7: discussion_forum_post_render
function discussion_forum_post_render($data, $parent_post = array(), $options = array())
{
$options['post'] = $data;
/*
[id] => 2 [handle] => normal_vikt [author] => 3 [timestamp] => 1200341971 [parent_post] => 0 [forum_id] => 0
[forum_type] => public_forum [title] => Normal vikt? [content] => Denna post har skapats av en funktion! [score] => 0
[verified] => 0 [removed] => 0 [removal_comment] => [remover] => 0 [child_count] => 1 [locked] => 0 [sticky] => 0
[last_post] => 0 [anonymous] => 0 [username] => Johan [birthday] => 1988-09-10 [gender] => m [spot] => Göteborg
*/
$warned = 0;
$options['show_post_controls'] = isset($options['show_post_controls']) ? $options['show_post_controls'] : true;
$options['show_removed_posts_content'] = isset($options['show_removed_posts_content']) ? $options['show_removed_posts_content'] : false;
$return = '<a name="post_' . $data['id'] . '"></a>' . "\n";
$return .= '<input type="hidden" id="post_' . $data['id'] . '_author_username" value="' . $data['username'] . '" />' . "\n";
$return .= '<div class="forum_post_container">' . "\n";
if ($data['removed'] == 1 && $options['show_removed_posts_content'] != true) {
$return .= '<div class="forum_post_removed">Inlägget har tagits bort' . "\n";
$return .= $options['show_post_controls'] == true && forum_security(array('action' => 'unremove_post')) ? '<button value="' . $data['id'] . '" class="forum_unremove_button">trob At</button>, Borttaget av <a href="/traffa/profile.php?id=' . $data['remover'] . '">' . $data['remover'] . '</a>.' . "\n" : '';
$return .= '</div>';
} else {
$return .= strpos(strtolower($data['content']), strtolower($_SESSION['login']['username'])) ? '<div class="highlight">' . "\n" : '';
$return .= '<div class="forum_post_top"></div>' . "\n";
$return .= '<div class="forum_post" id="forum_post_' . $data['id'] . '">' . "\n";
$return .= '<div class="author">' . "\n";
if (strtolower($data['username']) == 'vit_seger') {
$data['username'] = 'Vit_Neger';
}
$return .= '<a class="username" href="/traffa/profile.php?id=' . $data['author'] . '">' . $data['username'];
$return .= '</a>' . "\n";
$return .= $data['author'] == 2 ? ' <a href="/diskussionsforum/hamsterpaj/veckans_ros/" title="Veckans ros"><img src="http://images.hamsterpaj.net/ros.png" alt="Ros" style="width: 11px; height: 17px;border:0;" /></a><br style="clear: both;" />' . "\n" : '';
$return .= '<div class="passepartout">' . "\n";
$return .= ui_avatar($data['author']);
$return .= '</div>' . "\n";
$return .= '<span class="gender">' . str_replace(array('m', 'f', 'u'), array('P', 'F', ''), $data['gender']) . '</span>' . "\n";
if ($data['birthday'] != '0000-00-00') {
$return .= '<span class="age">' . date_get_age($data['birthday']) . '</span>' . "\n";
}
if (strlen($data['spot']) > 0) {
$return .= ' <span class="location">' . $data['spot'] . '</span>' . "\n";
}
if ($data['last_warning'] > time() - 604800) {
$return .= '<span class="warned">Varnad ' . '</span>' . "\n";
} elseif (strlen($data['forum_userlabel']) > 0) {
$return .= '<span class="userlevel">' . $data['forum_userlabel'] . '</span>' . "\n";
} elseif ($data['regtimestamp'] < time() - 86400 * 356 * 2.5) {
$return .= '<span class="userlevel">Veteran</span>' . "\n";
} elseif ($data['regtimestamp'] < time() - 86400 * 356) {
$return .= '<span class="userlevel">Stammis</span>' . "\n";
} elseif ($data['regtimestamp'] > time() - 86400 * 7) {
$return .= '<span class="userlevel">Nykomling</span>' . "\n";
}
if ($data['quality_level'] == 1) {
$return .= '<span class="post_count">' . cute_number($data['author_spam_count']) . ' spam</span>' . "\n";
} else {
if ($data['author'] == 15) {
$author_post_count = 'Några osöta';
} elseif ($data['author'] == 87926) {
$author_post_count = 'Många söta';
} elseif ($data['author'] == 774586) {
$author_post_count = 'Inte många';
} elseif ($data['author'] == 787082) {
$author_post_count = 'Många schmarta';
} elseif ($data['author'] == 891711) {
$author_post_count = '';
} elseif ($data['author'] == 299825) {
$author_post_count = '666 hatiska inlägg';
} else {
$author_post_count = cute_number($data['author_post_count']);
}
$return .= '<span class="post_count">' . $author_post_count . ' inlägg</span>' . "\n";
}
if ($data['lastaction'] > time() - 600) {
$return .= '<span class="online_status">Online</span>' . "\n";
}
$return .= ui_birthday_cake($data['birthday']) . "\n";
$return .= '</div>' . "\n";
$return .= '<div class="post_info">' . "\n";
$return .= '<span class="post_timestamp">' . fix_time($data['timestamp']) . '</span>' . "\n";
$return .= $data['parent_post'] == 0 ? '<h3>' . $data['title'] . '</h3>' : '';
$return .= '</div>' . "\n";
$return .= '<div class="post_content">' . "\n";
$return .= $data['removed'] == 1 ? '<strong>Inlägget är borttaget!</strong><br />' . "\n" : '';
$return .= discussion_forum_parse_output($data['content'], $options);
if (strlen($data['user_status']) > 0) {
$return .= '<p class="user_status">' . $data['user_status'] . '</p>' . "\n";
}
$return .= '</div>' . "\n";
$return .= '<div class="controls">' . "\n";
if ($options['show_post_controls'] == true) {
$return .= '<input type="text" class="forum_direct_link_input" id="forum_direct_link_input_' . $data['id'] . '" />';
$return .= '<button id="forum_direct_link_button_' . $data['id'] . '" class="forum_direct_link_button">Länk</button>' . "\n";
$return .= forum_security(array('action' => 'remove_post')) ? '<button value="' . $data['id'] . '" class="forum_remove_button">Ta bort</button>' . "\n" : '';
$return .= forum_security(array('action' => 'edit_post', 'post' => $data)) || forum_security(array('action' => 'post_addition', 'post' => $data)) ? '<button id="forum_edit_button_' . $data['id'] . '" class="forum_edit_button">Ändra</button>' . "\n" : '';
$return .= forum_security() ? '<button id="post_reply_' . $data['id'] . '" class="forum_reply_button">Citera</button>' . "\n" : '';
$return .= forum_security(array('action' => 'reply', 'post' => $parent_post)) === true ? '<button id="post_reply_' . $data['id'] . '" class="forum_reply_button">Svara</button>' . "\n" : '';
$return .= login_checklogin() ? '<button id="post_comment_' . $data['author'] . '" class="forum_comment_button" value="' . $data['id'] . '">Gästbok</button>' . "\n" : '';
if (forum_security()) {
$return .= '<input type="checkbox" class="post_move_check" name="post[]" value="' . $data['id'] . '" id="forum_move_check_' . $data['id'] . '" />';
$return .= '<label for="forum_move_check_' . $data['id'] . '">Flytta</label>' . "\n";
}
//.........这里部分代码省略.........
示例8: digga_instructions
}
function digga_instructions()
{
?>
<div id="digga_instructions">
<h2>Så gör du för att digga</h2>
</div>
<?php
}
if ($_SESSION['login']['id'] != 3) {
die('Closed for maintenance, som man säger i amerikat');
}
if ($_GET['action'] == 'view_info' && is_numeric($_GET['artist_id'])) {
$artist_info = digga_fetch_info($_GET['artist_id']);
echo '<h1>Digga ger dig info om ' . $artist_info['name'] . '</h1>' . "\n";
echo '<h3>' . cute_number($artist_info['popularity']) . ' Hamsterpajare diggar ' . $artist_info['name'] . '!</h3>' . "\n";
if (strlen($artist_info['description']) > 0) {
echo '<p class="digga_description">' . "\n";
echo nl2br($artist_info['description']);
echo '</p>' . "\n";
} else {
echo '<p class="digga_no_description">' . "\n";
echo 'Vi har tyvärr ingen beskrivning om ' . $artist_info['name'] . ' än. Om du känner att du kan mycket om det ';
echo 'här bandet eller den här artisten så får du hemskt gärna skriva en egen beskrivning och skicka den som ett ';
echo 'privat meddelande till <a href="/traffa/profile.php?id=65654">Rojk</a>. Glöm inte att tala om vilken artist ';
echo 'det gäller!' . "\n";
echo '</p>' . "\n";
}
$diggers = digga_fetch_diggers($_GET['artist_id']);
if (count($diggers) > 0) {
echo '<div id="digga_diggers">' . "\n";
示例9: films_film_play_draw
function films_film_play_draw($film, $options)
{
event_log_log('new_' . $film['film_type'] . '_watch');
film_view_count($film['id']);
echo '<div class="film_play" id="film_play">' . "\n";
rounded_corners_top();
$related_films = films_fetch(array('released' => true, 'film_type' => $film['film_type'], 'exclude' => array($film['id']), 'limit' => 3, 'order' => 'random'));
films_list($related_films, array('list_type' => 'film_list_compact', 'headline' => 'Fler ' . $film['film_type']));
echo '<h1 class="film_header">' . $film['title'] . '</h1>' . "\n";
echo '<div class="film_statistics">' . "\n";
echo '<div class="film_view_count">' . "\n";
echo cute_number($film['view_count'] + 1) . ' visningar' . "\n";
echo '</div>' . "\n";
// film_view_count
echo rank_draw($film['rank_average'], array('size' => 'medium'));
// echo '<div class="film_rank_count">' . "\n";
// echo cute_number($film['rank_count']) . ' röster' . "\n";
// echo '</div>' . "\n";
if (5 == $_SESSION['login']['userlevel']) {
echo '<a class="film_edit" href="/film/admin/' . $film['handle'] . '.html">[Redigera]</a>' . "\n";
}
echo '</div>' . "\n";
// film_statistics
echo '<div class="film_player">' . "\n";
if ($film['trailer_id'] > 0) {
echo '<!-- Play Networks - Embeddable Flash Player -->' . "\n";
echo '<div id="playnw" class="playnw">' . "\n";
echo '<script src="http://se.player.playnetworks.net/player.php?mid=' . $film['trailer_id'] . '&channel_user_id=4601100020-1&width=460&height=345"></script><br>' . "\n";
echo '</div>' . "\n";
echo '<!-- Play Networks - Embeddable Flash Player -->' . "\n";
} elseif ($film['use_special_code'] == 1) {
echo stripslashes($film['html']);
} elseif ($film['extension'] == 'swf') {
//todo! Här skall anpassas till distribute-systemet. distribute_server_get skall anropas för att f? en adress
// adress skall byggas med server . type . handle . '.' . extension
echo '<object type="application/x-shockwave-flash" data="http://amuse.hamsterpaj.net/distribute/film/' . $film['handle'] . '.swf" >
<param name="movie" value="http://amuse.hamsterpaj.net/distribute/film/' . $film['handle'] . '.swf" /></object>';
} elseif ($film['extension'] == 'flv') {
//todo! Här skall anpassas till distribute-systemet. distribute_server_get skall anropas för att f? en adress
// adress skall byggas med server . type . handle . '.' . extension
echo '<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Installera Flash Player</a> för att kunna se den här filmen.</p>
<script type="text/javascript">
var s1 = new SWFObject("/film/flvplayer.swf","single","460","345","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","http://amuse.hamsterpaj.net/distribute/film/' . $film['handle'] . '.flv");
s1.addVariable("image","' . IMAGE_URL . '/film/' . $film['handle'] . '.png");
s1.addVariable("width","460");
s1.addVariable("height","345");
s1.write("player1");
</script>';
} elseif ($film['film_type'] == 'bilder') {
//todo! Här skall anpassas till distribute-systemet. distribute_server_get skall anropas för att f? en adress
// adress skall byggas med server . type . handle . '.' . extension
echo '<img src="http://images.hamsterpaj.net/fun_images/' . $film['handle'] . '.jpg" class="fun_images_big" />' . "\n";
}
echo '</div>' . "\n";
// film_player
echo '<br style="clear: both;" />' . "\n";
echo '<div class="film_description">' . "\n";
if (strlen($film['description']) > 0) {
echo '<p>' . $film['description'] . '</p>' . "\n";
}
if ($film['trailer_id'] > 0) {
echo '<p>Filmtrailers visas i samarbete med Play Networks</p>' . "\n";
}
echo '</div>' . "\n";
// end film_description
echo '<div class="film_comments">' . "\n";
echo '<input type="hidden" id="film_id" value="' . $film['id'] . '" />' . "\n";
echo '<h2 class="rank_input_header">Din poäng</h2>' . "\n";
echo '<h2 class="comment_input_header">Din kommentar</h2>' . "\n";
echo '<br style="clear: both;" />' . "\n";
$query = 'SELECT rank FROM user_ranks WHERE user_id = "' . $_SESSION['login']['id'] . '" AND item_id = "' . $film['id'] . '" AND item_type = "film"';
$result = mysql_query($query);
if (mysql_num_rows($result) == 1) {
$data = mysql_fetch_assoc($result);
}
unset($rank_options);
$rank_options['previous'] = $data['rank'];
rank_input_draw($film['id'], 'film', $rank_options);
comments_input_draw($film['id'], 'film');
echo '<br style="clear: both;" />' . "\n";
echo '</div>' . "\n";
// film_comments
rounded_corners_bottom();
$options['comments'] = isset($options['comments']) ? $options['comments'] : 'yes';
if ($options['comments'] == 'yes') {
rounded_corners_top();
echo comments_list($film['id'], 'film');
rounded_corners_bottom();
}
echo '</div>' . "\n";
// film_play
}
示例10: entertain_item_draw
function entertain_item_draw($item, $options)
{
global $entertain_types;
entertain_item_viewed($item['id'], $item['entertain_type'], $item['view_count']);
$output .= '<span class="' . $item['entertain_type'] . '">' . "\n";
$output .= '<div class="entertain_item">' . "\n";
// Item title
$output .= '<h1 class="entertain_header">' . $item['title'] . '</h1>' . "\n";
/* The entertainment items are displayed in different ways for different types.
Games have full width while movie clips, flash films and images are displayed
in 3/4 width, whith a few thumbnails on the side.
*/
switch ($item['entertain_type']) {
case 'software':
case 'clip':
case 'flash':
case 'image':
$fetch_result = entertain_fetch(array('released' => true, 'entertain_type' => $item['entertain_type'], 'exclude' => array($item['id']), 'limit' => 3, 'order' => 'random'));
$related_items = $fetch_result['items'];
$output .= entertain_list($related_items, array('list_style' => 'thumbnails', 'headline' => 'Fler ' . $entertain_types[$item['entertain_type']]['label_plural']));
break;
case 'game':
break;
}
// Item rank, counter and release date
$output .= '<div class="entertain_statistics">' . "\n";
$output .= '<div class="entertain_rank">' . "\n";
$output .= rank_draw($item['rank_average'], array('size' => 'medium'));
$output .= '</div>' . "\n";
// end entertain_rank
$output .= '<div class="entertain_view_count">' . "\n";
$output .= cute_number($item['view_count'] + 1) . ' visningar sedan ' . "\n";
$output .= date('Y-m-d', $item['release']);
//fix_time($item['release']);
$output .= '</div>' . "\n";
// end entertain_date
$output .= '</div>' . "\n";
// end entertain_statistics
$output .= '<div class="entertain_player" id="entertain_player">' . "\n";
/* Now we shall display the entertainment item itself. This is done in different ways
for different types and also different depending on special properties like
use_special_code or trailer_id.
*/
if ($_SESSION['login']['id'] == 87926) {
preint_r($item);
}
//First, we consider a bunch of special cases, that is film trailers, items with their own special html, images and software links
if ($item['trailer_id'] > 0) {
$output .= '<!-- Play Networks - Embeddable Flash Player -->' . "\n";
$output .= '<div id="playnw" class="playnw">' . "\n";
$output .= '<script src="http://se.player.playnetworks.net/player.php?mid=' . $item['trailer_id'] . '&channel_user_id=4601100020-1&width=474&height=355"></script><br>' . "\n";
$output .= '</div>' . "\n";
$output .= '<!-- Play Networks - Embeddable Flash Player -->' . "\n";
} elseif ($item['use_special_code'] == 1) {
$output .= stripslashes($item['html']);
} elseif (strlen($item['link']) > 2 && $item['entertain_type'] == 'image') {
$server = distribute_server_get(array('item_handle' => $item['handle'], 'type' => $item['entertain_type']));
$address = 'http://' . $server['address'] . '/distribute/' . $item['entertain_type'] . '/' . $item['handle'] . '.' . $item['extension'];
$output .= '<a href="' . $item['link'] . '"><img src="' . $address . '" class="entertain_' . $item['entertain_type'] . '" /></a>' . "\n";
} elseif ($item['entertain_type'] == 'software') {
$output .= '<button onclick="window.location=\'' . $item['link'] . '\';" class="button_150">Ladda ner</button><br />' . "\n";
$output .= '<p>Alla filer är givetvis gratis att ladda ner och innehåller inga virus!</p>' . "\n";
} else {
$server = distribute_server_get(array('item_handle' => $item['handle'], 'type' => $item['entertain_type']));
$address = 'http://' . $server['address'] . '/distribute/' . $item['entertain_type'] . '/' . $item['handle'] . '.' . $item['extension'];
switch ($item['extension']) {
case 'swf':
$wrapper = '';
$output .= '<object type="application/x-shockwave-flash" data="' . $wrapper . $address . '" >
<param name="movie" value="' . $wrapper . $address . '" /></object>';
$item['entertain_type'] == 'clip' || $item['entertain_type'] == 'flash' ? event_log_log('jc_ad_after') : '';
break;
case 'flv':
$player_url = '/entertain/flvplayer.swf';
// On end of J-store campaign, set width to 456 and height to 355 on both places
$output .= '<div id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Installera Flash Player</a> för att kunna se den här grejen.</div>
<script type="text/javascript">
var s1 = new SWFObject("' . $player_url . '","single","466","336","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","' . $address . '");
s1.addVariable("image","' . IMAGE_URL . '/entertain/' . $item['handle'] . '.png");
s1.addVariable("width","466");
s1.addVariable("height","336");
s1.write("player1");
</script>';
break;
case 'jpg':
case 'png':
case 'gif':
$server = distribute_server_get(array('item_handle' => $item['handle'], 'type' => $item['entertain_type']));
$address = 'http://' . $server['address'] . '/distribute/' . $item['entertain_type'] . '/' . $item['handle'] . '.' . $item['extension'];
$output .= '<img src="' . $address . '" class="entertain_' . $item['entertain_type'] . '" />' . "\n";
}
}
$output .= '<div class="entertain_item_buttons">' . "\n";
if ($item['entertain_type'] == 'image') {
$query = 'SELECT id, handle FROM entertain_items WHERE id < "' . $item['id'] . '"';
$query .= ' AND `release` < ' . time();
$query .= ' AND entertain_type = "' . $item['entertain_type'] . '"';
$query .= ' ORDER BY id DESC';
//.........这里部分代码省略.........
示例11: file_get_contents
<?php
$serialized = file_get_contents(PATHS_CACHE . 'live_stats.phpserialized');
$info = unserialize($serialized);
$options['output'] .= '<h4>Besökare</h4>' . "\n";
$options['output'] .= cute_number($info['visitors']) . "\n";
$options['output'] .= '<h4>Inloggade</h4>' . "\n";
$options['output'] .= cute_number($info['logged_in']) . "\n";
$options['output'] .= '<h4>Medlemmar</h4>' . "\n";
$options['output'] .= cute_number($info['members']) . "\n";
$options['output'] .= '<h4>Sidvisningar idag</h4>' . "\n";
$pageviews = query_cache(array('query' => 'SELECT views FROM pageviews WHERE date = "' . date('Y-m-d') . '" LIMIT 1'));
$options['output'] .= cute_number($pageviews[0]['views']);
示例12: games_game_popularity_draw
function games_game_popularity_draw($game, $options = null)
{
echo '<div class="game_popularity" >' . "\n";
echo '<div class="game_played">' . "\n";
echo '<div class="column_1">' . cute_number($game['played']) . '</div><a href="/spel/topplistan/mest_spelade/">Spelningar</a>' . "\n";
echo '</div>' . "\n";
echo '<div class="game_points">' . "\n";
echo '<div class="column_1">' . cute_number($game['points']) . '</div><a href="/spel/topplistan/mest_hypade/">Hypes</a>' . "\n";
echo '</div>' . "\n";
echo '<div class="game_release">' . "\n";
echo '<div class="column_1">Släpptes</div>' . date('Y-m-d', $game['release']) . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
//end game_popularity
}
示例13: contests_list
function contests_list($contests)
{
global $contest_tags;
$counter = 0;
foreach ($contests as $contest) {
echo '<!-- Contest #' . $contest['id'] . ' -->' . "\n";
echo '<div class="contest">' . "\n";
echo '<div class="contest_freetext">' . "\n";
if ($contest['user_confirmed'] == 1) {
echo '<img src="http://images.hamsterpaj.net/contests/user_confirmed.png" />' . "\n";
}
echo '<h1><a href="/taevlingar/out.php?id=' . $contest['id'] . '" target="_blank">' . $contest['title'] . '</a></h1>' . "\n";
echo '<p>' . nl2br($contest['description']) . '</p>' . "\n";
echo '</div>' . "\n";
echo '<div class="contest_tags">' . "\n";
echo '<h3>Tävlingstyp</h3>' . "\n";
$first = true;
foreach ($contest['tags'] as $handle => $label) {
if (in_array($label, $contest_tags['contest_types'])) {
if (!$first) {
echo ', ';
}
echo '<a href="/taevlingar/' . $handle . '.html">' . $label . '</a>';
$first = false;
}
}
$first = true;
echo '<h3>Vinsttyp</h3>' . "\n";
foreach ($contest['tags'] as $handle => $label) {
if (in_array($label, $contest_tags['price_types'])) {
if (!$first) {
echo ', ';
}
echo '<a href="/taevlingar/' . $handle . '.html">' . $label . '</a>';
$first = false;
}
}
echo '</div>' . "\n";
echo '<div class="contest_footer">' . "\n";
echo '<span class="clicks">' . $contest['clicks'] . ' klick</span>' . "\n";
$time_left = ceil(($contest['time_end'] - time()) / 86400);
if ($time_left == 1) {
$time_label = 'Sista dagen idag';
} else {
$time_label = $time_left . ' dagar kvar';
}
$value = $contest['value'] == 0 ? 'okänt' : cute_number($contest['value']) . ':-';
$value = $contest['prize_value_cirka'] == 1 ? 'Ca ' . $value : $value;
echo '<span class="time_left">' . ceil(($contest['time_end'] - time()) / 86400) . ' dagar kvar</span>' . "\n";
echo '<span class="value">Värde: ' . $value . '</span>' . "\n";
echo '<span class="mark_as_done">markera som avklarad</span>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n\n\n";
if ($counter == 2) {
?>
<script type="text/javascript"><!--
google_ad_client = "pub-9064365008649147";
google_alternate_color = "FFFFFF";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
示例14: duration
echo '<td>' . $age . '</td>';
echo '<td>' . $data['spot'] . '</td>';
echo '<td>' . duration(time() - $data['regtimestamp']) . '</td>';
echo '</tr>';
}*/
?>
</table>
</div>
<div id="scribble_puff">
<a href="/traffa/klotterplank.php">
<img src="http://images.hamsterpaj.net/scribbler.png" style="float: left;" />
<?php
$query = 'SELECT id FROM klotterplank ORDER BY id DESC LIMIT 1';
$result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
$data = mysql_fetch_assoc($result);
echo '<h2>' . cute_number($data['id']) . ' inlägg på klotterplanket just nu!</h2>' . "\n";
?>
<p>
På klotterplanket skriver Hamsterpajare dygnet runt korta små inlägg. En del letar efter någon
att prata med, andra småpratar med den som dyker upp och några vill bara klaga på att lektionen
suger.<br />
Klotterplanket är till för dig som inte orkar med chatten och som vill se ansiktet på de du
pratar med.
</p>
</a>
</div>
<?php
ui_bottom();
示例15: ui_top
//.........这里部分代码省略.........
if (isset($options['menu_addition'])) {
$menu = array_merge_recursive($menu, $options['menu_addition']);
}
foreach ($menu as $handle => $current_menu) {
if (isset($current_menu['is_privilegied'])) {
$current_menu['is_privilegied'] = is_array($current_menu['is_privilegied']) ? $current_menu['is_privilegied'] : array($current_menu['is_privilegied']);
$is_privilegied = false;
foreach ($current_menu['is_privilegied'] as $privilegie) {
if (is_privilegied($privilegie)) {
$is_privilegied = true;
}
}
} else {
$is_privilegied = true;
}
if ($is_privilegied == true) {
$class = $handle == $options['menu_path'][0] ? 'menu_active' : 'menu';
echo '<div class="' . $class . '" id="menu_div_' . $handle . '">' . "\n";
$target = isset($current_menu['target']) ? ' target="' . $current_menu['target'] . '"' : '';
echo '<h3><a href="' . $current_menu['url'] . '" class="menu_title" id="menu_title_' . $handle . '"' . $target . '>' . $current_menu['label'] . '</a></h3>' . "\n";
echo '<div class="menu_content">' . "\n";
echo '<ul>' . "\n";
$label = isset($current_menu['index_label']) ? $current_menu['index_label'] : 'Start';
$class = count($options['menu_path']) == 1 && $handle == $options['menu_path'][0] ? ' class="active"' : '';
echo '<li' . $class . '><a href="' . $current_menu['url'] . '">' . $label . '</a></li>' . "\n";
if (count($current_menu['children']) > 0) {
$count_menu_items = ui_menu_recurse($current_menu['children'], $options, 1);
}
echo '</ul>' . "\n";
echo '</div>' . "\n";
echo '<img src="http://images.hamsterpaj.net/ui/menu/menu_box_open_bottom.png" class="menu_box_open_bottom" />' . "\n";
echo '<img src="http://images.hamsterpaj.net/ui/menu/menu_box_closed_bottom.png" class="menu_box_closed_bottom" />' . "\n";
echo '</div>' . "\n";
}
}
$serialized = file_get_contents(PATHS_INCLUDE . 'cache/live_stats.phpserialized');
$info = unserialize($serialized);
echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_top" />' . "\n";
echo '<div class="left_module">' . "\n";
echo '<h4>Besökare</h4>' . "\n";
echo cute_number($info['visitors']) . "\n";
echo '<h4>Inloggade</h4>' . "\n";
echo cute_number($info['logged_in']) . "\n";
echo '<h4>Medlemmar</h4>' . "\n";
echo cute_number($info['members']) . "\n";
echo '<h4>Sidvisningar idag</h4>' . "\n";
$pageviews = query_cache(array('query' => 'SELECT views FROM pageviews WHERE date = "' . date('Y-m-d') . '" LIMIT 1'));
echo cute_number($pageviews[0]['views']);
echo '</div>' . "\n";
echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_bottom" />' . "\n";
if (login_checklogin()) {
echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_top" />' . "\n";
echo '<div class="left_module">' . "\n";
echo '<h4>Minneslapp</h4>' . "\n";
echo '<textarea id="note">' . "\n";
echo htmlentities(stripslashes($_SESSION['note']));
echo '</textarea>' . "\n";
echo '<input type="button" value="Spara" class="button_50" onclick="note_save()" />' . "\n";
echo '</div>' . "\n";
echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_bottom" />' . "\n";
}
echo '</div>' . "\n";
echo '<div id="middle">' . "\n";
if (isset($_SESSION['notice_message'])) {
if (login_checklogin()) {
$notices[] = array('html' => $_SESSION['notice_message']);
}
unset($_SESSION['notice_message']);
}
$data = cache_load('recent_update');
if ($data['timestamp'] > time() - 1200 && $_SESSION['recent_update_notifier'][$data['id']] < 10) {
global $RECENT_UPDATES;
$content = '<span class="time">' . date('H:i', $data['timestamp']) . '</span>' . "\n";
$content .= '<span class="event">' . $RECENT_UPDATES[$data['type']] . '</span>' . "\n";
$content .= '<span class="link"><a href="/recent_updates_redirect.php?id=' . $data['id'] . '&url=' . urlencode($data['url']) . '&source=global_notice">' . $data['label'] . '</a></span>' . "\n";
$notices[] = array('html' => $content);
$_SESSION['recent_update_notifier'][$data['id']]++;
}
foreach ($notices as $notice) {
echo '<div class="notice">' . "\n";
if (isset($notice['timestamp'])) {
echo '<span class="time">' . date('H:i', $notice['timestamp']) . '</span>' . "\n";
}
echo $notice['html'];
echo '</div>' . "\n";
}
echo '<div id="content">' . "\n";
echo '<script type="text/javascript">CM8ShowAd("Rektangel");</script>' . "\n";
if (isset($_SESSION['posted_gb_to_webmaster'])) {
rounded_corners_top(array('color' => 'red'));
echo 'Men tjockis, det behövs inte mycket IQ för att förstå att användaren Webmaster inte är en riktig människa, utan en BOT som används för att maskineriet bakom Hamsterpaj ska fungera.<br /><br />Om ditt inlägg var speciellt (alltså inte som allt annat som hamnar i Webmasters inkorg, nämligen spam eller hatbrev) är du välkommen vända dig till någon ordningsvakt (se lista bland högermodulerna här till höger»).';
rounded_corners_bottom(array('color' => 'red'));
}
if (login_checklogin()) {
if (isset($_SESSION['unread_gb_entries'])) {
echo guestbook_list($_SESSION['unread_gb_entries']);
unset($_SESSION['unread_gb_entries']);
}
}
}