本文整理汇总了PHP中ui_avatar函数的典型用法代码示例。如果您正苦于以下问题:PHP ui_avatar函数的具体用法?PHP ui_avatar怎么用?PHP ui_avatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ui_avatar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list_avatars
function list_avatars()
{
global $hp_url;
$result = mysql_query('SELECT login.id, login.username, userinfo.gender, userinfo.birthday FROM login, userinfo WHERE login.id = userinfo.userid && image = "1" LIMIT 40');
if (mysql_num_rows($result) == 0) {
echo '<br /><br />Hittade inga avatarer som inte validerats.';
} else {
echo '<a href="' . $_SERVER['PHP_SELF'] . '?selectall=">Kryssa "Ja" på alla.</a>';
echo ' | <a onclick="alert(\'Nehejdu :P det går inte ;)\')" style="cursor: pointer;">Döda deras mammor.</a>';
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post" name="avatarform">';
$columns = 0;
rounded_corners_top();
echo '<table class="body"><tr>';
while ($data = mysql_fetch_assoc($result)) {
if ($data['gender'] == 'F') {
$bgstyle = 'background: #F7F7F7 url(\'/images/klotterplankbgF.png\') repeat-x;';
} elseif ($data['gender'] == 'P') {
$bgstyle = 'background: #F7F7F7 url(\'/images/klotterplankbgP.png\') repeat-x;';
} else {
$bgstyle = 'background: #F7F7F7 url(\'/images/klotterplankbg.png\') repeat-x;';
}
echo '<td style="' . $bgstyle . ' vertical-align: top;">';
echo '<a href="' . $hp_url . 'traffa/profile.php?id=' . $data['id'] . '"><b>' . $data['username'] . '</b></a>';
if ($data['gender'] != NULL) {
echo ' ' . $data['gender'];
}
if ($data['birthday'] != '0000-00-00') {
$yrsold = floor((time() - strtotime($data['birthday'])) / 31536000);
echo $yrsold . '';
}
echo '<br />';
echo ui_avatar($data['id']);
echo '<br />';
echo '<table><tr>';
$selected = '';
if (isset($_GET['selectall'])) {
$selected = 'checked ';
}
echo '<td><input ' . $selected . 'type="radio" name="user' . $data['id'] . '" value="2"></td>';
echo '<td><input type="radio" name="user' . $data['id'] . '" value="3"></td>';
echo '<td><input type="radio" name="user' . $data['id'] . '" value="4"></td>';
echo '</tr><tr>';
echo '<td style="text-align: center;"><a style="cursor: pointer;" onclick="document.avatarform.user' . $data['id'] . '[0].checked = true;">Y</a></td>';
echo '<td style="text-align: center;"><a style="cursor: pointer;" onclick="document.avatarform.user' . $data['id'] . '[1].checked = true;">N</a></td>';
echo '<td style="text-align: center;"><a style="cursor: pointer;" onclick="document.avatarform.user' . $data['id'] . '[2].checked = true;">X</a></td>';
echo '</tr></table>';
$columns++;
if ($columns == 6) {
echo '</tr><tr>';
$columns = 0;
}
echo '</td>';
}
echo '</tr>';
echo '</table>';
rounded_corners_bottom();
echo '<input type="submit" value="Korsfäst!" class="button_80">';
echo '</form>';
}
}
示例2: online_ovs
function online_ovs($level)
{
$query = 'SELECT username, lastaction, id FROM login WHERE userlevel = ' . $level . '';
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
if ($row['lastaction'] > time() - 600) {
$out .= '<div style="width: 150px; height: 150px; float: left; margin: 0px;">' . "\n";
$out .= $row['username'] . '<br />';
$out .= '<span class="online">online</span>' . "\n";
$out .= ui_avatar($row['id']);
$out .= '</div>';
}
}
}
示例3: viewPosts
function viewPosts($mode = 'normal', $criteria = NULL)
{
//Visar alla inlägg
$query = makeQuery($mode, $criteria);
$result = mysql_query($query) or die('Ett fel har upstått:<br/>' . mysql_error());
$genderlabels['P'] = 'Pojke';
$genderlabels['F'] = 'Flicka';
while ($data = mysql_fetch_assoc($result)) {
$userage = date_get_age($data['birthday']);
if ($data['gender'] == 'P') {
$divbg = 'blue_faded_div';
} elseif ($data['gender'] == 'F') {
$divbg = 'pink_faded_div';
} else {
$divbg = 'grey_faded_div';
}
if (isset($_SESSION['login']['username'])) {
if (preg_match("/" . $_SESSION['login']['username'] . "/i", $data['text'])) {
$divbg = 'orange_faded_div';
} elseif ($_SESSION['login']['username'] == $data['username']) {
$divbg = 'green_faded_div';
}
}
echo '<div class="' . $divbg . '" style="repeat-x; margin-top: 10px; border: 1px solid #CCCCCC;">' . "\n";
echo '<table class="body" style="width: 100%;"><tr><td style="vertical-align: top; width: 75px;">' . "\n";
if ($data['image'] == 1 || $data['image'] == 2) {
echo ui_avatar($data['userid']);
} else {
echo '<img src="' . IMAGE_URL . 'images/noimage.png" style="width: 75px; height: 75px; border: 1px solid #cccccc;" alt="Ingen visningsbild"/>' . "\n";
}
echo '</td><td style="vertical-align: top;">';
echo fix_time($data['timestamp']) . ' (inlägg #' . $data['id'] . ') <a style="text-decoration:none;" href="javascript:#;" onclick="javascript:document.gbform.message.value=document.gbform.message.value+\'' . $data['username'] . ' : \';document.gbform.message.focus();">[^]</a><br/>' . "\n";
echo '<a href="/traffa/profile.php?id=' . $data['userid'] . '">' . "\n";
echo '<b>' . $data['username'] . '</b></a> ' . "\n";
echo ui_birthday_cake($data['birthday']) . ' ' . "\n";
echo $genderlabels[$data['gender']];
if ($userage > 1) {
echo ' ' . $userage . 'år' . "\n";
}
if (strlen($data['geo_location']) > 1) {
echo ' från ' . htmlentities($data['geo_location']) . "\n";
}
echo '<br/>' . "\n";
echo setsmilies($data['text']) . "\n";
echo '</td></tr></table>' . "\n";
echo '</div>' . "\n";
}
//while-satsen för att skriva ut inlägg
}
示例4: render_friends_list
function render_friends_list($friends, $params = array())
{
$return .= '<ul class="friends_list">' . "\n";
foreach ($friends as $friend) {
$return .= '<li>' . "\n";
if ($friend['image'] == 1 || $friend['image'] == 2) {
$return .= ui_avatar($friend['user_id']) . "\n";
}
$return .= '<a href="/traffa/profile.php?id=' . $friend['user_id'] . '">' . $friend['username'] . '</a>' . "\n";
$genders = array('f' => 'F', 'm' => 'P');
$return .= isset($genders[$friend['gender']]) ? $genders[$friend['gender']] : '';
$return .= $friend['birthday'] != '0000-00-00' ? date_get_age($friend['birthday']) : '';
$return .= $friend['lastaction'] > time() - 600 ? '<span class="online">online</span>' : '';
if ($params['user_id'] == $_SESSION['login']['id'] && ($params['friend_type'] == 'idol' || $params['friend_type'] == 'friend')) {
$return .= '<a class="relation_end_control" href="/traffa/friends.php?user_id=' . $friend['user_id'] . '&action=removefriend">[Avsluta relationen]</a>' . "\n";
}
$return .= '</li>' . "\n";
}
$return .= '</ul>' . "\n";
return $return;
}
示例5: echo_sysop_images
function echo_sysop_images($params)
{
if ($params['return_options'] == true) {
$query = 'SELECT `id`, `username` FROM login WHERE `userlevel` = \'5\' LIMIT 20';
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
$sysop_id = $row["id"];
$sysop_name = $row["username"];
$out .= '<option value="' . $sysop_id . '">' . $sysop_name . '</option>';
}
} else {
$out .= '<h1>Våra soeta Sysops</h1>';
$out .= '<div id="sysops" class="sysops">';
$out .= rounded_corners_top(array("color" => "blue_deluxe"));
$out .= '<ul class="rita_img">';
$query = 'SELECT `id`, `username` FROM login WHERE `userlevel` = \'5\' LIMIT 20';
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
$sysop_id = $row["id"];
$sysop_name = $row["username"];
if (file_exists(IMAGE_PATH . 'images/users/thumb/' . $sysop_id . '.jpg')) {
$out .= '<li class="imgli">';
$out .= '';
$out .= ui_avatar($sysop_id);
$out .= '';
$out .= '<a href="/traffa/profile.php?user_id=' . $sysop_id . '">' . $sysop_name . '</a>';
$out .= '</li>';
} else {
$out .= '<li class="imgli">';
$out .= '<a href="/traffa/profile.php?user_id=' . $sysop_id . '">';
$out .= '<img src="http://images.hamsterpaj.net/tavling/gissa.png" class="user_avatar" />';
$out .= '</a>';
$out .= '<a href="/traffa/profile.php?user_id=' . $sysop_id . '">' . $sysop_name . '</a>';
$out .= '</li>';
}
}
}
return $out;
}
示例6: sex_sense_render_posts
function sex_sense_render_posts($posts, $options = array())
{
foreach ($posts as $post) {
$out .= sex_sense_bright_container_top();
$out .= sex_sense_dark_container_top();
$out .= '<h3 class="sex_sense_post_header" id="header_' . $post['id'] . '">' . $post['title'] . '</h3>' . "\n";
$out .= sex_sense_dark_container_bottom();
$out .= '<div class="' . (isset($options['unhide_content']) && $options['unhide_content'] == true ? 'content' : 'hidden_content') . '" id="content_' . $post['id'] . '">';
$out .= '<p>' . nl2br($post['question']) . '</p>' . "\n";
foreach ($post['answers'] as $answer) {
$out .= ui_avatar($answer['user_id']);
$out .= sex_sense_bubble_top();
$out .= '<h4>' . $answer['username'] . ' svarar:</h4>' . "\n";
$out .= '<p>' . nl2br($answer['answer']);
$out .= is_privilegied('sex_sense_admin') ? '<br /><a href="/sex_och_sinne/aendra_svar.php?id=' . $answer['id'] . '">Ändra svar.</a>' : '';
$out .= '</p>' . "\n";
$out .= sex_sense_bubble_bottom();
}
$direct_link = '/sex_och_sinne/';
$categories = sex_sense_fetch_categories(array('category_id' => $post['category_id']));
foreach ($categories as $category_tree) {
$category = array_pop($category_tree);
$direct_link .= $category['category_handle'] . '/';
}
$direct_link .= $post['handle'] . '.html';
$out .= '<button class="button_80" onclick="window.location=\'' . $direct_link . '\';">Direktlänk</button>' . "\n";
if ($post['forum_post_id'] != 0) {
$thread_url = forum_get_url_by_post($post['forum_post_id']);
$out .= '<button class="button_140" onclick="window.location=\'' . $thread_url . '\';">Diskutera i forumet</button>' . "\n";
}
$out .= is_privilegied('sex_sense_admin') ? '<br /><a href="/sex_och_sinne/admin.php?id=' . $post['id'] . '">Ändra fråga/lägg till svar »</a>' : '';
$out .= '<div style="clear: both; height: 5px;"></div>' . "\n";
$out .= '</div>';
$out .= sex_sense_bright_container_bottom();
$closed_content++;
}
return $out;
}
示例7: online_ovs2
function online_ovs2()
{
$ul = $_SESSION['login']['userlevel'];
//$ul = 1;
//$userlevel_fetch = ($level == 3) ? "userlevel = 3 OR userlevel = 4" : "userlevel = 5";
$userlevel_fetch = "userlevel >= 3";
$query = query_cache(array('query' => 'SELECT userlevel, id, username, lastaction FROM login WHERE ' . $userlevel_fetch . ' ORDER BY lastaction DESC'));
$out .= '<div class="ovlist">
<ul>';
foreach ($query as $row) {
if ($row['lastaction'] > time() - 600) {
$ov_ul = $row['userlevel'];
switch ($ov_ul) {
case 3:
$ov_ul_in_swedish = "Ordningsvakt";
break;
case 4:
$ov_ul_in_swedish = "Administratör";
break;
case 5:
$ov_ul_in_swedish = "Sysop";
break;
}
$out .= '<li>' . "\n";
$out .= ui_avatar($row['id']);
$out .= '<a href="/traffa/guestbook.php?view=' . $row['id'] . '">' . $row['username'] . '</a><br />';
$out .= $ov_ul_in_swedish . '<br />';
//$out .= '<span style="color: #008f00;">online</span>' . "\n";
$out .= '</li>';
$many[] = $row['id'];
}
}
$out .= '</ul>
<br style="clear: both;" />
</div>';
return $out;
}
示例8: 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";
}
//.........这里部分代码省略.........
示例9: radio_schedule_fetch
$out .= '</div>' . "\n";
} else {
$out .= '<div id="radio_sending_inactive">' . "\n";
// Displays "Ingen sändning
$out .= '</div>' . "\n";
}
$options['broadcasting'] = false;
// It shouldn't be broadcasting right now
$options['limit'] = 1;
// We only want the coming one
$options['order-direction'] = 'ASC';
// We want the coming one
$radio_next_program = radio_schedule_fetch($options);
if (isset($radio_next_program[0])) {
$out .= '<div id="radio_next_program">' . "\n";
$out .= ui_avatar($radio_next_program[0]['user_id']) . "\n";
$out .= '<div class="radio_about">' . "\n";
$out .= '<h2>' . $radio_next_program[0]['name'] . '</h2>' . "\n";
$out .= '<strong>DJ: ' . $radio_next_program[0]['username'] . '</strong><br />' . "\n";
$out .= '<span>' . $radio_next_program[0]['sendtime'] . '</span>' . "\n";
$out .= '</div>' . "\n";
$out .= '</div>' . "\n";
} else {
$out .= '<div id="radio_next_program_inactive">' . "\n";
// Displays a "Inget inplanerat" box
$out .= '</div>' . "\n";
}
$out .= '<br style="clear: both;" />' . "\n";
if ($radio_server_problems === true) {
$out .= '<div class="form_notice_error">Något verkar vara fel med servern, vi jobbar på felet och skyller det på Heggan.</div>' . "\n";
}
示例10: message_top
function message_top($options)
{
if (!isset($options['type'])) {
$options['type'] = 'standard';
}
$content = '<li class="message">' . "\n";
$content .= '<div class="' . $options['type'] . '">' . "\n";
$content .= ui_avatar($options['user_id']) . "\n";
$content .= '<div class="container">' . "\n";
$content .= '<div class="top_bg">' . "\n";
$content .= '<div class="bottom_bg">' . "\n";
$content .= '<div>' . "\n";
return $content;
}
示例11: christmas_avatar_draw_result
function christmas_avatar_draw_result($options)
{
$output = '';
$poll_list = array();
$total_votes = 0;
$options['poll_id'] = isset($options['poll_id']) ? intval($options['poll_id']) : 0;
$query_title = 'SELECT poll_title FROM christmas_avatars_polls WHERE poll_id = ' . $options['poll_id'] . ' AND is_removed = 0 LIMIT 1';
$result_title = mysql_query($query_title) or report_sql_error($query_title, __FILE__, __LINE__);
$data_title = mysql_fetch_assoc($result_title);
//fetch contenders
$query = 'SELECT c.id AS contender_id, c.contender AS contender_uid, l.username FROM christmas_avatars_contenders AS c, login AS l WHERE c.parent_poll = ' . $options['poll_id'] . ' AND l.id = c.contender AND c.is_removed = 0';
$result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
$number_of_contenders = mysql_num_rows($result);
if ($number_of_contenders > 0) {
while ($data = mysql_fetch_assoc($result)) {
$query_votes = 'SELECT NULL FROM christmas_avatars_votes AS v WHERE v.poll_id = ' . $options['poll_id'] . ' AND v.contender_id = ' . $data['contender_id'] . ' AND v.voter != 0 AND v.is_removed = 0';
$result_votes = mysql_query($query_votes) or report_sql_error($query_votes, __FILE__, __LINE__);
$contenders_votes = mysql_num_rows($result_votes);
$poll_list[] = array('votes' => $contenders_votes, 'contender' => $data['contender_uid'], 'username' => $data['username']);
$total_votes += $contenders_votes;
}
$output .= '<h2 id="poll_' . $options['poll_id'] . '">Resultat för ' . $data_title['poll_title'] . ' - ' . $total_votes . ' röst' . ($total_votes == 1 ? '' : 'er') . '</h2>' . "\n";
if ($total_votes > 0) {
foreach ($poll_list as $contender) {
$per_cent = round($contender['votes'] / $total_votes * 100, 2);
$output .= '<a href="/traffa/profile.php?user_id=' . $contender['contender'] . '">' . $contender['username'] . '</a>' . "\n";
$output .= '<br />' . "\n";
$output .= ui_avatar($contender['contender'], array('style' => 'height: 67;width: 50.25px')) . "\n";
$output .= '<div class="box">' . "\n";
$output .= '<div class="bar" title="' . $per_cent . '"></div>' . "\n";
$output .= '</div>' . "\n";
$output .= '<br />' . "\n";
}
} else {
$output .= 'Inga har röstat!';
}
} else {
$output .= 'Inga deltagare!';
}
return $output;
}
示例12: AND
$query .= 'AND' . $agequery_start . ' AND ' . $agequery_end . 'AND userinfo.birthday <> 0000-00-00';
$query .= ' AND userinfo.gender != "' . $_SESSION['userinfo']['gender'] . '"';
$query .= ' AND userinfo.gender != "u"';
$query .= ' AND userinfo.gender != ""';
$query .= ' AND (userinfo.image = 1 OR userinfo.image = 2)';
$query .= ' ORDER BY login.lastaction DESC LIMIT 0, 16';
$result = mysql_query($query) or die(report_sql_error($query));
// Let's show the result to the user
$out .= '<h2>Resultat</h2>';
if (mysql_num_rows($result) > 0) {
$out .= 'Hittade en hel bunt med folk som passade in på din sökning! <br /><br />';
while ($data = mysql_fetch_assoc($result)) {
if ($data['gender'] == 'f') {
$out .= '<div class="search_userbox girl">';
} elseif ($data['gender'] == 'm') {
$out .= '<div class="search_userbox boy">';
} else {
$out .= '<div class="search_userbox">';
}
$out .= ui_avatar($data['userid']);
$out .= '<br />' . "\n";
$out .= '<a href="/traffa/profile.php?user_id=' . $data['userid'] . '">' . $data['username'] . ' ' . $data['gender'] . date_get_age($data['birthday']) . '</a>' . "\n";
$out .= '</div>' . "\n";
}
} else {
$out .= 'Tyvärr hittades ingen som matchade din sökning :(';
}
}
ui_top($ui_options);
echo $out;
ui_bottom();
示例13: ui_avatar
<?php
global $photoblog_user;
$options['output'] .= ui_avatar($photoblog_user['id']);
$options['output'] .= '<h3><a href="/traffa/profile.php?user_id=' . $photoblog_user['id'] . '">' . $photoblog_user['username'] . '</a></h3>' . "\n";
$options['output'] .= '<br /><span><a href="/traffa/profile.php?user_id=' . $photoblog_user['id'] . '">Gå till presentation »</a></span>' . "\n";
示例14: mysql_query
$query .= 'login.username AS username, login.id AS userid, login.userlevel AS userlevel, userinfo.birthday AS birthday, ';
$query .= 'userinfo.gender AS gender, userinfo.image AS image ';
$query .= 'FROM login, userinfo ';
$query .= 'WHERE userinfo.userid = login.id AND login.userlevel > 2 ';
$result = mysql_query($query) or die('Ett fel uppstod vid hämtning av data<br><br>' . $query . '<br><br>' . mysql_error());
//echo '<pre>';
// echo '<table><tr>';
$last_user_level = 0;
//rounded_corners_top();
while ($data = mysql_fetch_assoc($result)) {
echo '<div style="width: 110px;height: 150px;' . ($last_user_level != $data['userlevel'] ? 'clear: left;' : '') . 'float: left;margin: 0px;' . '">' . "\n";
$last_user_level = $data['userlevel'];
echo '<a href="/traffa/profile.php?id=' . $data['userid'] . '"><b>' . $data['username'] . '</b></a>';
echo ' ' . $data['gender'] . date_get_age($data['birthday']);
echo '<br />';
if ($data['userlevel'] == 5) {
echo '<font color="red">SysOp</font>';
} elseif ($data['userlevel'] == 4) {
echo '<font color="green">Administratör</font>';
} elseif ($data['userlevel'] == 3) {
echo '<font color="blue">Ordningsvakt</font>';
} else {
echo 'Level 2';
}
echo '<br />';
echo ui_avatar($data['userid']);
echo '</div>' . "\n";
}
//rounded_corners_bottom();
// echo '</tr></table>';
ui_bottom();
示例15: verify_checkboxes
alert(\'Men fy på dig, du måste läsa reglerna igen ordentligt!\');
return false;
}
}
</script>
<input name="submit" type="submit" value="Ladda upp" onclick="return verify_checkboxes();" class="button_80" />';
if (isset($_GET['registerproccess'])) {
$out .= '<input type="hidden" name="registerproccess" value="1" />
<br /><br />
<input type="button" class="button" value="Nej tack, jag vill inte ladda upp en bild »" onclick="location.href=\'/register.php?nextstep=3\'">';
}
$out .= '</form>';
$avatar_full_filename = $avatar_path_full . $_SESSION['login']['id'] . '.jpg';
if (is_file($avatar_full_filename)) {
$out .= '<h2 style="margin: 0px; ">Din nuvarande bild:</h2>';
$out .= ui_avatar($_SESSION['login']['id'], array('style' => 'border: 1px solid #333333'));
$out .= '<br /><b><a href="' . $_SERVER['PHP_SELF'] . '?action=delete">» Ta bort bilden</a></b>';
}
} elseif ($_GET['step'] == '2') {
if (!is_file($avatar_tmp_orginal_filename)) {
jscript_alert('Någonting blev fel vid uppladdningen av bilden, försök igen!');
jscript_go_back();
die;
}
$copy_data = read_copy_protection($avatar_tmp_orginal_filename);
if ($copy_data['copyright'] == 1 && $_SESSION['login']['id'] != $copy_data['userid']) {
jscript_alert('Den gubben gick inte');
jscript_go_back();
die;
}
$avatar_height = intval(exec('identify ' . $avatar_tmp_orginal_filename . ' | cut -f3 -d" " | cut -f2 -d"x" | cut -f1 -d"+"'));