当前位置: 首页>>代码示例>>PHP>>正文


PHP rounded_corners_bottom函数代码示例

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


在下文中一共展示了rounded_corners_bottom函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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 &raquo;</a>' : '<a href="/hamsterpaj/hamsterblogg.php">&laquo; 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;
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:31,代码来源:hamsterblog.lib.php

示例2: 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'));
}
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:10,代码来源:register.lib.php

示例3: mysql_query

        $sql .= ' timestamp = ' . $time . '';
        mysql_query($sql) or report_sql_error(__FILE__, __LINE__, $sql);
        $sql = 'SELECT order_hash FROM shop_orders WHERE user_id = ' . $_SESSION['login']['id'] . ' LIMIT 1';
        $result = mysql_query($sql);
        $data = mysql_fetch_assoc($result);
        $out .= '
				<h1>Tack för din beställning!</h1>
				' . rounded_corners_top(array('color' => 'green')) . '
				<h2 style="margin-top: 0;">För att bekräfta betalning</h2>
				<p><strong>För att bekräfta din betalning</strong> så sätter du in <strong>200 SEK</strong> på <strong>bankgiro 5801-5025</strong> med kommentaren
				<strong>' . $data['order_hash'] . '</strong>
				</p>
				<p style="margin-bottom: 0;">
					Din tröja bör efter att du satt in pengarna plumsa ner i din brevlåda om cirka 2-5 arbetsdagar.
				</p>
				' . rounded_corners_bottom() . '
			';
    } else {
        $out .= '
			<img src="http://images.hamsterpaj.net/shop/hamstershirt.png" />
			<img id="shirt_boy" src="http://images.hamsterpaj.net/shop/hamstershirt_boy.png" />
			<img id="shirt_girl" src="http://images.hamsterpaj.net/shop/hamstershirt_girl.png" />
			<fieldset>
				<legend>Beställ din helt egna Hamsterpaj-tröja</legend>
				<p>Tjejtröjorna finns i storlek 36, 38 och XX men vi orkade inte göra två system så välj Small om ni vill ha 36 osv. så får moii säga vad hon vill till Ace och Joar!<br /><span style="font-size: 10px;"><em>Skämtade bara, om man väljer "tjej" så får man upp rätt nummer :)</em></span></p>
				
			<form action="?action=submit" method="post">
			    <div class="form">
				<div id="shirt">
				<table class="form">
			               	<tr>
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:index.php

示例4: rounded_corners_top

 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__));
     $query = 'SELECT id FROM developer_blog ORDER BY timestamp DESC LIMIT 1';
     $result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
     $data = mysql_fetch_assoc($result);
     $blogpost_url = '/hamsterpaj/utvecklarblogg.php?action=show&id=' . $data['id'];
     $query = 'INSERT INTO recent_updates (type, timestamp, url, label) VALUES ("blog_post", "' . time() . '", "' . $blogpost_url . '", "' . $_POST['header'] . '")';
     mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
     header('Location: ' . $blogpost_url);
     break;
 case 'update':
     break;
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:utvecklarblogg.php

示例5: 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&auml;r vi har tittat p&aring; ditt tema.<br />
			<a href="/profilteman">G&aring; 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&auml;lj ett namn f&ouml;r ditt tema:<input name="theme_name" type="text" /><input type="submit" value="Ok" /><br />
		<a href="/profilteman">G&aring; tillbaka.</a>
		</form>';
        $output .= rounded_corners_bottom(array('color' => 'orange_deluxe'), true);
    }
}
echo $output;
ui_bottom();
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:ptsubmit.php

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

示例7: 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) {
//.........这里部分代码省略.........
开发者ID:Razze,项目名称:hamsterpaj,代码行数:101,代码来源:movie_compability.lib.php

示例8: rounded_corners

function rounded_corners($content, $options = array())
{
    $return = rounded_corners_top($options);
    $return .= $content;
    $return .= rounded_corners_bottom($options);
    return $return;
}
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:7,代码来源:ui.lib.php

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

示例10: rounded_corners_top

<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.
</p>
开发者ID:Razze,项目名称:hamsterpaj,代码行数:30,代码来源:76.php

示例11: jscript_location

    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 {
        echo ' - Bevakas inte';
    }
    echo '<br />' . "\n";
}
echo '<br /><a href="/traffa/groups.php">Till alla dina grupper >></a><br />';
$output .= rounded_corners_bottom(array('color' => 'blue'));
cache_update_groups();
ui_bottom();
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:groupnotices.php

示例12: posts_list


//.........这里部分代码省略.........
        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 '&nbsp;';
        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";
            }
            if (posts_admin_check($post)) {
                if ($options['mode'] == 'game_comment') {
                    $control_set['admin'] = $control_set['game_admin'];
                }
                foreach ($control_set['admin'] as $button) {
                    echo $control_buttons[$button] . "\n";
                }
            }
            if ($post['author'] == $_SESSION['login']['id']) {
                if (!posts_admin_check($post)) {
                    echo $control_buttons['addition'] . "\n";
                }
                if (time() < $post['timestamp'] + 20 * 60) {
                    echo $control_buttons['edit'] . "\n";
                }
            }
            if ($_SESSION['login']['userlevel'] == 2) {
                echo $control_buttons['report'];
            }
        }
        echo '</div>' . "\n";
        echo '<div class="post_addition" id="post_addition_' . $post['post_id'] . '">' . "\n";
        echo '	<textarea id="post_addition_content_' . $post['post_id'] . '" rows="3" cols="50"  ></textarea>' . "\n";
        echo '	<button class="button_60" id="post_addition_submit_' . $post['post_id'] . '" value="post_addition_' . $post['post_id'] . '">Spara</button>' . "\n";
        echo '</div>' . "\n";
        echo '<div class="post_link" id="post_link_' . $post['post_id'] . '">' . "\n";
        echo '<h5>Länken nedan går direkt till detta inlägg.</h5>' . "\n";
        echo '<input type="text" class="post_link_input" value="http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . '#post_' . $post['post_id'] . '_anchor" />' . "\n";
        echo '</div>' . "\n";
        echo '</div>' . "\n";
        echo rounded_corners_bottom(array('color' => $rounded_corners_color));
        echo "\n\n";
        $displayed_posts[] = $post['post_id'];
    }
    if (login_checklogin()) {
        /* Remove all notices and answer notices for read posts */
        $query = 'DELETE FROM notices WHERE post_id IN("' . implode('", "', $displayed_posts) . '") AND user_id = "' . $_SESSION['login']['id'] . '"';
        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    }
    /* List the remaining discussions */
    if (count($discussions) > 0) {
        discussions_list_splits($discussions);
    }
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:101,代码来源:posts.php

示例13: 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();
?>


开发者ID:Razze,项目名称:hamsterpaj,代码行数:28,代码来源:upload_photos.php

示例14: tests_list_my_tests

function tests_list_my_tests()
{
    if (!login_checklogin()) {
        global $ui_options;
        ui_top($ui_options);
        echo 'Du måste logga in för att kunna se dina tester!';
        return;
    }
    $query = 'SELECT t.title, t.description, t.handle';
    $query .= ' FROM tests AS t';
    $query .= ' WHERE t.author = ' . $_SESSION['login']['id'];
    $query .= ' ORDER BY t.id DESC';
    $query .= ' LIMIT 100';
    $result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    global $ui_options;
    $ui_options['stylesheets'][] = 'tests.css';
    ui_top($ui_options);
    echo '<h1>Dina tester</h1>';
    while ($data = mysql_fetch_assoc($result)) {
        echo rounded_corners_top();
        echo '<br />';
        echo '<a href="/tests/' . $data['handle'] . '.html" class="tests_list_my_test_link">' . $data['title'] . '</a> - <a href="/tests/' . $data['handle'] . '/list_users.html">Visa folk som gjort testet och deras poäng.</a><br />' . "\n";
        echo 'Beskrivning: ' . $data['description'] . "\n";
        echo '<br /><br />';
        echo rounded_corners_bottom();
    }
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:27,代码来源:index.php

示例15: entertain_list

/**
 * List entertain items in ordinary list and compact list
 * $items array of entertain items with all necessary data included
 * 		(id, title, handle, rank_avarage, votes, comments)
 */
function entertain_list($items, $options)
{
    // Ok, lets fix some options
    if ($options['list_style'] == 'titles' && count($items) < 40) {
        $options['list_style'] = 'thumbnails';
    }
    //preint_r($options);
    //	$output .= '<p>list_style: ' . $options['list_style'] . '</p>';
    $options['list_style'] = isset($options['list_style']) ? $options['list_style'] : 'thumbnails';
    global $entertain_categories;
    global $entertain_list_styles;
    global $entertain_types;
    //	if(isset($options['
    $output .= '<div class="entertain_list">' . "\n";
    if (is_string($options['headline'])) {
        $output .= '<h2>' . $options['headline'] . '</h2>' . "\n";
    }
    $count = 0;
    switch ($options['list_style']) {
        case 'commented':
        case 'full':
            foreach ($items as $item) {
                $output .= rounded_corners_top();
                $output .= '<div class="entertain_full" id="entertain_full_' . $item['handle'] . '" >' . "\n";
                if (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) {
                    $output .= '<div style="background: url(\'' . IMAGE_URL . 'entertain/' . $item['handle'] . '.png\') 5px 5px no-repeat;" class="entertain_full_thumb">' . "\n";
                    $output .= '<a href="/' . $entertain_types[$item['entertain_type']]['url_handle'] . '/' . $item['handle'] . '.html">' . "\n";
                    $output .= '<img src="http://images.hamsterpaj.net/game_thumb_passepartout.png" />';
                    $output .= '</a>' . "\n";
                    $output .= '</div>';
                } else {
                    $output .= '<a href="/' . $entertain_types[$item['entertain_type']]['url_handle'] . '/' . $item['handle'] . '.html">' . "\n";
                    $output .= '<img alt="' . $item['title'] . '" class="entertain_full_thumb" src="' . IMAGE_URL . 'entertain/' . $item['handle'] . '.png" />' . "\n";
                    $output .= '</a>' . "\n";
                }
                $output .= '<div class="title_and_description">' . "\n";
                $output .= '<a href="/' . $entertain_types[$item['entertain_type']]['url_handle'] . '/' . $item['handle'] . '.html"><h1>' . $item['title'] . '</h1></a>' . "\n";
                $output .= '<a href="/' . $entertain_types[$item['entertain_type']]['url_handle'] . '/' . $item['handle'] . '.html">' . "\n";
                $output .= '<p>' . $item['description'] . '</p>' . "\n";
                $output .= '</a>' . "\n";
                $output .= '</div>' . "\n";
                // end info
                $output .= '<div class="statistics">' . "\n";
                $output .= '<div class="column_1">' . cute_number($item['played']) . '</div><a href="/spel/topplistan/mest_spelade/">Spelningar</a>' . "\n";
                $output .= '<div class="column_1">Släpptes</div>' . date('Y-m-d', $item['release']) . "\n";
                if (is_privilegied('entertain_admin')) {
                    $output .= '<a href="/' . $entertain_types[$item['entertain_type']]['url_handle'] . '/admin/' . $item['handle'] . '.php" >Redigera</a>' . "\n";
                }
                $output .= '</div>' . "\n";
                // end statistics
                $output .= '</div>' . "\n";
                // end entertain_full
                $output .= '<br style="clear: both;">' . "\n";
                $output .= rounded_corners_bottom();
            }
            break;
        case 'half':
        case 'thumbnails':
            foreach ($items as $item) {
                $output .= entertain_thumbnail_draw($item);
            }
            break;
        case 'titles':
            $letter = 'A';
            $count = count($items);
            $border[0] = floor($count / 3);
            $border[1] = 2 * $border[0];
            $border[2] = $count;
            $column = 0;
            $output .= '<ul class="entertain_list_titles">' . "\n";
            $output .= '<h2>' . $letter . '</h2>' . "\n";
            $output .= '<div class="list_slot">' . "\n";
            $i = 0;
            $slot = 0;
            foreach ($items as $item) {
                if ($letter != strtoupper(substr($item['title'], 0, 1))) {
                    $output .= '</div>' . "\n";
                    $letter = strtoupper(substr($item['title'], 0, 1));
                    if ($i > $border[$column]) {
                        $column++;
                        //						$output .= '<br style="clear: both;">' . "\n";
                        $output .= '</ul>' . "\n";
                        //						$output .= '<h1>Kolumn: ' . $column . '</h1>';
                        $output .= '<ul class="entertain_list_titles">' . "\n";
                    }
                    $output .= '<h2>' . $letter . '</h2>' . "\n";
                    $output .= '<div class="list_slot">' . "\n";
                    $slot = 2;
                } elseif ($slot > 6) {
                    $output .= '</div>' . "\n";
                    //						$output .= '<div class="header_dummy"></div>' . "\n";
                    $output .= '<div class="list_slot">' . "\n";
                    $slot = 0;
                }
                $output .= '<li>' . "\n";
//.........这里部分代码省略.........
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:101,代码来源:entertain.lib.php


注:本文中的rounded_corners_bottom函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。