예제 #1
0
    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>';
    }
예제 #2
0
파일: test.php 프로젝트: E89son/LieisonCMS
<?php

include '../../../../Conf/Include.php';
set_dependencies(array("LogsController"));
$dir = FunctionsController::GetRootUrl("task");
echo $dir . "<br>";
if ($dir) {
    echo "existe";
} else {
    echo "no existe";
}
$log = new LogsController("../../task/");
$log->SetLog("prueba");
$log->CloseLog();
예제 #3
0
     $action_form .= '<span>&nbsp&nbsp<b>NO SE HA INICIADO LA BITACORA</b>' . '&nbsp&nbsp<img src="../img/assert/flechaderecha_naranja.png" width="50" height="20" />' . '&nbsp&nbsp&nbsp<b>INICIE EL PROCESO</b> </span>';
     $action_form .= "</div>";
     $action_form .= '</div>';
 } else {
     //IMPRIMIMOS LOS LOGS
     $action_form_button = "<button class='btn green' onclick='InsertBitacora(" . $sales->GetIdBitacora($prospect_data['id_prospect']) . ',"' . UserController::GetIDUser() . '"' . ");'><i class='fa fa-plus'></i></button>";
     //OBTENEMOS LOS VALORES DE LA BITACORA ANTES DE IMPRIMIRLOS 'POR LOGICA'
     $result_bitacora = $sales->GetBitacora($prospect_data['id_prospect']);
     $action_form .= '<div class="scroller" style="height: 430px;" ' . 'data-always-visible="1" data-rail-visible1="0" data-handle-color="#D7DCE2">' . '<div class="general-item-list class_tbody_bitacora" id="bitacora_seccion">';
     foreach ($result_bitacora as $kb => $vb) {
         $action_form .= '<div class="item class_tr_bitacora">';
         $action_form .= '<div class="item-head">';
         $action_form .= '<div class="item-details">';
         $action_form .= '<img class="item-pic" src="../img/users/' . $vb['avatar'] . '">';
         $action_form .= '<a href="" class="item-name primary-link">' . $vb['name'] . '</a>';
         $action_form .= '<span class="item-label">' . FunctionsController::Get_TimeAgo($vb['date'] . " " . $vb['hour']) . '</span>';
         $action_form .= '</div>';
         $action_form .= '<span class="item-status">' . '<span class="badge badge-empty badge-success"></span>&nbsp&nbsp&nbsp&nbspTipo: ' . $vb['title_type'] . '</span>';
         $action_form .= '</div>';
         $action_form .= '<div class="item-body">';
         $action_form .= '<b>' . $vb['title'] . ':</b>';
         $action_form .= '&nbsp&nbsp' . $vb['description'];
         $action_form .= '</div>';
         $action_form .= '</div>';
     }
     /* $action_form .= '<div class="item">
     		<div class="item-head">
     		<div class="item-details">
     		</div>
     		</div>
     		<div class="item-body">
예제 #4
0
        if ($id == 68 && $exist_country == FALSE) {
            $values .= "<option selected value='{$id}'>{$nombre}</option>";
        } elseif ($exist_country == true && $id == $_REQUEST['country']) {
            $values .= "<option selected value='{$id}'>{$nombre}</option>";
        } else {
            $values .= "<option value='{$id}'>{$nombre}</option>";
        }
    }
    $values .= "</select>";
    unset($paises);
    echo $values;
} else {
    $prospect = new ProspectController();
    $data = $prospect->Get_Prospect_ById($_REQUEST['id']);
    $id_pais = $data['id_pais'];
    $paises = FunctionsController::get_paises();
    $values = '<select id="combo_pais" name="combo_pais" class="form-control">';
    foreach ($paises as $key => $value) {
        $id = $value['id'];
        $nombre = $value['nombre'];
        if ($id == $id_pais && $exist_country == FALSE) {
            $values .= "<option selected value='{$id}'>{$nombre}</option>";
        } elseif ($exist_country == true && $id == $_REQUEST['country']) {
            $values .= "<option selected value='{$id}'>{$nombre}</option>";
        } else {
            $values .= "<option value='{$id}'>{$nombre}</option>";
        }
    }
    $values .= "</select>";
    unset($paises);
    echo $values;
예제 #5
0
 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>&nbsp&nbsp';
         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);
     }
 }
예제 #6
0
 public function set_contract($id_contrato)
 {
     $fecha = FunctionsController::get_date();
     $update = parent::Update("contrato", array("aceptado" => "1", "fecha_contrato" => $fecha), "id_contrato LIKE {$id_contrato}");
     return $update;
 }
예제 #7
0
*@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';
set_dependencies(array("ProspectController", "AdminController"));
$prospecto = new ProspectController();
$arrayp = array("nombre" => $_REQUEST['nombre'], "direccion" => $_REQUEST['direccion1'], "direccion2" => $_REQUEST['direccion2'], "provincia" => $_REQUEST['provincia'], "ciudad" => $_REQUEST['ciudad'], "id_pais" => $_REQUEST['pais'], "zip" => $_REQUEST['zip'], "telefono" => $_REQUEST['telefono'], "fax" => $_REQUEST['fax'], "pagina_web" => $_REQUEST['web'], "email" => $_REQUEST['mail'], "facebook" => $_REQUEST['facebook'], "twitter" => $_REQUEST['twitter'], "notas" => $_REQUEST['notas'], "fecha" => FunctionsController::get_date(), "estado" => 1);
echo $prospecto->Add_Prospect($arrayp);
예제 #8
0
														<label class="control-label">Nueva Contraseña</label>
                                                                                                                <input name="txt_new_pass"  id="txt_new_pass" type="password" class="form-control"/>
													</div>
													<div class="form-group">
														<label class="control-label">Repetir Nueva Contraseña</label>
                                                                                                                <input name="txt_new_pass2"  id="txt_new_pass2" type="password" class="form-control" onkeyup="comparar();"/>
													</div>
                                                                                                    <div class="margin-top-10" id="cmd_password">
                                                                                                        <input type="submit" name="password_enviar"   value="Cambiar Contraseña" class="btn green-haze" />
													</div>
												</form>
											</div>
											<!-- END CHANGE PASSWORD TAB -->
											<!-- PRIVACY SETTINGS TAB -->
                                                                                         <?php 
$contrato = $user_controller->find_contract(FunctionsController::GetRootUrl("admin/files/manifiest"));
?>
                                                                                        
											<div class="tab-pane" id="tab_1_4">
                                                                                            <label>Tus Contratos</label>
													<table class="table table-light table-hover">
													
                                                                                                            <?php 
if (count($contrato) == 0) {
    echo "<tr><td>No Exiten contratos </td></tr>";
}
foreach ($contrato as $k => $v) {
    echo "<tr>";
    echo "<td>" . $v['nombre'] . "</td>";
    if ($v['aceptado'] != 0) {
        echo "<td><label class='uniform-inline'>Contrato Aceptado</td>";
예제 #9
0
파일: box.php 프로젝트: E89son/LieisonCMS
 * ?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>";
예제 #10
0
    $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) {
        $data .= substr(htmlspecialchars_decode($value['mensaje']), 0, 60) . ' (...)';
    } else {
        $data .= $value['mensaje'];
    }
    $data .= '</span>';
    $data .= '</a>';
    $data .= '</li>';
}
$array_['inbox'] = array("data" => $data);
$json = new SivarApi\Tools\Services_JSON();
echo $json->encode($array_);
예제 #11
0
<?php

include '../../../Conf/Include.php';
$fontend = new FrontEndController();
date_default_timezone_set('UTC');
$anio = FunctionsController::get_year();
$visitas = $fontend->GetWebvisits($anio);
if (count($visitas) == 0) {
    exit;
}
$arreglo_datos = array();
$i = 0;
foreach ($visitas as $key => $value) {
    $numero = $value['numero'];
    $mes = $value['mes'];
    $anio = $value['anio'];
    $fecha = "{$mes}/{$anio}";
    $arreglo_datos[$i] = array($fecha, $numero);
    $i++;
}
echo json_encode($arreglo_datos);
*@version 1.0
*@todo Lieison S.A de C.V 
*/
include '../../../Conf/Include.php';
set_dependencies(array("ProspectController", "AdminController"));
Session::InitSession();
$login = Session::GetSession("login");
$rol = $login['rol'];
//VARIABLES DE SESION , CAMBIO EN EL VISTA
Session::InsertSession("page_name", "Admin Prospectos");
Session::InsertSession("home", "Sales");
Session::InsertSession("title", "Sales: <b> Administrar Prospectos</b>");
//CONTROLADOR DEL ADMINISTRADOR
$adminc = new AdminController();
//OBTIENE LOS PERMISOS MEDIANTE EL ROL INDICADO
$adminc->Get_Permission($rol, FunctionsController::get_actual_page(), AdminController::get_option_permission(), array("admin", "Sales"));
//HEADER , CABECERA DONDE SE INICIARA ELEMENTOS NECESARIOS PARA ESTE SCRIPT
$header .= '<link href="../../assets/admin/pages/css/timeline.css" rel="stylesheet" type="text/css"/>';
$header .= '<link rel="stylesheet" type="text/css" href="../../assets/global/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.css"/>';
//BODY , SE INCLUIRA LA ESTRUCTURA QUE ESTA DENTRO DE ViewAdminProspecto
$body = "<?php include 'ViewAdminProspecto.php' ?>";
//FOOTER , SE INCLUIRAN EN EL PIE DE PAGINA PERO
// ESTOS DATOS SOLO DEBE SER FUNCIONES
$footer = 'FormValidation.init();';
$footer .= 'cargar_prospectos();';
$footer .= 'cargar_entradas();';
//AL FINAL DEL FOOTER SE INCLUIRAN LOS JS NECESARIOS PARA QUE FUNCIONE EL SCRIPT ADECUADAMENTE
$footer_end = '<script src="AjaxAdminSales.js"></script>';
$footer_end .= '<script src="../js/notify.js"></script>';
$footer_end .= '<script src="../js/bootbox.js"></script>';
$footer_end .= '<script src="../js/bootbox.min.js"></script>';
예제 #13
0
 public function get_dashboard_pages()
 {
     return FunctionsController::get_directory_tree("admin", array("name" => "dashboard", "extend" => "php"));
 }
예제 #14
0
 if ($value['Uid'] != $id_user) {
     $img_data = "";
     if (\SivarApi\Tools\Validation::Is_Empty_OrNull($value['Uimg'])) {
         $img_data = "avatar.png";
     } else {
         $img_data = $value['Uimg'];
     }
     $print .= '<img class="timeline-badge-userpic" src="../img/users/' . $img_data . '">';
 } else {
     $print .= '<div class="timeline-icon">';
     $print .= '<i class="icon-ghost font-green-haze"></i>';
     $print .= '</div>';
 }
 $print .= '</div>';
 $print .= '<div class="timeline-body">';
 $time_ago = FunctionsController::Get_TimeAgo($value['date'] . " " . $value['hour']);
 $print .= '<div class="timeline-body-arrow"></div>';
 $print .= '<div class="timeline-body-head">';
 $print .= '<div class="timeline-body-head-caption">';
 $print .= '<a href="#" class="timeline-body-title font-blue-madison">' . $value['Uname'] . '</a>';
 $print .= '<span class="timeline-body-time font-grey-cascade">' . $time_ago . '</span>';
 $print .= '</div>';
 $print .= '</div>';
 $print .= '<div class="timeline-body-head-actions">';
 $print .= '';
 $print .= '</div>';
 $print .= '<div class="timeline-body-content">';
 $print .= '<span class="font-grey-cascade">';
 if ($value['Uid'] == $id_user) {
     $print .= '<b>Tú</b> Entrastes A <b>  ' . $value['Pname'] . '</b> Aproximadamente&nbsp&nbsp(' . $time_ago . ')';
 } else {
예제 #15
0
/**
* 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>&nbsp;';
        /**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>&nbsp;&nbsp;<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>&nbsp;Accion</a>' . '</label>&nbsp;<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>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;<b>Cliente:</b>&nbsp;' . $client_name . ' </p>';
        $body_porlet .= '<i class="fa fa-envelope-o"></i>&nbsp;&nbsp;<a href="">' . $client_mail . '</a>';
        $body_porlet .= '<span><i class="fa fa-phone"></i>&nbsp;&nbsp;' . $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>&nbsp;<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;
}
예제 #16
0
파일: index.php 프로젝트: E89son/LieisonCMS
* 
*@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
 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
' . '</style>';
//BODY , SE INCLUIRA LA ESTRUCTURA QUE ESTA DENTRO DE ViewAdminProspecto
예제 #17
0
<?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");
예제 #18
0
    $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);
    $log->SetLog($error);
    $log->CloseLog();
} catch (PDOException $ex) {
    $error = "(" . FunctionsController::get_date() . ")";
    $error .= "(" . FunctionsController::get_time() . ")";
    $error .= "(ERROR==>" . $ex->getMessage() . ")";
    $dir = "../../task/logs/";
    $log = new LogsController($dir);
    $log->SetLog($error);
    $log->CloseLog();
}
unset($task);
예제 #19
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));
}
}
$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;*/
?>

 

    <!--[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 -->
예제 #21
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
}
예제 #22
0
 public function InstallController($controller_name, $path = null)
 {
     $path_controller = FunctionsController::GetRootUrl("Controllers", true);
     $clean = str_replace("../", "", $path);
     $clean = str_replace("/", "", $clean);
     $dest_c = FunctionsController::GetRootUrl("admin/" . $clean);
     $dest_c .= "{$controller_name}";
     if (file_exists($path_controller)) {
         if (file_exists($path)) {
             if (@rename($dest_c, $path_controller . "{$controller_name}")) {
                 return true;
             } else {
                 return false;
             }
         }
     }
 }
예제 #23
0
 /**
  * --------------------------------------------------------------
  *  FUNCIONES DE PROSPECTO A CLIENTE 
  * --------------------------------------------------------------
  */
 public function CreateClient($id_prospect)
 {
     $prospect = $this->Get_Prospect_ById($id_prospect);
     if (count($prospect) <= 0) {
         return false;
     }
     $this->Set_MetaStatus(2, $id_prospect);
     $client = array("nombre" => $prospect['nombre'], "direccion" => $prospect['direccion'] . "," . " " . $prospect['direccion2'], "id_pais" => $prospect['id_pais'], "provincia" => $prospect['provincia'], "zip" => $prospect['zip'], "telefono" => $prospect['telefono'], "facebook" => $prospect['facebook'], "twitter" => $prospect['twitter'], "pagina_web" => $prospect['pagina_web'], "email" => $prospect['email'], "fax" => $prospect['fax'], "ciudad" => $prospect['ciudad'], "id_prospect" => $prospect['id_prospect'], "fecha" => FunctionsController::get_date(), "hora" => FunctionsController::get_time());
     return parent::Insert("sales_client", $client);
     //echo "<pre>";
     //print_r($client);
     // echo "</pre>";
 }
예제 #24
0
 public function SetSubmessage($id_message, $id_usuario, $mensaje)
 {
     return $this->Insert("lieisoft_submensajeria", array("id_mensajeria" => $id_message, "id_usuario" => $id_usuario, "mensaje" => $mensaje, "fecha" => FunctionsController::get_date(), "hora" => FunctionsController::get_time()));
 }
    $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");
    }
}
?>




<!--[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 -->
예제 #26
0
    $header->redirect("dashboard_add_prospecto.php");
}
$fb = $_REQUEST['txt_facebook'];
$tw = $_REQUEST['txt_twitter'];
?>
<!--[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 
AdminHeader::$relative_route = FunctionsController::GetContentUrl("Web/");
AdminHeader::GetTitle("Lieison Dashboard");
AdminHeader::GetMeta();
AdminHeader::GetCss();
?>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-quick-sidebar-over-content page-style-square"> 

<input type="hidden" value="<?php 
echo $_REQUEST['txt_nombre'];
?>
" id="nombre" />
<input type="hidden" value="<?php 
echo $_REQUEST['txt_direccion1'];