当前位置: 首页>>代码示例>>PHP>>正文


PHP route::path方法代码示例

本文整理汇总了PHP中route::path方法的典型用法代码示例。如果您正苦于以下问题:PHP route::path方法的具体用法?PHP route::path怎么用?PHP route::path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在route的用法示例。


在下文中一共展示了route::path方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: con

 function get_options_fincas()
 {
     $con = new con();
     $msg = new messages();
     $rt = new route();
     $con->connect();
     //consultamos fincas desde la matriz ica
     if (isset($_SESSION["ses_id"])) {
         $qry = 'SELECT DISTINCT codfinca, municipio, depto FROM tbl_matriz_ica ORDER BY codfinca ASC';
         $res = mysql_query($qry);
         $item = " ";
         $script = "<script>\$(document).ready(function(){";
         while ($row_res = mysql_fetch_assoc($res)) {
             $item .= '
           <option value="' . $row_res["codfinca"] . '">' . $row_res["codfinca"] . ' (' . $row_res["municipio"] . ' - ' . $row_res["depto"] . ')</option>
     ';
             $script .= '';
         }
         $script .= '});</script>';
     } else {
         $rt->routing($rt->path("login"));
     }
     $html = '
     <select class="form-control valued" id="cod">
       ' . $item . '
     </select>
 ';
     $con->disconnect();
     return $script . $html;
 }
开发者ID:alchemixt99,项目名称:STL,代码行数:30,代码来源:supervisores.php

示例2: con

 function get_reports()
 {
     $con = new con();
     $msg = new messages();
     $rt = new route();
     $con->connect();
     //consultamos fincas
     if (isset($_SESSION["ses_id"])) {
         $qry = 'SELECT * FROM tbl_reporte_consecutivo ORDER BY rp_consecutivo DESC ';
         $res = mysql_query($qry);
         $item = " ";
         $script = "<script>\$(document).ready(function(){";
         while ($row_res = mysql_fetch_assoc($res)) {
             $item .= '
           <tr>
             <td>' . $row_res["rp_timestamp"] . '</td>
             <td>' . $row_res["rp_consecutivo"] . '</td>
             <td>' . $row_res["rp_causa"] . '</td>
           </tr>
     ';
             $script .= '';
         }
         $script .= '});</script>';
     } else {
         $rt->routing($rt->path("login"));
     }
     $html = '
       <table class="table table-striped table-hover ">
         <thead>
           <tr>
             <th>Fecha reporte</th>
             <th>Consecutivo</th>
             <th>Causa</th>
           </tr>
         </thead>
         <tbody>
           ' . $item . '
         </tbody>
       </table> 
 ';
     $con->disconnect();
     return $script . $html;
 }
开发者ID:alchemixt99,项目名称:STL,代码行数:43,代码来源:reportar.php

示例3: con

    function build_menu_aside()
    {
        $con = new con();
        $msg = new messages();
        $rt = new route();
        $con->connect();
        //consultamos sesión del usuario
        if (isset($_SESSION["ses_id"])) {
            $qry = 'SELECT * FROM tbl_modulos AS M
            INNER JOIN tbl_usuarios AS U
            INNER JOIN tbl_permisos AS P
            INNER JOIN tbl_per_x_usu AS PxU
            INNER JOIN tbl_permisos_x_modulo AS PxM
            WHERE M.mo_id = PxM.pxm_mo_id 
            AND PxM.pxm_pe_id = P.pe_id
            AND P.pe_id = PxU.pxu_pe_id
            AND PxU.pxu_us_id = U.us_id
            AND U.us_id = ' . $_SESSION["ses_id"] . ' LIMIT 1';
            $res = mysql_query($qry);
            $menuitem = " ";
            $script = "<script>\$(document).ready(function(){";
            while ($row_res = mysql_fetch_assoc($res)) {
                $cargo = $row_res['pe_descripcion'];
                $nombre = $row_res['us_nombre'];
                //si es superadmin, le habilitamos el menú de gestión de usuarios y permisos
                switch ($row_res['pe_permiso']) {
                    case 1:
                        //superAdmin
                        $script .= '$("#usuarios").on("click", function(){$(location).attr("href","../users/users.php"); });';
                        $script .= '$("#reportar").on("click", function(){$(location).attr("href","../reportar/reportar.php"); });';
                        $menuitem .= '<li><a href="#" id="usuarios" class=""><i class="md md-user"></i>Usuarios</a></li>';
                        $menuitem .= '<li><a href="#" id="reportar" class=""><i class="md md-user"></i>Reportar Consecutivo</a></li>';
                        $icon = '<a href="#" class="btn btn-floating-mini btn-warning" title="' . $row_res['pe_descripcion'] . '" data-ripple-centered=""><i class="md md-account-circle"></i></a>';
                        break;
                    case 2:
                        //Jefeop
                        $icon = '<a href="#" class="btn btn-floating-mini btn-primary" title="' . $row_res['pe_descripcion'] . '" data-ripple-centered=""><i class="md md-account-circle"></i></a>';
                        break;
                    case 3:
                        //Digit
                        $icon = '<a href="#" class="btn btn-floating-mini btn-success" title="' . $row_res['pe_descripcion'] . '" data-ripple-centered=""><i class="md md-account-circle"></i></a>';
                        break;
                    case 4:
                        //Gerente
                        $icon = '<a href="#" class="btn btn-floating-mini btn-warning" title="' . $row_res['pe_descripcion'] . '" data-ripple-centered=""><i class="md md-account-circle"></i></a>';
                        break;
                    default:
                        $menuitem = "";
                        break;
                }
                /*$tipo_us = $row_res['pxu_pe_id'];
                  //$menuitem.='<li><a href="'.$row_res['mo_ruta'].'" class="">'.$row_res['mo_nombre'].'</a></li>';
                  $menuitem.='<li><a href="#" id="'.$row_res['mo_nombre'].'" class="">'.$row_res['mo_descripcion'].'</a></li>';
                  $script.='$("#'.$row_res['mo_nombre'].'").on("click", function(){$(location).attr("href","'.$row_res['mo_ruta'].'"); });';
                  */
            }
            $script .= '});</script>';
        } else {
            $rt->routing($rt->path("login"));
        }
        $html = '
	    <nav class="navbar-panel">
	      <div class="header container-fluid mtr-cyan-900">
	        <div class="row">
	          <div class="col-xs-12">
              <h1 style="text-align:center; padding-top:6px; margin-bottom: 6px;">' . $icon . '</h1>
              <h4 style="margin-top: 1px;"><b>' . $nombre . '</b> <br> <span style="font-style:italic; font-size:13px;">' . $cargo . '<span></h4>
              <h4></h4>
	          </div>
	        </div>
	      </div>

	      <div class="content mtr-grey-100">
	        <ul class="nav">
            ' . $menuitem . '
	          <li><a href="#" id="btn_logout">Salir</a></li>
	        </ul>
	      </div>
	    </nav>
    ';
        $con->disconnect();
        return $script . $html;
    }
开发者ID:alchemixt99,项目名称:STL,代码行数:83,代码来源:aside_menu.php

示例4: con

 function get_fincas_list()
 {
     $con = new con();
     $msg = new messages();
     $rt = new route();
     $con->connect();
     //consultamos fincas desde la tabla de fincas
     if (isset($_SESSION["ses_id"])) {
         $qry = 'SELECT * FROM tbl_fincas WHERE fi_estado=1 ORDER BY fi_id ASC';
         $res = mysql_query($qry);
         $item = " ";
         $script = "<script>\$(document).ready(function(){";
         while ($row_res = mysql_fetch_assoc($res)) {
             $item .= '
           <option value="' . $row_res["fi_id"] . '">' . $row_res["fi_codigo"] . '</option>
     ';
             $script .= '';
         }
         $script .= '});</script>';
     } else {
         $rt->routing($rt->path("login"));
     }
     $html = '
     <select class="form-control valued" id="cod">
       <option>Seleccione</option>
       ' . $item . '
     </select>
 ';
     $con->disconnect();
     return $script . $html;
 }
开发者ID:alchemixt99,项目名称:STL,代码行数:31,代码来源:inventarios.php

示例5: json_encode

<?php

session_start();
session_unset();
//borro todas las variables de session
session_destroy();
//destruyo la sesion
include "../mods/route.php";
$e = new route();
$response = new StdClass();
$response->res = true;
$response->mes = $e->path("login");
echo json_encode($response);
?>
 
开发者ID:alchemixt99,项目名称:STL,代码行数:14,代码来源:logout.php

示例6: con

 function get_options_vehiculos($id = 'cod_prop')
 {
     $con = new con();
     $msg = new messages();
     $rt = new route();
     $con->connect();
     //consultamos fincas desde la matriz ica
     if (isset($_SESSION["ses_id"])) {
         $qry = 'SELECT DISTINCT ve_id, ve_placa, ve_capacidad_m3 FROM tbl_vehiculos WHERE ve_estado=1 ORDER BY ve_placa ASC';
         $res = mysql_query($qry);
         $item = " ";
         $script = "<script>\$(document).ready(function(){";
         while ($row_res = mysql_fetch_assoc($res)) {
             $item .= '
           <option value="' . $row_res["ve_id"] . '">' . $row_res["ve_placa"] . ' (Capacidad: ' . $row_res["ve_capacidad_m3"] . ' m<sup>3</sup>)</option>
     ';
             $script .= '';
         }
         $script .= '});</script>';
     } else {
         $rt->routing($rt->path("login"));
     }
     $html = '
     <select class="form-control valued" id="' . $id . '">
       ' . $item . '
     </select>
 ';
     $con->disconnect();
     return $script . $html;
 }
开发者ID:alchemixt99,项目名称:STL,代码行数:30,代码来源:vehiculos.php

示例7: con

    function build_menu()
    {
        $con = new con();
        $msg = new messages();
        $rt = new route();
        $con->connect();
        //consultamos sesión del usuario
        if (isset($_SESSION["ses_id"])) {
            $qry = 'SELECT * FROM tbl_modulos AS M
            INNER JOIN tbl_usuarios AS U
            INNER JOIN tbl_permisos AS P
            INNER JOIN tbl_per_x_usu AS PxU
            INNER JOIN tbl_permisos_x_modulo AS PxM
            WHERE M.mo_id = PxM.pxm_mo_id 
            AND PxM.pxm_pe_id = P.pe_id
            AND P.pe_id = PxU.pxu_pe_id
            AND PxU.pxu_us_id = U.us_id
            AND U.us_id = ' . $_SESSION["ses_id"];
            $res = mysql_query($qry);
            $menuitem = " ";
            $script = "<script>\$(document).ready(function(){";
            while ($row_res = mysql_fetch_assoc($res)) {
                $tipo_us = $row_res['pxu_pe_id'];
                //$menuitem.='<li><a href="'.$row_res['mo_ruta'].'" class="">'.$row_res['mo_nombre'].'</a></li>';
                $menuitem .= '<li><a href="#" id="' . $row_res['mo_nombre'] . '" class="">' . $row_res['mo_descripcion'] . '</a></li>';
                $script .= '$("#' . $row_res['mo_nombre'] . '").on("click", function(){$(location).attr("href","' . $row_res['mo_ruta'] . '"); });';
            }
            $script .= '});</script>';
        } else {
            $rt->routing($rt->path("login"));
        }
        //generamos menú tipo dropdown para el usuario gerente
        if ($tipo_us == 1) {
            $dropdown = '<li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Gestionar <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                    ' . $menuitem . '
                    </ul>
                  </li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Reportes <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                      <li><a onclick="reporte(1)" target="_blank" id="" class="">Reporte de Consecutivos ICA generados</a></li>              
                      <li><a onclick="reporte(2)" target="_blank" id="" class="">Reporte de Despachos Generados</a></li>
                    </ul>
                  </li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Programación (Cronjobs) <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                      <li><a onclick="go_cj_r()" target="">Despachos</a></li>              
                      <li><a onclick="go_cj_i()" target="">Consecutivos ICA</a></li>              
                    </ul>
                  </li>';
            $menuitem = $dropdown;
        }
        $html = '
            <nav class="navbar navbar-inverse">
              <div class="container-fluid">
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </button>
                </div>

                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
                  <ul class="nav navbar-nav">
                  ' . $menuitem . '
                  </ul>
                  <ul class="nav navbar-nav navbar-right">
                    
                    <li><a href="#" id="reloj">fecha / hora</a></li>
                  </ul>
                </div>
              </div>
            </nav>
    ';
        $con->disconnect();
        return $script . $html;
    }
开发者ID:alchemixt99,项目名称:STL,代码行数:82,代码来源:app_menu.php

示例8: con

 function get_rfisicas()
 {
     $con = new con();
     $msg = new messages();
     $rt = new route();
     $con->connect();
     //consultamos fincas
     if (isset($_SESSION["ses_id"])) {
         $qry = 'SELECT * FROM tbl_remisiones_fisicas ORDER BY rf_estado DESC ';
         $res = mysql_query($qry);
         $item = " ";
         $script = "<script>\$(document).ready(function(){";
         while ($row_res = mysql_fetch_assoc($res)) {
             $denominador = $row_res["rf_dig_fin"] - $row_res["rf_dig_ini"];
             //calculamos porcentaje de uso
             if ($denominador > 0) {
                 $porcentaje = $row_res["rf_cant_usados"] * 100 / $denominador;
             } else {
                 $porcentaje = 0;
             }
             //echo "datos: <br> -usados: ".$row_res["rf_cant_usados"]."<br>-fin: ".$row_res["rf_dig_fin"]."<br>-ini: ".$row_res["rf_dig_ini"];
             //boton de activacion/desactivación
             if ($row_res["rf_estado"] == 1) {
                 $btn = '<div id="act-button" style="display:" onclick="change(1, ' . $row_res['rf_id'] . ')" class="btn btn-floating-mini btn-success" title="Activar Paquete"><i class="md  md-done"></i></div>
               <div id="des-button" style="display:none" onclick="change(2, ' . $row_res['rf_id'] . ')" class="btn btn-floating-mini btn-warning" title="Desactivar Paquete"><i class="md  md-close"></i></div>';
             } else {
                 $btn = '<div id="act-button" style="display:none" onclick="change(1, ' . $row_res['rf_id'] . ')" class="btn btn-floating-mini btn-success" title="Activar Paquete"><i class="md  md-done"></i></div>
               <div id="des-button" style="display:" onclick="change(2, ' . $row_res['rf_id'] . ')" class="btn btn-floating-mini btn-warning" title="Desactivar Paquete"><i class="md  md-close"></i></div>';
             }
             $btn_edt = '<div id="act-button" onclick="load_row(' . $row_res['rf_id'] . ')" class="btn btn-floating-mini btn-info" title="Modificar Paquete"><i class="md  md-edit"></i></div>';
             //--
             $item .= '
           <tr>
             <td>' . $row_res["rf_timestamp"] . '</td>
             <td>' . $row_res["rf_persona_entrega"] . '</td>
             <td>' . $row_res["rf_interventor"] . '</td>
             <td>' . $row_res["rf_dig_ini"] . '</td>
             <td>' . $row_res["rf_dig_fin"] . '</td>
             <td><div class="progress progress-striped active">
                   <div class="progress-bar" title="' . $row_res["rf_cant_usados"] . '  (' . $porcentaje . '%)" style="width: ' . $porcentaje . '%; height:10px;"></div>
                 </div>
             </td>
             <td>
             ' . $btn_edt . $btn . '
             </td>
           </tr>
     ';
             $script .= '';
         }
         $script .= '});</script>';
     } else {
         $rt->routing($rt->path("login"));
     }
     $html = '
       <table class="table table-striped table-hover ">
         <thead>
           <tr>
             <th>Fecha Registro</th>
             <th>Recibido</th>
             <th>Interventor</th>
             <th>Inicia</th>
             <th>Termina</th>
             <th>Usados</th>
             <th>Acciones</th>
           </tr>
         </thead>
         <tbody>
           ' . $item . '
         </tbody>
       </table> 
 ';
     $con->disconnect();
     return $script . $html;
 }
开发者ID:alchemixt99,项目名称:STL,代码行数:74,代码来源:rfisicas.php

示例9: con

    function get_personas()
    {
        $con = new con();
        $msg = new messages();
        $rt = new route();
        $con->connect();
        //consultamos Inventarios
        if (isset($_SESSION["ses_id"])) {
            $qry = 'SELECT * FROM tbl_personas 
            WHERE pe_estado BETWEEN 1 AND 2 ORDER BY pe_nombre ASC';
            $res = mysql_query($qry);
            $item = " ";
            $script = "<script>\$(document).ready(function(){";
            while ($row_res = mysql_fetch_assoc($res)) {
                if ($row_res["pe_tipo"] == 1) {
                    $lic = '';
                } else {
                    $lic = $row_res["pe_licencia"] . ' - (' . $row_res["pe_licencia_vigencia"] . ')';
                }
                $btn_des = "des_persona('" . $row_res["pe_id"] . "',this)";
                $btn_act = "act_persona('" . $row_res["pe_id"] . "',this)";
                $btn_del = "del_persona('" . $row_res["pe_id"] . "',this)";
                if ($row_res["pe_estado"] == 1 && $row_res["pe_tipo"] != 1) {
                    $btn_set = '<div id="edt-button" style="display:none;" onclick="" class="btn btn-floating-mini btn-success" title="Modificar"><i class="md  md-edit"></i></div>
                      <div id="des-button" onclick="' . $btn_des . '" class="btn btn-floating-mini btn-warning" title="Deshabilitar"><i class="md  md-visibility-off"></i></div>
                      <div id="del-button" onclick="' . $btn_del . '" class="btn btn-floating-mini btn-danger" title="Borrar"><i class="md  md-delete"></i></div>';
                } elseif ($row_res["pe_estado"] == 2 && $row_res["pe_tipo"] != 1) {
                    $btn_set = '<div id="edt-button" style="display:none;" onclick="" class="btn btn-floating-mini btn-success" title="Modificar"><i class="md  md-edit"></i></div>
                      <div id="act-button" onclick="' . $btn_act . '" class="btn btn-floating-mini btn-warning" title="Habilitar"><i class="md  md-visibility"></i></div>
                      <div id="del-button" onclick="' . $btn_del . '" class="btn btn-floating-mini btn-danger" title="Borrar"><i class="md  md-delete"></i></div>';
                } else {
                    $btn_set = '<div id="edt-button" style="display:none;" onclick="" class="btn btn-floating-mini btn-success" title="Modificar"><i class="md  md-edit"></i></div>
                      <div id="del-button" onclick="' . $btn_del . '" class="btn btn-floating-mini btn-danger" title="Borrar"><i class="md  md-delete"></i></div>';
                }
                $item .= '
              <tr id="' . $row_res["pe_cedula"] . '">
                <td>' . $row_res["pe_cedula"] . '</td>
                <td>' . $row_res["pe_nombre"] . '</td>
                <td>' . $row_res["pe_tel"] . ' - ' . $row_res["pe_cel"] . '</td>
                <td>' . $row_res["pe_dir"] . '</td>
                <td>' . $lic . '</td>
                <td>
                  ' . $btn_set . '
                </td>
              </tr>

        ';
                switch ($row_res["pe_estado"]) {
                    case 2:
                        $script .= '$("#' . $row_res["pe_cedula"] . '").addClass("danger");';
                        break;
                }
                $script .= '$("#' . $row_res["pe_cedula"] . '").addClass();';
            }
            $script .= '});</script>';
        } else {
            $rt->routing($rt->path("login"));
        }
        $html = '
          <table class="table table-striped table-hover ">
            <thead>
              <tr>
                <th>Cédula</th>
                <th>Nombre</th>
                <th>Tel - Cel</th>
                <th>Domicilio</th>
                <th>Licencia</th>
                <th>Acciones</th>
              </tr>
            </thead>
            <tbody>
              ' . $item . '
            </tbody>
          </table> 
    ';
        $con->disconnect();
        return $script . $html;
    }
开发者ID:alchemixt99,项目名称:STL,代码行数:78,代码来源:personas.php


注:本文中的route::path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。