本文整理汇总了PHP中rounded_corners_top函数的典型用法代码示例。如果您正苦于以下问题:PHP rounded_corners_top函数的具体用法?PHP rounded_corners_top怎么用?PHP rounded_corners_top使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rounded_corners_top函数的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: render_entries
function render_entries($entries, $options)
{
$content .= '<ul class="group_entries">' . "\n";
foreach ($entries as $entry) {
$options['user_id'] = $entry['user_id'];
$content .= message_top($options);
$content .= '<div style="border-bottom: 1px solid #ababab;">' . "\n";
$content .= '<span class="timestamp">' . fix_time($entry['timestamp']) . '</span>' . "\n";
$content .= '<h2 style="display: inline;">' . $entry['header'] . '</h2> - <a href="/traffa/profile.php?id=' . $entry['user_id'] . '">' . $entry['username'] . '</a> ' . "\n";
$content .= $entry['gender'];
$content .= date_get_age($entry['birthday']);
$content .= '<p>' . "\n";
$content .= nl2br(html_entity_decode($entry['content'])) . "\n";
$content .= '</p>' . "\n";
$content .= '</div>' . "\n";
// ----START----
$content .= $_GET['action'] != 'show' ? '<a href="/hamsterpaj/hamsterblogg.php?action=show&id=' . $entry['id'] . '">Kommentera »</a>' : '<a href="/hamsterpaj/hamsterblogg.php">« Tillbaka</a>';
// ----END------
$content .= message_bottom();
if ($options['enable_comments'] == true) {
$content .= rounded_corners_top();
$content .= '<label>Kommentera:</label>' . "\n";
$content .= comments_input_draw($entry['id'], 'hamsterblog');
$content .= rounded_corners_bottom();
$content .= '<div style="clear: both;"></div>' . "\n";
$content .= comments_list($entry['id'], 'hamsterblog');
}
}
$content .= '</ul>' . "\n";
return $content;
}
示例3: regform_header_p13
function regform_header_p13()
{
echo rounded_corners_top(array('color' => 'orange_deluxe'));
$info2 .= '<img style="float: left; padding: 5px 5px 5px 0;" src="http://images.hamsterpaj.net/13skylt.png" />' . "\n";
$info2 .= '<h1 style="margin: 0 0 3px 0; font-size: 16px;">Hamsterpaj är ingen barnsida, är du under 13 så använd www.lunarstorm.se</h1>' . "\n";
$info2 .= '<p style="margin: 0 0 0 0;">Vi som gör Hamsterpaj tycker att medlemmar under 13 år ställer till en massa problem. Om du inte har fyllt 13 borde du läsa vår <a href="http://www.hamsterpaj.net/artiklar/?action=show&id=24">ålderspolicy</a> och fundera på om Hamsterpaj är rätt ställe för dig. Annars rekommenderar vi Lunarstorm, där kan man få häftiga statuspoäng!</p>' . "\n";
$info2 .= '<div style="clear:both;"></div>' . "\n";
echo $info2;
echo rounded_corners_bottom(array('color' => 'orange_deluxe'));
}
示例4: 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;
}
示例5: array
require '/storage/www/www.hamsterpaj.net/data/include/libraries/developer_blog.lib.php';
require PATHS_INCLUDE . 'libraries/comments.lib.php';
$ui_options['stylesheets'][] = 'abuse.css';
$ui_options['javascripts'][] = 'start.js';
$ui_options['javascripts'][] = 'comments.js';
$ui_options['stylesheets'][] = 'comments.css';
$ui_options['stylesheets'][] = 'groups.css';
$ui_options['title'] = 'Hamsterpajs utvecklare skriver för brinnande livet! - Hamsterpaj.net';
$ui_options['menu_path'] = array('hamsterpaj', 'utvecklarblogg');
switch ($_GET['action']) {
case 'compose':
if (!is_privilegied('developer_blog_admin')) {
$out .= 'Lol, jag glömde att stänga för alla :).<br /><a href="/hamsterpaj/utvecklarblogg.php">Tillbaka</a>';
} else {
$out .= '<h2>Skriv nytt inlägg i utvecklarbloggen :)</h2>';
$out .= rounded_corners_top($void, true);
$out .= '<form action="' . $_SERVER['PHP_SELF'] . '?action=insert" method="post">' . "\n";
$out .= '<label for="header">Rubrik</label><br />' . "\n";
$out .= '<input type="text" name="header" /><br />' . "\n";
$out .= '<label for="content">Text:</label><br />' . "\n";
$out .= '<textarea name="content" style="width: 500px; height: 300px;">' . "\n";
$out .= '</textarea><br />' . "\n";
$out .= '<input type="submit" value="Skriv" class="button_60" />' . "\n";
$out .= '' . "\n";
$out .= '</form>' . "\n";
$out .= rounded_corners_bottom($void, true);
}
break;
case 'insert':
$query = 'INSERT INTO developer_blog (timestamp, author, header, content) VALUES (' . time() . ', ' . $_SESSION['login']['id'] . ', "' . $_POST['header'] . '", "' . $_POST['content'] . '")';
mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
示例6: fwrite
fwrite($handle, $css);
fclose($handle);
}
// GET IMAGE
$filename = $img_path . $uid . ".png";
$handle = fopen($filename, "r");
$img = fread($handle, filesize($filename));
fclose($handle);
// SUBMIT IMAGE
$handle = fopen($img_path . "submits/" . $uid . ".png", "w+");
fwrite($handle, $img);
fclose($handle);
if (file_exists($img_path . "submits/" . $uid . ".png") && file_exists($img_path . "submits/" . $uid . ".css")) {
$output .= rounded_corners_top(array('color' => 'orange_deluxe'), true);
$output .= 'Allt gick fint, vi meddelar dig när vi har tittat på ditt tema.<br />
<a href="/profilteman">Gå tillbaka.</a>';
$output .= rounded_corners_bottom(array('color' => 'orange_deluxe'), true);
$query = "INSERT INTO `profile_bg_candidates_submits` (`user_id`, `timestamp`, `status`, `theme_name`) \r\n\t\t\tVALUES ('{$uid}', '" . date("U") . "', '0', '" . $_POST['theme_name'] . "')";
mysql_query($query);
}
} else {
$output .= rounded_corners_top(array('color' => 'orange_deluxe'), true);
$output .= '<form action="/profilteman/ptsubmit.php" method="post">
Välj ett namn för ditt tema:<input name="theme_name" type="text" /><input type="submit" value="Ok" /><br />
<a href="/profilteman">Gå tillbaka.</a>
</form>';
$output .= rounded_corners_bottom(array('color' => 'orange_deluxe'), true);
}
}
echo $output;
ui_bottom();
示例7: mysql_query
if (is_privilegied('ascii_art_admin')) {
if (isset($_GET['delete']) && is_numeric($_GET['delete']) && (int) $_GET['delete'] > 0) {
$query = 'DELETE FROM ascii_art WHERE id = ' . $_GET['delete'] . ' LIMIT 1';
mysql_query($query) or report_sql_error($query);
jscript_alert('Go, went och... GONE!');
jscript_location('ascii_art.php');
}
}
if (is_privilegied('ascii_art_admin')) {
if (isset($_POST['title'], $_POST['the_art'])) {
$query = 'INSERT INTO ascii_art (title, the_art) VALUES ("' . $_POST['title'] . '", "' . $_POST['the_art'] . '")';
mysql_query($query) or report_sql_error($query);
jscript_alert('Vi har nu lagt till ASCII-arten i databasen. Det kan dröja upp till 60 sekunder innan den dyker upp bland de andra ASCII-artsen!');
jscript_location('ascii_art.php');
}
echo rounded_corners_top(array('color' => 'white'));
?>
<form method="post" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<input type="text" name="title" /> (titel)<br />
<textarea name="the_art" style="width: 100%; height: 300px"></textarea><br />
<input type="submit" value="Skapa" class="button_80" />
</form>
<?php
echo rounded_corners_bottom();
}
ui_bottom();
?>
示例8: movie_compability_compare
function movie_compability_compare($users, $report_user)
{
/* The $report_user is the user viewing the report */
global $MOVIE_CATEGORIES;
if (count($users) > 5) {
echo '<h1>Du kan som mest jämföra dig med fyra personer samtidigt!</h1>' . "\n";
echo '<p>En eller flera personer har plockats bort ur jämförelsen, försök att jämföra max fyra personer åt gången.</p>' . "\n";
$temp = $users;
$users = array();
$count = 0;
foreach ($users as $key => $value) {
$users[$key] = $value;
$count++;
if ($count == 5) {
break;
}
}
}
$i = 1;
foreach (array_keys($users) as $user_id) {
$bar_ids[$user_id] = $i;
$i++;
}
$users[$report_user]['username'] = 'Du';
/* Fetch all the test info and store in the $users array */
$query = 'SELECT * FROM movie_tests WHERE owner IN("' . implode(array_keys($users), '", "') . '")';
$result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
while ($data = mysql_fetch_assoc($result)) {
$users[$data['owner']]['movie_scores'][$data['movie_id']] = $data['score'];
}
$all_movies = movie_compability_fetch();
foreach ($all_movies as $movie) {
foreach (array_keys($users) as $user_id) {
/* Count total seen movies? */
$users[$user_id]['seen_movies'] += isset($users[$user_id]['movie_scores'][$movie['id']]['score']) ? 1 : 0;
/* Count seen movies in specific category */
$users[$user_id][$movie['category']]['seen_movies'] += isset($users[$user_id]['movie_scores'][$movie['id']]['score']) ? 1 : 0;
/* Increase the total score for the specific category and user */
$users[$user_id][$movie['category']]['total_score'] += $users[$user_id]['movie_scores'][$movie['id']]['score'];
if (isset($users[$report_user]['movie_scores'][$movie['id']]['score']) && isset($users[$user_id]['movie_scores'][$movie['id']]['score'])) {
/* Total distance and common movies */
$users[$user_id]['total_distance'] += abs($users[$report_user]['movie_scores'][$movie['id']]['score'] - $users[$user_id]['movie_scores'][$movie['id']]['score']);
$users[$user_id]['common_movies']++;
/* Total distance and common movies for this category */
$users[$user_id][$movie_category]['total_distance'] += abs($users[$report_user]['movie_scores'][$movie['id']]['score'] - $users[$user_id]['movie_scores'][$movie['id']]['score']);
$users[$user_id][$movie_category]['common_movies']++;
}
/* Mark the movie as seen if anyone of you has seen it */
if (isset($users[$user_id]['movie_scores'][$movie['id']]['score'])) {
$all_movies[$movie['handle']]['seen'] = 1;
$all_movies[$movie['handle']]['scores'][$user_id] = $users[$user_id]['movie_scores'][$movie['id']]['score'];
}
}
}
/* Loop through all movies and set the score_spread key */
foreach ($all_movies as $movie_handle => $movie) {
$all_movies[$movie_handle]['average_score'] = array_sum($movie['scores']) / count($movie['scores']);
foreach ($movie['scores'] as $score) {
$all_movies[$movie_handle]['score_spread'] += abs($all_movies[$movie_handle]['average_score'] - $score);
}
}
foreach (array_keys($users) as $user_id) {
foreach ($MOVIE_CATEGORIES as $category_handle => $category) {
$users[$user_id][$category_handle]['average_score'] = round($users[$user_id][$category_handle]['total_score'] / $users[$user_id][$category_handle]['seen_movies'], 1);
}
$users[$user_id]['match'] = 100 - round($users[$user_id][$movie_category]['total_distance'] / $users[$user_id]['common_movies'] / 5 * 100);
}
if (count($users) < 4) {
foreach ($users as $user_id => $user) {
if ($user_id != $report_user) {
$output .= '<h1>Du och ' . $user['username'] . ' matchar till ' . $user['match'] . '%</h1>' . "\n";
}
}
rounded_corners($output, array('style' => 'text-align: center'));
} else {
foreach ($users as $user_id => $user) {
if ($user_id != $report_user) {
$output .= '<h1>Du och ' . $user['username'] . ' matchar till ' . $user['match'] . '%</h1>' . "\n";
}
}
rounded_corners($output, array('style' => 'text-align: center'));
}
rounded_corners_top(array('color' => 'white'));
echo '<h3>Hur många filmer har ni sett?</h3>' . "\n";
echo '<div class="bars">' . "\n";
foreach ($users as $user_id => $user) {
$user_label = $user_id == $report_user ? 'Du' : $user['username'];
echo '<div class="bar_' . $bar_ids[$user_id] . '" style="width: ' . $user['seen_movies'] * 6 . 'px;">' . "\n";
echo '<span class="person">' . $user_label . '</span>' . "\n";
echo '<span class="movie_count">' . $user['seen_movies'] . 'st</span>' . "\n";
echo '</div>' . "\n";
}
echo '</div>' . "\n";
rounded_corners_bottom(array('color' => 'white'));
rounded_corners_top(array('color' => 'white', 'id' => 'movie_compare_categories'));
echo '<h3>Vad tycker ni egentligen om olika sorters film?</h3>' . "\n";
foreach ($MOVIE_CATEGORIES as $category_handle => $category) {
echo '<div class="bars">' . "\n";
echo '<h4>' . $category['label'] . '</h4>' . "\n";
foreach ($users as $user_id => $user) {
//.........这里部分代码省略.........
示例9: 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) {
//.........这里部分代码省略.........
示例10: photo_display_full
function photo_display_full($parameters)
{
event_log_log('photo_display');
$next_by_day = photo_get_photos(array('limit' => 1, 'photo_taken' => $parameters['image']['photo_taken'], 'order_direction' => 'ASC', 'internal_id_min' => $parameters['image']['internal_id']));
$next_by_album = photo_get_photos(array('limit' => 1, 'album' => $parameters['image']['album'], 'order_direction' => 'ASC', 'internal_id_min' => $parameters['image']['internal_id']));
$previous_by_day = photo_get_photos(array('limit' => 1, 'photo_taken' => $parameters['image']['photo_taken'], 'order_direction' => 'DESC', 'internal_id_max' => $parameters['image']['internal_id']));
$previous_by_album = photo_get_photos(array('limit' => 1, 'album' => $parameters['image']['album'], 'order_direction' => 'DESC', 'internal_id_max' => $parameters['image']['internal_id']));
echo '<div class="photo_full">' . "\n";
echo '<div class="head">' . "\n";
echo '<span class="date">' . $parameters['image']['photo_taken'] . '</span>' . "\n";
if (strlen($parameters['image']['description']) > 0) {
echo '<p class="photo_description">' . "\n";
echo $parameters['image']['description'] . "\n";
echo '</p>' . "\n";
}
echo '</div>' . "\n";
// Photo with passepartout
echo '<div class="photo_passepartout_outer">' . "\n";
echo '<div class="photo_passepartout_inner">' . "\n";
echo '<img src="' . PHOTO_FULL_IMAGE_URL . floor($parameters['image']['internal_id'] / 5000) . '/' . $parameters['image']['external_id'] . '.jpg" />' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="foot">' . "\n";
echo '<div class="next">' . "\n";
if ($next_by_day[0]['internal_id'] > 0) {
echo '<a href="/fotoalbum/bild.php?photo=' . $next_by_day[0]['external_id'] . '"><button class="button_110">Samma dag »</button></a>' . "\n";
}
if ($next_by_album[0]['internal_id'] > 0) {
echo '<a href="/fotoalbum/bild.php?photo=' . $next_by_album[0]['external_id'] . '"><button class="button_110">Samma album »</button></a>' . "\n";
}
echo '</div>' . "\n";
echo '<div class="previous">' . "\n";
if ($previous_by_day[0]['internal_id'] > 0) {
echo '<a href="/fotoalbum/bild.php?photo=' . $previous_by_day[0]['external_id'] . '"><button class="button_110">« Samma dag</button></a>' . "\n";
}
if ($previous_by_album[0]['internal_id'] > 0) {
echo '<a href="/fotoalbum/bild.php?photo=' . $previous_by_album[0]['external_id'] . '"><button class="button_110">« Samma album</button></a>' . "\n";
}
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
$query = 'UPDATE photos SET unread_comments = 0 WHERE internal_id = "' . $parameters['image']['internal_id'] . '" LIMIT 1';
mysql_query($query);
echo '<h2>Kommentarer</h2>' . "\n";
echo '<h5>Här kan du lämna din kommentar</h5>' . "\n";
echo comments_input_draw($parameters['image']['internal_id'], 'photo');
rounded_corners_top();
echo comments_list($parameters['image']['internal_id'], 'photo');
rounded_corners_bottom();
// Count views
if (!in_array($parameters['image']['internal_id'], $_SESSION['photos']['viewed_photos'])) {
$_SESSION['photos']['viewed_photos'][] = $parameters['image']['internal_id'];
$query = 'UPDATE photos SET view_count = view_count + 1 WHERE internal_id = "' . $parameters['image']['internal_id'] . '" LIMIT 1';
mysql_query($query);
}
}
示例11: rounded_corners_tabs_bottom
echo '<input name="contact2_handle" type="text" class="textbox" size="50" value="' . $contact2['handle'] . '"><br/>';
echo '<br /><br />';
echo '<strong>Förnamn</strong><br />' . "\n";
echo '<input type="text" name="firstname" class="textbox" value="' . $_SESSION['traffa']['firstname'] . '" /><br /><br />' . "\n";
echo '<br />';
echo '<input type="submit" value="Spara frivillig information »" class="button_150" id="optional_info_submit" />';
echo '</form>' . "\n";
/* echo '</div>' . "\n\n"; */
rounded_corners_tabs_bottom();
/* Lösenordsbyte */
echo '<a name="change_password"></a>';
/* echo '<div class="grey_faded_div">' . "\n"; */
rounded_corners_tabs_top();
echo '<h2 style="margin-top: 0px;">Byt lösenord</h2>' . "\n";
echo '<form action="' . $_SERVER['PHP_SELF'] . '?action=perform_changes&type=password" method="post">' . "\n";
echo '<table><tr style="font-weight: bold;"><td>Nuvarande lösenord</td><td>Nytt lösenord</td><td>Upprepa nytt lösenord</td></tr>' . "\n";
echo '<tr>' . "\n";
echo '<td><input type="password" name="password_old" class="textbox" /></td>' . "\n";
echo '<td><input type="password" name="password_new" class="textbox" /></td>' . "\n";
echo '<td><input type="password" name="password_verify" class="textbox" /></td>' . "\n";
echo '</tr></table><br />' . "\n";
echo '<input type="submit" class="button_80" value="Byt lösenord »" />' . "\n";
echo '</form>' . "\n";
/* echo '</div>' . "\n"; */
rounded_corners_tabs_bottom();
$rounded_corners_config['color'] = 'orange_deluxe';
$rounded_corners_config['return'] = true;
echo rounded_corners_top($rounded_corners_config);
echo '<span>Bytet av profiltema har flyttat. Du hittar det <a href="http://www.hamsterpaj.net/traffa/profile_presentation_change.php?action=theme_select">här</a></span>' . "\n";
echo rounded_corners_bottom($rounded_corners_config);
ui_bottom();
示例12: rounded_corners_top
</p>
<h4>Bra exempel på inlägg i nivå 2 kategorier:</h4>
<?php
rounded_corners_top(array('color' => 'green'));
?>
"Allt möjligt. Skaffa sommarjob, klippa gräs åt folk, va hundvakt när nån åker på semester lr nåt sånt.<br />
Den desperate kan ju strippa lite ;)"
<?php
rounded_corners_bottom(array('color' => 'green'));
?>
<h4>Dåliga exempel på inlägg i nivå 2 kategorier:</h4>
<?php
rounded_corners_top(array('color' => 'red'));
?>
"Vaddå jobba? spela wow hela sommararen istället!"<br />
"Bli en lönnmördare och kräv 100000 kronor för att döda någon"<br />
"hahaha XP"
<?php
rounded_corners_bottom(array('color' => 'red'));
?>
<h2>Slapp</h2>
<p>
Detta är den nivå som har minst moderering. Chatt, skämt, offtopic och liknande: Vi tillåter det mesta, men inga agressiva påhopp eller rena lagförbrytelser.
</p>
<p>
Inga exempel, det är fritt fram att göra det mesta men det betyder också att Ordningsvakter har fritt fram här att moderera om det börjar bli påhopp, hot eller liknande.
示例13: array
<?php
require '../include/core/common.php';
$ui_options['menu_path'] = array('traeffa', 'grupper');
$ui_options['title'] = 'Gruppnotiser - Hamsterpaj.net';
ui_top($ui_options);
if (login_checklogin() != 1) {
jscript_alert('Du måste vara inloggad för att komma åt denna sidan!');
jscript_location('index.php');
}
$output .= rounded_corners_top(array('color' => 'blue'));
echo '<h2 style="margin-top: 0px;">Nya inlägg i dina grupper</h2>';
foreach ($_SESSION['groups_members'] as $key => $value) {
$query = 'SELECT groups_list.message_count, groups_members.read_msg, groups_list.name, groups_members.notices FROM groups_members, groups_list ';
$query .= 'WHERE groups_members.groupid = ' . $value . ' AND groups_list.groupid = ' . $value;
$query .= ' AND groups_members.userid =' . $_SESSION['login']['id'];
$result = mysql_query($query) or die(report_sql_error($query));
$data = mysql_fetch_assoc($result);
if ($data['notices'] == "Y") {
$new_posts = $data['message_count'] - $data['read_msg'];
if ($new_posts > 0) {
echo '<strong>';
}
}
echo '<a href="groups.php?action=goto&groupid=' . $value . '">' . $data['name'] . '</a>';
if ($data['notices'] == "Y") {
echo ' - ' . $new_posts . ' nya inlägg.';
if ($new_posts > 0) {
echo '</strong>';
}
} else {
示例14: posts_list
function posts_list($posts, $discussions = null, $options)
{
$options['quality_level'] = isset($options['quality_level']) ? $options['quality_level'] : 0;
$options['mode'] = isset($options['mode']) ? $options['mode'] : 'forum';
echo '<input type="hidden" id="debug_input" />';
foreach ($posts as $i => $post) {
/* Shall we display any discussion splits before the post? */
$display_discussions = array();
foreach ($discussions as $key => $discussion) {
if ($discussion['timestamp'] <= $post['timestamp']) {
$display_discussions[] = $discussion;
unset($discussions[$key]);
}
}
if (count($display_discussions) > 0) {
discussions_list_splits($display_discussions);
}
if (in_array('private_gb', $post['flags'])) {
echo '<h5 class="private_header">Privat inlägg</h5>' . "\n";
if ($_SESSION['login']['id'] != $post['author'] && $_SESSION['login']['id'] != $options['gb_recipient']) {
continue;
}
}
echo '<!-- Post #' . $post['post_id'] . ' at ' . date('Y-m-d H:i:s', $post['timestamp']) . '-->' . "\n";
echo '<a name="post_' . $post['post_id'] . '_anchor"></a>' . "\n";
if (in_array('removed', $post['flags'])) {
echo '<div class="removed_post">' . "\n";
echo '<h2>Borttaget inlägg, skrevs ' . fix_time($post['timestamp']) . ' av <a href="/traffa/profile.php?id=' . $post['author'] . '">' . $post['username'] . '</a></h2>' . "\n";
echo '</div>' . "\n";
$displayed_posts[] = $post['post_id'];
continue;
}
// todo!
/* detta skall användas för Skräpklassade inlägg, inlägg flaggade med junk
$rounded_corners_color = in_array('junk', $post['flags']) ? 'orange' :
((login_checklogin() && strpos( $post['content'], $_SESSION['login']['username'])) ? 'orange' : 'blue');
*/
$rounded_corners_color = login_checklogin() && strpos($post['content'], $_SESSION['login']['username']) ? 'orange' : 'blue';
echo rounded_corners_top(array('id' => 'post_' . $post['post_id'], 'color' => $rounded_corners_color));
echo '<div class="post">' . "\n";
/* Head section */
echo '<div class="head">' . "\n";
echo ' <span class="date_time">Skrevs ' . fix_time($post['timestamp']) . '</span>' . "\n";
echo ' <a href="/traffa/profile.php?id=' . $post['author'] . '">' . $post['username'] . '</a>' . "\n";
if ($post['gender'] == 'm') {
echo ' kille';
} elseif ($post['gender'] == 'f') {
echo ' tjej';
}
echo date_get_age($post['birthday']) > 0 ? ' ' . date_get_age($post['birthday']) . ' år' : '';
echo strlen($post['spot']) > 0 ? ' från ' . $post['spot'] . "\n" : '';
$onlinestatus = login_onlinestatus($post['lastaction'], $post['lastrealaction']);
echo ' <span class="user_label_' . $onlinestatus['handle'] . '">' . $onlinestatus['label'] . '</span>' . "\n";
echo '</div>' . "\n";
/* Author pane */
echo '<div class="author_pane">' . "\n";
if ($post['image'] == 1 || $post['image'] == 2) {
echo user_avatar($post['author']) . "\n";
}
echo ' ';
echo birthdaycake($post['birthday']);
echo '</div>' . "\n";
echo '<div id="post_content_' . $post['post_id'] . '" class="content">' . "\n";
$options_markup['post_id'] = $post['post_id'];
$options_markup['context'] = 'forum';
if ($post['no_smilies'] != 1) {
echo setsmilies(markup_parse($post['content'], $options_markup));
} else {
echo markup_parse($post['content'], $options_markup);
}
if (strlen($post['forum_signature']) > 0) {
echo '<div class="signature">' . $post['forum_signature'] . '</div>' . "\n";
}
if (strlen($post['user_status']) > 0) {
echo '<p class="user_status">' . $post['user_status'] . '</p>' . "\n";
}
echo '</div>' . "\n";
echo '<div class="controls">' . "\n";
if (login_checklogin()) {
$control_buttons['answer'] = '<input type="button" class="post_answer_button" id="post_answer_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Svara" />';
$control_buttons['comment'] = '<input type="button" class="post_comment_button" id="post_comment_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Kommentera" />';
$control_buttons['quote'] = '<input type="button" class="post_quote_button" id="post_quote_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Citera" />';
$control_buttons['history'] = '<input type="button" class="post_history_button" id="post_history_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Historik" />';
$control_buttons['delete'] = '<input type="button" class="post_delete_button" id="post_delete_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Ta bort" />';
$control_buttons['censor'] = '<input type="button" class="post_censor_button" id="post_censor_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Censurera" />';
$control_buttons['addition'] = '<input type="button" class="post_addition_button" id="post_addition_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Tillägg" />';
$control_buttons['link'] = '<input type="button" class="post_link_button" id="post_link_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Direktlänk" />';
$control_buttons['report'] = '<input type="button" class="post_report_button" value="Rapport" onclick="abuse_report(\'post\', \'' . $post['post_id'] . '\');" />';
$control_buttons['edit'] = '<input type="button" class="post_edit_button" id="post_edit_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Ändra"/>';
$control_buttons['junk'] = '<input type="button" class="post_junk_button" id="post_junk_button_' . $post['post_id'] . '_' . $post['username'] . '" value="Skräp!"/>';
$control_set['forum'] = array('answer', 'comment', 'quote', 'link');
$control_set['guestbook'] = array('answer', 'quote', 'history');
// $control_set['game_comment'] = array();
$control_set['admin'] = array('delete', 'censor', 'addition');
// todo! Aktivera Skräpknappen när färgspecen är klar, 'junk');
// $control_set['game_admin'] = array('delete');
foreach ($control_set[$options['mode']] as $button) {
echo $control_buttons[$button] . "\n";
}
//.........这里部分代码省略.........
示例15: photos_get_categories
$display_successful_message = false;
for ($i = 0; $i < PHOTOS_MAX_UPLOADS; $i++) {
if (is_uploaded_file($_FILES['photo_' . $i]['tmp_name'])) {
$options['file'] = $_FILES['photo_' . $i]['tmp_name'];
$options['user'] = 2348;
$options['description'] = $_POST['description_' . $i];
$options['category'] = $_POST['category_' . $i];
$category = photos_get_categories(array('user' => $options['user'], 'name' => $options['category'], 'create_if_not_found' => true));
$category = array_pop($category);
$query = 'UPDATE articles SET photo_category_id = "' . $category['id'] . '" WHERE id = "' . $_GET['article_id'] . '" LIMIT 1';
jscript_alert($query);
mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
$photo_id = photos_upload($options);
$display_successful_message = true;
}
}
if ($display_successful_message) {
$upload_form .= rounded_corners_top(array('color' => 'blue_deluxe'), true);
$upload_form .= 'Bilderna är uppladdade!';
$upload_form .= rounded_corners_bottom(array('color' => 'blue_deluxe'), true);
}
$upload_form .= photos_upload_form(array('user' => 2348));
}
ui_top($ui_options);
echo $upload_form;
echo $_POST['category_' . $i];
ui_bottom();
?>