Esempio n. 1
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . "/reou/includes/const.php";
require_once D_ROOT . "/reou/controllers/users_controller.php";
show_user($db, $_POST);
Esempio n. 2
0
                case "app_version":
                    show_app_version($res);
                    break;
                case "host":
                    show_host($res);
                    break;
                case "workunit":
                    show_workunit($res);
                    break;
                case "result":
                    show_result($res);
                    break;
                case "team":
                    show_team($res);
                    break;
                case "user":
                    show_user($res);
                    break;
            }
        }
    }
    if ($detail == "low" || $table == "profile") {
        end_table();
    }
    mysql_free_result($result);
} else {
    echo "<h2>No results found</h2>";
}
admin_page_tail();
$cvs_version_tracker[] = "\$Id: db_action.php 15975 2008-09-07 07:40:56Z davea \$";
//Generated automatically - do not edit
Esempio n. 3
0
function search_action()
{
    $where = "true";
    $search_string = get_str('search_string');
    if (strlen($search_string)) {
        if (strlen($search_string) < 3) {
            error_page(tra("search string must be at least 3 characters"));
        }
        $s = BoincDb::escape_string($search_string);
        $s = escape_pattern($s);
        $where .= " and name like '{$s}%'";
    }
    $country = get_str('country');
    if ($country != 'any') {
        $s = BoincDb::escape_string($country);
        $where .= " and country='{$s}'";
    }
    $t = get_str('team');
    if ($t == 'yes') {
        $where .= " and teamid<>0";
    } else {
        if ($t == 'no') {
            $where .= " and teamid=0";
        }
    }
    $t = get_str('profile');
    if ($t == 'yes') {
        $where .= " and has_profile<>0";
    } else {
        if ($t == 'no') {
            $where .= " and has_profile=0";
        }
    }
    $search_type = get_str('search_type', true);
    $order_clause = "id desc";
    if ($search_type == 'rac') {
        $order_clause = "expavg_credit desc";
    } else {
        if ($search_type == 'total') {
            $order_clause = "total_credit desc";
        }
    }
    $fields = "id, create_time, name, country, total_credit, expavg_credit, teamid, url, has_profile, donated";
    $users = BoincUser::enum_fields($fields, $where, "order by {$order_clause} limit 100");
    page_head(tra("User search results"));
    $n = 0;
    foreach ($users as $user) {
        if ($n == 0) {
            start_table();
            table_header(tra("Name"), tra("Team"), tra("Average credit"), tra("Total credit"), tra("Country"), tra("Joined"));
        }
        show_user($user);
        $n++;
    }
    end_table();
    if (!$n) {
        echo tra("No users match your search criteria.");
    }
    page_tail();
}
Esempio n. 4
0
function name_search($filter)
{
    $count = 100;
    $search_string = get_str('search_string');
    if (strlen($search_string) < 3) {
        error_page("search string must be at least 3 characters");
    }
    $s = boinc_real_escape_string($search_string);
    $s = escape_pattern($s);
    $fields = "id, create_time, name, country, total_credit, expavg_credit, teamid, url, has_profile, donated";
    $users = BoincUser::enum_fields($fields, "name like '{$s}%'", "limit {$count}");
    $n = 0;
    foreach ($users as $user) {
        if (!filter_user($user, $filter)) {
            continue;
        }
        if ($n == 0) {
            echo "<h3>User names starting with '" . htmlspecialchars($search_string) . "'</h3>\n";
            start_table();
            table_header("Name", "Team", "Average credit", "Total credit", "Country", "Joined");
        }
        show_user($user);
        $n++;
    }
    end_table();
    if (!$n) {
        echo "No users matching your search criteria.";
    }
}
Esempio n. 5
0
session_start();
//require_login();
//$deck = json_decode(urldecode($_POST[DECK_KEY]));
//$hand = json_decode(urldecode($_POST[HAND_KEY]));
$deck = get_session_value(DECK_KEY);
$hand = get_session_value(HAND_KEY);
draw_cards($hand, $deck);
?>

<!doctype html>
<html lang="en">
<head>
     <meta charset="UTF-8">
     <title>Video Poker</title>
     <link rel="stylesheet" type="text/css" href="includes/poker.css.php">
     <script src="includes/poker.js.php"></script>
</head>
<body onload="javascript:init(true);">
     <?php 
show_user();
?>

     <div id="spacer"></div>

     <?php 
show_content($hand, TRUE);
?>

</body>
</html>
Esempio n. 6
0
if (isset($_GET['userid']) and $_GET['userid'] != 0) {
    $userid = (int) $_GET['userid'];
    $sel = myquery("SELECT * FROM game_users WHERE user_id='{$userid}'");
    if (!mysql_num_rows($sel)) {
        $sel = myquery("SELECT * FROM game_users_archive WHERE user_id='{$userid}'");
    }
    if (mysql_num_rows($sel) == '1') {
        echo '<SCRIPT language=javascript src="http://' . domain_name . '/js/info.js"></SCRIPT><DIV id=hint  style="Z-INDEX: 100; LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"></DIV>';
        $user = mysql_fetch_array($sel);
        list($delay, $delay_reason) = mysql_fetch_array(myquery("SELECT delay,delay_reason FROM game_users_active_delay WHERE user_id='{$userid}'"));
        $user['delay'] = $delay;
        $user['delay_reason'] = $delay_reason;
        show_user($user);
    }
} elseif (preg_match('/^[ _a-zа-яA-ZА-Я0-9]*$/i', $name)) {
    $name = mysql_escape_string($name);
    $sel = myquery("SELECT * FROM game_users WHERE name='{$name}'");
    if (!mysql_num_rows($sel)) {
        $sel = myquery("SELECT * FROM game_users_archive WHERE name='{$name}'");
    }
    if (mysql_num_rows($sel) == '1') {
        echo '<SCRIPT language=javascript src="http://' . domain_name . '/js/info.js"></SCRIPT><DIV id=hint  style="Z-INDEX: 100; LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"></DIV>';
        $user = mysql_fetch_array($sel);
        show_user($user);
    } else {
        echo '<center>Игрок не найден</center>';
    }
}
if (function_exists("save_debug")) {
    save_debug();
}
            $user_table .= "<tr><td>Heard From:</td><td>{$heard_from}</td></tr>\n";
            $user_table .= "<tr><td>Receives NewsLetter:</td><td>{$newsletter}</td></tr>\n";
        }
        print $user_table;
    }
}
$user_records = get_user($user_id);
?>

<html>
<head>
	<title> Show users page </title>
</head>
<body>

	<h3> Displaying User with id <?php 
echo $user_id;
?>
</h3>
	
	<table name="user_table" width="400px" border="1">
		<?php 
if ($user_records) {
    show_user($user_records);
}
?>
	</table>
	<br>
	Go back to show users page <a href="show_users_with_actions.php">Click here</a>.
</body>
</html>