PROVO DI SEGUITO A INSERIRE UN PO' DI CODICE.
SPECIFICO CHE NELLA PAGINA DI FRAMESET (LA PRIMA PORZIONE DI HTML IN EVIDENZA, A PARTE LA CHIAMATA CON SRC NON HO MESSO ALCUNO SCRIPT.
*******CODICE DELLA PAGINA INDEX.HTML(STESSA COPIA IN PHP)***********
</head>
<frameset rows="100,*" cols="*" frameborder="NO" border="0" framespacing="0">
<frame src="toppage.php" name="topFrame" scrolling="NO" noresize >
<frameset cols="150,*" frameborder="NO" border="0" framespacing="0">
<frame src="frleft.php" name="leftFrame" scrolling="NO" noresize>
<frame src="FRMMAIN.php" name="mainFrame">
</frameset>
</frameset>
<noframes><body>
******CODICE DELLA PAGINA DI FRAME MAINFRM.PHP=================
<html>
<head>
<title>XXXXXXXXX.it</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stile3.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Stile1 {
font-size: 24px;
font-style: italic;
}
-->
</style>
</head>
<body topmargin="0">
<?php
$XXXXX_cn=@mysql_connect('localhost','********','* ************');
if (!XXXXX_cn) {
exit('impossibile connettersi.');
}
if (!@mysql_select_db('YYYYYYYY')) {
exit ('impossibile connettersi al database');
}
$record=@mysql_query('select count(*) from nomefile');
$cont= $record +1;
?>
<table width="593" height="311" border="0" cellpadding="3" cellspacing="3">
<tr>
<td width="450"><table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>[img]images/gif/cartelnews.gif[/img]</td>
</tr>
<tr>
<?php //carica i dati delle news
$sqllast=@mysql_query("select cat_id from categoria where categoria ='News'");
if(!$sqllast) {
exit('Impossibile eseguire la richiesta della categoria. Opreazione annullata: ').mysql_error();
}
while ($res=mysql_fetch_array($sqllast)) {
$catid=$res['cat_id'];
//echo $catid;
}
$sqltesto=@mysql_query("select id_testo,descrizione,testo,data_ins from desc_cat,nomefile where id_cat=$catid and nomefile.testo_id=id_testo");
if(!$sqltesto) {
exit('Impossibile eseguire la richiesta della categoria. Opreazione annullata: ').mysql_error();
}
//imposta i valori di collegamento
$page= $res['testo'];
$root= $_SERVER['DOCUMENT_ROOT'];
$path= $root.'/siulp/';
$link=$path.$page;
while ($res=@mysql_fetch_array($sqltesto)) {
$testoid=trim($res['id_testo']);
$news=trim($res['descrizione']);
$testo=trim($res['testo']);
$data=trim($res['data_ins']);
?>
****POI PROSEGUE CON LA SCRITTURA DEI DATI******
<td bgcolor="c5c7fd" valign="top" align="center">
<table width="449" align="center">
<font color="#FFFFFF">
<?php "<tr><td>< echo '$data'.'-'.'$news'</font></td></tr>";?>
AL MOMENTO QUESTA ULTIMA NON MI FUNZIONA GRANCHE' DI SUO, DEVE ESSERCI QUALCHE ERRORE DI SINTASSI, MA IN ALTRE VERSIONI DI PROVA -CON CODICE SCRITTO DIVERSAMENTE- CHE HO FATTO SULLA PAGNINA TI POSSO ASSICURARE CHE I DATI VENGONO VISUALIZZATI.
</table>
</td>
<?php
}
?>
******CODICE CHE SCRIVE NELLA COLONNA PIU' A DX DELLA PAGINA*******
<?php
$record=@mysql_query('select count(*) from nomefile');
$cont= $record +1;
for ($i=1; $i<$cont;$i++){
$sqllast=@mysql_query("select * from nomefile,ufficio where testo_id=$i and ufficio_id=nomefile.id_ufficio");
if(!$sqllast) {
exit('Impossibile eseguire la richiesta. Opreazione annullata: ').mysql_error();
}
while ($res=@mysql_fetch_array($sqllast)) {
?>
<tr>
<?php $page= $res['testo'];
$root= $_SERVER['DOCUMENT_ROOT'];
$path= $root.'/siulp/'.$testo;
$link=$path.$page;
?>
<td>[*]<font color="#FFFFFF"><a href="<?php echo $link;?>" target="_self">
<?php echo ($res['data_ins'].'-'.$res['nome_ufficio'].'. '.$res['descrizione']);?></a></font>
<?php
}
}?>
</td>
</tr>
</table>
ECCO FATTO: ABBASTANZA LUNGO, INCASINATO E SOPRATTUTTO NON FUNZIONANTE.
grazie, un saluto.


Rispondi quotando