"> <td><?php echo utf8_encode($row['nombre']); ?> </td> <td class="tcentrado"><a href="<?php echo enlazar($_GET['arg1'] . "/editar/" . $row['id']); ?> "><img src="imagenes/editar.png" alt="editar" width="16" height="16" /></a></td> </tr> <?php } ?> </tbody> </table> <div style="padding-top: 10px; text-align: center;"> <!-- BOTON NUEVO --> <a class="boton_a bg_rojo" href="<?php echo enlazar($_GET['arg1'] . "/nueva"); ?> ">Nuevo Tipo</a> </div> <?php include "html/paginador.php"; ?> </div> <?php } } ?>
<?php $_SESSION['admin']=""; session_destroy(); session_unset(); header("Location: ".enlazar("login")); ?>
?> " idioma="es" iva="<?php echo $iva; ?> "></div> <?php if (!isset($_SESSION['admin'])) { include "includes/login.php"; } else { $patharch = "cli/"; if (!isset($_SESSION['admin'])) { header("Location: " . enlazar("login")); } //SI NO SE HA PASADO UN PRIMER ARGUMENTO SE LLAMA AL GESTOR GENERICO if (!isset($_GET['arg1']) or $_GET['arg1'] == "html") { header("Location: " . enlazar("gestor")); } //BUSCAMOS EL ARCHIVO QUE LE CORRESPONDE EN LA BBDD SEGUN EL PRIMER ARGUMENTO //PRIMERO BUSCAMOS EN LA TABLA DE LOS MENUS NORMALES $sqlzona = "SELECT txt, estatico, id, galeria\n \t\tFROM zkng_menu\n \t\tWHERE es = '" . $_GET['arg1'] . "'"; $rezona = mysql_query($sqlzona); //SI NO ENCONTRAMOS RESULTADOS BUSCAMOS EN LA TABLA DE MENUS DE ADMIN if (mysql_num_rows($rezona) == 0) { $sqlzona = "SELECT txt\n \t\t\tFROM zkng_menu_admin\n \t\t\tWHERE a_nombre = '" . $_GET['arg1'] . "'\n \t\t\tLIMIT 1"; $rezona = mysql_query($sqlzona); $patharch = "adm/"; //SI NO ENCONTRAMOS RESULTADOS BUSCAMOS EN LA TABLA DE MENUS DE FACTURACION if (mysql_num_rows($rezona) == 0) { $sqlzona = "SELECT txt, id\n\t \t\t\tFROM zkng_menu_fac\n\t \t\t\tWHERE es = '" . $_GET['arg1'] . "'\n\t \t\t\tLIMIT 1"; $rezona = mysql_query($sqlzona); $patharch = "fac/";
<tr> <td width="50%"><input type="text" name="user" value="Usuario" onclick="if(this.value=='Usuario')this.value='';" /></td> <td style="color: #FFFFFF; font-size: 20px;">|</td> <td width="50%"><input type="password" name="pass" /></td> </tr> <tr> <td colspan="2" style="padding: 30px 0px 0px; color: #CC0000;"><?php echo $error; ?> </td> <td style="padding-top: 30px; text-align: right"><input class="bg_lila" type="submit" name="submit" value="entrar"/></td> </tr> <tr> <td colspan="3" style="padding-top: 30px;"><a class="boton_a bg_lila" href="<?php echo enlazar("login/olvido"); ?> ">¿Olvidastes tu contraseña?</a></td> </tr> </table> <input type="hidden" name="accion" value="ok" /> <?php } ?> </form> </div> </td> <td></td> </tr> <tr><td colspan="3"></td></tr> </table>
mysql_query($sqlperfil); $aviso = "El perfil se ha modificado correctamente"; } else $aviso = "La contraseña actual no es la correcta"; ?> <div class="aviso1"><?php echo $aviso; ?></div> <?php } $sqlperfil = "SELECT * FROM zkng_admins WHERE nick = '".$_SESSION['admin']."' LIMIT 1"; $resultperfil = mysql_query($sqlperfil); $rowperfil =mysql_fetch_array($resultperfil) ?> <form id="perfil" action="<?php echo enlazar($_GET['arg1']); ?>" method="post"> <table class="formulario" align="center" cellpadding="0" cellspacing="2" border="0" width="50%"> <tr> <th>NICK</th> <td><?php echo $rowperfil['nick']; ?></td> </tr> <tr> <th>CONTRASEÑA ACTUAL</th> <td><input title="Contraseña antigua" class="obligatorio" type="password" name="passold" value="" style="width: 98%;" /></td> </tr> <tr> <th>NUEVA CONTRASEÑA</th> <td><input id="pass" title="contraseña" type="password" name="pass" style="width: 98%;" /></td> </tr> <tr> <th>NUEVA CONTRASEÑA (rep)</th>
?> </div> <div class="men"> Bienvenid@ <?php echo $_SESSION['admin']; ?> <a href="<?php echo enlazar("gestor"); ?> " alt="Inicio" title="Inicio"> <img src="imagenes/iconos/gestor.png" width="15px" /> </a> <a href="<?php echo enlazar("perfil"); ?> " alt="Perfil" title="Perfil"> <img src="imagenes/iconos/perfil.png" width="15px" /> </a> <a href="<?php echo enlazar("salir"); ?> " alt="Salir" title="Salir"> <img src="imagenes/iconos/salir.png" width="15px" /> </a> </div> <div class="finflotar"></div>
echo $tablaa . '::' . $row['faid']; ?> "><img src="imagenes/borrar.png" alt="Borrar" width="16" height="16" class="borradof" /></a></td> </tr> <?php } ?> </tbody> </table> <div style="padding-top: 10px; text-align: center;"> <a class="boton_a bg_rojo" href="<?php echo enlazar($_GET['arg1'] . "/nuevo"); ?> ">Nueva factura</a> <a class="boton_a bg_rojo" href="<?php echo enlazar($_GET['arg1'] . "/grafica"); ?> ">Gráfica de ventas</a> <?php //$sqlExport = serialize($sqlExport); ?> <a class="boton_a bg_rojo" href="<?php echo BASEURL . 'fac/exportar.php?q=' . $sqlExport; ?> ">Exportar</a> </div> <?php include "html/paginador.php"; include "globales.php"; } }
?> </td> <td class="tcentrado"><a title="Editar" href="<?php echo enlazar($_GET['arg1'] . "/editar/" . $row['id']); ?> "><img src="imagenes/editar.png" alt="Editar" width="16" height="16" /></a></td> <td class="tcentrado"><a title="Borrar" href="" class="<?php echo $tablaa . '::' . $row['id']; ?> "><img src="imagenes/borrar.png" alt="Borrar" width="16" height="16" class="borradof" /></a></td> </tr> <?php } ?> </tbody> </table> <div style="padding-top: 10px; text-align: center;"> <a class="boton_a bg_rojo" href="<?php echo enlazar($_GET['arg1'] . "/nuevo"); ?> ">Nuevo idioma</a> <a class="boton_a bg_rojo" href="<?php echo enlazar($_GET['arg1'] . "/ordenar"); ?> ">Reordenar</a> </div> <?php include "html/paginador.php"; } } }
function tablages($cuantos, $res, $avartabl) { ?> <div class="infotabla pager"> <?php echo $avartabl['titulo'] . $avartabl['plural'] . ': ' . $cuantos; ?> </div> <table class="tablesorter"> <thead> <tr> <?php //COLUMNA DE IMAGEN if ($avartabl['imagen'] == "1") { echo '<th width="5%" class="tcentrado {sorter: false}">Imagen</th>'; } //COLUMNAS DATOS for ($i = 0; $i < count($avartabl['titulos']); $i++) { echo '<th>' . $avartabl['titulos'][$i] . '</th>'; } ?> <?php //COLUMNAS OPCIONES for ($i = 0; $i < count($avartabl['titulos_op']); $i++) { echo '<th width="5%" class="tcentrado {sorter: false}">' . $avartabl['titulos_op'][$i] . '</th>'; } ?> <?php //COLUMNAS ACCIONES //EDITAR if ($avartabl['editable'] == 1) { echo '<th width="5%" class="tcentrado {sorter: false}">Editar</th>'; } //BORRAR if ($avartabl['borrable'] == 1) { echo '<th width="5%" class="tcentrado {sorter: false}">Borrar</th>'; } ?> </tr> </thead> <tbody> <?php while ($row = mysql_fetch_array($res)) { ?> <tr id="col<?php echo $row['aid']; ?> "> <?php //COLUMNA DE IMAGEN if ($avartabl['imagen'] == "1") { echo '<td class="tcentrado"><img src="' . BASEURLX . $avartabl['imagen_url'] . $row[$avartabl['imagen_file']] . '.png" /></td>'; } //DATOS for ($i = 0; $i < count($avartabl['cols']); $i++) { echo '<td>' . $row[$avartabl['cols'][$i]] . '</td>'; } //OPCIONES for ($i = 0; $i < count($avartabl['cols_op']); $i++) { ?> <td align="center"> <?php if ($row[$avartabl['cols_op'][$i]] == "1") { echo '<a href="#" title="' . $avartabl['titulos_op'][$i] . '" class="' . $avartabl['name'] . '::' . $row['aid'] . '::' . $avartabl['cols_op'][$i] . '"><img src="' . BASEURL . 'imagenes/ok.png" alt="ON" width="16" height="16" class="clicki" alt="ON" / ></a>'; } else { echo '<a href="#" title="' . $avartabl['titulos_op'][$i] . '" class="' . $avartabl['name'] . '::' . $row['aid'] . '::' . $avartabl['cols_op'][$i] . '"><img src="' . BASEURL . 'imagenes/bannear.png" alt="OFF" width="16" height="16" class="clicki" alt="OFF" /></a>'; } ?> </td> <?php } //ACCIONES //EDITAR if ($avartabl['editable'] == 1) { echo '<td class="tcentrado"><a href="' . enlazar($_GET['arg1'] . '/editar/' . $row['aid']) . '"><img src="' . BASEURL . 'imagenes/editar.png" alt="editar" title="Editar" width="16" height="16" /></a></td>'; } //BORRAR if ($avartabl['borrable'] == 1) { echo '<td class="tcentrado"><a title="Borrar" href="#" class="' . $avartabl['name'] . '::' . $row['aid'] . '" ><img src="' . BASEURL . 'imagenes/borrar.png" alt="borrar" width="16" height="16" class="dele" /></a></td>'; } ?> </tr> <?php } ?> </tbody> </table> <?php boton_nuevo($avartabl); include "html/paginador.php"; }
function dibujaMenus($menu, $nivel) { global $contador; if (sizeof($menu) == 0) { return; } echo "\n"; $tab = ""; for ($i = 0; $i < $nivel; $i++) { $tab .= "\t"; } echo $tab; echo "<div "; if ($nivel > 0) { echo " class=\"oculto\""; } echo ">\n"; foreach ($menu as $m) { //BOTONES SELECCIONADOS if ($_GET['arg1'] == $m['nombre']) { //BOTON SELECCIONADO if ($nivel > 0) { ?> <div class="menubotonsel mb<?php echo $nivel + 1; ?> " style="background-image: url(imagenes/iconos/<?php echo $m['icono']; ?> .png);"> <div style="width: 225px; float: left;"> <a href="<?php echo enlazar($m['nombre']); ?> "> <?php echo ucfirst($m['nombre']); ?> </a> </div> <?php if (!empty($m['menus'])) { echo "<div class=\"sele\"\"><img src=\"imagenes/plus.png\" width=\"9\" height=\"13\" /></div>"; } ?> <div class="finflotar"></div> </div> <?php } else { /*BOTONES PADRE*/ ?> <div class="menubotonsel" style="background-image: url(imagenes/iconos/<?php echo $m['icono']; ?> .png);"> <div style="width: 235px; float: left;"> <a href="<?php echo enlazar($m['nombre']); ?> "> <?php echo ucfirst($m['nombre']); ?> </a> </div> <?php if (!empty($m['menus'])) { echo "<div class=\"sele\"\"><img src=\"imagenes/plus.png\" width=\"9\" height=\"13\" /></div>"; } ?> <div class="finflotar"></div> </div> <?php } } else { /*BOTONES NO SELECCIONADOS*/ if ($nivel > 0) { ?> <div class="menuboton mb<?php echo $nivel + 1; ?> " style="background-image: url(imagenes/iconos/<?php echo $m['icono']; ?> .png);"> <div style="width: 225px; float: left;"> <a href="<?php echo enlazar($m['nombre']); ?> "> <?php echo ucfirst($m['nombre']); ?> </a> </div> <?php if (!empty($m['menus'])) { echo "<div class=\"sele\"><img src=\"imagenes/plus.png\" width=\"9\" height=\"13\" /></div>"; } ?> <div class="finflotar"></div> </div> <?php } else { /*BOTONES PADRE*/ ?> <div class="menuboton" style="background-image: url(imagenes/iconos/<?php echo $m['icono']; ?> .png);"> <div style="width: 235px; float: left;"> <a href="<?php echo enlazar($m['nombre']); ?> "> <?php echo ucfirst($m['nombre']); ?> </a> </div> <?php if (!empty($m['menus'])) { echo "<div class=\"sele\"><img src=\"imagenes/plus.png\" width=\"9\" height=\"13\" /></div>"; } ?> <div class="finflotar"></div> </div> <?php } } dibujaMenus($m['menus'], $nivel + 1); } echo "</div>\n"; }