static function Get_DropDown() { echo '<ul class="dropdown-menu dropdown-menu-default"> <li> <a href="' . FunctionsController::GetUrl('perfil/') . '"> <i class="icon-user"></i> Mi Perfil</a> </li>'; echo '<li class="divider"> </li> <li> <a href="' . FunctionsController::GetUrl('lock.php') . '"> <i class="icon-lock"></i> Bloquear Pantalla </a> </li> <li> <a href="' . FunctionsController::GetUrl('logout/') . '"> <i class="icon-key"></i> Cerrar Sesion </a> </li></ul>'; }
private function ComparePriv($priv_user, $priv_dashboard, $link, $titulo, $icon, $id, $complement = null) { if ($priv_dashboard == $priv_user || $priv_dashboard == 0 || $priv_user == 55) { if ($this->puntero != null && $this->puntero == $titulo) { $this->format .= '<li class="start active open">'; } else { $this->format .= '<li>'; } $this->format .= '<a href="' . FunctionsController::GetUrl($link) . '">'; $this->format .= '<i class="' . $icon . '"></i>  '; if ($complement != NULL) { try { $decode = json_decode($complement); $this->format .= '<span id="' . $decode[0]->id . '" class="badge badge-warning">' . $decode[0]->value . '</span>'; } catch (Exception $ex) { } } $this->format .= $titulo . '</a></li>'; array_push($this->dashboard_key, $id); } }
<?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 }
} 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)); }
$action_button = ''; $pais = $sales->Get_Country($prospect_data['id_pais']); //obtiene el pais $prospect_body_dir .= '<div class="form-body"><i class="fa fa-globe"></i> <b>Provincia : </b>' . $prospect_data['provincia'] . '<b>     <i class="fa fa-globe"></i> Ciudad: </b>' . $prospect_data['ciudad'] . '<b>     <i class="fa fa-globe"></i> Pais: </b>' . $pais . '</div>'; //agrega los datos de la direccion //perfil o progreso del prospecto completado $propect_progress = $sales->Get_ProspectProgress($prospect_data['id_prospect']); $complete_profile = "(Perfil Completado: " . $propect_progress . "%)"; if ($propect_progress >= 100) { $complete_profile = ""; } //si esta al 100% el progreso desaparece //cambia el titulo del dashboard por el nombre del prospecto , agrega el perfil completado $action_edit = ""; if ($prospect_data['meta_estado'] <= 1) { $action_edit = '<a class="btn blue" href="' . FunctionsController::GetUrl('sales/dashboard_edit_prospecto.php?id=' . $prospect_data['id_prospect']) . '"' . '><i class="fa fa-pencil"></i></a>'; } $script_title = "<script>\$('#id_title').html('<p><b>" . strtoupper($prospect_data['nombre']) . "</b>" . "   " . $action_edit . " <small>" . $complete_profile . "</small>" . "</p>');</script>"; /*INICIO DE LA INFORMACION DEL PROSPECTO */ $title_info = "Informacion Del Prospecto"; $prospect_info = '<div class="form-body">'; $prospect_info .= '<i class="fa fa-building-o"></i>   <b>Nombre:</b> ' . $prospect_data['nombre'] . '<br><br>'; $prospect_info .= '<i class="fa fa-building-o"></i>   <b>Telefono:</b> ' . "(" . $prospect_data['zip'] . ") " . $prospect_data['telefono'] . '<br><br>'; $prospect_info .= '<i class="fa fa-building-o"></i>   <b>Fax:</b> ' . $prospect_data['fax'] . '<br><br>'; $prospect_info .= '<i class="fa fa-building-o"></i>   <b>Fecha de Entrada:</b> ' . $prospect_data['fecha'] . '<br><br>'; $prospect_info .= '<div id="prospect_estado"><i class="fa fa-building-o"></i>   <b>Estado:</b> '; if ($prospect_data['estado'] == 1) { $prospect_info .= "Activo     <input class='btn green' type='button' onclick='ProspectActivate(0 ," . $prospect_data['id_prospect'] . ");' value='Desactivar' id='cmd_estado' />"; } else { $prospect_info .= "No Activo     <input class='btn green' type='button' onclick='ProspectActivate(1 ," . $prospect_data['id_prospect'] . ");' value='Activar' id='cmd_estado' />"; }
*/ include '../../../../Conf/Include.php'; $type = $_REQUEST['type'] ?: null; set_dependencies(array("TaskController", "LogsController", "MessageController")); if (SivarApi\Tools\Validation::Is_Empty_OrNull($type)) { echo 0; exit; } try { $task = new TaskController(); Session::InitSession(); $id_user = Session::GetSession("login", "id"); $encript = new \SivarApi\Tools\Encriptacion\Encriptacion(); $id_mt = $encript->Md5Encrypt(mt_rand(0, 1000) . mt_rand(100, 500) . $id_user . $_REQUEST['title']); $box_files = $_REQUEST['box_nodes'] ?: ""; $mensaje = htmlspecialchars("<b>La tarea Consiste en :</b><br> " . $_REQUEST['client_description'] . "<div align='center'><a target='_blank' class='btn btn-circle green-haze btn-sm ' href='" . FunctionsController::GetUrl("task/show_task.php?id={$id_mt}") . "'>Ver tarea ...</a></div>", ENT_QUOTES); $asunto = " Tarea :" . $_REQUEST['title']; $msj = new MessageController(); $id_msj = $msj->SetmessageLastId($_REQUEST['id_user'], $id_user, $mensaje, $asunto); $val = $task->SaveTask(array("id_multitask" => $id_mt, "id_client" => $_REQUEST['id_client'], "id_user_from" => $id_user, "description" => $_REQUEST['client_description'] ?: "ERROR", "title" => $_REQUEST['title'], "status" => 1), array("id_multitask" => $id_mt, "id_type" => 1, "id_user_from" => $id_user, "id_user_to" => $_REQUEST['id_user'], "id_message" => $id_msj[0]['id'], "date_asign" => FunctionsController::get_date(), "time_asign" => FunctionsController::get_time(), "box_files" => $box_files, "files" => $_REQUEST['other_docs'] ?: "", "comments" => $_REQUEST['user_comment'], "date_deadline" => FunctionsController::ReWriteDate($_REQUEST['deadline']), "time_deadline" => $_REQUEST['hourdead'], "status" => $_REQUEST['user_activate'])); if (!$val) { echo 0; } else { echo $id_mt; } } catch (Exception $ex) { $error = "(" . FunctionsController::get_date() . ")"; $error .= "(" . FunctionsController::get_time() . ")"; $error .= "(ERROR==>" . $ex->getMessage() . ")"; $dir = "../../task/logs/"; $log = new LogsController($dir);
<?php include '../../../Conf/Include.php'; set_dependencies(array("AdminController")); Session::InitSession(); //INICIA SESION $id_log = NULL; $hora_salida = NULL; $admin = new AdminController(); while (Session::ExistSession("login")) { $id_log = Session::GetSession("log"); //OBTIENE EL LOG DE LOGUEO $hora_salida = FunctionsController::get_time(); //OBTIENE LA HORA DE SALIDA $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); } Session::DestroySession("", true); //LIBERA TODAS LAS VARIABLES DE SESION ... } echo FunctionsController::GetUrl("login.php");
* ?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>'; } } echo "</select>";
foreach ($msjto as $k => $v) { $r = $messagecontroller->GetCountSubMessage($v['id_mensaje'], $id_user); $count_submsj += $r; } $count += $count_submsj; $array_ = array(); $array_['count'] = array("counter" => $count, "url" => FunctionsController::GetUrl("messages") . '/'); $data = ""; foreach ($msjto as $key => $value) { $data .= '<li>'; $data .= '<a href="javascript:chat_preview(' . $value['id_mensaje'] . ');">'; $data .= '<span class="photo">'; if ($value['imagen'] == null) { $data .= '<img src="' . FunctionsController::GetUrl("img", false) . '/users/avatar.png" class="img-circle" alt="">'; } else { $data .= '<img src="' . FunctionsController::GetUrl("img", false) . '/users/' . $value['imagen'] . '" class="img-circle" alt="">'; } $data .= '</span>'; $data .= '<span class="subject">'; $sub_msj = $messagecontroller->GetCountSubMessage($value['id_mensaje'], $id_user); if ($sub_msj >= 1) { $data .= '<span class="badge badge-default">'; $data .= $sub_msj . '</span>'; } $data .= '<span class="from">'; $data .= $value['nombre'] . '</span>'; $data .= '<span class="time">' . FunctionsController::Get_TimeAgo($value['fecha'] . " " . $value['hora']) . '</span>'; $data .= '</span>'; $data .= '<br><span class="message">'; $data .= '<b>' . $value['asunto'] . "</b><br>"; if (strlen($value['mensaje']) >= 65) {
/** * INTERFAZ GRAFICO PORTLERT HELP * var data = '<div class="col-md-4 column sortable"><div class="portlet portlet-sortable light bordered"><div class="portlet-title"><div class="caption font-green-sharp"><i class="fa fa-tasks"></i><span class="caption-subject bold uppercase">Aplicaciones</span> <span class="caption-helper"></span>'; data += '</div><div class="actions"><a class="btn btn-circle btn-icon-only btn-default fullscreen" href="#"></a></div></div><div class="portlet-body"><div class="scroller" style="height:200px" data-rail-visible="1" data-rail-color="yellow" data-handle-color="#a1b2bd">'; data += '</div></div></div>'; data += '<div class="portlet portlet-sortable light bordered"><div class="portlet-title"><div class="caption font-green-sharp"><i class="fa fa-tasks"></i><span class="caption-subject bold uppercase">Aplicaciones</span> <span class="caption-helper"></span>'; data += '</div><div class="actions"><a class="btn btn-circle btn-icon-only btn-default fullscreen" href="#"></a></div></div><div class="portlet-body"><div class="scroller" style="height:200px" data-rail-visible="1" data-rail-color="yellow" data-handle-color="#a1b2bd">'; data += '</div></div></div>'; data += '<div class="portlet portlet-sortable light bordered"><div class="portlet-title"><div class="caption font-green-sharp"><i class="fa fa-tasks"></i><span class="caption-subject bold uppercase">Aplicaciones</span> <span class="caption-helper"></span>'; data += '</div><div class="actions"><a class="btn btn-circle btn-icon-only btn-default fullscreen" href="#"></a></div></div><div class="portlet-body"><div class="scroller" style="height:200px" data-rail-visible="1" data-rail-color="yellow" data-handle-color="#a1b2bd">'; data += '</div></div></div></div>'; * * */ function PorltetStyle($request, $type, $id) { $count = count($request); $portlet_array = array(); $task = new TaskController(); if ($count == 0) { $not_task = "<div align='center' class='col-md-12'>"; $not_task .= "<h1><br><br><br><b>No Hay Tareas :)</b></h1>"; $not_task .= "</div>"; echo $not_task; exit; } if ($count == 1) { $portlet_array[] = array('<div class="col-md-4 column sortable">'); } elseif ($count == 2) { $portlet_array[] = array('<div class="col-md-4 column sortable">'); $portlet_array[] = array('<div class="col-md-4 column sortable">'); } elseif ($count >= 3) { $portlet_array[] = array('<div class="col-md-4 column sortable">'); $portlet_array[] = array('<div class="col-md-4 column sortable">'); $portlet_array[] = array('<div class="col-md-4 column sortable">'); } $i = -1; $max = count($portlet_array) - 1; //ESTADOS DE LOS TABULADORES $n = 1; $p = 2; $q = 3; /** * RECORRIDO DE LAS TAREAS PENDIENTES O ASIGNADAS DE ACUERDO * AL PERFIL DEL USUARIO DADO ... */ foreach ($request as $data) { //GENERAL $mt_id = $data->mt_id; $mt_status = $data->status; $mt_description = stripcslashes(nl2br($data->mt_description)); $title = $data->title; //CLIENTE $client_name = $data->client_name; $client_phone = $data->client_phone; $client_mail = $data->client_email; //USUARIO $user = $data->user_name; $user_image = $data->user_image; $user_mail = $data->user_email; //TAREA TIEMPOS $date_asign = $data->td_asign; $time_asign = $data->tt_asign; $date_deadline = $data->t_deadline; $time_deadline = $data->t_timedeadline; //TAREA OTROS $task_status = $data->t_status; $task_id = $data->t_id; $task_type_id = $data->t_idtype; $task_type_name = $data->t_nametype; $task_type_status = $data->t_typestatus; //FILES $task_box = $data->t_boxfiles; $task_files = $data->t_files; //TASK COMMENT $task_comment = $data->t_comment; $body_porlet = ""; $body_porlet = '<div class="portlet portlet-sortable light bordered">'; $body_porlet .= '<div class="portlet-title tabbable-line">'; $body_porlet .= '<div class="caption">'; /**INICIO : SELECCION SE COLOR TITULO MEDIANTE EL TYPO DE TAREA*/ $title_color = NULL; switch ($task_type_id) { case 1: $title_color = "font-green-crusta"; break; case 2: $title_color = "font-blue-crusta"; break; case 3: $title_color = "font-red-crusta"; break; case 4: $title_color = "font-green-crusta"; break; case 5: $title_color = "font-yellow-crusta"; break; } $body_porlet .= '<i class="fa fa-tasks"></i>'; $body_porlet .= '<span class="caption-subject bold ' . $title_color . ' uppercase">'; $body_porlet .= $title . '</span> '; /**FINAL SELECCION DE COLOR TITULO */ if ($task_status == 1) { $body_porlet .= '<span class="caption-helper"><i class="fa fa-spinner"></i></span>'; } else { $body_porlet .= '<span class="caption-helper"><i class="fa fa-check"></i></span>'; } $body_porlet .= '</div>'; $body_porlet .= '<ul class="nav nav-tabs">'; if ($type == 0) { $body_porlet .= '<li><a href="#portlet_tab' . $q . '" data-toggle="tab"><i class="fa fa-tachometer"></i></a></li>'; $body_porlet .= '<li><a href="#portlet_tab' . $p . '" data-toggle="tab"><i class="fa fa-user"></i></a></li>'; $body_porlet .= '<li class="active" ><a href="#portlet_tab' . $n . '" data-toggle="tab"><i class="fa fa-info"></i></a></li>'; } else { $body_porlet .= '<li><a href="#portlet_tab' . $q . '" data-toggle="tab"><i class="fa fa-tachometer"></i></a></li>'; $body_porlet .= '<li><a href="#portlet_tab' . $p . '" data-toggle="tab"><i class="fa fa-user"></i></a></li>'; $body_porlet .= '<li class="active" ><a href="#portlet_tab' . $n . '" data-toggle="tab"><i class="fa fa-info"></i></a></li>'; } $body_porlet .= '</ul>'; $body_porlet .= '</div>'; $body_porlet .= '<div class="portlet-body">'; $body_porlet .= '<div class="tab-content">'; //PRIMER TAB ------------------------------------------------------------------------------------------------ $body_porlet .= '<div class="tab-pane active" id="portlet_tab' . $n . '">'; $body_porlet .= '<div class="scroller">'; if ($type == 0) { $color = "red"; $reasign = FALSE; switch ($task_type_id) { case 1: break; case 2: $color = "blue"; break; case 3: $color = "green"; break; case 4: $reasign = TRUE; break; } if ($reasign) { $body_porlet .= '<h4><label class="btn btn-circle btn-transparent grey-cascade btn-sm active"> ' . $task_type_name . '</label> <a title="Si desea tomar accion en este momento sobre la reasignacion haz clic" href="javascript:alert();" class="btn btn-circle btn-primary btn-sm"><i class="fa fa-refresh"></i> Accion</a>' . '</label> <a title="muestra un poco mas acerca de esta tarea" href="show_task.php?id=' . $mt_id . '" class="btn btn-circle btn-transparent active" ><i class="fa fa-eye"></i></a></h4>'; } else { $body_porlet .= '<h4><label class="btn btn-circle btn-transparent ' . $color . ' btn-sm active" >' . $task_type_name . '</label> <a title="muestra un poco mas acerca de esta tarea" href="show_task.php?id=' . $mt_id . '" class="btn btn-circle btn-transparent green btn-sm active" ><i class="fa fa-eye"></i></a></h4>'; } } else { $estatus_ = $task->get_task_type(); $body_porlet .= '<select class="">'; foreach ($estatus_ as $v) { if ($task_type_id == 1) { $body_porlet .= "<option value='" . $v->id_type . "'>" . $v->name . "</option>"; } else { if ($v->id_type !== $task_type_id) { $body_porlet .= "<option value='" . $v->id_type . "'>" . $v->name . "</option>"; } } } $body_porlet .= '</select>'; } $body_porlet .= '<div class="blog-twitter">'; $body_porlet .= '<div class="blog-twitter-block">'; $body_porlet .= '<p><i class="fa fa-university "></i> <b>Cliente:</b> ' . $client_name . ' </p>'; $body_porlet .= '<i class="fa fa-envelope-o"></i> <a href="">' . $client_mail . '</a>'; $body_porlet .= '<span><i class="fa fa-phone"></i> ' . $client_phone . '</span>'; $body_porlet .= '<i class="fa fa-university blog-twiiter-icon"></i>'; $body_porlet .= '</div></div>'; $body_porlet .= '<p><b>Descripcion:</b></p>'; $body_porlet .= '<p class="">' . $mt_description . '</p>'; $body_porlet .= '</div></div>'; //SEGUNDO TAB -------------------------------------------------------------------------- $body_porlet .= '<div class="tab-pane" id="portlet_tab' . $p . '">'; $body_porlet .= '<div class="scroller">'; $body_porlet .= '<div class="row">'; $body_porlet .= '<div class="col-md-4">'; if ($user_image == null) { $user_image = "avatar.png"; } $body_porlet .= '<img src="' . FunctionsController::GetUrl("img/users/{$user_image}") . '" class="img-circle" width ="60" height="60" alt="">'; $body_porlet .= '</div>'; $body_porlet .= '<div class="col-md-8">'; $body_porlet .= '<h4><b>' . $user . '</b></h4>'; /**RECORDATORIO : SE LE CAMBIARA EL MAILTO POR NUESTRO SISTEMA DE CORREOS */ $body_porlet .= '<p><i class="fa fa-envelope-o"></i> <b><a href="mailto:' . $user_mail . '">' . current(explode("@", $user_mail)) . '</a></b></p>'; if ($type == 0) { //$select_users = $task->AsignTouser($id); $body_porlet .= '<div align="center">' . '<button onclick="alert();" type="button" class="btn btn-circle btn-primary">' . '<i class="fa fa-repeat"></i> Reasignar</button>' . '</div>'; } $body_porlet .= ''; $body_porlet .= '</div>'; $body_porlet .= '</div>'; $body_porlet .= '</div></div>'; /**TERCER TAB -----------------------------------------------------------------------------------------*/ $body_porlet .= '<div class="tab-pane" id="portlet_tab' . $q . '">'; $body_porlet .= '<div class="scroller">'; $body_porlet .= '</div></div>'; /* $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= ''; $body_porlet .= '';*/ $body_porlet .= '</div></div></div>'; /* * TABULACION PROBLEMA MATEMATICO * * si n = primero = 1 * entonces n = n+q dado q = ultimo * si p = segundo = 2 * entonces p = p+q dado q = ultimo * si q = ultimo * entonces q = q + q o el doble de su producto */ $n = $n + $q; $p = $p + $q; $q += $q; if ($i >= $max) { $i = 0; } else { $i++; } $portlet_array[$i][] = $body_porlet; } $paste_body = ""; for ($i = 0; $i < count($portlet_array); $i++) { $portlet_array[$i][] = "</div>"; $paste_body .= implode("", $portlet_array[$i]); } echo $paste_body; exit; }