Exemplo n.º 1
0
 function enter()
 {
     import::load('lib', 'Validar');
 }
Exemplo n.º 2
0
<?php

define('CMSPATH', str_replace("\\", "/", dirname(__FILE__)));
define('DS', "/");
define('COREPATH', CMSPATH . DS . 'core');
require_once COREPATH . DS . "loader.php";
$access = Import::load("lib", "Start_Page");
$access = $access and import::load('lib', 'view');
$access = $access and import::load('lib', 'Validate_Auth');
validate_auth::start();
$LestStart = new Start_Page();
if ($access) {
    if ($LestStart->checkURL() == URL . DS) {
        header('Location: http://' . URL . DS . 'login' . DS . "start");
    } else {
        $LestStart->start();
    }
} else {
    echo "No se logro realizar la carga de los archivos.";
}
Exemplo n.º 3
0
                            </div>
                            <h4 class="panel-title">Detalle Base de Datos</h4>
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table id="data-table" class="table table-striped table-bordered">
                                    <thead>
                                        <tr>
                                            <th>Descripcion</th>
                                            <th>Host</th>
                                            <th>Usuario</th>
                                        </tr>
                                    </thead>
                                    <tbody>
	                                    <?php 
import::load('lib', 'MySQL');
$query = "\tselect descripcion,host_conexion,user\r\n\t                                    \t\t\t\tfrom billing.bases_cobro\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by id_base;";
$conexion = new MySQL(0);
$exec = $conexion->consulta($query);
while ($row2 = $conexion->fetch_row($exec)) {
    //if ($row2[2] == 1){$value = "Activo";}else{$value = "Baja";}
    echo "<tr><td>{$row2['0']}</td><td>{$row2['1']}</td><td>{$row2['2']}</td></tr>";
}
?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <!-- end panel -->
                </div>
Exemplo n.º 4
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/core/import.php';
import::load('lib', 'Validate_Auth');
import::load('core', 'Start_page');
import::load('lib', 'Session');
import::load('lib', 'MySQL');
import::load('lib', 'view');
class Usuario
{
    function __construct()
    {
        $this->titulo = 'Billing Vas Pass';
        $this->mensaje = '';
    }
    function start($mensaje)
    {
        if (self::check()) {
            if ($_SESSION['access'] == 1) {
                $data = array("Titulo" => "Billing Vas Pass", "mensaje" => $mensaje);
                self::LoadTemplate("usuario/usuario.php", $data);
            } else {
                $_SESSION['value'] = 'Acceso denegado';
                session_write_close();
                exit(header('Location: http://' . URL . DS . 'dashboard' . DS . 'start'));
            }
        } else {
            exit(header('Location: http://' . URL . DS));
        }
    }
    function edit($mensaje)
Exemplo n.º 5
0
<?php

define('CMSPATH', str_replace("\\", "/", dirname(__FILE__)));
define('DS', "/");
define('COREPATH', CMSPATH . DS . 'core');
require_once COREPATH . DS . "loader.php";
$access = Import::load("lib", "Start_Page");
$access = $access and import::load('lib', 'view');
$MainLogger = new Logger();
$MainLogger->OpenLogger();
$MainLogger->WriteLogger("--------------------------------------Main Page Start---------------------------------------");
$LestStart = new Start_Page();
if ($access) {
    $MainLogger->WriteLogger($LestStart->checkURL() . " validando " . URL . DS);
    if ($LestStart->checkURL() == URL . DS) {
        $MainLogger->WriteLogger("Redireccionando -> Location: http://" . URL . DS . 'home');
        $MainLogger->WriteLogger("--------------------------------------Main Page End-----------------------------------------");
        $MainLogger->CloseLogger();
        header('Location: http://' . URL . DS . 'home');
    } else {
        $MainLogger->WriteLogger("Cargando Start_Page()");
        $MainLogger->WriteLogger("--------------------------------------Main Page End-----------------------------------------");
        $MainLogger->CloseLogger();
        $LestStart->start();
    }
} else {
    $MainLogger->WriteLogger("No se logro realizar la carga de los archivos.");
    $MainLogger->CloseLogger();
}
Exemplo n.º 6
0
<?php

//include_once("paths.php");
//require_once('../core/import.php');
import::load('lib', 'MySQL');
import::load('lib', 'Session');
class Validate_Auth
{
    public static function start()
    {
        Session::start();
    }
    public static function logout()
    {
        $conexion = new MySQL(0);
        $query = "update usuario set logged = 0, date_logged = now(), session_id = '' where usuario = '" . $_SESSION['login'] . "';";
        $result1 = $conexion->consulta($query);
        $conexion->MySQLClose();
        Session::destroy();
    }
    public static function check()
    {
        $session = Session::get("login");
        if ($session != false) {
            $conexion = new MySQL(0);
            $query = "select logged, date_logged,now() as fe from usuario where usuario = '" . $_SESSION["login"] . "';";
            $result1 = $conexion->consulta($query);
            $row = $conexion->fetch_row($result1);
            $valor = $conexion->num_rows($result1);
            if ($valor == 1) {
                $fechaGuardada = $row[1];