Пример #1
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
$DefaultHomeTitle = $HomeTitle;
$DefaultHomeDescription = $HomeDesc;
foreach ($_POST as $key => $value) {
    $_POST[$key] = FilterData($value);
}
foreach ($_GET as $key => $value) {
    $_GET[$key] = FilterData($value);
}
include OS_PAGE_PATH . "registration_login_page.php";
include OS_PAGE_PATH . "add_comment_page.php";
//Update last_login on active sessions after 15 min.
if (os_is_logged() and isset($_SESSION["logged"]) and $_SESSION["logged"] + 60 * 15 <= time()) {
    $LastLogin = $db->update(OSDB_USERS, array("user_last_login" => (int) time()), "user_id = '" . (int) $_SESSION["user_id"] . "'");
}
//If "u" is not a number, found in the database this user (if exists)
if (isset($_GET["u"]) and !is_numeric($_GET["u"])) {
    $uid = OS_StrToUTF8(trim($_GET["u"]));
    $sql = "";
    if (isset($_GET["game_type"])) {
        $game_type = (int) $_GET["game_type"];
        $sql = "AND alias_id = '" . $game_type . "' ";
    } else {
        $sth = $db->prepare("SELECT * FROM " . OSDB_ALIASES . " WHERE default_alias = 1 LIMIT 1");
        $result = $sth->execute();
        if ($sth->rowCount() >= 1) {
Пример #2
0
 case 'select':
     // Leer el archivo de texto en un string
     $users = file_get_contents($filename);
     // separar por saltos de linea en una array
     $users = explode("\n", $users);
     // recorrer el array de usuario
     include '../modules/Application/views/user/select.phtml';
     break;
 case 'insert':
     if ($_POST) {
         //             echo "<pre>Post: ";
         //             print_r($_POST);
         //             echo "</pre>";
         include '../modules/Utils/src/Utils/Form/FilterData.php';
         $formdef = "../modules/Application/src/Application/Forms/register.json";
         $data = FilterData($_POST, $formdef);
         //             echo "<pre>data: ";
         //             print_r($data);
         //             echo "</pre>";
         $validate = ValidateData($data, $formdef);
         //             echo "<pre>validate: ";
         //             print_r($validate);
         //             echo "</pre>";
         //             die;
         if ($validate['result'] === true) {
             // Write to repo
             $array = $_POST;
             $array['photo'] = $_FILES['photo']['name'];
             Save($array, $filename);
             header("Location: /user/select");
         } else {
Пример #3
0
    ?>
  <img src="<?php 
    echo OS_HOME;
    ?>
img/warn.png" alt="" class="imgvalign" /> <?php 
    echo $lang["gl_no_accesss"];
    ?>
  <?php 
    //$_SESSION["die"] = true;
    die;
}
require_once 'inc/class.db.PDO.php';
require_once 'inc/db_connect.php';
require_once 'inc/live_games_functions.php';
foreach ($_POST as $key => $value) {
    $_POST[$key] = FilterData($value);
}
//GET GAME LISTS
if (isset($_POST["refresh"]) and $_POST["refresh"] == "gamelist") {
    if ($LiveGamesLimit >= 1) {
        $LIMIT = "LIMIT {$LiveGamesLimit}";
    }
    if (isset($_POST["gameid"]) and $_POST["gameid"] >= 1) {
        $selectedGameID = (int) $_POST["gameid"];
    } else {
        $selectedGameID = "";
    }
    $sql = " ";
    //if (os_is_logged() AND $_SESSION["level"]>=9 ) $sql = " ";
    //else $sql = " AND botid = 1";
    if (isset($_POST["alias_id"]) and is_numeric($_POST["alias_id"])) {