• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ui_avatar函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了ui_avatar函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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>';
    }
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:60,代码来源:avatarer.php


示例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>';
        }
    }
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:14,代码来源:ovs_online.php


示例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
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:49,代码来源:klotterplank.php


示例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;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:21,代码来源:friends.php


示例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;
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:39,代码来源:contest.lib.php


示例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 &raquo;</a>' : '';
        $out .= '<div style="clear: both; height: 5px;"></div>' . "\n";
        $out .= '</div>';
        $out .= sex_sense_bright_container_bottom();
        $closed_content++;
    }
    return $out;
}
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:38,代码来源:sex_sense.lib.php


示例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;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:37,代码来源:online_ovs.php


示例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 ? '&nbsp;<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";
            }
//.........这里部分代码省略.........
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:101,代码来源:discussion_forum.lib.php


示例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";
 }
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:index.php


示例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;
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:14,代码来源:ui.lib.php


示例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;
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:41,代码来源:christmas_avatars_polls.lib.php


示例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();
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:search.lef.php


示例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 &raquo;</a></span>' . "\n";
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:6,代码来源:photoblog_user.module.php


示例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();
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:admins.php


示例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 &raquo;"	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"+"'));
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:avatar-settings.php


示例16: group_list_messages

function group_list_messages($options)
{
    $groupid = $options['group_id'];
    /* Fetch the total messages in group */
    $selectquery = 'SELECT message_count AS total, owner FROM groups_list WHERE groupid = ' . $groupid;
    $result = mysql_query($selectquery) or die(report_sql_error($selectquery));
    $data = mysql_fetch_assoc($result);
    $total_msg = $data['total'];
    $new_messages = $data['total'];
    /* Get the group owner */
    $owner = $data['owner'];
    /* Fetch read_msg for this user */
    $selectquery = 'SELECT read_msg AS total_read FROM groups_members WHERE groupid = ' . $groupid . ' AND userid = ' . $_SESSION['login']['id'];
    $result = mysql_query($selectquery) or die(report_sql_error($selectquery));
    $data = mysql_fetch_assoc($result);
    $query = 'UPDATE groups_members SET read_msg = ' . $total_msg . ' WHERE userid = ' . $_SESSION['login']['id'] . ' AND groupid = ' . $groupid;
    mysql_query($query) or die(report_sql_error($query));
    $_SESSION['cache']['groups_notices'][$groupid]['unread_messages'] = 0;
    $new_messages = $new_messages - $data['total_read'];
    /* Update the read_msg */
    $query = 'SELECT login.username, groups_scribble.userid, groups_scribble.timestamp, groups_scribble.text, groups_scribble.id, userinfo.image, userinfo.birthday FROM login, groups_scribble, userinfo WHERE login.id = groups_scribble.userid AND groups_scribble.groupid = ' . $groupid . ' AND userinfo.userid = groups_scribble.userid AND groups_scribble.deleted = 0 ORDER BY groups_scribble.id DESC LIMIT ' . ($options['page'] - 1) * 100 . ', 100';
    //Lef hackar via råd från heggan. Maskroskisseporr ska inte synas för hennes söta ögon.
    if ($_SESSION['login']['id'] == '148153') {
        /* Fetch the total messages in group */
        $query = 'SELECT login.username, groups_scribble.userid, groups_scribble.timestamp, groups_scribble.text, groups_scribble.id, userinfo.image, userinfo.birthday FROM login, groups_scribble, userinfo WHERE groups_scribble.text NOT LIKE "%maskrosp0rn%" AND login.id = groups_scribble.userid AND groups_scribble.groupid = ' . $groupid . ' AND userinfo.userid = groups_scribble.userid AND groups_scribble.deleted = 0 ORDER BY groups_scribble.id DESC LIMIT ' . ($options['page'] - 1) * 100 . ', 100';
    }
    //Död åt lef
    $result = mysql_query($query) or die(report_sql_error($query));
    /* $count_read - Hur många msg har gruppen 	*/
    $count_read = 0;
    while ($data = mysql_fetch_assoc($result)) {
        for ($i = 0; $i < count($surveys); $i++) {
            if ($surveys[$i]['start_time'] >= $data['timestamp']) {
                echo survey_draw_frame($surveys[$i]);
                unset($surveys[$i]);
            }
        }
        $div_code = $count_read < $new_messages ? 'orange' : 'blue';
        if (preg_match("/(" . $_SESSION['login']['username'] . "|Magic word: igotgodmodeigotgubbmode)/i", $data['text'])) {
            $div_code = 'orange_deluxe';
        }
        echo rounded_corners_top(array('color' => $div_code));
        echo '<table class="body" style="width: 95%;"><tr><td style="vertical-align: top; width: 75px;">';
        if ($data['image'] == 1 || $data['image'] == 2) {
            echo ui_avatar($data['userid']);
        } else {
            echo '<img src="' . IMAGE_URL . 'user_no_image.png" alt="Ingen visningsbild"/>';
        }
        echo '</td><td style="vertical-align: top;">';
        echo fix_time($data['timestamp']) . ' <a href="javascript:void(0);" onclick="javascript:document.postform.group_message.value=document.postform.group_message.value + \'' . $data['username'] . ': \';document.postform.group_message.focus();">[^]</a><br/>';
        echo '<a href="/traffa/profile.php?id=' . $data['userid'] . '">';
        echo '<b>' . ($data['userid'] == 43273 ? '<span style="color: #FF60B6">GheyAtrapp</span>' : $data['username']) . '</b></a> ';
        if ($owner == $_SESSION['login']['id'] || is_privilegied('groups_superadmin')) {
            echo '<a href="' . $_SERVER['PHP_SELF'] . '?action=remove_post&amp;groupid=' . $groupid . '&amp;postid=' . $data['id'] . '" onclick="return confirm(\'Vill du verkligen ta bort posten?\')">[Ta bort]</a>';
        }
        echo ui_birthday_cake($data['birthday']) . ' ';
        echo '<br/>';
        echo setSmilies(discussion_forum_parse_output($data['text']));
        echo '</td></tr></table>';
        echo rounded_corners_bottom(array('color' => $div_code));
        $count_read++;
    }
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:63,代码来源:groups_active.lib.php


示例17: tests_get_last_test_completers

function tests_get_last_test_completers($options)
{
    if (!isset($options['test_id'], $options['limit'])) {
        return 'tests_get_last_test_completers - Not enough parameters...';
    }
    if (!is_numeric($options['test_id']) || !is_numeric($options['limit'])) {
        return 'Wrong parameter format for tests_get_last_test_completers.';
    }
    $query = 'SELECT tus.score AS score, l.id AS userid, l.username AS username, u.image AS image';
    $query .= ' FROM tests_user_score AS tus, login AS l, userinfo AS u';
    $query .= ' WHERE tus.test_id = ' . $options['test_id'] . ' AND tus.user_id = l.id AND u.userid = l.id';
    $query .= ' ORDER BY tus.timestamp DESC';
    $query .= ' LIMIT ' . $options['limit'];
    $result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    $return = mysql_num_rows($result) > 0 ? '' : 'Ingen inloggad användare har gjort testet ännu!';
    while ($data = mysql_fetch_assoc($result)) {
        $return .= '<div class="tests_completer">';
        $return .= '<h3>' . $data['score'] . ' poäng</h3>' . "\n";
        $return .= '<a href="/traffa/profile.php?id=' . $data['userid'] . '">' . ucfirst($data['username']) . '</a><br />' . "\n";
        $return .= ui 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ui_bottom函数代码示例发布时间:2022-05-23
下一篇:
PHP ui_add_effects_support函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap