Пример #1
0
function profile_mini_page($options)
{
    $output .= profile_top($options);
    $output .= profile_head($options);
    $output .= profile_bottom($options);
    return $output;
}
Пример #2
0
    ui_top($ui_options);
    echo '<h1>Presentationsfel</h1>';
    echo '<p>' . $profile['error_message'] . '</p>';
    ui_bottom();
    exit;
    //Important!
}
/* Set page title */
$ui_options['title'] .= $profile['username'] . ' - Hamsterpaj.net';
if (strlen($profile['profile_theme']) > 0) {
    $ui_options['stylesheets'][] = 'profile_themes/' . $profile['profile_theme'] . '.css';
}
/* Start of profile */
$output .= profile_top($profile);
/* Including Profile-head */
$output .= profile_head($profile);
/* Presentation changed... */
if (isset($_GET['show_change_profile_notice'])) {
    $rounded_corners_config['color'] = 'orange_deluxe';
    $output .= rounded_corners_top($rounded_corners_config);
    $output .= 'Blev det inte riktigt som du hade tänkt dig? Gå tillbaka och 
		<a href="/installningar/profilesettings.php">ändra din presentation</a> igen!';
    $output .= rounded_corners_bottom($rounded_corners_config);
}
/* Photos */
$photos = photos_fetch(array('user' => $user_id, 'order-by' => 'up.id', 'order-direction' => 'DESC', 'limit' => 11));
if (count($photos) > 4) {
    $output .= photos_list_mini($photos);
} elseif (count($photos) > 0) {
    $output .= photos_list_mini($photos);
}
Пример #3
0
$ui_options['stylesheets'][] = 'user_profile.css';
$ui_options['stylesheets'][] = 'user_lists.css.php';
if ($action == 'insert') {
    $ui_options['javascripts'][] = 'user_lists.js';
}
ui_top($ui_options);
$show_user = isset($_GET['user']) && is_numeric($_GET['user']) ? intval($_GET['user']) : false;
if (!$show_user && login_checklogin()) {
    $show_user = $_SESSION['login']['id'];
}
if (!$show_user) {
    echo '<h1>Ogiltig användare</h1>' . "\n";
    echo 'Haxxorz!';
}
$profile_params['user_id'] = $show_user;
echo profile_head($profile_params);
$username = '******';
switch ($action) {
    case 'insert':
        if (login_checklogin()) {
            if (isset($_POST['save'])) {
                $items = array();
                $current_item = 0;
                while (isset($_POST['item_text_' . $current_item]) && isset($_POST['item_checked_' . $current_item]) && in_array($_POST['item_checked_' . $current_item], array('checked', 'unchecked'))) {
                    $items[] = array('checked' => $_POST['item_checked_' . $current_item], 'text' => $_POST['item_text_' . $current_item]);
                    // Important!
                    $current_item++;
                }
                // Do something here in the future maybe?
                if (count($items) > 0) {
                    $query_save = array();
Пример #4
0
    }
}
$fetch['login'] = array('id', 'username', 'userlevel', 'regtimestamp', 'regip', 'lastlogon', 'lastip', 'lastaction', 'lastusernamechange', 'lastusername');
$fetch['userinfo'] = array('contact1', 'contact2', 'gender', 'birthday', 'image', 'forum_signature', 'forum_posts');
$fetch['traffa'] = array('firstname', 'profile_modules', 'guestbook_entries');
if (!isset($userid)) {
    jscript_alert("Du har loggats ut. Logga in och försök igen.");
    //jscript_location($_SERVER['PHP_SELF']);
    die;
}
$userinfo = login_load_user_data($userid, $fetch);
$profile = profile_fetch(array('user_id' => $userid));
$ui_options['stylesheets'][] = 'profile_themes/' . $profile['profile_theme'] . '.css';
ui_top($ui_options);
echo '<div class="profile_' . $profile['profile_theme'] . '">' . "\n";
echo profile_head($profile);
echo '</div>' . "\n";
if (login_checklogin() == 1) {
    if ($_GET['action'] == 'delete') {
        if ($_POST['all'] == 'true') {
            $query = 'UPDATE traffa_guestbooks SET deleted = 1 WHERE recipient = "' . $_SESSION['login']['id'] . '" AND `read` = 1';
            mysql_query($query) or die(report_sql_error($query));
            $query = 'UPDATE traffa SET guestbook_entries = ' . count_unread_gb_entries($userid) . ' WHERE userid = "' . $_SESSION['login']['id'] . '" LIMIT 1';
            mysql_query($query) or die(report_sql_error($query));
        } else {
            delete_entry($_GET['entry_id'], $_SESSION['login']['id']);
        }
        jscript_location($_SERVER['PHP_SELF'] . '?offset=' . $_GET['return_offset']);
    } elseif ($_GET['action'] == 'send_new_message') {
        if (userblock_check($_GET['userid'], $_SESSION['login']['id']) == 1) {
            jscript_alert('Den användare som du har angivit som mottagare har blockerat dig, och ditt meddelande kan därför inte skickas!');