Example #1
0
<?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
}
Example #2
0
<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
$messages = new MessageController();
$r = $messages->GetMessageTrash(Session::GetSession("login", "id"), MESSAGE_TO);
$a = array("count" => sizeof($r), "data" => $r);
unset($messages);
echo json_encode($a);
exit;
Example #3
0
} 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);
        $admin_controller->UpdateSession(Session::GetSession('login', "id_log"), 1);
    } else {
        $_SESSION['DUPLICATE_SESSION'] = true;
    }
    $_SESSION['log'] = $id_log;
    $header->redirect(FunctionsController::GetUrl($url_index));
} else {
    $header->redirect(FunctionsController::GetUrl($url_err));
}
Example #4
0
<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
//OBTENEMOS EL ID DEL MENSAJE
$message = $_GET['message'];
$iduser = Session::GetSession("login", "id");
$id = $_GET['id'];
//CARGAMOS EL CONTROLADOR
$msj = new MessageController();
if ($msj->SetSubmessage($id, $iduser, $message)) {
    echo 1;
} else {
    echo 0;
}
exit;
Example #5
0
<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
$messages = new MessageController();
$r = $messages->GetMessageFrom(Session::GetSession("login", "id"), NULL, 2, TRUE);
$a = array("count" => sizeof($r), "data" => $r);
unset($messages);
echo json_encode($a);
exit;
Example #6
0
<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
//OBTENEMOS EL ID DEL MENSAJE
$id = $_GET['id_message'];
//CARGAMOS EL CONTROLADOR
$msj = new MessageController();
$request = $msj->GetChatById($id);
$first = $msj->GetMessageById($id);
if (count($first) == 0) {
    $first = "";
} else {
    $first = $first[0]['mensaje'];
}
$data = array("me" => Session::GetSession("login", "id"), "chat" => $request, "mensaje" => htmlspecialchars_decode($first, ENT_QUOTES));
$json = new SivarApi\Tools\Services_JSON();
echo $json->encode($data);
exit;
//CONVERTIMOS EN FORMATO JSON
//echo "<pre>";
//print_r($request);
//echo "</pre>";
Example #7
0
<div class="todo-sidebar">
<div class="portlet light">
<div class="portlet-title">
<div class="caption" data-toggle="collapse" data-target=".todo-project-list-content">
<?php 
/*
 * CONTROL DE TAREAS 
 * 
 * **/
$parent = new UserController(Session::GetSession("login", "id"));
$result_ = $parent->GetParent();
?>
    
    

    <?php 
if ($result_ == 0) {
    echo '<select onchange="call_thetask(this.value,0,0,true);" class="selectpicker" id="task_selected" name="task_selected">';
    echo '<option selected value="1" data-content="Mis Tareas"></option>';
    echo '<option value="0" data-content="Tareas Asignadas"></option>';
    echo '</select>';
}
?>

 <select onchange="alert(this.value);" class="selectpicker" id="task_selected" name="task_selected">
  <option value="-1" selected data-content='Ordenar Por...'></option>   
  <option value="0" data-content='Fecha'></option>
  <option value="1" data-content='Deadline'></option>
  <option value="1" data-content='En Proceso'></option>
  <option value="1" data-content='En Espera'></option>
Example #8
0
   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';
Session::InitSession();
$login = Session::GetSession("login");
$rol = $login['rol'];
//VARIABLES DE SESION , CAMBIO EN EL VISTA
Session::InsertSession("page_name", "Lieison");
Session::InsertSession("home", "Front-End");
Session::InsertSession("title", "<b>Lieison.com</b>");
//CONTROLADOR DEL ADMINISTRADOR
$adminc = new AdminController();
//OBTIENE LOS PERMISOS MEDIANTE EL ROL INDICADO
$adminc->Get_Permission($rol, FunctionsController::get_actual_page());
//HEADER , CABECERA DONDE SE INICIARA ELEMENTOS NECESARIOS PARA ESTE SCRIPT
$header .= '<style>' . '.lieisonframe {
                    position: relative;
                    padding-bottom: 56.25%;
                    overflow: hidden;
                }' . '.lieisonframe iframe
Example #9
0
<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
$to = $_GET['msj_to'];
$from = Session::GetSession("login", "id");
$business = $_GET['msj_bussines'];
$msj = $_GET['msj'];
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
$messages = new MessageController();
$request = $messages->SetMessage($to, $from, $msj, $business);
echo $request;
unset($messages);
exit;
Example #10
0
<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
$messages = new MessageController();
$r = $messages->GetMessageTo(Session::GetSession("login", "id"));
$a = array("count" => sizeof($r), "data" => $r);
unset($messages);
echo json_encode($a);
exit;
Example #11
0
 public function SetReadInbox($id)
 {
     $id_user = Session::GetSession("login", "id");
     parent::Update("lieisoft_mensajeria", array("leido" => "1"), " id_mensaje LIKE {$id} AND id_usuario_para LIKE '{$id_user}'");
 }
Example #12
0
 *         2 = en proceso
 *         3 = espera
 *         4 = termianda
 */
set_dependencies(array("TaskController"));
Session::InitSession();
$type = $_REQUEST['type'] ?: 0;
//verifica el tipo de tarea a mostrar 0 y 1
$style = $_REQUEST['style'] ?: 0;
//como se vera la tarea dos estilos 0 y 1
$order = $_REQUEST['order'] ?: 0;
//orden de la tarea 0 por defecto
$task = new TaskController();
//controlador
$request = null;
$id = Session::GetSession("login", "id");
switch ($order) {
    case 0:
        $order = FECHA;
        break;
    case 1:
        $order = DEADLINE;
        break;
    case 2:
        $order = PROCESO;
        break;
    case 3:
        $order = ESPERA;
        break;
    case 4:
        $order = TERMINADA;
Example #13
0
include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
//VERIFICAMOS LOS MULTIPLES IDS
$id = explode(",", $_GET['id_message']);
$array_ = array();
//RECORREMOS LOS IDS
foreach ($id as $value) {
    $msj = new MessageController();
    //controlador
    $request = $msj->GetActiveUserChat($value);
    //data
    $count_msj = $msj->GetCountSubMessage($value, Session::GetSession("login", "id"));
    //cantidad de mensajes
    $array_[] = array("date" => $request['fecha'], "time" => $request['hora'], "count" => $count_msj, "data" => $request, "id" => $value, "id_user" => $request['id_user']);
    unset($msj);
}
function comparedate($a, $b)
{
    if ($a['date'] < $b['date']) {
        return $b;
    }
}
function comparetime($a, $b)
{
    return $a['time'] < $b['time'];
}
function comparecount($a, $b)
Example #14
0
<?php

/**
 * ESTE FRAGMENTO DE CODIGO LO QUE HACE ES REDIRECCIONAR SI EXISTE 
 * EL TOKEN DE BOX , ESTO QUIERE DECIR QUE SE HA LOGADO ANTES A UNA CUENTA
 */
if (Session::ExistSession("box")) {
    echo "<script> " . " window.location.href='includes/box.php?init=0&box=" . Session::GetSession("box") . "';" . "</script>";
} elseif (file_exists("includes/token.box")) {
    echo "<script> " . " window.location.href='includes/box.php?init=0';" . "</script>";
}
?>
<div class="portlet box purple">
    
				<div class="portlet-title">
							<div class="caption">
                                                                 Security Box
							</div>
							
						</div>
						<div class="portlet-body form">
							<form role="form" class="form-horizontal">
								<div align="center" class="form-body">
                                                                    <H2><b>¿TIENES CUENTA DE BOX?</b></H2>
									<div class="form-group">

										<div align="center" class="col-md-12">
                                                                                    <a href="includes/box.php?init=0" class="btn btn-primary">SI</a>
                                                                                    <a href="dashboard_add_task.php?security=1&box=0" class="btn green">NO</a>
										</div>
									</div>