Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/09/2009, 05:14
Avatar de camilo_1987
camilo_1987
 
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 15 años, 10 meses
Puntos: 0
Sistemas de modules

bueno tarde
codigo sistemas de modules
Código PHP:
<?php    
    
if(!isset($_SESSION['varIdioma']) || !empty($_GET['temas'])){  
        
$temas=$_GET['temas'];  
        if(empty(
$lang)){  
            
$temas="noticias";  
        }  
        
$_SESSION['varIdioma']=$temas;  
    }  
    switch (
$_SESSION['varIdioma']) {  
    case 
$_SESSION['varIdioma']: require("temas/".$_SESSION['varIdioma'].".php"); break; }  
?>
modules noticia y foro etc..
Código PHP:
<?php  
    $temas1
="Noticias<br/>
<? 
$server="
localhost"; 
$username="
camilo19"; 
$password="
980980"; 
$database="
camilo19_candemasjor"; 
$offset = 5; //Numero de noticias 
$posicion = (int) ($_GET["
pos"]*$offset); //Numero de noticia desde la cual va a empezar a mostrarlas 
$siguiente = $_GET["
pos"]+1; //variable siguiente 
$anterior = $_GET["
pos"] == 0 ? 0 : $_GET["pos"]-1; //variable anterior 
$limit = " 
LIMIT ".$posicion."".$offset; 

$connection=mysql_connect ($server, $username, $password); 
mysql_select_db($database, $connection); 
$sentencia=mysql_db_query("
camilo19_candemasjor", "SELECT FROM noticia ORDER BY id DESC".$limit); 
while($rs=mysql_fetch_array($sentencia)){ 
?>
<div class="
noticias" id="noticias"><? echo $rs["Titulo"]; ?></div>
<div class="
noticiasfecha" id="noticiasfecha" align="center"><? echo $rs["Fecha"]; ?> </div>
<div class="
noticiastexto" id="noticiastexto"><? echo $rs["Texto"]; ?></div>
<div class="
1" id="1">
  <? } ?>
</div>
<div class="
2" id="2">
  <table width="
100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td align="
left"><ul>
        <a href ="
<? echo $_SERVER["PHP_SELF"]."?pos=".$anterior?>">Anterior</a>
      </ul></td>
      <td align="right"><ul>
        <a href ="<? echo $_SERVER["PHP_SELF"]."?pos=".$siguiente?>">Siguiente</a>
      </ul></td>
    </tr>
  </table>
</div>"; 
?>