Файловый менеджер - Редактировать - C:/xampp/htdocs/cat/backoffice/gestion_quisom.php
Назад
<?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_quisom"; // Taula a insertar o modificar de la BBDD $sufix = "quisom"; // Per directoris i fitxers $element = "el Qui Som"; // Per treure missatges a pantalla $elementtxt = "qui som"; // Singular sense article $elementBBDD ="textoCA"; // Per treure missatges a pantalla $calperBBDD = "un Text en Català"; // Text per indicar que cal per actualitzar BBDD $titolseccio = "Gesti Qui Som"; // 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_quisom"; $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 tituloCA 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 width="110" align="center" class="textblanc"> </td> <td width="100" align="left" class="textblanc"></td> <td width="200" align="left" class="textblanc">Nom secci</td> <td align="left" class="textblanc">Text Introducció</td> <td colspan="3" align="center" class="textblanc">Accions</td> </tr> <tr> <td height="12" colspan="8"></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 width="110" align="center"><?php if ($line["foto"]!="") { ?> <img src="../images/<?php echo $sufix;?>/<?php echo $line["foto"]; ?>" border="0" width="80" /> <?php } else { ?> <img src="img/nofoto80.gif" align="top" border="0"/> <?php } ?> </td> <td width="100" align="left" valign="top" class="text_gris"> </td> <td width="200" align="left" valign="top" class="text_gris"><?php echo $line["tituloCA"];?> </td> <td valign="top" class="text_gris"> <?php if(strlen($line["textointroCA"]) > 150){ echo substr($line["textointroCA"],0,strpos($line["textointroCA"]," ",150))."..."; } else{ $line["textointroCA"]; } ?> </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="18"><img src="img/pointblack.gif" width="100%" height="1" /></td> </tr> <?php } if($total_buscats){ ?> <tr> <td colspan="5"> </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="7"> <?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
|
Настройка