/** * @author Rolando Antonio Arriaza * @todo Constructor de la clase mysqlconection * @version 1.3 * @param Array $conect_dsn Conecta un dsn nuevo fuera del la conexion principal * @param string $directory directorio del config (Option en vez del $conect_dsn) * @since 1.1 */ public function __construct() { global $CONFIG_; $this->dsn = $CONFIG_["DB_MYSQL"]["driver"] . ':host=' . $CONFIG_["DB_MYSQL"]["host"] . ';dbname=' . $CONFIG_["DB_MYSQL"]["database"] . ';port=' . $CONFIG_["DB_MYSQL"]["port"]; try { parent::__construct($this->dsn, $CONFIG_["DB_MYSQL"]["user"], $CONFIG_["DB_MYSQL"]["password"]); parent::setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $ex) { $header = new \Http\Header(); if ($ex->getMessage() == "could not find driver") { $header->redirect(\Url\Url::GetContentUrl("web/admin/error/database/index.php?err=0")); } else { $header->redirect(\Url\Url::GetContentUrl("web/admin/error/database/index.php?err=1")); } } }
<?php /** *@todo LIEISOFT CMS SCRIPT AUTOGENERACION *@author Rolando Arriaza <*****@*****.**> *@version 1.x *@since 0.1 */ Session::InitSession(); //INCLUIMOS LIBRERIA PRINCIPAL DONDE SE CARGAN TODAS LAS DEMAS LIBRERIAS O SCRIPTS include '../../../Conf/Include.php'; $header = new Http\Header(); $header->redirect("../index.php");
session_start(); include '../../Conf/Include.php'; $header = new Http\Header(); $usuario = $_SESSION['login']['user']; $rol = $_SESSION['login']['rol']; $nombre = $_SESSION['login']['nombre']; $mail = $_SESSION['login']['email']; $activo = $_SESSION['login']['activo']; $id_user = $_SESSION['login']['id']; $imagen = $_SESSION['login']['imagen']; if (\SivarApi\Tools\Validation::Is_Empty_OrNull($imagen)) { $imagen = "avatar.png"; } if (!isset($_SESSION['login'])) { $header->redirect("login.php"); } $user_controller = new UserController($id_user); if (isset($_REQUEST['avatar_guardar'])) { $is_save = $user_controller->SetNew_Avatar(FunctionsController::GetRootUrl("admin/img/users"), "avatar_imagen"); if (!$is_save) { echo "<script>alert('Imposible subir la imagen intente de nuevo mas tarde ...');</script>"; } else { $_SESSION['login']['imagen'] = $user_controller->get_file_name(); $imagen = $_SESSION['login']['imagen']; } } elseif (isset($_REQUEST['usuario_datos'])) { $campos = array("telefono" => $_REQUEST['txt_telefono'], "celular" => $_REQUEST['txt_celular']); $user_controller->Update_user($campos); } elseif (isset($_REQUEST['id_contrato'])) { $user_controller->set_contract($_REQUEST['id_contrato']);
<!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <?php include '../../../Conf/Include.php'; $http = new Http\Header(); Session::InitSession(); if (Session::ExistSession("login")) { $http->redirect("user/"); } ?> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <meta charset="utf-8"/> <title>Lieisoft Logueate !!</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="width=device-width, initial-scale=1.0" name="viewport"/> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta content="" name="description"/> <meta content="" name="author"/> <!-- BEGIN GLOBAL MANDATORY STYLES --> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/> <link href="../../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <link href="../../assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/> <link href="../../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> <link href="../../assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
} } } elseif (isset($_POST['cmd_padre_guardar']) && isset($_POST['txt_namehijo'])) { $nombre_rol_hijo = $_POST['txt_namehijo']; $opt_padre = $_POST['opt_padre']; $is_ok = $adminc->add_rols($nombre_rol_hijo, $opt_padre); if ($is_ok) { echo "<script>alert('Se agrego nuevo privilegio hijo');</script>"; } else { echo "<script>alert('No se pudo agregar el nuevo privilegio hijo');</script>"; } } elseif (isset($_REQUEST['id_rol'])) { $is_ok = $adminc->delete_rols($_REQUEST['id_rol']); if ($is_ok) { echo "<script>alert('Se ha eliminado el privilegio');</script>"; $header->redirect("dashboard_gestion_usuarios.php"); } else { echo "<script>alert('Error al eliminar el privilegio');</script>"; } } else { $priv = $adminc->get_permission_page($rol, FunctionsController::get_actual_page()); if (!$priv) { $header->redirect("index.php"); } } ?> <div class="row"> <!-- PRIMERA TABLA ENTRADA Y SALIDA --> <div class="col-md-12"> <div class="portlet box blue">
<?php /** *@author Rolando Antonio Arriaza <*****@*****.**> *@copyright (c) 2015, Lieison * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@version 1.0 *@todo Lieison S.A de C.V */ include '../../../Conf/Include.php'; $header = new Http\Header(); $header->redirect("dashboard_control_paginas.php");
in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@version 1.0 *@todo Lieison S.A de C.V * * * */ //INCLUIMOS LIBRERIA PRINCIPAL DONDE SE CARGAN TODAS LAS DEMAS LIBRERIAS O SCRIPTS include '../../Conf/Include.php'; $header = new \Http\Header(); //INDEX APUNTA AL DIRECTORIO USER if (isset($_REQUEST['redirect'])) { $header->redirect("user/index.php?redirect=" . $_REQUEST['redirect']); } else { $header->redirect("user/"); }
$pass = $_POST['password']; //$url_builder = NULL; $url = null; $url_err = null; $url_index = null; if (SivarApi\Tools\Validation::Is_Empty_OrNull($redirect)) { $url = "login.php"; $url_err = "login.php?error=true"; $url_index = "index.php"; } else { $url = "login.php?redirect=" . $_REQUEST['redirect']; $url_err = "login.php?error=true&redirect=" . $_REQUEST['redirect']; $url_index = "index.php?redirect=" . $_REQUEST['redirect']; } if (!isset($_POST['username'])) { $header->redirect(FunctionsController::GetUrl($url)); } if (preg_match("/[^A-Za-z0-9]/", $user) || preg_match("/[^A-Za-z0-9]/", $pass)) { if (!\SivarApi\Tools\Validation::CheckEmail($user)) { $header->redirect(FunctionsController::GetUrl($url_err)); exit; } } $admin_controller = new AdminController(); $is_user = $admin_controller->GetLogin($user, $pass); if ($is_user) { $hora_entrada = FunctionsController::get_time(); $fecha = FunctionsController::get_date(); $id_user = Session::GetSession("login", "id"); if (!$admin_controller->SessionActive(Session::GetSession('login', "id_log"))) { $id_log = $admin_controller->Create_Log($id_user, $hora_entrada, $fecha);
<?php session_start(); include '../../Conf/Include.php'; $header = new Http\Header(); if (!isset($_SESSION['login'])) { $header->redirect("Login.php"); } $usuario = $_SESSION['login']['user']; $rol = $_SESSION['login']['rol']; $nombre = $_SESSION['login']['nombre']; $mail = $_SESSION['login']['email']; $activo = $_SESSION['login']['activo']; $id_user = $_SESSION['login']['id']; $imagen = $_SESSION['login']['imagen']; if (\SivarApi\Tools\Validation::Is_Empty_OrNull($imagen)) { $imagen = "avatar.png"; } if ($activo == 0) { $header->redirect("cuenta_desactivada.php"); } $adminc = new AdminController(); $adminc->Get_Permission($rol, FunctionsController::get_actual_page(), AdminController::get_option_permission("index.php")); /* if(isset($_REQUEST['id'])): elseif(!$priv): $header->redirect("index.php"); endif;*/ ?>
*QUE QUIERE DECIR , PUES GRACIAS A LA API TODO DEBE SERIALIZARCE * * ?init=0 , SE LOGUE A LA CUENTA DE BOX PARA TENER ACCESO * ?init=1 , SI YA ESTA LOGADO OBTENEMOS LA INFORMACION * */ include '../../../../Conf/Include.php'; include '../../box/BaseBox.php'; $uri = FunctionsController::GetContentUrl('Web/admin/task/includes/box.php?init=' . $_GET['init'] ?: 1); //$box = new BaseBox("http://localhost/LieisonCMS/Content/Web/admin/task/includes/box.php?init=" . $_GET['init'] ? : 1); $box = new BaseBox($uri); $box->ConecToBox(); if (isset($_REQUEST['init'])) { if ($_REQUEST['init'] == 0) { $header = new \Http\Header(); $header->redirect('../../task/dashboard_add_task.php?security=1&box=1'); exit; } else { $uri = FunctionsController::GetUrl('task/includes/box.php?init=1'); } } if (!isset($_REQUEST['folder'])) { $folders = $box->ShowAllPrimaryFolders(); echo '<h3>Seleccione un directorio</h3>'; echo "<select onchange='GetBoxChild(0 , null);' class='form-control' id='box_parent' name='box_parent' >"; echo '<option value="-1">...</option>'; foreach ($folders as $parent) { if ($box->Get_type($parent['type']) == 0) { $id = $parent['id']; $name = $parent['name']; echo '<option value="' . $id . '">' . $name . '</option>';
<!DOCTYPE html> <?php session_start(); include '../../Conf/Include.php'; $http = new Http\Header(); if (isset($_SESSION['login'])) { $http->redirect("index.php"); } ?> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <meta charset="utf-8"/> <title>Login Dashboard Lieison Working Together</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="width=device-width, initial-scale=1.0" name="viewport"/> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta content="" name="description"/> <meta content="" name="author"/> <!-- BEGIN GLOBAL MANDATORY STYLES --> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/> <link href="../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <link href="../assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/> <link href="../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> <link href="../assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@version 1.0 *@todo Lieison S.A de C.V */ include '../../../Conf/Include.php'; set_dependencies(array("ProspectController", "AdminController")); $header = new Http\Header(); if (!isset($_POST['cmd_enviar'])) { $header->redirect("index.php"); exit; } $values = array("nombre" => $_POST['txt_nombre'], "direccion" => $_POST['txt_direccion1'], "direccion2" => $_POST['txt_direccion2'], "provincia" => $_POST['txt_provincia'], "ciudad" => $_POST['txt_ciudad'], "id_pais" => $_POST['combo_pais'], "zip" => $_POST['txt_zip'], "telefono" => $_POST['txt_telefono'], "fax" => $_POST['txt_fax'], "pagina_web" => $_POST['txt_web'], "email" => $_POST['txt_email'], "facebook" => $_POST['txt_facebook'], "twitter" => $_POST['txt_twitter'], "notas" => $_POST['txt_notas']); $id = $_POST['cmd_enviar']; $prospect = new ProspectController(); $prospect->EditProspect($id, $values); $header->redirect("dashboard_admin_prospecto.php?id={$id}");
* * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@version 1.0 *@todo Lieison S.A de C.V */ session_start(); //INCLUIMOS LIBRERIA PRINCIPAL DONDE SE CARGAN TODAS LAS DEMAS LIBRERIAS O SCRIPTS include '../../../Conf/Include.php'; $header = new Http\Header(); $header->redirect("dashboard_admin_prospecto.php"); /*$path_origin = "../"; $path_plugin = "../prueba_plugin.zip"; $plugin = new \Plugin\PluginClass($path_origin, $path_plugin); print_r($plugin->UnZipPlugin());*/
<?php //INCLUIMOS LIBRERIA PRINCIPAL DONDE SE CARGAN TODAS LAS DEMAS LIBRERIAS O SCRIPTS include '../../../Conf/Include.php'; //INDEX APUNTA AL DIRECTORIO USER $header = new \Http\Header(); $header->redirect("dashboard_index.php");
<?php /* * SE CANCELO EL FRONT END ASI QUE * REDIRIGIMOS DIRECTAMENTE AL CMS */ include '../Conf/Include.php'; $head = new Http\Header(); $head->redirect("admin/"); ?>
<?php include 'Conf/Include.php'; $head = new Http\Header(); $head->redirect("web/admin/");
<?php include '../../../Conf/Include.php'; $header = new \Http\Header(); $header->redirect("index.php"); exit;
$target_dir = "../plugins/files/"; //ARCHIVO DONDE SE ENCUENTRA EL PLUGIN $target_file = $target_dir . basename($_FILES["plugin"]["name"]); //VERIFICAMOS EL TIPO DE ARCHIVO DEBE SER .ZIP $FileType = pathinfo($target_file, PATHINFO_EXTENSION); //VERIFICAMOS EL NOMBRE $name = $_FILES["plugin"]["name"]; //INSTANCIAMOS EL HEADER $header = new \Http\Header(); //VERIFICAMOS SI EXISTE EL ARCHIVO ANTERIORMENTE ANTES DE SUBIRLO if (file_exists($target_file)) { unlink($target_file); } //VERIFICAMOS EL TIPO DE ARCHIVO if ($FileType != "zip") { $header->redirect("dashboard_index.php?error=nofile"); exit; } //PROCEDEREMOS A SUBIR EL ARCHIVO $result = move_uploaded_file($_FILES["plugin"]["tmp_name"], $target_file); echo $result . $_FILES["plugin"]["tmp_name"]; if (!$result) { $header->redirect("dashboard_index.php?error=noupload"); exit; } //DESCOMPRESION DEL ARCHIVO $plugin = new PluginController("../", "../plugins/files/" . $name); //DESCOMPRIMIMOS $plugin->UnZipPlugin(); //REDIRECCIONAMOS AL DASHBOARD DEL MODULO $header->redirect("dashboard_index.php");
<?php include '../../../Conf/Include.php'; set_dependencies(array("AdminController")); Session::InitSession(); //INICIA SESION $header = new Http\Header(); //INSTANCIA EL HEADER if (Session::ExistSession("login")) { //VERIFICA SI EXISTE LA SESION LOGIN $id_log = Session::GetSession("log"); //OBTIENE EL LOG DE LOGUEO $hora_salida = FunctionsController::get_time(); //OBTIENE LA HORA DE SALIDA $admin = new AdminController(); //INSTANCIA EL CONTROLADOR DEL ADMIN $admin->Update_log($id_log, $hora_salida); //ACTUALIZA EL LOG O BITACORA if (!Session::ExistSession("DUPLICATE_SESSION")) { //VERIFICA SI ES SESION DUPLICADA $admin->UpdateSession($_SESSION['login']["id_log"], 0); //EN DADO CASO NO SEA ENTONCES RESTABLECE LA ACTIVIDAD A CERO } Session::DestroySession("", true); //LIBERA TODAS LAS VARIABLES DE SESION ... $header->redirect(FunctionsController::GetUrl("login.php")); //REDIRECT } else { $header->redirect(FunctionsController::GetUrl("login.php")); //REDIRECT }
if (!isset($_SESSION['login'])) { $http->redirect("login.php"); } $usuario = $_SESSION['login']['user']; $rol = $_SESSION['login']['rol']; $nombre = $_SESSION['login']['nombre']; $mail = $_SESSION['login']['email']; $activo = $_SESSION['login']['activo']; $id_user = $_SESSION['login']['id']; $imagen = $_SESSION['login']['imagen']; if (\SivarApi\Tools\Validation::Is_Empty_OrNull($imagen)) { $imagen = "avatar.png"; } if ($activo == 0) { $header = new Http\Header(); $header->redirect("cuenta_desactivada.php"); } $adminc = new AdminController(); $priv = $adminc->get_permission_page($rol, FunctionsController::get_actual_page()); if (!$priv) { $header->redirect("index.php"); } ?> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD --> <head>
<?php include '../../../Conf/Include.php'; Session::InitSession(); set_dependencies(array("AdminController")); $header = new Http\Header(); if (!isset($_SESSION['login'])) { $header->redirect("Login.php"); } $usuario = $_SESSION['login']['user']; $rol = $_SESSION['login']['rol']; $nombre = $_SESSION['login']['nombre']; $mail = $_SESSION['login']['email']; $activo = $_SESSION['login']['activo']; $id_user = $_SESSION['login']['id']; $imagen = $_SESSION['login']['imagen']; if (\SivarApi\Tools\Validation::Is_Empty_OrNull($imagen)) { $imagen = "avatar.png"; } if ($activo == 0) { $header->redirect("cuenta_desactivada.php"); } $adminc = new AdminController(); if (isset($_POST['guardar_superpermisos']) && isset($_POST['txt_superpermisos'])) { if (!\SivarApi\Tools\Validation::Is_Empty_OrNull($_POST['txt_superpermisos'])) { $nombre_rol = $_POST['txt_superpermisos']; $is_ok = $adminc->add_rols($nombre_rol); if ($is_ok) { echo "<script>alert('Se agrego nuevo privilegio');</script>"; } else { echo "<script>alert('No se pudo agregar el nuevo privilegio');</script>";
/** *@author Rolando Arriaza *@todo Funcion para otorgar permisos a la pagina , esta funcion requiere de parametros especiales *@version 1.5 *@since 1.0 *@depends get_permission_page , get_option_permission *@param string $rol el nombre del rol usuario "admin" por ejemplo *@param string $pagina pagina actual de la llamada *@param array $redirect´parametros de redireccion , se puede utilizar la funcion get_option_permission *@param array $alter_permission agregar permisos por el programador array("admin", "sales" , "etc..") *@return mixed bool/redirect */ public function Get_Permission($rol, $dashboard_page, array $redirect = array("redirect" => "../error/permisos/index.php", "activate" => true), array $alter_permission = array()) { $redirect_activate = $redirect['activate']; $is_priv = $this->get_permission_page($rol, $dashboard_page); if (!$is_priv && $rol != "admin") { if ($redirect_activate == true) { if (count($alter_permission) >= 1) { foreach ($alter_permission as $permission) { if (strcmp($permission, $rol) == 0) { return $permission; } } } ob_start(); $header = new \Http\Header(); $header->redirect($redirect['redirect']); unset($header); ob_end_clean(); } else { return $is_priv; } } }