public function actionCerrarsesion()
 {
     $_REQUEST["XTPlantillaOpcion"] = 2;
     XTUtils::setSession("EMPUSERID", null);
     XTUtils::setSession("EMPTIPONOMBRE", null);
     XTUtils::setSession("EMPAVATAR", null);
     XTUtils::setSession("EMPNOMBRE_COMPLETO", null);
     XTUtils::setSession("EMPKEY", null);
     header("Location: index.php");
 }
Ejemplo n.º 2
0
 static function ValidaSessionBrowser()
 {
     if (XTVALIDABROWSER == "Y") {
         print "<script>if(window.name!='" . XTUtils::Session("XTWindID") . "') window.location='error401.html';</script>";
     }
 }
	<thead>
	<tr>
	<th scope="col" class="rounded-company">#</th>
	<th scope="col" class="rounded-company">
		<input type="checkbox" id="todos" name="todos" onchange="seleccionar_check(this.checked,'tablaform')">
	</th>
	<th scope="col" class="rounded">Tabla</th>
	<th scope="col" class="rounded">Vistas</th>
	<th scope="col" class="rounded">&nbsp;</th>
	</tr>
	</thead>
<?php 
for ($i = 0; $i < count($listado); $i++) {
    $fila = $listado[$i];
    $estilofila = $i % 2 == 0 ? 'row0' : 'row1';
    $i_item_pos = XTUtils::Request("xtpagcon") == '' ? 1 : XTUtils::Request("xtpagcon");
    $i_item_pos = $i + 1 + ($i_item_pos - 1) * XTRECORD_x_PAGES;
    ?>
	<tr class="<?php 
    echo $estilofila;
    ?>
">
		<td><?echo $i_item_pos?></td>
		<th scope="col" class="rounded-company">
		<input type="checkbox" id="tabla_$i" name="tabla[]" value="<?php 
    echo $fila[table_name];
    ?>
">
		</th>
		<td><b><?php 
    echo $fila[table_name];
Ejemplo n.º 4
0
      </header>
      <!-- Left side column. contains the logo and sidebar -->
      <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <!-- Sidebar user panel -->
          <div class="user-panel">
            <div class="pull-left image">
              <img src="<?php 
echo XTImages::getAvatar(XTUtils::Session("EMPAVATAR"));
?>
" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
              <p><?php 
echo ucwords(strtolower(XTUtils::Session("EMPNOMBRE_COMPLETO")));
?>
</p>
              <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
          </div>
          <!-- search form -->
          <form action="#" method="get" class="sidebar-form">
              <input type="text" name="q" class="form-control" id="searchinput" type="search" placeholder="Search...">
              
          </form>         
          <!-- /.search form -->
          <!-- sidebar menu: : style can be found in sidebar.less -->
          <ul id="searchlist"  class="sidebar-menu">
            <li class="header">MENU PRINCIPAL</li>
            <li class="<?php 
 static function Paginacion($total_registros, $parametros = array())
 {
     $config = XTConfig::singleton();
     $xtcom = XTUtils::Request("xtcom");
     $app = XTUtils::Request("app");
     $accion = XTUtils::Request("accion");
     $pagina = $parametros["pagina"];
     $params = $parametros["params"];
     $sFileName = $parametros["url"];
     $sFileName = $sFileName == "" ? "index.php" : $sFileName;
     $pagina = $pagina == "" ? XTUtils::Request("xtpagcon") : $pagina;
     $tam_paginacion = $parametros["tam_paginacion"];
     $params = "&{$params}";
     $pagina = $pagina == "" ? "1" : $pagina;
     if ($tam_paginacion == "") {
         $registros = XTRECORD_x_PAGES;
     } else {
         $registros = $tam_paginacion;
     }
     $total_paginas = ceil($total_registros / $registros);
     $sFileName = "{$sFileName}?app={$app}&xtcom={$xtcom}&accion={$accion}";
     echo "<table class='paging-table' style='width:100%'>";
     echo "<tfoot>\n";
     echo "<tr>";
     echo '	<th valign="middle" >';
     if ($total_registros) {
         echo "<div style='float:left'> Total Registros: {$total_registros}</div><div style='float:right'>";
         if ($pagina - 1 > 0) {
             echo "<a style=\"color:#2c4d79;text-decoration :none\" href='" . $sFileName . "&xtpagcon=" . ($pagina - 1) . $params . "'>Anterior</a> ";
         }
         if ($total_paginas < 10) {
             for ($i = 1; $i <= $total_paginas; $i++) {
                 if ($pagina == $i) {
                     echo "<strong style=\"font-size:14px\">" . $pagina . "</strong> ";
                 } else {
                     echo "<a style=\"color:#2c4d79\" href='" . $sFileName . "&xtpagcon=" . $i . $params . "'>{$i}</a> ";
                 }
             }
         }
         if ($pagina + 1 <= $total_paginas) {
             echo " <a style=\"color:#2c4d79;text-decoration :none\" href='" . $sFileName . "&xtpagcon=" . ($pagina + 1) . $params . "'>Siguiente</a>";
         }
         echo "</div>";
     }
     echo "</th>";
     echo "</tr>";
     echo "<tfoot>\n";
     echo "</table>";
 }