예제 #1
0
function online_ovs()
{
    $query = query_cache(array('query' => 'SELECT l.username AS username, l.id AS user_id FROM login AS l, privilegies AS pl WHERE pl.user = l.id AND pl.privilegie = "user_management_admin" ORDER BY lastaction DESC LIMIT 5'));
    foreach ($query as $row) {
        $out .= '<li><a href="/traffa/profile.php?user_id=' . $row['user_id'] . '">' . $row['username'] . '</a></li>' . "\n";
    }
    return $out;
}
예제 #2
0
function user_flags_fetch()
{
    $options['query'] = 'SELECT id, handle, title FROM user_flags_list ORDER BY id';
    $options['max_delay'] = 600;
    $result = query_cache($options);
    $flags_list = array();
    foreach ($result as $flag) {
        $flags_list[$flag['id']]['handle'] = $flag['handle'];
        $flags_list[$flag['id']]['title'] = $flag['title'];
    }
    return $flags_list;
}
예제 #3
0
function poll_fetch($options)
{
    $options['limit'] = is_numeric($options['limit']) ? $options['limit'] : 1;
    $query = 'SELECT poll.*';
    $query .= login_checklogin() ? ', poll_answers.answer_id' : '';
    $query .= ' FROM poll';
    $query .= login_checklogin() ? ' LEFT OUTER JOIN poll_answers ON poll.id = poll_answers.poll_id AND poll_answers.user_id = "' . $_SESSION['login']['id'] . '"' : '';
    $query .= ' WHERE 1';
    $query .= isset($options['id']) && is_numeric($options['id']) ? ' AND poll.id = "' . $options['id'] . '"' : '';
    $query .= isset($options['author']) ? ' AND poll.author = "' . $options['author'] . '"' : '';
    $query .= isset($options['handle']) ? ' AND poll.handle = "' . $options['handle'] . '"' : '';
    $query .= isset($options['type']) ? ' AND poll.type = "' . $options['type'] . '"' : '';
    $query .= ' ORDER BY poll.id DESC';
    $query .= ' LIMIT ' . $options['limit'];
    //if(!login_checklogin())
    if (false) {
        $poll = query_cache(array('query' => $query, 'type' => 'poll'));
    } else {
        $result = mysql_query($query) or report_sql_error($query);
        while ($data = mysql_fetch_assoc($result)) {
            $poll[] = $data;
        }
    }
    foreach ($poll as $id => $current) {
        if (login_checklogin()) {
            $poll[$id]['can_answer'] = $current['answer_id'] > 0 ? false : true;
        } elseif ($current['force_logon'] == 0) {
            if ($_COOKIE['poll_' . $current['id']] == true) {
                $poll[$id]['can_answer'] = false;
            } else {
                $poll[$id]['can_answer'] = true;
            }
        } else {
            $poll[$id]['can_answer'] = false;
        }
    }
    return $poll;
}
예제 #4
0
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;
}
예제 #5
0
     break;
 case 'update':
     break;
 case 'index':
 default:
     $ui_options['menu_path'] = array('sex_sense');
     $output .= '<img src="http://images.hamsterpaj.net/sexosinne.png" />' . "\n";
     $void['color'] = 'orange_deluxe';
     $info = '<h2 style="margin-top: 0px;">Info</h2>';
     $info .= 'Den här sidan är bara öppen för <a href="/traffa/profile.php?user_id=534434">SheDevil</a>, <a href="/traffa/profile.php?user_id=643392">Entrero</a> och <a href="/traffa/profile.php?user_id=774586">Joar</a> än så länge (alla kommer åt den, men det är bara vi som ser den i menyn.)';
     $output .= rounded_corners($info, $void, true);
     $output .= '<h1>Sex och sinne</h1>' . "\n";
     $output .= '<p><a href="/traffa/profile.php?user_id=643392">Entrero</a> och <a href="/traffa/profile.php?user_id=534434">SheDevil</a> svarar på dina funderingar om sex, kärlek, kroppen och annat som hör tonåren till. Vill du ställa en fråga? Välj "Ställ en fråga" i menyn till höger!</p>' . "\n";
     $output .= '<h2>Börja med att välja en kategori</h2>' . "\n";
     $query = 'SELECT DISTINCT(category) FROM sex_sense ORDER BY category ASC';
     $categories = query_cache(array('query' => $query, 'max_delay' => 1));
     $output .= '<ul class="sex_sense_categories">' . "\n";
     foreach ($categories as $category) {
         $output .= '<li><h3><a href="/sex_och_sinne/' . $category['category'] . '/">' . $SEX_SENSE[$category['category']]['label'] . '</a></h3>' . "\n";
         $output .= '<p><a href="/sex_och_sinne/' . $category['category'] . '/">' . $SEX_SENSE[$category['category']]['description'] . '</a></p>' . "\n";
         $output .= '</li>' . "\n";
     }
     $output .= '</ul>' . "\n";
     if (login_checklogin()) {
         $void['color'] = 'blue_deluxe';
         $output .= '</div>';
         $output .= '<h2 style="margin-top: 0px; padding-top: 2px;">Ställ en fråga, anonymt givetvis ;)</h2>' . "\n";
         $output .= rounded_corners_top($void, true);
         $output .= '<form action="/sex_och_sinne/ny.php" method="post">' . "\n";
         $output .= '<label for="title">Ämne</label><br />' . "\n";
         $output .= '<input type="text" name="title" /><br />' . "\n";
예제 #6
0
<?php

require '../include/core/common.php';
require PATHS_INCLUDE . 'libraries/discussions.php';
require PATHS_INCLUDE . 'libraries/posts.php';
require PATHS_INCLUDE . 'libraries/quality.php';
require PATHS_INCLUDE . 'libraries/forum-antispam.php';
include $hp_path . 'forum_new/parser.php';
$ui_options['menu_path'] = array('hamsterpaj', 'nytt');
ui_top($ui_options);
$recent_updates = query_cache(array('query' => 'SELECT * FROM recent_updates ORDER BY id DESC'));
echo '<table>' . "\n";
foreach ($recent_updates as $data) {
    echo '<!-- Recent update "' . $data['label'] . '" -->' . "\n";
    echo '<tr>' . "\n";
    echo '<td class="timestamp">' . fix_time($data['timestamp']) . '</td>';
    echo '<td class="type_label">' . $RECENT_UPDATES[$data['type']] . '</td>';
    if (strlen($data['url']) > 1) {
        echo '<td><a href="/recent_updates_redirect.php?id=' . $data['id'] . '&url=' . urlencode($data['url']) . '">' . $data['label'] . '</a></td>';
    } else {
        echo '<td>' . $data['label'] . '</td>';
    }
    echo strlen($data['url']) > 1 ? '<td class="clicks">' . $data['clicks'] . ' klick</td>' : '';
    echo '</tr>' . "\n";
}
echo '</table>' . "\n";
ui_bottom();
예제 #7
0
function ui_top($options)
{
    if (isset($_SESSION['new_design'])) {
        echo ui_new_top($options);
        return;
    }
    global $SIDE_MODULES;
    if (!isset($options['adtoma_category'])) {
        $options['adtoma_category'] = 'other';
    }
    define('ADTOMA_CATEGORY', $options['adtoma_category']);
    if (login_checklogin() && rand(1, 5) == 2) {
        $query = 'UPDATE login SET lastrealaction="' . time() . '" WHERE id="' . $_SESSION['login']['id'] . '"';
        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    }
    $options['title'] = isset($options['title']) ? $options['title'] : 'Hamsterpaj.net - Onlinespel, community, forum och annat kul ;)';
    $options['stylesheets'][] = 'shared.css';
    $options['stylesheets'][] = 'modules.css';
    $options['stylesheets'][] = 'buttons.css';
    $options['stylesheets'][] = 'new_guestbook.css';
    $options['stylesheets'][] = 'rounded_corners.css';
    $options['stylesheets'][] = 'message.css';
    $options['stylesheets'][] = 'domTT.css';
    $options['stylesheets'][] = 'poll.css';
    /* Order:
    			jQuery
    			Womlib (needs jQuery to work properly!)
    			The rest...
    		*/
    if (is_array($options['javascripts'])) {
        array_unshift($options['javascripts'], 'womlib.js');
    } else {
        $options['javascripts'] = array('womlib.js');
    }
    if ($_SESSION['login']['id'] > 0) {
        $options['javascripts'][] = 'stay_online.js';
    }
    $options['javascripts'][] = 'ui_server_message.js';
    $options['javascripts'][] = 'scripts.js';
    $options['javascripts'][] = 'steve.js';
    $options['javascripts'][] = 'new_guestbook.js';
    $options['javascripts'][] = 'forum.js';
    $options['javascripts'][] = 'posts.js';
    $options['javascripts'][] = 'abuse_report.js';
    $options['javascripts'][] = 'poll.js';
    array_unshift($options['javascripts'], 'jquery.js');
    $options['javascripts'][] = 'swfobject.js';
    $options['javascripts'][] = 'md5.js';
    $options['javascripts'][] = 'xmlhttp_login.js';
    $options['javascripts'][] = 'xmlhttp.js';
    $options['javascripts'][] = 'fult_dhml-skit_som_faar_bilder_att_flyga.js';
    $options['javascripts'][] = 'wave_effect.js';
    $options['javascripts'][] = 'joels_hackerkod.js';
    $options['javascripts'][] = 'ui.js';
    if (!login_checklogin()) {
        $options['javascripts'][] = 'tiny_reg_form.js';
        $options['stylesheets'][] = 'tiny_reg_form.css';
    }
    if (rand(0, 73) == 50) {
        $query = 'UPDATE pageviews SET views = views + 73 WHERE date = "' . date('Y-m-d') . '" LIMIT 1';
        mysql_query($query);
        if (mysql_affected_rows() == 0) {
            $query = 'INSERT INTO pageviews (views, date) VALUES(73, "' . date('Y-m-d') . '")';
            mysql_query($query);
        }
    }
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
    echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
    echo '<head>' . "\n";
    echo '<meta name="description" content="' . $options['meta_description'] . '" />' . "\n";
    echo '<meta name="keywords" content="' . $options['meta_keywords'] . '" />' . "\n";
    echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
    echo '<title>' . $options['title'] . '</title>' . "\n";
    echo '<link rel="icon" href="http://images.hamsterpaj.net/favicon.png" type="image/x-icon" />' . "\n";
    echo '<link rel="shortcut icon" href="http://images.hamsterpaj.net/favicon.png" type="image/x-icon" />' . "\n";
    array_unshift($options['stylesheets'], 'ui.css.php');
    echo "\n\n" . '<!-- Load stylesheets, version is timestamp of last file modification. Current timestamp is: ' . time() . ' -->' . "\n";
    echo '<style type="text/css">' . "\n";
    foreach ($options['stylesheets'] as $stylesheet) {
        echo '@import url(\'/stylesheets/' . $stylesheet . '?version=' . filemtime(PATHS_WEBROOT . 'stylesheets/' . $stylesheet) . '\');' . "\n";
    }
    echo '</style>' . "\n";
    echo "\n\n" . '<!-- Load javascripts, version is timestamp of last file modification. -->' . "\n";
    foreach ($options['javascripts'] as $javascript) {
        echo '<script type="text/javascript" language="javascript" ';
        echo 'src="/javascripts/' . $javascript . '?version=' . filemtime(PATHS_WEBROOT . 'javascripts/' . $javascript) . '"></script>' . "\n";
    }
    if (isset($options['enable_rte'])) {
        echo '<script language="javascript" type="text/javascript" src="/javascripts/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
						<script language="javascript" type="text/javascript">
						tinyMCE.init({
							mode : "exact",
							elements: "post_form_content",
							theme: "advanced",
							theme_advanced_buttons1 : "bold,italic,underline,separator,bullist,numlist,separator,sup,charmap",
							theme_advanced_buttons2 : "",
							theme_advanced_buttons3 : "",
							theme_advanced_resize_horizontal : false,
							theme_advanced_resizing : true,
							theme_advanced_path : false,
							theme_advanced_toolbar_location : "top",
							theme_advanced_statusbar_location : "bottom",
							theme_advanced_toolbar_align : "left",
							auto_reset_designmode : true
						});
						</script>';
    }
    echo "\n\n";
    echo $options['header_extra'];
    echo '</head>' . "\n";
    echo isset($options['body_extra']) ? '<body ' . $options['body_extra'] . '>' . "\n" : '<body>' . "\n";
    echo '<div id="hamsterpaj_website">' . "\n";
    echo '<!-- Nej, fråga oss inte varför vi har typ tio olika divar som verkar göra samma sak... -->' . "\n";
    echo '<!-- Ad management, adtoma -->' . "\n";
    echo '<script type="text/javascript">' . "\n";
    $adtoma_gender = in_array($_SESSION['userinfo']['gender'], array('P', 'F')) ? $_SESSION['userinfo']['gender'] : 'xx';
    $adtoma_age = $_SESSION['userinfo']['birthday'] != '0000-00-00' ? date_get_age($_SESSION['userinfo']['birthday']) : 'xx';
    $adtoma_birthyear = $_SESSION['userinfo']['birthday'] != '0000-00-00' ? substr($_SESSION['userinfo']['birthday'], 0, 4) : 'xx';
    echo "\t" . 'var CM8Server = "ad.adtoma.com";' . "\n";
    echo "\t" . 'var CM8Cat = "hp.' . ADTOMA_CATEGORY . '";' . "\n";
    echo "\t" . 'var CM8Profile = "hp_age=' . $adtoma_age . '&amp;hp_birthyear=' . $adtoma_birthyear . '&amp;hp_gender=' . $adtoma_gender . '"' . "\n";
    echo '</script>' . "\n";
    echo '<script language="JavaScript" type="text/javascript" src="http://ad.adtoma.com/adam/cm8adam_1_call.js"></script>' . "\n";
    echo "\n\n";
    echo '<div>' . "\n";
    echo '	<script type="text/javascript">CM8ShowAd("Bigbanner");</script>' . "\n";
    echo '</div>' . "\n";
    echo '<div style="width: 1200px;margin-top: 10px">' . "\n";
    if (!login_checklogin() && rand(0, 5) == 4 || login_checklogin() && rand(0, 30) == 7) {
        echo '<a href="/sex_och_sinne/"><img src="http://images.hamsterpaj.net/sex_and_sense/ui_to_new_sex_sense.png" alt="Till nya sex och sinne!" style="margin-left: 670px" /></a>';
    }
    echo '<img src="http://images.hamsterpaj.net/ui/site_top_rounded_corners.png" id="site_top_rounded_corners" />' . "\n";
    echo '<div id="site_container">' . "\n";
    echo '<div id="main">' . "\n";
    echo '<div id="top">' . "\n";
    if (true) {
        if ($_SESSION['login']['id'] == 148153 || isset($_GET['illerpaj'])) {
            echo '<a href="/"><img src="http://images.hamsterpaj.net/illerpaj2.png" id="logo" /></a>' . "\n";
        } elseif (NATTPAJ == true) {
            echo '<a href="/"><img src="http://images.hamsterpaj.net/nattpaj/nattpaj_logo.png" id="logo" /></a>' . "\n";
        } else {
            echo '<a href="/"><img src="http://images.hamsterpaj.net/ui/logo.png" id="logo" /></a>' . "\n";
        }
    } else {
        echo '<div id="logo">' . "\n";
        if (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) {
            ?>
	<object type="application/x-shockwave-flash" data="http://images.hamsterpaj.net/ui/hamsterpaj_logo.swf" width="320" height="60">
		<param name="movie" value="http://images.hamsterpaj.net/ui/hamsterpaj_logo.swf" />
		<img src="http://images.hamsterpaj.net/logo.png" alt="Hamsterpaj logo" />
	</object>
<?php 
        }
        echo '</div>' . "\n";
    }
    echo '<div id="login_pane">' . "\n";
    if (login_checklogin()) {
        echo ui_login_status_bar('page_init');
    } else {
        ?>
			<form action="/login.php?action=login" method="post" id="login_form">
				<div class="username">
					<h5>Användarnamn</h5> 
					<input type="text" name="username"  />
				</div>
				<div class="password">
					<h5>Lösenord</h5>
					<input type="password" name="password" />
				</div>
			<ul class="login_buttons">
				<li>
						<div class="icon">
							<a onclick="javascript: document.getElementById('login_form').submit();">
								<img src="http://images.hamsterpaj.net/login_bar/login_color.png" alt="Logga in" />
							</a>
						</div>
					<a onclick="javascript: document.getElementById('login_form').submit();">
						Logga in
					</a>
				</li>
				
				<li>
						<div class="icon">
						<a href="/register.php">
							<img src="http://images.hamsterpaj.net/login_bar/register_color.png" alt="Bli medlem" />
						</a>
						</div>
						<a href="/register.php">
							Bli medlem
						</a>
				</li>
			</ul>
			<input type="submit" value="logga in" style="width: 0px; height: 0px; float: left; border: none;" />
			<!-- Submit med enterslag fungerar inte i IE om det inte finns en submit-knapp, dessutom får den inte ha display: none; för då funkar det inte i IE... Skitläsare! -->
			</form>
			<?php 
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    ?>
		
		<div id="search_and_status">
				<div id="quicksearch">
					<form action="/quicksearch.php">
					<input type="text" id="quicksearch_input" class="quicksearch_input" value="Sök Hamsterpajare..." name="search" />
					<input type="hidden" name="type" value="user" />
		
		<?php 
    if (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) {
        //			echo '<img src="' . IMAGE_URL . 'steve/icon_gun.gif" id="steve_gun"/>' . "\n";
    }
    echo '<input type="submit" value="" class="button_magnifier" />' . "\n";
    echo '</form>' . "\n";
    echo '</div>' . "\n";
    echo '<div class="status">' . "\n";
    if ($_SESSION['disablesteve'] != 1) {
        echo '<img src="http://images.hamsterpaj.net/steve/steve.gif" id="steve" />' . "\n";
    }
    if (login_checklogin()) {
        $status = strlen(trim($_SESSION['userinfo']['user_status'])) > 0 ? $_SESSION['userinfo']['user_status'] : 'Ingen status';
        echo '<input type="text" id="user_status_input" value="' . stripslashes($status) . '" />' . "\n";
        echo '<button class="button_50" id="user_status_save_button">Spara</button>' . "\n";
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<div id="main_left">' . "\n";
    global $menu;
    /* Merge the users additions to the menu array */
    if (isset($options['menu_addition'])) {
        $menu = array_merge_recursive($menu, $options['menu_addition']);
    }
    foreach ($menu as $handle => $current_menu) {
        if (isset($current_menu['is_privilegied'])) {
            $current_menu['is_privilegied'] = is_array($current_menu['is_privilegied']) ? $current_menu['is_privilegied'] : array($current_menu['is_privilegied']);
            $is_privilegied = false;
            foreach ($current_menu['is_privilegied'] as $privilegie) {
                if (is_privilegied($privilegie)) {
                    $is_privilegied = true;
                }
            }
        } else {
            $is_privilegied = true;
        }
        if ($is_privilegied == true) {
            $class = $handle == $options['menu_path'][0] ? 'menu_active' : 'menu';
            echo '<div class="' . $class . '" id="menu_div_' . $handle . '">' . "\n";
            $target = isset($current_menu['target']) ? ' target="' . $current_menu['target'] . '"' : '';
            echo '<h3><a href="' . $current_menu['url'] . '" class="menu_title" id="menu_title_' . $handle . '"' . $target . '>' . $current_menu['label'] . '</a></h3>' . "\n";
            echo '<div class="menu_content">' . "\n";
            echo '<ul>' . "\n";
            $label = isset($current_menu['index_label']) ? $current_menu['index_label'] : 'Start';
            $class = count($options['menu_path']) == 1 && $handle == $options['menu_path'][0] ? ' class="active"' : '';
            echo '<li' . $class . '><a href="' . $current_menu['url'] . '">' . $label . '</a></li>' . "\n";
            if (count($current_menu['children']) > 0) {
                $count_menu_items = ui_menu_recurse($current_menu['children'], $options, 1);
            }
            echo '</ul>' . "\n";
            echo '</div>' . "\n";
            echo '<img src="http://images.hamsterpaj.net/ui/menu/menu_box_open_bottom.png" class="menu_box_open_bottom" />' . "\n";
            echo '<img src="http://images.hamsterpaj.net/ui/menu/menu_box_closed_bottom.png" class="menu_box_closed_bottom" />' . "\n";
            echo '</div>' . "\n";
        }
    }
    $serialized = file_get_contents(PATHS_INCLUDE . 'cache/live_stats.phpserialized');
    $info = unserialize($serialized);
    echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_top" />' . "\n";
    echo '<div class="left_module">' . "\n";
    echo '<h4>Besökare</h4>' . "\n";
    echo cute_number($info['visitors']) . "\n";
    echo '<h4>Inloggade</h4>' . "\n";
    echo cute_number($info['logged_in']) . "\n";
    echo '<h4>Medlemmar</h4>' . "\n";
    echo cute_number($info['members']) . "\n";
    echo '<h4>Sidvisningar idag</h4>' . "\n";
    $pageviews = query_cache(array('query' => 'SELECT views FROM pageviews WHERE date = "' . date('Y-m-d') . '" LIMIT 1'));
    echo cute_number($pageviews[0]['views']);
    echo '</div>' . "\n";
    echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_bottom" />' . "\n";
    if (login_checklogin()) {
        echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_top" />' . "\n";
        echo '<div class="left_module">' . "\n";
        echo '<h4>Minneslapp</h4>' . "\n";
        echo '<textarea id="note">' . "\n";
        echo htmlentities(stripslashes($_SESSION['note']));
        echo '</textarea>' . "\n";
        echo '<input type="button" value="Spara" class="button_50" onclick="note_save()" />' . "\n";
        echo '</div>' . "\n";
        echo '<img src="http://images.hamsterpaj.net/ui/menu/left_module_top_bottom.png" class="left_module_bottom" />' . "\n";
    }
    echo '</div>' . "\n";
    echo '<div id="middle">' . "\n";
    if (isset($_SESSION['notice_message'])) {
        if (login_checklogin()) {
            $notices[] = array('html' => $_SESSION['notice_message']);
        }
        unset($_SESSION['notice_message']);
    }
    $data = cache_load('recent_update');
    if ($data['timestamp'] > time() - 1200 && $_SESSION['recent_update_notifier'][$data['id']] < 10) {
        global $RECENT_UPDATES;
        $content = '<span class="time">' . date('H:i', $data['timestamp']) . '</span>' . "\n";
        $content .= '<span class="event">' . $RECENT_UPDATES[$data['type']] . '</span>' . "\n";
        $content .= '<span class="link"><a href="/recent_updates_redirect.php?id=' . $data['id'] . '&url=' . urlencode($data['url']) . '&source=global_notice">' . $data['label'] . '</a></span>' . "\n";
        $notices[] = array('html' => $content);
        $_SESSION['recent_update_notifier'][$data['id']]++;
    }
    foreach ($notices as $notice) {
        echo '<div class="notice">' . "\n";
        if (isset($notice['timestamp'])) {
            echo '<span class="time">' . date('H:i', $notice['timestamp']) . '</span>' . "\n";
        }
        echo $notice['html'];
        echo '</div>' . "\n";
    }
    echo '<div id="content">' . "\n";
    echo '<script type="text/javascript">CM8ShowAd("Rektangel");</script>' . "\n";
    if (isset($_SESSION['posted_gb_to_webmaster'])) {
        rounded_corners_top(array('color' => 'red'));
        echo 'Men tjockis, det behövs inte mycket IQ för att förstå att användaren Webmaster inte är en riktig människa, utan en BOT som används för att maskineriet bakom Hamsterpaj ska fungera.<br /><br />Om ditt inlägg var speciellt (alltså inte som allt annat som hamnar i Webmasters inkorg, nämligen spam eller hatbrev) är du välkommen vända dig till någon ordningsvakt (se lista bland högermodulerna här till höger&raquo;).';
        rounded_corners_bottom(array('color' => 'red'));
    }
    if (login_checklogin()) {
        if (isset($_SESSION['unread_gb_entries'])) {
            echo guestbook_list($_SESSION['unread_gb_entries']);
            unset($_SESSION['unread_gb_entries']);
        }
    }
}
예제 #8
0
function sex_sense_fetch_categories($options, $category_tree = array())
{
    $query = 'SELECT * FROM sex_categories WHERE 1';
    $query .= isset($options['parent_category']) && is_numeric($options['parent_category']) ? ' AND parent_category = ' . $options['parent_category'] : '';
    $query .= isset($options['category_id']) && is_numeric($options['category_id']) ? ' AND category_id = ' . $options['category_id'] : '';
    $query .= isset($options['category_handle']) ? ' AND category_handle LIKE "' . str_replace('_', '\\_', $options['category_handle']) . '"' : '';
    $query .= ' ORDER BY category_id ASC';
    $result = query_cache(array('category' => 'sex_sense', 'query' => $query));
    if (count($result) < 1) {
        throw new Exception('Kategorin existerar inte.');
    }
    $child_nodes = array();
    foreach ($result as $data) {
        $child_nodes[] = $data;
    }
    array_unshift($category_tree, $child_nodes);
    return $options['parent_category'] == 0 || isset($options['skip_recursion']) && $options['skip_recursion'] == true ? $category_tree : sex_sense_fetch_categories(array('parent_category' => $category_tree[0]['id']), $category_tree);
}
예제 #9
0
function discussion_forum_path_to_category($options)
{
    $query = 'SELECT handle, title, id, parent FROM public_forums WHERE 1';
    $query .= isset($options['id']) ? ' AND id = "' . $options['id'] . '"' : '';
    $query .= isset($options['handle']) ? ' AND id = "' . $options['handle'] . '"' : '';
    $query .= ' LIMIT 1';
    $data = array_pop(query_cache(array('category' => 'forum_categories', 'query' => $query)));
    $categories[] = $data;
    if ($data['parent'] > 0) {
        $categories[] = array_pop(discussion_forum_path_to_category(array('id' => $data['parent'])));
    }
    $categories = array_reverse($categories);
    $url = '/diskussionsforum/';
    foreach ($categories as $level => $category) {
        $url .= $category['handle'] . '/';
        $categories[$level]['url'] = $url;
    }
    return $categories;
}
예제 #10
0
		return false;
	}
}


	if (online_ovs(3))
	{
		$return .= online_ovs(3);
	}
	elseif (online_ovs(4))
	{
		$return .= online_ovs(4);
	}
	elseif (online_ovs(5))
	{
		$return .= online_ovs(5);
	}
	else
	{
		$title = 'Ingen';
	}
	$return .= '<div style="height: 2px;"></div><a href="/admin/online_ovs.php">Alla inloggade OV\'s</a>';
*/
$query = 'SELECT DISTINCT(p.user) AS user_id, l.username FROM login AS l, privilegies AS p WHERE l.id = p.user AND p.value = 0 AND p.privilegie IN ("discussion_forum_remove_posts", "discussion_forum_edit_posts", "discussion_forum_rename_threads", "discussion_forum_lock_threads", "discussion_forum_sticky_threads", "discussion_forum_move_thread", "discussion_forum_post_addition") AND l.lastaction > UNIX_TIMESTAMP() - 600 ORDER BY l.lastaction DESC limit 7';
$result = query_cache(array('query' => $query));
foreach ($result as $data) {
    $return .= '<li>' . "\n";
    $return .= '- ';
    $return .= '<a href="/traffa/guestbook.php?view=' . $data['user_id'] . '">' . $data['username'] . '</a><br />' . "\n";
    $return .= '</li>' . "\n";
}
예제 #11
0
function ui_bottom($options = array())
{
    $output .= '<br style="clear: both;" />' . "\n";
    $output .= '</div>' . "\n";
    $output .= '<div id="ui_modulebar">' . "\n";
    if ($options['ui_modules_hide'] == true) {
        $modules = $options['ui_modules'];
    } else {
        #$modules['google_adsense'] = 'Överlevnadsmodul';
        $modules['ad_module'] = 'Admodul';
        $query = 'SELECT rs.id FROM radio_schedule AS rs, login AS l, radio_programs AS rp WHERE l.id = rp.user_id AND rp.id = rs.program_id AND NOW() BETWEEN rs.starttime AND rs.endtime ORDER BY rs.starttime DESC LIMIT 0, 1';
        $ui_module_radio_sending = query_cache(array('query' => $query, 'max_delay' => 60));
        if (count($ui_module_radio_sending) > 0) {
            $modules['radio_sending'] = 'Radio';
        }
        $modules['multisearch'] = 'Multi-sök';
        $modules['n24'] = 'Nyheter';
        if (isset($options['ui_modules']) && is_array($options['ui_modules'])) {
            $modules = array_merge($modules, $options['ui_modules']);
        }
        if (login_checklogin()) {
            $modules['friends_online'] = 'Vänner online';
            $modules['friends_notices'] = 'Vänner(s)notiser';
            $modules['profile_visitors'] = 'Besökare';
        }
        $modules['latest_threads'] = 'Forumtrådar';
        $modules['latest_posts'] = 'Inlägg i forumet';
        $modules['site_stats'] = 'Statistik';
        foreach (array('discussion_forum_remove_posts', 'discussion_forum_edit_posts', 'discussion_forum_rename_threads', 'discussion_forum_lock_threads', 'discussion_forum_sticky_threads', 'discussion_forum_move_thread', 'discussion_forum_post_addition', 'gb_autoreport') as $privilegie) {
            if (is_privilegied($privilegie)) {
                $ui_administration_module_show = true;
            }
        }
        if ($ui_administration_module_show === true) {
            $modules['administration'] = 'Administration';
        }
        $modules['online_ovs'] = 'Inloggade ordningsvakter';
    }
    if (is_array($_SESSION['module_order']) && $options['ui_modules_hide'] == false) {
        // Merging together all coded modules and those in the SESSION so no modules are missed
        $show_modules = $_SESSION['module_order'];
        foreach ($modules as $handle => $module) {
            if (!in_array($handle, $show_modules)) {
                $show_modules[] = $handle;
            }
        }
        foreach ($show_modules as $order => $handle) {
            if (isset($modules[$handle])) {
                $output .= ui_module_render(ui_module_fetch(array('header' => $modules[$handle], 'handle' => $handle)));
            }
        }
    } else {
        foreach ($modules as $handle => $header) {
            $output .= ui_module_render(ui_module_fetch(array('header' => $header, 'handle' => $handle)));
        }
    }
    $output .= '		</div>' . "\n";
    $output .= '	<div id="ui_break"></div> ' . "\n";
    $output .= '	</div>' . "\n";
    $output .= '<div id="skyscraper">' . "\n";
    $output .= '<div><script type="text/javascript">CM8ShowAd("Skyscraper");</script></div>' . "\n";
    $output .= '<iframe src="http://nyheter24.se/special/hamsterpaj-ads.html" style="border: 0; overflow: hidden; width: 142px; height: 352px;" scrolling="no" frameborder="0"></iframe>';
    $output .= '</div>' . "\n";
    $output .= '<div id="fiskpinne" style="background: none;">' . "\n";
    $output .= '<script type="text/javascript"><!-- google_ad_client = "pub-3110640362329253"; /* hamsterpaj 160x600, skapad 2009-06-08 */ google_ad_slot = "0695149486"; google_ad_width = 160; google_ad_height = 600; //--></script><script type="text/javascript"src=" http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>' . "\n";
    $output .= '<br style="clear: both;" />' . "\n";
    $output .= '</div>' . "\n";
    // Close id="ad_wrapper"
    $output .= '</div>' . "\n";
    if (!login_checklogin()) {
        $output .= '<div id="tiny_reg_form">' . "\n";
        $regform_suspended = cache_load('register_suspend');
        if ($regform_suspended == 'disabled') {
            $output .= '<h1>Du måste vara inloggad för att kunna göra detta!</h1>' . "\n";
            $output .= '<p>Just nu är registreringen avstängd, detta är extremt ovanligt. Om du väntar någon timme så borde den vara öppen igen!</p>' . "\n";
        } else {
            $output .= login_tiny_reg_form_generate();
        }
        $output .= '</div>' . "\n";
    }
    if (ENVIRONMENT == 'production') {
        $output .= '<script type="text/javascript">
			var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
			document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
			</script>
			<script type="text/javascript">
			try {
			var pageTracker = _gat._getTracker("UA-7987100-1");
			pageTracker._trackPageview();
			} catch(err) {}
		</script>';
        $output .= '<img src="http://sifomedia.nyheter24.se/RealMedia/ads/adstream_nx.ads/nyheter24/123645@TopRight?XE&Sajt=hamsterpaj&Grupp1=nyheter24natverket&XE" border="0" alt="" />';
    }
    $output .= '</body>' . "\n";
    $output .= '</html>' . "\n";
    if (isset($options['return']) && $options['return'] == true) {
        return $output;
    } else {
        echo $output;
    }
}
예제 #12
0
<?php

include '../../include/core/common.php';
$query = 'SELECT * FROM music_guess_songs ORDER BY id DESC LIMIT 1, 15';
$songs = query_cache(array('query' => $query));
header('Content-type: application/xml; charset=utf-8');
//header('Content-type: text/plain');
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<playlist version="0" xmlns="http://xspf.org/ns/0/">' . "\n";
echo '<trackList>' . "\n";
foreach ($songs as $song) {
    $song['song'] = strtolower($song['song']);
    $song['artist'] = strtolower($song['artist']);
    $song['timestamp'] = strtolower(fix_time($song['timestamp']));
    $search = array('å', 'ä', 'ö', '\'', '"');
    $replace = array('a', 'a', 'o', '', '');
    $song['song'] = str_replace($search, $replace, $song['song']);
    $song['artist'] = str_replace($search, $replace, $song['artist']);
    $song['timestamp'] = str_replace($search, $replace, $song['timestamp']);
    /*
    $song['song'] = htmlentities($song['song']);
    $song['artist'] = htmlentities($song['artist']);
    $song['timestamp'] = htmlentities($song['timestamp']);
    */
    echo '<track>' . "\n";
    echo '<location>http://images.hamsterpaj.net/music_guess_mp3/' . $song['secret_id'] . '.mp3</location>' . "\n";
    echo '<image>http://images.hamsterpaj.net/mattan/album_pic.jpg</image>' . "\n";
    echo '<annotation>' . $song['timestamp'] . ', ' . $song['artist'] . ' - ' . $song['song'] . '</annotation>' . "\n";
    echo '</track>' . "\n";
}
echo '</trackList>' . "\n";
예제 #13
0
파일: index.php 프로젝트: Razze/hamsterpaj
/* Info text */
$output .= '<p>Hamsterpaj är en kul sida med filmer, spel och lite chattfunktioner, till för tonåringar som inte orkar skriva skolarbeten utan slösurfar istället.</p>' . "\n";
$output .= '<p>Vi håller inte på och tramsar med några betaltjänster eller "nyhetsbrev", allt är gratis. Vi tjänar pengar på annonser och chefen på bygget jobbar som chokladhjulssnurrare på Liseberg.</p>' . "\n";
/* Drivers license ad */
$output .= '<div class="fp_column_ad">' . "\n";
$output .= '<a href="/mattan/koerkort.php"><img src="' . IMAGE_URL . 'fp_column_ads/drivers_license.png" /></a>' . "\n";
$output .= '</div>' . "\n";
/* People online, with maps */
$output .= '<h2>Användare på karta</h2>' . "\n";
foreach (array('f', 'm') as $gender) {
    $query = 'SELECT l.id, l.username, u.gender, u.birthday, u.image, z.x_rt90, z.y_rt90';
    $query .= ' FROM login AS l, userinfo AS u, zip_codes AS z';
    $query .= ' WHERE u.userid = l.id AND z.zip_code = u.zip_code AND z.zip_code > 0 AND (u.image = 2 OR u.image = 1) AND u.gender = "%GENDER%" AND u.birthday < 1970';
    $query .= ' ORDER BY l.lastaction DESC LIMIT 40';
    $query = str_replace('%GENDER%', $gender, $query);
    $people = query_cache(array('query' => $query, 'max_delay' => 600));
    foreach ($people as $data) {
        $map_points .= '<Point X=\'' . $data['y_rt90'] . '\' Y=\'' . $data['x_rt90'] . '\'>';
        $map_points .= '<Name>' . $data['username'] . '</Name>';
        $map_points .= '<IconImage>http://www.hitta.se/images/point.png</IconImage>';
        $map_points .= '<Content><![CDATA[' . $data['gender'] . ' ' . date_get_age($data['birthday']);
        if ($data['image'] == 1 || $data['image'] == 2) {
            $map_points .= '<br /><a href=\'http://www.hamsterpaj.net/hittapunktse_map_link_redirect.php?id=' . $data['id'] . '\'><img src=\'http://images.hamsterpaj.net/images/users/thumb/' . $data['id'] . '.jpg\' /></a>';
        }
        if (login_checklogin()) {
            $map_points .= '<br />' . rt90_readable(rt90_distance($_SESSION['userinfo']['x_rt90'], $_SESSION['userinfo']['y_rt90'], $data['x_rt90'], $data['y_rt90']));
        }
        $map_points .= ']]></Content>';
        $map_points .= '</Point>';
    }
    $output .= '<form method="post" action="http://www.hitta.se/LargeMap.aspx" target="hittapunktse" onsubmit="window.open(\'\', \'hittapunktse\', \'location=no, width=750, height=500\');" style="display: block; margin: 0px; float: left;">' . "\n";
예제 #14
0
    // Close hamsterpaj_website
    $_SESSION = array();
    if (isset($_COOKIE[session_name()])) {
        setcookie(session_name(), '', time() - 42000, '/');
    }
    session_unset();
    session_destroy();
    die;
} elseif (!isset($_SESSION['ip']) && !$is_banned) {
    $_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
    $is_proxy = in_array($_SERVER['REMOTE_ADDR'], array('116.1.58.46', '116.14.37.121', '116.209.65.156', '116.227.210.188', '116.228.221.2', '116.233.83.60', '116.27.222.36', '116.28.225.79', '116.48.178.222', '116.48.24.204', '116.75.177.32', '117.13.122.16', '117.32.152.168', '117.85.137.89', '117.88.124.134', '117.90.37.38', '117.95.41.82', '118.13.245.6', '118.165.158.111', '118.172.30.116', '12.159.65.84', '12.176.103.74', '12.218.243.118', '121.14.139.216', '121.15.124.206', '121.228.57.224', '121.237.25.85', '121.24.131.192', '121.24.147.56', '121.28.143.109', '121.94.102.16', '122.162.55.156', '122.204.17.118', '122.224.129.162', '122.94.245.8', '123.10.226.62', '123.114.114.10', '123.117.97.240', '123.191.80.59', '123.4.222.60', '123.53.88.138', '123.54.201.244', '123.9.10.93', '124.115.137.77', '124.131.152.149', '124.133.104.70', '124.162.136.112', '124.200.91.46', '124.217.247.103', '124.237.34.47', '124.82.48.116', '124.90.202.37', '125.112.22.204', '125.116.27.153', '125.118.194.239', '125.127.46.186', '125.220.17.56', '125.33.75.110', '125.71.0.97', '125.78.181.173', '125.82.139.187', '125.83.53.22', '125.84.83.85', '128.197.11.30', '128.2.155.207', '129.2.168.221', '129.21.97.207', '129.240.250.86', '130.225.246.195', '130.64.37.147', '132.239.163.221', '134.130.243.7', '134.60.236.65', '134.76.63.98', '134.91.236.5', '137.224.234.42', '138.23.72.156', '140.112.212.171', '140.112.42.79', '140.116.104.15', '140.122.225.112', '140.123.123.67', '140.125.31.59', '140.138.148.84', '141.152.203.99', '141.20.102.151', '141.211.4.31', '142.177.158.41', '145.116.239.149', '145.92.14.217', '147.52.18.244', '149.20.54.204', '149.9.0.108', '151.203.163.188', '151.32.207.239', '151.50.153.176', '151.51.10.245', '151.59.165.158', '158.130.5.102', '159.149.155.89', '160.80.34.113', '162.105.71.235', '166.111.68.21', '166.70.207.2', '166.70.99.91', '168.122.39.112', '169.237.31.187', '18.187.1.68', '18.238.0.183', '18.246.1.160', '18.250.0.223', '18.85.1.13', '189.100.179.27', '189.154.90.239', '189.24.7.99', '189.71.162.32', '190.156.28.146', '190.16.2.117', '190.161.218.44', '190.18.235.101', '190.21.161.131', '190.48.163.35', '192.251.226.205', '192.67.63.148', '193.111.87.20', '193.125.37.100', '193.125.39.54', '193.167.127.81', '193.174.33.200', '193.200.193.137', '193.201.52.133', '193.25.119.62', '194.102.180.118', '194.152.135.102', '195.135.149.182', '195.14.206.163', '195.141.92.196', '195.2.100.71', '195.24.77.225', '195.250.220.218', '200.105.82.81', '200.116.11.237', '200.120.100.11', '201.139.72.2', '201.150.79.57', '201.21.205.181', '201.212.164.137', '201.213.182.247', '201.231.127.112', '201.231.247.49', '201.233.138.33', '201.235.220.92', '201.254.119.178', '201.51.73.51', '201.67.238.52', '202.102.126.215', '202.109.116.3', '202.114.2.139', '203.169.184.37', '203.218.189.100', '203.218.213.105', '204.13.236.244', '206.222.28.93', '206.55.74.0', '206.57.47.50', '207.172.90.28', '208.110.71.34', '208.223.208.181', '208.52.130.92', '208.73.249.40', '208.75.88.34', '208.75.91.19', '209.128.193.195', '209.151.236.27', '209.162.35.64', '209.221.206.114', '209.40.205.218', '209.44.114.178', '209.91.32.93', '210.22.83.146', '210.46.174.47', '210.60.97.175', '211.157.109.95', '211.3.34.136', '212.112.242.89', '212.149.225.3', '212.198.182.246', '212.203.9.38', '212.204.40.86', '212.24.168.178', '212.251.141.99', '212.29.148.185', '212.32.206.36', '212.42.236.140', '212.74.233.43', '212.94.75.43', '213.113.33.177', '213.114.108.141', '213.115.6.58', '213.134.173.19', '213.186.47.43', '213.192.74.24', '213.199.26.251', '213.200.166.244', '213.207.93.167', '213.211.48.71', '213.220.233.230', '213.225.28.34', '213.226.67.71', '213.231.98.33', '213.47.128.105', '213.65.146.230', '213.66.16.212', '213.88.243.41', '213.9.47.115', '216.101.119.161', '216.161.85.185', '216.169.105.192', '216.171.141.126', '216.174.137.61', '216.19.54.232', '216.211.42.154', '216.224.122.202', '216.224.124.124', '216.231.61.43', '216.249.85.250', '216.255.187.162', '216.27.177.188', '216.93.181.46', '217.10.142.173', '217.114.224.235', '217.115.149.241', '217.148.84.179', '217.152.200.220', '217.157.150.182', '217.157.63.254', '217.160.207.226', '217.162.236.127', '217.191.227.226', '217.196.64.205', '217.196.85.122', '217.201.79.189', '217.202.3.169', '217.216.179.197', '217.227.237.232', '217.230.205.17', '217.235.57.170', '217.238.211.250', '217.238.29.60', '217.58.144.220', '217.88.241.178', '218.102.116.93', '218.199.29.20', '218.250.63.171', '218.254.2.9', '218.56.201.59', '218.74.140.114', '218.81.128.99', '218.90.162.250', '219.130.217.117', '219.137.160.122', '219.140.9.84', '219.142.241.164', '219.232.54.186', '219.79.145.135', '220.157.175.94', '220.175.154.135', '220.184.141.109', '220.234.3.35', '220.248.63.63', '221.135.140.60', '221.137.84.93', '221.202.226.231', '221.206.231.16', '221.207.2.30', '221.215.12.14', '221.219.121.16', '221.220.74.67', '221.222.188.28', '221.228.113.70', '221.233.70.34', '221.3.123.65', '221.9.108.68', '222.131.45.60', '222.164.56.249', '222.183.20.236', '222.183.228.73', '222.187.111.2', '222.187.165.36', '222.187.165.91', '222.191.210.238', '222.20.250.168', '222.211.110.152', '222.220.208.4', '222.248.115.74', '222.33.228.70', '222.68.183.210', '24.118.41.151', '24.128.11.119', '24.129.80.199', '24.131.64.233', '24.148.237.5', '24.173.23.98', '24.174.164.222', '24.180.38.254', '24.19.230.22', '24.201.198.226', '24.231.102.89', '24.240.24.58', '24.59.124.176', '24.71.238.144', '24.73.79.38', '24.77.221.15', '24.8.193.176', '24.84.25.129', '24.85.203.222', '24.87.36.165', '24.9.185.227', '4.156.84.62', '41.200.229.4', '41.201.187.111', '41.251.27.133', '58.17.170.18', '58.19.148.194', '58.212.102.66', '58.212.138.144', '58.213.251.243', '58.22.197.146', '58.24.135.230', '58.24.90.39', '58.247.204.171', '58.25.237.26', '58.251.109.105', '58.37.24.163', '58.38.213.166', '58.51.12.251', '58.51.14.249', '58.51.8.253', '58.55.3.232', '58.63.91.120', '58.64.63.136', '58.8.138.162', '58.91.21.179', '59.104.37.153', '59.149.34.180', '59.155.88.91', '59.173.30.9', '59.174.171.24', '59.66.250.32', '60.0.15.121', '60.14.82.127', '60.174.195.121', '60.188.44.70', '60.213.172.5', '60.233.190.173', '60.50.19.146', '60.51.70.103', '60.63.16.82', '60.63.246.44', '61.131.247.218', '61.140.103.38', '61.144.213.191', '61.157.186.91', '62.117.26.69', '62.143.0.114', '62.163.54.217', '62.2.86.228', '62.214.202.107', '62.47.212.77', '62.75.222.88', '62.78.161.210', '62.97.195.190', '63.226.223.162', '63.249.15.2', '63.249.90.248', '64.119.83.34', '64.178.97.37', '64.182.159.8', '64.22.103.37', '64.233.244.45', '64.31.221.253', '64.34.166.71', '64.81.59.235', '65.1.59.228', '65.101.111.20', '65.110.19.146', '65.23.158.193', '65.35.143.150', '65.35.30.198', '65.39.84.94', '66.142.45.40', '66.159.127.30', '66.159.225.72', '66.175.214.64', '66.177.234.252', '66.223.210.43', '66.225.36.43', '66.228.127.27', '66.230.230.230', '66.68.176.57', '66.91.35.211', '66.92.128.186', '66.92.214.112', '67.142.87.206', '67.170.141.130', '67.172.231.207', '67.175.213.37', '67.176.47.196', '67.18.176.114', '67.186.55.154', '67.202.23.14', '67.207.135.95', '67.53.229.163', '67.78.5.60', '67.83.111.105', '68.101.140.91', '68.107.36.237', '68.113.179.38', '68.13.179.10', '68.146.142.22', '68.147.8.99', '68.157.133.17', '68.180.82.163', '68.196.249.19', '68.29.174.54', '68.3.220.48', '68.35.75.27', '68.6.242.78', '68.61.63.44', '68.62.7.6', '68.63.209.187', '68.77.112.47', '68.82.186.166', '69.138.156.156', '69.179.138.131', '69.196.152.198', '69.205.113.136', '69.209.203.75', '69.212.46.248', '69.253.178.8', '69.28.228.76', '69.57.148.142', '69.59.173.73', '69.79.150.118', '69.90.109.247', '69.93.127.69', '70.106.161.189', '70.119.35.145', '70.121.253.104', '70.132.21.182', '70.177.34.176', '70.177.8.187', '70.181.90.130', '70.189.191.160', '70.2.116.40', '70.223.237.181', '70.232.161.31', '70.246.157.71', '70.49.42.91', '70.67.178.251', '70.80.213.147', '70.82.87.169', '70.87.222.222', '71.103.251.114', '71.112.1.127', '71.135.176.254', '71.174.110.252', '71.202.234.54', '71.225.22.94', '71.237.94.16', '71.33.137.129', '71.56.10.126', '71.56.59.33', '72.177.117.110', '72.197.121.52', '72.201.71.244', '72.240.190.98', '72.39.122.92', '72.43.122.208', '72.55.156.170', '72.55.174.112', '74.128.62.192', '74.141.51.84', '74.166.30.140', '74.184.172.14', '74.196.223.159', '74.208.104.114', '74.208.46.15', '74.229.201.181', '74.238.241.32', '74.56.88.217', '74.68.111.153', '75.120.225.157', '75.126.145.251', '75.127.105.149', '75.127.97.14', '75.155.127.44', '75.69.104.125', '75.69.39.120', '75.87.229.210', '76.102.228.93', '76.109.0.176', '76.121.18.177', '76.14.14.117', '76.15.68.46', '76.161.42.3', '76.167.199.89', '76.180.174.72', '76.184.184.54', '76.187.202.56', '76.189.173.254', '76.200.152.23', '76.209.59.142', '76.216.50.26', '76.234.100.170', '76.6.157.31', '76.67.49.31', '76.91.72.15', '76.99.52.119', '77.0.152.140', '77.12.218.211', '77.128.38.10', '77.135.129.96', '77.160.175.107', '77.180.146.83', '77.183.41.193', '77.184.253.162', '77.184.85.53', '77.185.233.254', '77.191.57.118', '77.193.214.56', '77.198.58.156', '77.2.233.191', '77.201.23.156', '77.202.15.3', '77.250.135.154', '77.251.119.151', '77.41.71.244', '77.49.133.232', '77.56.217.183', '77.56.73.190', '77.57.123.135', '77.64.128.137', '77.64.168.214', '77.65.144.81', '77.7.49.165', '78.102.43.56', '78.106.133.87', '78.107.237.16', '78.110.197.26', '78.116.86.111', '78.12.141.198', '78.129.201.189', '78.13.172.254', '78.29.149.19', '78.34.154.51', '78.42.38.55', '78.42.7.80', '78.47.29.82', '78.48.123.155', '78.48.229.126', '78.51.75.197', '78.51.86.252', '78.53.145.208', '78.53.32.162', '78.54.174.195', '78.84.183.212', '78.94.33.218', '78.96.160.114', '78.99.138.141', '79.109.173.99', '79.114.185.226', '79.117.43.91', '79.118.177.162', '79.13.11.247', '79.137.103.26', '79.145.249.81', '79.148.242.144', '79.16.106.75', '79.178.141.107', '79.212.127.231', '79.212.161.11', '79.223.188.232', '79.3.175.227', '79.32.207.12', '79.34.29.106', '79.37.230.204', '79.42.127.68', '79.73.244.234', '79.76.219.165', '79.8.48.110', '79.86.93.135', '79.88.185.69', '79.99.236.2', '80.104.161.120', '80.126.244.126', '80.135.32.103', '80.135.82.177', '80.136.223.135', '80.138.210.106', '80.139.54.104', '80.142.253.10', '80.144.80.137', '80.171.15.161', '80.191.160.131', '80.192.8.89', '80.201.40.7', '80.203.49.192', '80.219.56.214', '80.229.218.5', '80.236.232.155', '80.240.210.181', '80.244.73.187', '80.250.30.233', '80.39.35.43', '80.42.158.68', '80.54.169.116', '80.63.56.148', '80.67.172.19', '80.78.228.180', '81.167.139.78', '81.169.137.209', '81.169.155.246', '81.169.167.133', '81.169.168.22', '81.169.181.93', '81.169.183.122', '81.174.21.202', '81.186.243.88', '81.197.66.246', '81.206.126.221', '81.209.59.212', '81.210.158.52', '81.210.205.77', '81.217.141.182', '81.227.136.249', '81.227.239.183', '81.230.37.15', '81.231.172.239', '81.232.87.16', '81.237.202.149', '81.251.93.153', '81.53.99.108', '81.56.149.142', '81.57.158.21', '81.67.247.61', '82.116.241.176', '82.122.248.143', '82.130.9.94', '82.131.167.138', '82.152.159.162', '82.156.183.49', '82.159.119.16', '82.165.180.112', '82.169.108.22', '82.182.125.89', '82.182.15.84', '82.193.148.93', '82.207.109.118', '82.207.255.6', '82.210.151.23', '82.215.135.51', '82.216.197.27', '82.224.204.105', '82.225.205.246', '82.227.12.18', '82.228.199.147', '82.228.218.46', '82.228.250.224', '82.229.227.12', '82.230.122.92', '82.230.15.32', '82.230.152.84', '82.230.29.17', '82.231.26.90', '82.234.140.19', '82.235.104.223', '82.242.129.153', '82.245.97.6', '82.250.215.138', '82.251.170.186', '82.253.61.201', '82.34.227.132', '82.41.52.161', '82.43.132.152', '82.44.63.76', '82.47.45.127', '82.59.115.172', '82.64.61.205', '82.65.35.170', '82.67.91.66', '82.82.173.41', '82.82.184.180', '82.82.64.174', '82.82.83.122', '82.95.255.153', '83.1.71.18', '83.140.35.226', '83.141.157.242', '83.145.165.222', '83.149.112.107', '83.171.151.170', '83.171.156.120', '83.171.158.70', '83.171.190.210', '83.205.117.166', '83.215.48.166', '83.233.180.14', '83.237.106.209', '83.237.35.22', '83.24.61.205', '83.246.118.106', '83.246.95.65', '83.248.198.37', '83.251.151.228', '83.253.168.96', '83.254.67.236', '83.28.183.191', '83.53.207.71', '83.6.84.3', '83.84.165.4', '83.84.170.2', '84.133.217.140', '84.134.136.17', '84.139.106.92', '84.141.235.237', '84.143.93.235', '84.150.91.254', '84.150.96.177', '84.151.81.6', '84.165.88.87', '84.169.104.163', '84.170.146.161', '84.170.169.222', '84.172.241.91', '84.174.125.169', '84.174.147.143', '84.175.242.37', '84.176.238.17', '84.177.83.127', '84.179.159.68', '84.179.93.215', '84.180.117.166', '84.184.75.185', '84.188.219.189', '84.189.173.98', '84.189.27.240', '84.20.173.155', '84.222.121.32', '84.222.148.171', '84.223.118.84', '84.223.119.219', '84.241.71.34', '84.244.189.19', '84.25.14.91', '84.255.238.118', '84.28.209.135', '84.34.133.217', '84.38.64.85', '84.40.218.108', '84.41.177.144', '84.43.191.101', '84.46.8.218', '84.56.49.248', '84.56.55.170', '84.58.218.31', '84.59.218.11', '84.59.31.191', '84.63.192.61', '84.72.243.62', '85.100.228.69', '85.119.157.129', '85.126.48.6', '85.126.83.85', '85.127.15.185', '85.134.205.51', '85.136.255.101', '85.140.188.35', '85.147.73.95', '85.17.116.166', '85.172.119.17', '85.176.10.213', '85.176.255.183', '85.177.162.77', '85.177.223.234', '85.177.229.147', '85.178.109.189', '85.178.111.131', '85.178.240.162', '85.178.243.211', '85.178.248.5', '85.178.89.252', '85.179.122.224', '85.179.131.168', '85.179.3.140', '85.179.61.90', '85.180.237.186', '85.181.131.49', '85.181.4.215', '85.181.71.193', '85.181.72.190', '85.181.88.32', '85.182.29.22', '85.183.209.210', '85.2.69.240', '85.202.104.40', '85.214.114.88', '85.221.160.66', '85.225.176.243', '85.227.201.124', '85.228.98.117', '85.235.21.9', '85.24.239.150', '85.25.150.94', '85.25.151.22', '85.25.152.185', '85.26.57.13', '85.31.187.225', '85.50.147.47', '85.85.77.145', '86.136.109.101', '86.140.182.87', '86.142.202.26', '86.193.177.25', '86.205.133.188', '86.56.58.235', '86.56.61.38', '86.56.75.2', '86.68.126.144', '86.68.156.191', '87.10.238.239', '87.105.180.91', '87.106.188.238', '87.106.27.17', '87.106.74.219', '87.106.77.37', '87.11.218.113', '87.111.129.5', '87.118.101.102', '87.120.199.10', '87.121.146.181', '87.121.71.225', '87.122.15.248', '87.123.65.210', '87.123.77.133', '87.157.233.161', '87.170.81.241', '87.18.224.35', '87.181.240.74', '87.183.251.202', '87.19.151.45', '87.19.194.55', '87.204.26.205', '87.205.55.57', '87.205.80.160', '87.206.14.184', '87.227.46.4', '87.228.124.86', '87.230.11.166', '87.230.88.138', '87.234.205.226', '87.237.59.174', '87.240.8.10', '87.247.90.151', '87.5.31.145', '87.7.248.55', '87.76.4.179', '87.76.53.90', '87.78.220.31', '87.78.32.169', '87.78.99.161', '87.8.239.98', '87.98.131.249', '88.110.159.242', '88.112.38.228', '88.117.8.196', '88.123.22.179', '88.134.235.244', '88.134.43.234', '88.149.235.158', '88.153.55.197', '88.160.218.31', '88.161.54.214', '88.163.108.131', '88.165.60.14', '88.165.60.63', '88.172.128.238', '88.179.60.147', '88.180.68.243', '88.191.13.199', '88.191.16.96', '88.191.22.62', '88.191.28.23', '88.191.47.11', '88.191.57.15', '88.191.79.196', '88.191.80.98', '88.196.19.215', '88.198.11.105', '88.198.128.26', '88.198.56.140', '88.198.72.170', '88.217.22.242', '88.217.60.126', '88.217.90.32', '88.65.187.213', '88.67.123.137', '88.67.19.230', '88.72.121.197', '88.72.225.216', '88.73.0.114', '88.73.123.66', '88.73.62.225', '88.73.79.27', '88.74.156.196', '88.74.178.136', '88.74.57.25', '88.76.172.85', '88.76.32.97', '88.77.219.128', '88.77.24.0', '88.77.29.186', '88.80.7.116', '88.84.144.63', '89.102.57.114', '89.106.244.90', '89.110.150.126', '89.112.2.176', '89.128.13.83', '89.13.102.223', '89.145.20.35', '89.149.194.143', '89.149.242.226', '89.149.244.45', '89.150.202.174', '89.156.240.8', '89.173.30.29', '89.176.196.66', '89.181.59.156', '89.183.17.199', '89.20.99.177', '89.201.122.145', '89.210.55.111', '89.215.98.221', '89.216.74.2', '89.220.82.243', '89.223.30.32', '89.223.41.94', '89.228.231.0', '89.245.202.92', '89.245.28.90', '89.246.189.19', '89.246.215.23', '89.247.1.59', '89.247.48.131', '89.248.169.108', '89.252.210.23', '89.27.199.198', '89.32.23.102', '89.35.77.57', '89.48.239.27', '89.5.38.8', '89.52.163.18', '89.76.80.94', '89.79.18.7', '89.79.215.32', '90.131.163.231', '90.149.8.117', '90.153.125.43', '90.21.92.223', '90.216.187.14', '90.32.227.143', '91.121.0.172', '91.121.102.64', '91.121.142.53', '91.121.162.120', '91.121.204.145', '91.121.26.150', '91.121.7.211', '91.14.93.248', '91.143.83.123', '91.149.187.155', '91.149.42.221', '91.154.63.77', '91.164.11.180', '91.20.30.114', '91.22.229.69', '91.37.127.165', '91.50.114.47', '91.64.153.51', '91.64.162.234', '91.64.19.12', '91.64.216.183', '91.64.41.11', '91.65.101.109', '91.65.186.249', '91.65.208.106', '91.65.222.86', '91.65.228.212', '91.65.239.52', '91.65.60.25', '91.65.64.72', '91.65.68.196', '91.66.193.194', '91.66.251.251', '91.66.43.132', '91.66.81.94', '91.67.20.49', '91.73.189.187', '91.76.110.219', '91.78.116.8', '91.78.51.1', '91.89.138.38', '91.89.177.230', '92.112.51.85', '92.113.221.70', '92.130.202.238', '92.194.12.45', '92.226.196.182', '92.227.120.92', '92.227.25.227', '92.227.35.182', '92.228.5.44', '92.228.76.200', '92.228.81.114', '92.234.173.251', '92.243.15.37', '92.243.5.156', '92.244.44.97', '92.254.176.244', '92.75.241.62', '92.78.2.208', '92.80.47.205', '92.81.189.78', '92.96.209.50', '92.97.216.208', '93.183.132.33', '93.194.218.233', '94.42.16.109', '96.237.144.230', '96.241.12.116', '96.246.249.241', '97.114.82.46', '97.89.35.249', '98.200.47.67', '98.206.141.103', '98.212.177.179', '98.25.74.173', '98.26.125.173', '99.135.10.29', '99.150.120.74', '99.233.158.84', '99.246.227.210'));
    $is_banned = $is_proxy;
}
if (!$is_banned) {
    $query = 'SELECT ip FROM ip_ban_list';
    $data = query_cache(array('query' => $query, 'max_delay' => 5));
    foreach ($data as $ip) {
        if ($ip['ip'] == $_SERVER['REMOTE_ADDR']) {
            $is_banned = true;
        }
    }
}
if ($is_banned) {
    $stylesheet = 'open_source.css';
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
    echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
    echo '<head>' . "\n";
    echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
    echo '<meta http-equiv="refresh" content="10; URL=http://disneyland.disney.go.com/disneyland/en_US/home/home?name=HomePage&bhcp=1" />';
    echo '<title>Bannad ifrån Hamsterpaj</title>' . "\n";
    echo '<link rel="icon" href="http://images.hamsterpaj.net/favicon.png" type="image/x-icon" />' . "\n";
예제 #15
0
 $output['user_status'] = addslashes(htmlentities($data['user_status'], ENT_QUOTES, 'UTF-8'));
 if ($data['flags'] != '') {
     $output['flag_array'] = array();
     $flags = explode(',', $data['flags']);
     $flag_count = 0;
     foreach ($flags as $flag) {
         if (!is_numeric($flag)) {
             die('Nähedu, det gick inte!');
         }
         if ((int) $flag > 0 && $flag_count++ < 6) {
             /* Do not change $flag_query unnecessarily, we're using query_cache()! */
             $flag_query = 'SELECT handle';
             $flag_query .= ' FROM user_flags_list';
             $flag_query .= ' WHERE id=' . $flag;
             $flag_query .= ' LIMIT 1';
             $flag_data = query_cache(array('query' => $flag_query, 'max_delay' => 86400, 'category' => 'user_flags')) or report_sql_error($flag_query);
             $output['flag_array'][] = $flag_data[0]['handle'];
         }
     }
     unset($flag);
     $output['flags'] = '["' . implode('", "', $output['flag_array']) . '"]';
 } else {
     $output['flags'] = '[]';
 }
 $output['everything'] = '"age": ' . $output['age'];
 $output['everything'] .= ', "username": "******"';
 $output['everything'] .= ', "have_visited": "' . $output['have_visited'] . '"';
 $output['everything'] .= ', "gender": "' . $output['gender'] . '"';
 $output['everything'] .= ', "location": "' . $output['location'] . '"';
 $output['everything'] .= ', "total_visits": ' . $output['total_visits'];
 $output['everything'] .= ', "last_visit": "' . $output['last_visit'] . '"';
예제 #16
0
            $return .= '<br />Inga nya bilder';
        } elseif ($new_images > 1) {
            $return .= '<br />----------------------';
            $return .= '<br /><a href="/admin/avatarer.php">' . $new_images . ' nya bilder att validera &raquo;</a>';
        } else {
            $return .= '<br />----------------------';
            $return .= '<br /><a href="/admin/avatarer.php">En ny bild att validera &raquo;</a>';
        }
    }
}
if (is_privilegied('gb_autoreport')) {
    $query = 'SELECT COUNT(*) posts';
    $query .= ' FROM gb_autoreport_posts AS garp';
    $query .= ' JOIN gb_autoreport_strings AS gars ON gars.id = garp.string_id ';
    $query .= ' JOIN traffa_guestbooks AS gb ON gb.id = garp.gb_id';
    $query .= ' JOIN login AS l ON l.id = gb.sender AND l.is_removed = 0';
    $query .= ' WHERE garp.checked = 0';
    $result = query_cache(array('query' => $query, 'max_delay' => 60));
    $gb_autoreports = $result[0]['posts'];
    if ($gb_autoreports == 0) {
        $return .= '<br />----------------------';
        $return .= '<br />Inga nya automatiska GB-rapporter';
    } elseif ($gb_autoreports > 1) {
        $return .= '<br />----------------------';
        $return .= '<br /><a href="/admin/gb_autoreport.php">' . $gb_autoreports . ' nya automatiska GB-rapporter &raquo;</a>';
    } else {
        $return .= '<br />----------------------';
        $return .= '<br /><a href="/admin/gb_autoreport.php">En ny automatisk GB-rapport &raquo;</a>';
    }
}
$options['output'] = $return;
예제 #17
0
<?php

$serialized = file_get_contents(PATHS_CACHE . 'live_stats.phpserialized');
$info = unserialize($serialized);
$options['output'] .= '<h4>Besökare</h4>' . "\n";
$options['output'] .= cute_number($info['visitors']) . "\n";
$options['output'] .= '<h4>Inloggade</h4>' . "\n";
$options['output'] .= cute_number($info['logged_in']) . "\n";
$options['output'] .= '<h4>Medlemmar</h4>' . "\n";
$options['output'] .= cute_number($info['members']) . "\n";
$options['output'] .= '<h4>Sidvisningar idag</h4>' . "\n";
$pageviews = query_cache(array('query' => 'SELECT views FROM pageviews WHERE date = "' . date('Y-m-d') . '" LIMIT 1'));
$options['output'] .= cute_number($pageviews[0]['views']);
예제 #18
0
파일: ui.lib.php 프로젝트: Rojk/hamsterpaj
function ui_bottom($options = array())
{
    $output .= '<br style="clear: both;" />' . "\n";
    $output .= '</div>' . "\n";
    $output .= '<div id="ui_modulebar">' . "\n";
    if ($options['ui_modules_hide'] == true) {
        $modules = $options['ui_modules'];
    } else {
        $modules['google_adsense'] = 'Överlevnadsmodul';
        $query = 'SELECT rs.id FROM radio_schedule AS rs, login AS l, radio_programs AS rp WHERE l.id = rp.user_id AND rp.id = rs.program_id AND NOW() BETWEEN rs.starttime AND rs.endtime ORDER BY rs.starttime DESC LIMIT 0, 1';
        $ui_module_radio_sending = query_cache(array('query' => $query, 'max_delay' => 60));
        if (count($ui_module_radio_sending) > 0) {
            $modules['radio_sending'] = 'Radio';
        }
        $modules['multisearch'] = 'Multi-sök';
        if (login_checklogin()) {
            $modules['friends_online'] = 'Vänner online';
            $modules['friends_notices'] = 'Vänner(s)notiser';
            $modules['profile_visitors'] = 'Besökare';
        }
        $modules['latest_threads'] = 'Forumtrådar';
        $modules['latest_posts'] = 'Inlägg i forumet';
        $modules['site_stats'] = 'Statistik';
        foreach (array('discussion_forum_remove_posts', 'discussion_forum_edit_posts', 'discussion_forum_rename_threads', 'discussion_forum_lock_threads', 'discussion_forum_sticky_threads', 'discussion_forum_move_thread', 'discussion_forum_post_addition') as $privilegie) {
            if (is_privilegied($privilegie)) {
                $ui_administration_module_show = true;
            }
        }
        if ($ui_administration_module_show === true) {
            $modules['administration'] = 'Administration';
        }
        $modules['online_ovs'] = 'Inloggade ordningsvakter';
    }
    if (is_array($_SESSION['module_order']) && $options['ui_modules_hide'] == false) {
        // Merging together all coded modules and those in the SESSION so no modules are missed
        $show_modules = array_merge(array_flip($_SESSION['module_order']), $modules);
        foreach ($show_modules as $handle => $order) {
            if (isset($modules[$handle])) {
                $output .= ui_module_render(ui_module_fetch(array('header' => $modules[$handle], 'handle' => $handle)));
            }
        }
    } else {
        foreach ($modules as $handle => $header) {
            $output .= ui_module_render(ui_module_fetch(array('header' => $header, 'handle' => $handle)));
        }
    }
    $output .= '		</div>' . "\n";
    $output .= '	<div id="ui_break"></div> ' . "\n";
    $output .= '	</div>' . "\n";
    $output .= '<div id="skyscraper">' . "\n";
    $output .= '<script type="text/javascript">CM8ShowAd("Skyscraper");</script>' . "\n";
    $output .= '</div>' . "\n";
    $output .= '<div id="fiskpinne" style="background: none;">' . "\n";
    $output .= '<a href="http://click.double.net/?27424;229;4368" target="_blank"><img src="http://imp.double.net/imp.html?a27424p229g4368" width="160" height="350" border="0" alt=""></a>' . "\n";
    $output .= '<script type="text/javascript" src="http://www.adtrade.net/ad/p/?id=hamsterpaj_1&size=140x350&ad=001" charset="iso-8859-1"></script>';
    $output .= '</div>' . "\n";
    $output .= '<!-- START Nielsen//NetRatings SiteCensus V5.2 -->' . "\n";
    $output .= '<!-- COPYRIGHT 2006 Nielsen//NetRatings -->' . "\n";
    $output .= '<script type="text/javascript">' . "\n";
    $output .= '	var _rsCI="hamsterpaj-se";	 /* client ID */' . "\n";
    $output .= '	var _rsCG="0";	 /* content group */' . "\n";
    $output .= '	var _rsDN="//secure-dk.imrworldwide.com/";	 /* data node */' . "\n";
    $output .= '</script>' . "\n";
    $output .= '<script type="text/javascript" src="//secure-dk.imrworldwide.com/v52.js"></script>' . "\n";
    $output .= '<noscript>' . "\n";
    $output .= '	<img src="//secure-dk.imrworldwide.com/cgi-bin/m?ci=hamsterpaj-se&amp;cg=0&amp;cc=1" alt=""/>' . "\n";
    $output .= '</noscript>' . "\n";
    $output .= '<!-- END Nielsen//NetRatings SiteCensus V5.2 -->' . "\n";
    if (!login_checklogin()) {
        $output .= '<div id="tiny_reg_form">' . "\n";
        $regform_suspended = cache_load('register_suspend');
        if ($regform_suspended == 'disabled') {
            $output .= '<h1>Du måste vara inloggad för att kunna göra detta!</h1>' . "\n";
            $output .= '<p>Just nu är registreringen avstängd, detta är extremt ovanligt. Om du väntar någon timme så borde den vara öppen igen!</p>' . "\n";
        } else {
            $output .= login_tiny_reg_form_generate();
        }
        $output .= '</div>' . "\n";
    }
    if (ENVIRONMENT == 'production') {
        $output .= '<script type="text/javascript">
			var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
			document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
			</script>
			<script type="text/javascript">
			try {
			var pageTracker = _gat._getTracker("UA-7987100-1");
			pageTracker._trackPageview();
			} catch(err) {}
		</script>';
    }
    $output .= '</body>' . "\n";
    $output .= '</html>' . "\n";
    if (isset($options['return']) && $options['return'] == true) {
        return $output;
    } else {
        echo $output;
    }
}
예제 #19
0
파일: index.php 프로젝트: Rojk/hamsterpaj
        $out .= '<div class="controls">' . "\n";
        if ($module['published'] == 'true') {
            $out .= '<p class="fp_module_published">Upplagd ' . date('Y-m-d', $module['launch']) . '</p>' . "\n";
        }
        if ($module['grading'] == 'true') {
            if (login_checklogin() && !in_array($module['id'], $_SESSION['fp_module_votes'])) {
                $out .= '<img src="http://images.hamsterpaj.net/discussion_forum/thread_voting_plus.png" class="fp_vote" id="fp_vote_plus_' . $module['id'] . '" />' . "\n";
                $out .= '<img src="http://images.hamsterpaj.net/discussion_forum/thread_voting_minus.png" class="fp_vote" id="fp_vote_minu_' . $module['id'] . '" />' . "\n";
            }
            $out .= '<p class="fp_module_score"><span id="fp_module_score_' . $module['id'] . '">' . $module['score'] . '</span>p</p>' . "\n";
        }
        if ($module['clicks'] > 0) {
            $out .= '<p>' . cute_number($module['clicks']) . ' klick</p>' . "\n";
        }
        $out .= '</div>' . "\n";
    }
    if ($module['format'] == '2_3') {
        $out .= '</div>' . "\n";
        $out .= '<div class="puff">' . "\n";
        $puff_query = 'SELECT * FROM fp_puffs ORDER BY id ASC';
        $puffs = query_cache(array('category' => 'fp_puffs', 'max_limit' => 600, 'query' => $puff_query));
        $puff_key = (date('z') + $puff_no) % count($puffs);
        $out .= $puffs[$puff_key]['content'];
        $out .= '</div>' . "\n";
    }
    $out .= '</li>' . "\n";
}
$out .= '</ol>' . "\n";
ui_top($ui_options);
echo $out;
ui_bottom();
예제 #20
0
function guestbook_insert($entry)
{
    if ($entry['is_mass_gb'] !== true) {
        if ($_SESSION['login']['id'] == $entry['sender']) {
            if ($_SESSION['last_gb_entry'] > time() - 5) {
                return false;
            }
        }
        if (strlen($entry['message']) == 0) {
            return false;
        }
        if ($entry['recipient'] == 2348 && $entry['sender'] != 2348) {
            $_SESSION['posted_gb_to_webmaster'] = true;
        }
    }
    $entry['is_private'] = $entry['is_private'] == 1 ? 1 : 0;
    $query = 'INSERT INTO traffa_guestbooks(timestamp, recipient, sender, message, is_private)';
    $query .= ' VALUES("' . time() . '", "' . $entry['recipient'] . '", "' . $entry['sender'] . '", "' . $entry['message'] . '", "' . $entry['is_private'] . '")';
    mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    $entry['id'] = mysql_insert_id();
    $query = 'UPDATE userinfo SET gb_entries = gb_entries + 1 WHERE userid = "' . $entry['recipient'] . '" LIMIT 1';
    if (!mysql_query($query)) {
        report_sql_error($query, __FILE__, __LINE__);
        return false;
    }
    if (isset($entry['reply-to'])) {
        $query = 'UPDATE traffa_guestbooks SET answered = "Y", `read` =  1 WHERE id = "' . $entry['reply-to'] . '" AND recipient = "' . $entry['sender'] . '" LIMIT 1';
        if (!mysql_query($query)) {
            report_sql_error($query, __FILE__, __LINE__);
            return false;
        }
    }
    if ($entry['is_mass_gb'] !== true) {
        $query = 'SELECT session_id FROM login WHERE id = "' . $entry['recipient'] . '" LIMIT 1';
        $result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
        $data = mysql_fetch_assoc($result);
        if (strlen($data['session_id']) > 5) {
            $remote_session = session_load($data['session_id']);
            $remote_session['notices']['unread_gb_entries'] += 1;
            $entry['image'] = $_SESSION['userinfo']['image'];
            $entry['timestamp'] = time();
            $entry['message'] = stripslashes($entry['message']);
            $entry['username'] = $_SESSION['login']['username'];
            $remote_session['unread_gb_entries'][] = $entry;
            session_save($data['session_id'], $remote_session);
        }
    }
    $_SESSION['last_gb_entry'] = time();
    // Report message to gb_autoreport if it contains a string which should be reported.
    $query = 'SELECT id, string FROM gb_autoreport_strings';
    $gb_autoreport_strings = query_cache(array('query' => $query));
    $message = strtolower(' ' . $entry['message'] . ' ');
    foreach ($gb_autoreport_strings as $gb_autoreport_string) {
        if (strpos($message, strtolower($gb_autoreport_string['string'])) == true) {
            $report_gb = true;
        }
    }
    if (isset($report_gb) && $report_gb == true) {
        $query = 'INSERT INTO gb_autoreport_posts SET string_id = ' . $gb_autoreport_string['id'] . ', gb_id = ' . $entry['id'];
        mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    }
    return true;
}