示例#1
0
    $swfurl = 'cropper.swf?cropheight=' . $avatar_height . '&cropwidth=' . $crop_width . '&imageFile=' . $avatar_tmp_orginal_url . '&postFile=avatar-settings.php?action=crop';
    if (isset($_GET['registerproccess'])) {
        $swfurl .= '%26registerproccess=1';
    }
    $swfurl .= '&imageWidth=442&imageHeight=' . $avatar_height . '&cropText=Klar&hiddenFields=&imageQueryString=&target=_self';
    $out .= '<object type="application/x-shockwave-flash" data="' . $swfurl . '" width="460" height="' . $flash_height . '">';
    $out .= '<param name="movie" value="' . $swfurl . '" />';
    $out .= '</object>';
} elseif ($_GET['step'] == '3') {
    $out .= '<h1 style="margin: 0px; ">Förhandsgranska och spara (steg 3)</h1>';
    $out .= 'Du har nu skalat och beskärt ditt foto. Om du tycker ditt foto är okej så tryck på Spara så kommer ditt foto sparas och läggas in för granskning.<br /><br />';
    $out .= '» Vill du ladda upp en annan bild så gå tillbaka till <a href="avatar-settings.php';
    $out .= isset($_GET['registerproccess']) ? '?registerproccess=1' : '';
    $out .= '">uppladdningen</a>.<br/>';
    $out .= '» Eller vill du skala om bilderna gå till <a href="avatar-settings.php?step=2';
    $out .= isset($_GET['registerproccess']) ? '&registerproccess=1' : '';
    $out .= '">beskärningen</a>.';
    $out .= '<div id="preview">';
    $out .= '<br /><b>Fullstorlek:</b><br/> <img src="' . $avatar_tmp_full_url . '">';
    $out .= '<br /><b>Thumbnail:</b><br /> <img src="' . $avatar_tmp_thumb_url . '">';
    $out .= '</div>';
    $out .= '<p><form name="saveimg" action="avatar-settings.php?action=save" method="post" enctype="multipart/form-data" style="margin: 0px;">';
    $out .= '<input name="submit" type="submit" value="Spara" class="button" /><br />';
    if (isset($_GET['registerproccess'])) {
        $out .= '<input type="hidden" name="registerproccess" value="1" />';
    }
    $out .= '</form></p>';
}
ui_top($ui_options);
echo rounded_corners($out, $void, true);
ui_bottom();
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'] = '******';
    /* 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) {
            echo '<div class="score">' . $user[$category_handle]['average_score'] . '</div>' . "\n";
            echo '<div class="bar_' . $bar_ids[$user_id] . '" style="width: ' . round($user[$category_handle]['average_score'] * 12) . 'px; float: left;"></div>' . "\n";
        }
        echo '</div>' . "\n";
    }
    echo '<br style="clear: both;" />' . "\n";
    rounded_corners_bottom(array('color' => 'white'));
    rounded_corners_top(array('color' => 'white', 'id' => 'movie_compability_not_seen_list'));
    echo '<h3>Hey, ingen av er har kollat in dom här rullarna!</h3>' . "\n";
    foreach ($all_movies as $movie) {
        echo '<ul>' . "\n";
        if ($movie['seen'] != 1) {
            echo '<li id="movie_not_seen_control_' . $movie['handle'] . '" class="movie_not_seen_control">' . $movie['title'] . '</li>' . "\n";
            echo '<div class="movie" id="movie_not_seen_' . $movie['handle'] . '">' . "\n";
            echo '<img src="' . IMAGE_URL . 'movie_compability/folders/' . $movie['handle'] . '.png" alt="' . $movie['handle'] . '" />' . "\n";
            echo '<h3>' . $movie['title'] . '</h3>' . "\n";
            echo '<p>' . $movie['description'] . '</p>' . "\n";
            echo '</div>' . "\n";
        }
        echo '</ul>' . "\n";
    }
    rounded_corners_bottom(array('color' => 'white'));
    echo '<div class="bars">' . "\n";
    foreach ($users as $user_id => $user) {
        echo '<div class="bar_' . $bar_ids[$user_id] . '" style="width: 100px; float: left; margin-right: 10px; text-align: center;">' . $user['username'] . '</div>' . "\n";
    }
    echo '</div>' . "\n";
    /* Movies with high score spread */
    foreach ($all_movies as $movie_handle => $movie) {
        $score_spreads[$movie_handle][] = $movie['score_spread'];
    }
    arsort($score_spreads);
    rounded_corners_top(array('color' => 'white', 'id' => 'movie_compare_score_spread'));
    echo '<h3>Filmer ni inte är överrens om</h3>' . "\n";
    $i = 0;
    foreach ($score_spreads as $movie_handle => $score_spread) {
        if ($i < 4 && $score_spread > 5) {
            echo '<div class="bars">' . "\n";
            echo '<h4>' . $movie_handle . '</h4>' . "\n";
            foreach ($all_movies[$movie_handle]['scores'] as $user_id => $score) {
                echo '<div class="score">' . $score . '</div>' . "\n";
                if (in_array($user_id, array_keys($all_movies[$movie_handle]['scores']))) {
                    echo '<div class="bar_' . $bar_ids[$user_id] . '" style="width: ' . round($score * 18) . 'px; float: left;"></div>' . "\n";
                } else {
                    echo 'Ej sett';
                }
            }
            echo '</div>' . "\n";
            $i++;
        }
    }
    echo '<br style="clear: both;" />' . "\n";
    rounded_corners_bottom(array('color' => 'white'));
    /* Popular and unpopular movies */
    foreach ($all_movies as $movie) {
        $movie_popularity[$movie['handle']] = $movie['average_score'];
    }
    arsort($movie_popularity);
    rounded_corners_top(array('color' => 'white'));
    echo '<div id="movie_compare_most_popular">' . "\n";
    echo '<h3>Skitbra rullar</h3>' . "\n";
    $i = 0;
    foreach ($movie_popularity as $movie_handle => $average_score) {
        if ($i < 2 && count($all_movies[$movie_handle]['scores']) >= count($users) - floor(count($users) / 3)) {
            echo '<div class="bars">' . "\n";
            echo '<h4>' . $movie_handle . '</h4>' . "\n";
            foreach ($all_movies[$movie_handle]['scores'] as $user_id => $score) {
                echo '<div class="score">' . $score . '</div>' . "\n";
                if (in_array($user_id, array_keys($all_movies[$movie_handle]['scores']))) {
                    echo '<div class="bar_' . $bar_ids[$user_id] . '" style="width: ' . round($score * 18) . 'px; float: left;"></div>' . "\n";
                } else {
                    echo 'Ej sett';
                }
            }
            echo '</div>' . "\n";
            $i++;
        }
    }
    echo '</div>' . "\n";
    echo '<div id="movie_compare_most_unpopular">' . "\n";
    echo '<h3>Filmer som suger</h3>' . "\n";
    asort($movie_popularity);
    $i = 0;
    foreach ($movie_popularity as $movie_handle => $average_score) {
        if ($i < 2 && count($all_movies[$movie_handle]['scores']) >= count($users) - floor(count($users) / 3)) {
            echo '<div class="bars">' . "\n";
            echo '<h4>' . $movie_handle . '</h4>' . "\n";
            foreach ($all_movies[$movie_handle]['scores'] as $user_id => $score) {
                echo '<div class="score">' . $score . '</div>' . "\n";
                if (in_array($user_id, array_keys($all_movies[$movie_handle]['scores']))) {
                    echo '<div class="bar_' . $bar_ids[$user_id] . '" style="width: ' . round($score * 18) . 'px; float: left;"></div>' . "\n";
                } else {
                    echo 'Ej sett';
                }
            }
            echo '</div>' . "\n";
            $i++;
        }
    }
    echo '</div>' . "\n";
    echo '<br style="clear: both;" />' . "\n";
    rounded_corners_bottom(array('color' => 'white'));
}
示例#3
0
文件: abuse.php 项目: Rojk/hamsterpaj
require '../include/core/common.php';
$ui_options['stylesheets'][] = 'abuse.css';
$ui_options['javascripts'][] = 'start.js';
$ui_options['title'] = 'Rapportfunktionen för ett säkert Hamsterpaj';
$ui_options['menu_path'] = array('hamsterpaj', 'rapportera');
ui_top($ui_options);
echo '<div id="abuse">' . "\n";
if (login_checklogin() && isset($_GET['report_type']) && isset($_GET['reference_id']) && is_numeric($_GET['reference_id'])) {
    $query = 'SELECT reference_id FROM abuse WHERE reference_id = "' . $_GET['reference_id'] . '" LIMIT 1';
    $result = mysql_query($query);
    while ($row = mysql_fetch_assoc($result)) {
        $is_it_reported = $row['reference_id'];
    }
    if (strlen($is_it_reported) > 0) {
        $rounded = '<h1 style="margin: 0px">Inlägget har redan blivit rapporterat, men tack ändå ;)';
        echo rounded_corners($rounded, array('color' => 'orange_deluxe'), true);
    } else {
        echo '<h1>' . $abuse_headers[$_GET['report_type']] . '</h1>';
        echo $abuse_info[$_GET['report_type']];
        echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">' . "\n";
        echo '<input type="hidden" name="report_type" value="' . $_GET['report_type'] . '" />' . "\n";
        echo '<input type="hidden" name="reference_id" value="' . $_GET['reference_id'] . '" />' . "\n";
        foreach ($abuse_alternatives_by_type[$_GET['report_type']] as $handle) {
            echo '<input type="radio" name="abuse_type" class="abuse_radio" value="' . $handle . '" id="abuse_' . $handle . '" />' . "\n";
            echo '<label for="abuse_' . $handle . '">' . $abuse_types[$handle]['label'] . '</label>' . "\n";
            echo '<p>' . $abuse_types[$handle]['description'] . '</p>' . "\n";
        }
        echo '<label for="abuse_freetext">Fritextbeskrivning</label>' . "\n";
        echo '<textarea name="freetext" id="abuse_freetext"></textarea>' . "\n";
        echo '<input type="submit" class="button_70" value="Nästa &raquo;" />' . "\n";
        echo '</form>' . "\n";
示例#4
0
         $data = mysql_fetch_assoc($result);
         if (strlen($data['handle']) > 0) {
             $handle_exists_already = true;
         }
     }
     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>';
示例#5
0
        }
        $out .= !empty($_GET['fullscreen']) ? '' : '<a href="/admin/guestbook_hack.php">Tillbaka</a>';
        if (number_isset(array($_GET['id_1'], $_GET['id_2']))) {
            $sql = 'SELECT gb.* FROM traffa_guestbooks AS gb
				 WHERE gb.sender = ' . $_GET['id_1'] . '
				 AND gb.recipient = ' . $_GET['id_2'] . '
				 OR gb.sender = ' . $_GET['id_2'] . '
				 AND gb.recipient = ' . $_GET['id_1'];
            $sql .= ' ORDER BY gb.timestamp DESC LIMIT 2000';
        } elseif (!empty($_GET['id_1']) && strlen($_GET['id_2']) == 0) {
            $sql = 'SELECT gb.* FROM traffa_guestbooks AS gb
				 WHERE gb.sender = ' . $_GET['id_1'] . '
				 OR gb.recipient = ' . $_GET['id_1'] . '
				 ORDER BY gb.timestamp DESC LIMIT 2000';
        }
        $result = mysql_query($sql) or $out .= rounded_corners(mysql_error(), array('color' => 'orange_deluxe'), true);
        $out .= '<table style="width: 100%;">';
        $out .= '<tr>' . "\n";
        $out .= '<th colspan="11" style="background: #fc8; color: #000;">' . "\n";
        $sql_2 = 'SELECT username FROM login WHERE id = ' . $_SESSION['login']['id'] . ' LIMIT 1';
        $data_2 = mysql_fetch_assoc(mysql_query($sql_2));
        $out .= 'Frågan utförd ' . date("Y.m.d - H:i.s") . ' (' . time() . ') av ' . $data_2['username'] . '(' . $_SESSION['login']['id'] . ')';
        $out .= '</tr>' . "\n\n";
        $out .= '<tr>' . "\n";
        $out .= '<th valign="top">post id</th>' . "\n";
        $out .= '<th valign="top">time</th>' . "\n";
        $out .= '<th valign="top">sender</th>' . "\n";
        $out .= '<th valign="top">recipient</th>' . "\n";
        $out .= '<th valign="top">is_private</th>' . "\n";
        $out .= '<th valign="top">deleted</th>' . "\n";
        $out .= '<th valign="top">message</th>' . "\n";
示例#6
0
文件: test.php 项目: Rojk/hamsterpaj
$ui_options['menu_addition']['annat']['children']['hamburgare']['children']['alla_burgare'] = array('label' => 'Alla burgare', 'url' => '/hamburgare/alla_burgare.php');
$ui_options['menu_addition']['annat']['children']['hamburgare']['children']['om_testet'] = array('label' => 'Om testet', 'url' => '/hamburgare/om_testet.php');
ui_top($ui_options);
if (!isset($_SESSION['burger'])) {
    event_log_log('burgers_test_init');
}
echo '<h1>Gissa Hamburgaren</h1>' . "\n";
if (isset($_GET['guessed_burger'])) {
    $query = 'SELECT vendor, name FROM burgers WHERE id = "' . $_SESSION['burger']['current_burger'] . '" LIMIT 1';
    $result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    $data = mysql_fetch_assoc($result);
    if ($_GET['guessed_burger'] == $_SESSION['burger']['current_burger']) {
        rounded_corners('Rätt! Hamburgaren heter ' . $data['name'] . ' och säljs på ' . $data['vendor'], array('color' => 'green'));
        $correct = 1;
    } else {
        rounded_corners('Fel! Hamburgaren heter ' . $data['name'] . ' och säljs på ' . $data['vendor'], array('color' => 'red'));
        $correct = 0;
    }
    if (login_checklogin()) {
        $query = 'UPDATE burgers SET guesses = guesses + 1, correct_guesses = correct_guesses + ' . $correct . ', correct_ratio = correct_guesses/guesses WHERE id = "' . $_SESSION['burger']['current_burger'] . '"';
        mysql_query($query);
    }
    echo '<h2>Hur lik är hamburgaren reklambilden?</h2>' . "\n";
    $labels[0] = 'Oigenkännlig';
    $labels[1] = 'Inte alls lik';
    $labels[2] = 'Igenkännbar';
    $labels[3] = 'Ganska lik';
    $labels[4] = 'Identisk';
    for ($i = 0; $i < 5; $i++) {
        echo '<button value="' . $i . '" class="button_100" style="margin-right: 20px;" onclick="window.location = \'/hamburgare/test.php?burger_vote=' . $i . '&burger=' . $_SESSION['burger']['current_burger'] . '\';">' . $labels[$i] . '</button>' . "\n";
    }
示例#7
0
    $swfurl = 'cropper.swf?cropheight=' . $img_height . '&cropwidth=' . $crop_width . '&imageFile=' . $img_tmp_orginal_url . '&postFile=avatar-settings.php?action=crop';
    if (isset($_GET['registerproccess'])) {
        $swfurl .= '%26registerproccess=1';
    }
    $swfurl .= '&imageWidth=442&imageHeight=' . $img_height . '&cropText=Klar&hiddenFields=&imageQueryString=&target=_self';
    $out .= '<object type="application/x-shockwave-flash" data="' . $swfurl . '" width="460" height="' . $flash_height . '">';
    $out .= '<param name="movie" value="' . $swfurl . '" />';
    $out .= '</object>';
} elseif ($_GET['step'] == '3') {
    $out .= '<h1 style="margin: 0px; ">Förhandsgranska och spara (steg 3)</h1>';
    $out .= 'Du har nu skalat och beskärt ditt foto. Om du tycker ditt foto är okej så tryck på Spara så kommer ditt foto sparas och läggas in för granskning.<br /><br />';
    $out .= '» Vill du ladda upp en annan bild så gå tillbaka till <a href="avatar-settings.php';
    $out .= isset($_GET['registerproccess']) ? '?registerproccess=1' : '';
    $out .= '">uppladdningen</a>.<br/>';
    $out .= '» Eller vill du skala om bilderna gå till <a href="avatar-settings.php?step=2';
    $out .= isset($_GET['registerproccess']) ? '&registerproccess=1' : '';
    $out .= '">beskärningen</a>.';
    $out .= '<div id="preview">';
    $out .= '<br /><b>Fullstorlek:</b><br/> <img src="' . $img_tmp_full_url . '">';
    $out .= '<br /><b>Thumbnail:</b><br /> <img src="' . $img_tmp_thumb_url . '">';
    $out .= '</div>';
    $out .= '<p><form name="saveimg" action="avatar-settings.php?action=save" method="post" enctype="multipart/form-data" style="margin: 0px;">';
    $out .= '<input name="submit" type="submit" value="Spara" class="button" /><br />';
    if (isset($_GET['registerproccess'])) {
        $out .= '<input type="hidden" name="registerproccess" value="1" />';
    }
    $out .= '</form></p>';
}
ui_top($ui_options);
echo rounded_corners($out);
ui_bottom();
示例#8
0
        echo '<h1>Presentationsfel</h1>';
        echo '<p>' . $profile['error_message'] . '</p>';
        ui_bottom();
        exit;
        //Important!
    }
    $is_blocked = retrieve_userblock();
    if ($is_blocked['is_blocked'] == true) {
        if ($is_blocked['ov_is_blocked'] == false) {
            echo 'fisk';
        } else {
            $ui_options['title'] = 'Blockerad - Hamsterpaj.net';
            ui_top($ui_options);
            $out = '<h1 style="margin-top: 0px">Den här användaren har blockerat dig!</h1>
				<p>Den användaren du försöker besöka har blockerat dig. <br />Ett tips är att du uppför dig bättre i fortsättningen.</p><br />';
            echo rounded_corners($out, array('color' => 'orange_deluxe'));
            ui_bottom();
            exit;
        }
    }
    $ui_options['stylesheets'][] = 'user_profile.css';
    $ui_options['stylesheets'][] = 'profile_themes/' . $profile['profile_theme'] . '.css';
    $out .= profile_mini_page($profile);
    $ui_options['javascripts'][] = 'user_profile.js';
    if (isset($_GET['history'])) {
        $fetch['recipient'] = array($fetch['recipient'], $_GET['history']);
        $fetch['sender'] = $fetch['recipient'];
    }
    if (!isset($_GET['history']) && login_checklogin() && $fetch['recipient'] != $_SESSION['login']['id'] && !is_array($fetch['recipient'])) {
        $out .= guestbook_form(array('recipient' => $fetch['recipient']));
    }
示例#9
0
<?php

require '../include/core/common.php';
$ui_options['title'] = 'Handy encoder/decoder - Hamsterpaj.net';
$ui_options['menu_path'] = array('dev', 'ajax_handy');
$ui_options['javascripts'][] = 'ajax_handy.js';
if (!login_checklogin()) {
    die('Du blev nog utloggad.');
}
if (!is_privilegied('use_debug_tools')) {
    die('Fisk');
}
$out .= '<h2 style="margin: 0px; padding: 2px;">Handy encoder/decoder</h2>' . "\n";
//$out .= '<p>Ajax Handy är testad och utvecklad i och för Firefox 3. och om det inte fungerar för er så gör ni fel :@</p>' . "\n";
$out .= '<select style="margin: 2px;" id="send_select">' . "\n";
$out .= '<option value="choose">Välj encoder/decoder</option>' . "\n";
$options = array('ip2host' => 'IP => Host', 'ip2long' => 'IP => \'long\'', 'long2ip' => '\'long\' => IP', 'serialize2preint_r' => 'Serialized data string(?) bara Joel vet.', 'md5' => 'Text => MD5', 'sha1' => 'Text => SHA1', 'hamsterpaj_password_hash' => 'Text => HP-password', 'timestamp2readable' => 'Unixtid => Läsbar tid', 'base64encode' => 'Text => Base64', 'base64decode' => 'Base64 => Text');
foreach ($options as $value => $desc) {
    $out .= '<option value="' . $value . '">' . $desc . '</option>' . "\n";
}
$out .= '</select><br />' . "\n";
$out .= 'Text: <br />' . "\n";
$out .= '<input style="margin: 2px; float: left;" type="text" id="send_value" />' . "\n";
$out .= '<button style="float: left;" onclick="" class="button_80" id="submit_button">Submit</button>';
$out .= '<br style="clear: both" />' . "\n";
$out .= 'Resultat:<br />' . "\n";
$out .= '<textarea id="response_area" name="responseArea" style="width: 500px; height: 200px;" readonly="readonly"></textarea>' . "\n";
ui_top($ui_options);
echo rounded_corners(utf8_encode($out), $void, true);
ui_bottom();
示例#10
0
$out .= '<strong>RSS-flöde i gästboken</strong><br />' . "\n";
$out .= 'Ska andra kunna prenumerera på din gästbok via RSS-flöde? <input type="radio" name="gbrss" value="1" ' . ($_SESSION['userinfo']['gbrss'] ? 'checked="checked" ' : '') . ' /> Ja <input type="radio" name="gbrss" value="0" ' . (!$_SESSION['userinfo']['gbrss'] ? 'checked="checked" ' : '') . '/> Nej' . "\n";
$out .= '<br />';
$out .= '<br />';
$out .= '<input type="submit" value="Spara frivillig information &raquo;" class="button_150" id="optional_info_submit" />';
$out .= '</form>' . "\n";
$out .= rounded_corners_tabs_bottom($void, true);
/* Lösenordsbyte */
$out .= '<a name="change_password"></a>';
$out .= rounded_corners_tabs_top($void, true);
$out .= '<h2 style="margin-top: 0px;">Byt lösenord</h2>' . "\n";
$out .= '<form action="' . $_SERVER['PHP_SELF'] . '?action=perform_changes&type=password" method="post">' . "\n";
$out .= '<table><tr style="font-weight: bold;"><td>Nuvarande lösenord</td><td>Nytt lösenord</td><td>Upprepa nytt lösenord</td></tr>' . "\n";
$out .= '<tr>' . "\n";
$out .= '<td><input type="password" name="password_old" class="textbox" /></td>' . "\n";
$out .= '<td><input type="password" name="password_new" class="textbox" /></td>' . "\n";
$out .= '<td><input type="password" name="password_verify" class="textbox" /></td>' . "\n";
$out .= '</tr></table><br />' . "\n";
$out .= '<input type="submit" class="button_80" value="Byt lösenord &raquo;" />' . "\n";
$out .= '</form>' . "\n";
$out .= rounded_corners_tabs_bottom($void, true);
$noob_pointer .= '<div style="height: 64px;">';
$noob_pointer .= '<img style="float:left;" src="http://images.hamsterpaj.net/joar_icons/test.png">';
$noob_pointer .= '<h2 style="margin-top: 0px;">Där nere byter man visningsbild</h2>';
$noob_pointer .= '<p>';
$noob_pointer .= 'Lite strukturändringar har lett till många förvirrade trådar om var man byter visningsbild, men det är där nere :P';
$noob_pointer .= '</p>';
$noob_pointer .= '</div>';
ui_top($ui_options);
echo rounded_corners($noob_pointer, $void, true) . $out;
ui_bottom();