Файловый менеджер - Редактировать - C:/xampp/htdocs/documents/gestion_documents.php.tar
Назад
C:/xampp/htdocs/backoffice/gestion_documents.php 0000666 00000014405 15155066662 0015773 0 ustar 00 <?php session_start(); // Incluyo las funciones basicas include "../files/config.php"; include "../files/funciones.php"; // Incluyo funciones espcifica de esta web // Arranque BBDD $link = conectar(); $tabla = "web_documents"; // Taula a insertar o modificar de la BBDD $sufix = "documents"; // Per directoris i fitxers $element = "el document"; // Per treure missatges a pantalla $elementtxt = "document"; // Singular sense article $elementBBDD ="nom"; // Per treure missatges a pantalla $calperBBDD = "un nom"; // Text per indicar que cal per actualitzar BBDD $titolseccio = "Gesti de Documents Pblics"; // Titol de la pgina ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php // HEAD + javascripts ?> <?php include "head.php"; ?> <body> <?php // Cabecera de la web ?> <table align="center" cellpadding="0" cellspacing="1" border="0" bgcolor="#D1D1D1"> <tr> <td> <?php include "cabecera.php"; ?> <table width="950" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF"> <tr class="data"> <td height="15" class="bg_colorback"></td> <td height="15" class="bg_colorback"><p class="textblancBold"><?php echo $titolseccio; ?></p></td> <td height="15" class="bg_colorback"></td> </tr> <tr> <td width="15"></td> <td height="300" valign="top"><!-- --> <?php // PAGINACIO $este_fichero = "gestion_".$sufix.".php"; $tabla = "web_documents"; $porpagina = 10; $lang_paginas = "Pàgines"; if ((isset($_GET["pag"])) && (!isset($_POST["pagina"]))) $pagina= $_GET["pag"]; if (!isset($pagina)) $pagina=1; $limite = " LIMIT ".(($pagina-1)*$porpagina).",".$porpagina; // Consulta per saber el total de projectes que compleixen $sql = "SELECT COUNT(*) FROM ".$tabla." ".$cerca; $resultpagina = mysql_query($sql) or die("No ha sido posible realizar la consulta"); $linepagina = mysql_fetch_array($resultpagina, MYSQL_ASSOC); $total_buscats_paginas = $linepagina["COUNT(*)"];//mysql_num_rows($result); ?> <?php $sql = "SELECT * FROM ".$tabla." ORDER BY nom ASC".$limite; //echo $sql."<br />"; $result = mysql_query($sql) or die("No ha sido posible realizar la consulta"); $total_buscats = mysql_num_rows($result); ?> <p class="text_gris_m">Página <?php echo $pagina ?><br /> Es mostran <b><?php echo $total_buscats; ?></b> de <?php echo $total_buscats_paginas." ".ucfirst($sufix); ?></p> <form action="borrar_<?php echo $sufix;?>.php" method="post" name="formulario" id="formulario"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0"> <tr class="bg_colorback"> <td width="20" align="center" class="textblanc"> </td> <td align="left" class="textnegre">Nom document</td> <td align="left" class="textnegre">Tipus</td> <td align="left" class="textnegre">Categoria</td> <td align="left" class="textnegre">Pujat per</td> <td align="left" class="textblanc"></td> <td colspan="3" align="center" class="textnegre">Accions</td> </tr> <tr> <td height="12" colspan="6"></td> </tr> <?php while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { ?> <tr> <td width="20" align="center"><?php if ($line["_destacat"]) { ?> <img src="img/destacat.gif" width="16" height="16" border="0" /> <?php } ?> </td> <td align="left" class="text_gris"><?php echo $line["nom"];?> </td> <td align="left" class="text_gris"><?php if($line["tipus"] != ""){ echo $line["tipus"]; } else{ echo "Privats"; }?> </td> <td align="left" class="text_gris"> <?php $cat = mysql_query("SELECT * FROM web_categoriesd WHERE id=".$line["categoria"]); $a = mysql_fetch_array($cat); $categoria = $a['nom']; echo $categoria; ?> </td> <td align="left" class="text_gris"><?php echo $line["pujat_per"];?> </td> <td valign="top" class="text_gris"></td> <td width="16" align="center" valign="top"></td> <td width="50" align="center" valign="top"><a href="modificar_<?php echo $sufix;?>.php?id=<?php echo $line['id']; ?>" class="text_gris_m">Editar</a></td> <td width="16" align="center" valign="top"><input type="checkbox" name="seleccion[<?php echo $line['id']; ?>]2" align="absmiddle" /></td> </tr> <tr> <td height="3" colspan="16"><img src="img/pointblack.gif" width="100%" height="1" /></td> </tr> <?php } if($total_buscats){ ?> <tr> <td colspan="3"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"><input value="Esborrar" name="borrar" type="button" class="form_submit" onclick="validar_borrar()"/></td> </tr> <?php } ?> <tr> <td colspan="5"> <?php // PAGINACIO if ($total_buscats_paginas>$porpagina) echo "<span class=\"text_gris\">".$lang_paginas.": </span>"; $numpagina=1; for ($cont=1;$cont<$total_buscats_paginas;$cont++) { if (($cont%$porpagina)==0){ if ($cont==($pagina*$porpagina)) { echo " <span class=\"numHIGH\">".$numpagina."</span> "; $numpagina++; } else { echo " <a href=\"".$este_fichero."?pag=".$numpagina."\" class=\"num\">".$numpagina."</a>"; $numpagina++; } } } // If de la ultima página if ((($numpagina-1)*$porpagina)<=($cont-1) && ((($numpagina-1)*$porpagina)!=0)) { if ($numpagina==$pagina) { echo " <span class=\"numHIGH\">".$numpagina."</span> "; } else { echo " <a href=\"".$este_fichero."?pag=".$numpagina."\" class=\"num\">".$numpagina."</a>"; } } ?> </td> </tr> </table> </form> <!-- --> </td> <td width="15"></td> </tr> <tr> <td height="15" colspan="3"></td> </tr> </table> </td> </tr> </table> <?php // Texto final y cierres de BBDD ?> <?php include "pie.php"; ?> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 5.3.8 | Генерация страницы: 0.12 |
proxy
|
phpinfo
|
Настройка