Ejemplo n.º 1
0
        require_once '' . TEFunctionsPath . 'ClassTableEditor.php';
        $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
        mysql_select_db(DB_NAME);
        $editor = new TableEditor($link, $table);
        if (TEditorActions == true) {
            $ActionButtons = 1;
        } else {
            $ActionButtons = 0;
        }
        $editor->setConfig('allowView', $ActionButtons);
        $editor->setConfig('allowAdd', $ActionButtons);
        $editor->setConfig('allowEdit', $ActionButtons);
        $editor->setConfig('allowCopy', $ActionButtons);
        $editor->setConfig('allowDelete', $ActionButtons);
        $editor->setConfig('perPage', 20);
        if (!valida_acceso($table)) {
            ?>
	  <script language="javascript">
	  	 alert("Usted no tiene privilegios a este módulo");
	     history.back(1);
      </script>
	<?php 
        }
        if (file_exists(TEditorPath . 'TE_TODAS_LAS_TABLAS_javascript_inicio.php')) {
            include TEditorPath . 'TE_TODAS_LAS_TABLAS_javascript_inicio.php';
        }
        if (file_exists(TEditorPath . 'TE_TODAS_LAS_TABLAS_colores.php')) {
            include TEditorPath . 'TE_TODAS_LAS_TABLAS_colores.php';
        }
        include '' . TEIncludesPath . 'TEFieldsRequired.php';
        // Obtenemos campos requeridos de la tabla...
Ejemplo n.º 2
0
    if (valida_acceso("REPORTES/Reporte de servicios")) {
        $LeftMenu .= TEColumnLeftSubMenu('Reporte de servicios', 'Reporte de servicios', TEditorUrl . '&table=&seccion=reportes&rep=esp1', '../../' . TEImagesPath . 'query.png');
    }
    if (valida_acceso("REPORTES/Reporte de servicios detalle")) {
        $LeftMenu .= TEColumnLeftSubMenu('Reporte de servicios detalle', 'Reporte de detalles', TEditorUrl . '&table=&seccion=reportes&rep=esp2', '../../' . TEImagesPath . 'query.png');
    }
    $LeftMenu .= TEColumnLeftSubMenu('Reporte de servicios para facturar', 'Reporte de detalles', TEditorUrl . '&table=&seccion=reportes&rep=esp3', '../../' . TEImagesPath . 'query.png');
    $LeftMenu .= '</table>';
    $LeftMenu .= '</span>';
}
if (valida_acceso("USUARIOS")) {
    $IdMenu++;
    $LeftMenu .= TEColumnLeftMenu('USUARIOS', 'USUARIOS', 'SwitchMenu(\'sub' . $IdMenu . '\')', '../../' . TEImagesPath . 'menu_usuarios.gif');
    $LeftMenu .= '<span class="submenu" id="sub' . $IdMenu . '">';
    $LeftMenu .= '<table cellpadding="0" cellspacing="0" align="center" width="90%" style="background-color:#ffffff; border-top:2px solid #b2b2b2;  border-left:2px solid #b2b2b2;">';
    if (valida_acceso("USUARIOS/Agregar usuario")) {
        $LeftMenu .= TEColumnLeftSubMenu('Agregar usuario', 'Agregar nuevo usuario', TEditorUrl . '&table=te_usuarios&add=1', '../../' . TEImagesPath . 'usuarioadd.gif');
    }
    if (valida_acceso("Usuarios/Listar usuarios")) {
        $LeftMenu .= TEColumnLeftSubMenu('Listar usuarios', 'Lista de usuarios', TEditorUrl . '&table=te_usuarios', '../../' . TEImagesPath . 'lista.png');
    }
    if (valida_acceso("USUARIOS/Tipos de usuario")) {
        $LeftMenu .= TEColumnLeftSubMenu('Tipos de usuarios', 'Tipos de usuarios', TEditorUrl . '&table=te_usuarios_tipos', '../../' . TEImagesPath . 'tiposusuario.png');
    }
    $LeftMenu .= '</table>';
    $LeftMenu .= '</span>';
}
// END SAMPLE
?>

Ejemplo n.º 3
0
<table border="1" height="600" align="center" bordercolor="#EBEBEB" cellpadding="10" cellspacing="10">
<?php 
$aux = consulta("select max(COORDENADA_X) as X, max(COORDENADA_Y) as Y from te_c_accesos_rapidos  ");
echo "<tr><td align=center width=150>";
for ($j = 1; $j <= $aux["Y"]; $j++) {
    for ($i = 1; $i <= $aux["X"]; $i++) {
        $conta++;
        $acc = consulta("select * from te_c_accesos_rapidos where COORDENADA_X='" . $i . "' and COORDENADA_Y='" . $j . "' and ESTATUS='Activo' ");
        if (!valida_acceso($acc["LINK"])) {
            continue;
        }
        if ($acc["IMAGEN"] != "") {
            echo "<a href='?table=" . $acc["LINK"] . "'><img border=0 width=50 src=" . TEImagesPath . $acc["IMAGEN"] . " alt='" . $acc["DESCRIPCION"] . "'></a>";
            echo "<br>";
            echo $acc["NOMBRE"];
            if ($acc["TIPO"] = "Tabla") {
                ?>
			  <table border="0">
				<tr>
				  <td>
                    <a href="?table=<?php 
                echo $acc["LINK"];
                ?>
&add=1"><img src="<?php 
                echo TEImagesPath;
                ?>
TEActionAdd.gif" width="25" border="0" alt="Agregar <?php 
                echo $acc["NOMBRE"];
                ?>
"></a>
				  </td>