Beispiel #1
0
function checkSafeFromSession($safe)
{
    SESSION_START();
    if ($safe == $_SESSION["snumber"]) {
        return true;
    }
    return false;
}
Beispiel #2
0
function login_chk()
{
    SESSION_START();
    $id = $_SESSION['los_id'];
    if (!$id) {
        exit("<script>location.href='./';</script>");
    }
}
Beispiel #3
0
function haIniciadoSesion()
{
    // CONTINUAR UNA SESIÓN INICIADA
    SESSION_START();
    // VERIFICAMOS LA EXISTENCIA DE LA VARIABLE DE SESIÓN
    if (isset($_SESSION['US_nombre'])) {
        return TRUE;
    }
    return FALSE;
}
 public function __construct($state, $action)
 {
     SESSION_START();
     parent::__construct($state, $action);
     $this->ip = Ip::getClientIp();
     /*
             //控制外网IP访问管理功能
             if (substr($this->ip, 0, 3) != '10.') {
                 header("HTTP/1.0 404 Not Found");
                 exit;
             }
     */
 }
 public function __construct($state, $action)
 {
     SESSION_START();
     parent::__construct($state, $action);
     $this->ip = Ip::getClientIp();
     if (in_array($action, array('debug'))) {
         Switcher::close('postRefererCheck');
     }
     //控制外网IP访问管理功能
     if (substr($this->ip, 0, 3) != '10.') {
         header("HTTP/1.0 404 Not Found");
         exit;
     }
 }
Beispiel #6
0
<?php

SESSION_START();
if (isset($_SESSION['Username']) && isset($_SESSION['Password'])) {
    $sql = "SELECT \r\n\t\t\t\t\t*\r\n\t\t\t\tFROM\r\n\t\t\t\t\tmaster_user \r\n\t\t\t\tWHERE \r\n\t\t\t\t\tUsername = '******'Username'] . "' \r\n\t\t\t\t\tAND Password = '******'Password'] . "'";
    if (!($result = mysql_query($sql, $dbh))) {
        echo mysql_error();
        return 0;
    }
    $cek = mysql_num_rows($result);
    if ($cek != 1) {
        echo "<script>window.location='./'; </script>";
    }
    $sql = "SELECT\r\n\t\t\t\tNama,\r\n\t\t\t\tNilai\r\n\t\t\tFROM\r\n\t\t\t\tmaster_parameter";
    if (!($result = mysql_query($sql, $dbh))) {
        echo mysql_error();
        return 0;
    }
    while ($row = mysql_fetch_row($result)) {
        ${$row[0]} = $row[1];
    }
} else {
    echo "<script>window.location='./'; </script>";
}
Beispiel #7
0
function OpenDatabase()
{
    $_db_host = "localhost";
    # meist localhost
    $_db_datenbank = "hififabrik_intern";
    $_db_username = "******";
    $_db_passwort = "Hf54mC74slRw";
    SESSION_START();
    # Datenbankverbindung herstellen
    $link = mysql_connect($_db_host, $_db_username, $_db_passwort);
    # Hat die Verbindung geklappt ?
    if (!$link) {
        die("Keine Datenbankverbindung möglich: " . mysql_error());
    }
    # Verbindung zur richtigen Datenbank herstellen
    $datenbank = mysql_select_db($_db_datenbank, $link);
    if (!$datenbank) {
        echo "Kann die Datenbank nicht benutzen: " . mysql_error();
        mysql_close($link);
        # Datenbank schliessen
        exit;
        # Programm beenden !
    }
    return $link;
}
Beispiel #8
0
 public function __construct()
 {
     $this->data = null;
     SESSION_START();
 }
Beispiel #9
0
function CreateOrderHead($order, $MKZ, $UGP)
{
    SESSION_START();
    $userinfo = GetUserInfo();
    $ts = strtotime($order->order_date);
    $html = "<div style=\"font-family: Arial; font-size: 14px; \">";
    $html = $html . "Bestellung <b>" . $order->order_number . "</b> vom <b>" . date("d.m.Y G:i:s", $ts) . "</b><br>";
    $html = $html . "Besteller: <b>" . $order->ba_firstname . " " . $order->ba_lastname . "</b><br><br>\n";
    $html = $html . "Status: <b>" . $order->status . "</b><br><br>\n";
    $html = $html . "Lieferadresse:<br>\n";
    $html = $html . $order->firstname . " " . $order->lastname . "<br>\n";
    $html = $html . $order->street . "<br>\n";
    $html = $html . $order->country_id . "-" . $order->postcode . " " . $order->city . "<br><br>\n";
    if ($order->email != "" or $order->telephone != "") {
        $html = $html . "<table width=\"200\" cellpadding=\"1\">\n";
        $html = $html . "<style type=\"text/css\">\n";
        $html = $html . "table { width: 200px; }\n";
        $html = $html . "table { border-collapse: collapse;}\n";
        $html = $html . "table, td, th { border: 1px solid black; }\n";
        $html = $html . "td, th { height: 10px; font-family: Arial; font-Size: 12px};\n";
        $html = $html . "td, th { height: 10px; font-family: Arial; font-Size: 12px};\n";
        $html = $html . "th { text-align: right; };\n";
        $html = $html . "td { text-align: left; };\n";
        $html = $html . "</style>\n";
        //        $html = $html. "<div id=\"txtHint\"><b>Person info will be listed here...</b></div>";
        if ($order->email != "") {
            $html = $html . "<tr><td width=\"10%\">E-Mail</td><td width=\"20%\">" . $order->email . "</td><td width=\"60%\"></td></tr>";
        }
        if ($order->telephone != "") {
            $html = $html . "<tr><td width=\"10%\">Telefon</td><td width=\"20%\">" . $order->telephone . "</td><td width=\"60%\"></td></tr>";
        }
        $html = $html . "</table><br>\n";
    }
    $html = $html . "Zahlungsweise: <p style=\"font-family: Arial; font-size:18px;\" ><b>" . GetPayMethod($order->paymethod) . "</b></p>\n";
    $html = $html . "</div>";
    return $userinfo . $html;
}