コード例 #1
0
ファイル: wordfind.php プロジェクト: Razze/hamsterpaj
<?php

/* OPEN_SOURCE */
//	require('include/core/common.php');
require 'include/core/common.php';
$ui_options['title'] = 'Startsidan på Hamsterpaj - Sveriges ungdomssida!';
$ui_options['javascripts'][] = 'wordfind.js';
ui_top($ui_options);
echo '<table id="wordfind" style="width: 100%; height: 638px;">' . "\n";
for ($r = 0; $r < 10; $r++) {
    echo '<tr>' . "\n";
    for ($c = 0; $c < 10; $c++) {
        echo '<td>' . $r . $c . '</td>' . "\n";
    }
    echo '</tr>' . "\n";
}
echo '</table>' . "\n";
ui_bottom();
コード例 #2
0
ファイル: index.php プロジェクト: Rojk/hamsterpaj
            switch ($uri_parts[3]) {
                case 'album':
                    $options['members_only'] = $photoblog_user['members_only'];
                    $options['friends_only'] = $photoblog_user['friends_only'];
                    $options['action'] = 'visit';
                    $options['owner_id'] = $photoblog_user['id'];
                    photoblog_access($options);
                    require 'album.php';
                    break;
                default:
                    $options['members_only'] = $photoblog_user['members_only'];
                    $options['friends_only'] = $photoblog_user['friends_only'];
                    $options['action'] = 'visit';
                    $options['owner_id'] = $photoblog_user['id'];
                    photoblog_access($options);
                    require 'blogg.php';
                    break;
            }
            break;
    }
} catch (Exception $error) {
    $options['type'] = 'error';
    $options['title'] = 'Felmeddelande!';
    $options['message'] = $error->getMessage();
    $options['collapse_information'] = '<p>File: ' . $error->getFile() . '<br />Line: ' . $error->getLine() . '</p>';
    $out = ui_server_message($options);
}
ui_top($ui_options);
echo $out;
ui_bottom($ui_options);
コード例 #3
0
ファイル: schedule_v2.lib.php プロジェクト: Razze/hamsterpaj
function schedule_admin_parse_request($options)
{
    $options['source'] = isset($options['source']) ? $options['source'] : $_GET;
    $page = isset($options['source']['page']) && in_array($options['source']['page'], array('ajax_fetch_slot', 'ajax_save_slot', 'main')) ? $options['source']['page'] : 'main';
    $call_options['base_url'] = isset($options['base_url']) ? $options['base_url'] : '';
    $call_options['what'] = $page;
    $ui_options['javascripts'][] = 'schedule_v2_admin.js';
    $ui_options['stylesheets'][] = 'schedule_v2_admin.css';
    $ui_options['title'] = 'Schemalagt v2 på Hamsterpaj';
    $ui_options['menu_path'] = array('admin');
    switch ($page) {
        case 'ajax_fetch_slot':
            if (isset($options['source']['id']) && is_numeric($options['source']['id'])) {
                $call_options['slot_id'] = $options['source']['id'];
                echo schedule_admin_draw($call_options);
            } else {
                schedule_admin_error(array('error' => 'Felaktigt ID skickades med till ajax_fetch_slot!'));
            }
            break;
        case 'ajax_save_slot':
            if (isset($options['source']['id'], $options['source']['start'], $options['source']['end'], $options['source']['type']) && is_numeric($options['source']['id']) && is_numeric($options['source']['start']) && is_numeric($options['source']['end']) && in_array($options['source']['type'], schedule_get_slot_types())) {
                $call_options['id'] = $options['source']['id'];
                $call_options['start'] = $options['source']['start'];
                $call_options['end'] = $options['source']['end'];
                $call_options['type'] = $options['source']['type'];
                echo schedule_admin_draw($call_options);
            }
            break;
        case 'main':
            ui_top($ui_options);
            rounded_corners_top(array('color' => 'orange'));
            echo 'Note: Schemat är både fult, snett och går en timma fel.';
            rounded_corners_bottom(array('color' => 'orange'));
            if (isset($options['source']['create_slot_save']) && isset($options['source']['start_day'], $options['source']['start_hour'], $options['source']['start_minute']) && is_numeric($options['source']['start_day']) && is_numeric($options['source']['start_hour']) && is_numeric($options['source']['start_minute']) && isset($options['source']['end_day'], $options['source']['end_hour'], $options['source']['end_minute']) && is_numeric($options['source']['end_day']) && is_numeric($options['source']['end_hour']) && is_numeric($options['source']['end_minute']) && isset($options['source']['type']) && in_array($options['source']['type'], schedule_get_slot_types())) {
                $call_options['what'] = 'create_slot_save';
                $call_options['start'] = schedule_readable_to_week_minutes($options['source']['start_day'], $options['source']['start_hour'], $options['source']['start_minute']);
                $call_options['end'] = schedule_readable_to_week_minutes($options['source']['end_day'], $options['source']['end_hour'], $options['source']['end_minute']);
                $call_options['type'] = $options['source']['type'];
                if ($call_options['start'] < $call_options['end']) {
                    $call_options['what'] = 'create_slot_save';
                    echo schedule_admin_draw($call_options);
                } else {
                    jscript_alert('Fel: Du måste ange ett slut som är efter din början!');
                }
            }
            $call_options['what'] = 'main';
            echo schedule_admin_draw($call_options);
            $call_options['what'] = 'create_slot_create';
            echo schedule_admin_draw($call_options);
            ui_bottom();
            break;
    }
}
コード例 #4
0
ファイル: user_logins.php プロジェクト: Rambutan/hamsterpaj
        }
        $display_ip = str_replace('%VALUE%', $ip, $assigned[$ip]);
        $out .= '<tr>' . "\n";
        $out .= '<td>' . date('Y-m-d H:i:s', $data['logon_time']) . '</td>' . "\n";
        $out .= '<td>' . $data['impressions'] . '</td>' . "\n";
        $out .= '<td><a href="?ip=' . $ip . '">' . $display_ip . '</a></td>' . "\n";
        $out .= '</tr>' . "\n";
    }
} elseif (isset($_GET['ip'])) {
    $out .= '<h1>Visar inloggningar från IP: ' . $_GET['ip'] . '</h1>' . "\n";
    $query = 'SELECT ll.*, l.username FROM login_log AS ll, login AS l ';
    $query .= 'WHERE ll.ip = "' . ip2long($_GET['ip']) . '" AND l.id = ll.user_id ';
    $query .= 'ORDER BY logon_time DESC LIMIT 500';
    $result = mysql_query($query);
    $out .= '<table style="width: 100%;">';
    while ($data = mysql_fetch_assoc($result)) {
        $out .= '<tr>' . "\n";
        $out .= '<td>' . date('Y-m-d H:i:s', $data['logon_time']) . '</td>' . "\n";
        $out .= '<td><a href="?user_id=' . $data['user_id'] . '">' . $data['username'] . '</a></td>' . "\n";
        $out .= '<td>' . $data['impressions'] . '</td>' . "\n";
        $out .= '</tr>' . "\n";
    }
    $out .= '</table>';
}
echo ui_top($ui_options);
echo $out;
echo ui_bottom();
?>