questa è la pagina generata da php alla quale sto cercando di applicare quel menù
Codice PHP:
<!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">
<head>
<title>pool</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
function displayDiv(index){
divId = "div" + index;
if (document.getElementById(divId).style.display=="none"){
document.getElementById(divId).style.display="block";
document.getElementById('btn'+index).value="nascondi";
} else {
document.getElementById(divId).style.display="none";
document.getElementById('btn'+index).value="mostra";
}
}
</script>
<style>
<!--
html, body {
width: 100%;
background:#EEEEEE;
}
#container {
border-width:1px;
border-style:solid;
padding-left:5px;
padding-right:5px;
padding-bottom:5px;
padding-top:5px;
clear:left;
}
#areamenu {
width: 100%;
text-align: center; /* serve solo per IE */
}
#menu {
margin 0 auto; /* per centrare */
padding: 0; /* pulisce i padding di default */
list-style-type: none; /* toglie il punto-elenco */
}
#menu li {
margin: 0; /* pulisce i margini di default */
padding: 0; /* pulisce i padding di default */
border: 1px solid;
border-color: #ccc #888 #555 #bbb;
list-style-type: none; /* toglie il punto-elenco */
float: left; /* affianca i vari blocchi */
width: 150px; /* da sistemare a piacere */
}
#menu a {
text-align: center;
display: block; /* per potergli dare le dimensioni */
width: 100%; /* deve occupare tutto lo spazio del li */
height: 100%;
background: #111111;
color: #FFFFFF;
font: 20px arial, helvetica, sans-serif;
text-decoration:none;
}
div#div1,div#div2 {
background-color:#DDDDDD;
border-width:1px;
border-style:solid;
text-align:center;
}
-->
</style>
</head>
<body>
<div id="aeamenu">
<ul id="menu">[*][url="link1.php"]linkcorto[/url][*][url="link2.php"]linknupopiulungo[/url][*][url="link3.php"]link3[/url][*][url="link4.php"]link4[/url][/list]
</div>
<div id="container">
<div id="init">
<h3>video presenti nella sezione pool (3)</h3>
<input id="btn1" type="button" value="mostra" onclick="displayDiv('1')">
[url="vidshandle.php?category=pool&action=insert"]inserisci un nuovo video[/url]
</p>
</div>
<div id="div1" style="display:none">
[b]video n.ro 1[/b]</p>
[b]titolo: [/b]uno</p> <div id="flashcontent1"></div>
<script type="text/javascript">
var so = new SWFObject("tryvid.swf", "tryvid", "260", "240", "9", "black");
so.addVariable("video", "../poolvids/video00010.flv");
so.write("flashcontent1");
</script>
[url="vidshandle.php?category=pool&action=modify&id_video=10"]modifica[/url][url="vidshandle.php?category=pool&action=delete&id_video=10"]cancella[/url]</p></p><hr size="1" color="red">
[b]video n.ro 2[/b]</p>
[b]titolo: [/b]due</p> <div id="flashcontent2"></div>
<script type="text/javascript">
var so = new SWFObject("tryvid.swf", "tryvid", "260", "240", "9", "black");
so.addVariable("video", "../poolvids/video00011.flv");
so.write("flashcontent2");
</script>
[url="vidshandle.php?category=pool&action=modify&id_video=11"]modifica[/url][url="vidshandle.php?category=pool&action=delete&id_video=11"]cancella[/url]</p></p><hr size="1" color="red">
[b]video n.ro 3[/b]</p>
[b]titolo: [/b]appena inserito</p> <div id="flashcontent3"></div>
<script type="text/javascript">
var so = new SWFObject("tryvid.swf", "tryvid", "260", "240", "9", "black");
so.addVariable("video", "../poolvids/video00018.flv");
so.write("flashcontent3");
</script>
[url="vidshandle.php?category=pool&action=modify&id_video=18"]modifica[/url][url="vidshandle.php?category=pool&action=delete&id_video=18"]cancella[/url]</p></p><hr size="1" color="red">
</div>
<div id="init">
<h3>news presenti nella sezione pool (5)</h3>
<input id="btn2" type="button" value="mostra" onclick="displayDiv('2')">
[url="newshandle.php?category=pool&action=insert"]inserisci una nuova news[/url]
</p>
</div>
<div id="div2" style="display:none">
[b]news n.ro 1[/b]</p>
[b]data: [/b]29.08.2007</p>
[b]titolo: [/b]PHP example page that should tell us upload informations</p><p align="left" style="padding-left:5px">[b]testo: [/b]// APPLICATION - PLEASE DON'T MODIFY
require('UploadProgressManager.class.php'); // The class UploadProgressManager class
session_start(); // need a session to be really efficient
clearstatcache(); // and maybe a cleared stats
$UPM = new UploadProgressManager($tmpdir); // new UploadProgressManager with temporary upload folder
if(($output = $UPM->getTemporaryFileSize()) === false) // if UPM class cannot find the temporary file
$output = '&filesize=undefined'; // the output for LoadVars will be undefined
else
$output = '&filesize='.$output; // else the output will be temporary file size
header('Content-Length: '.strlen($output)); // now headers to resolve browser cache problems
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
echo $output; // and finally the output for LoadVars
?></p>
[url="newshandle.php?category=pool&action=modify&id_news=16"]modifica[/url][url="newshandle.php?category=pool&action=delete&id_news=16"]cancella[/url]</p><hr size="1" color="blue">
[b]news n.ro 2[/b]</p>
[b]data: [/b]28.08.2007</p>
[b]titolo: [/b]news nel mondo del pool</p><p align="left" style="padding-left:5px">[b]testo: [/b]
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('mydb');
mysql_query("INSERT INTO mytable (product) values ('kossu')");
printf("Last inserted record has id %d
", mysql_insert_id());
printf("View Last inserted record id %d
", mysql_insert_id());
Get the last id
$last_id = mysql_insert_id();
</p>
[url="newshandle.php?category=pool&action=modify&id_news=15"]modifica[/url][url="newshandle.php?category=pool&action=delete&id_news=15"]cancella[/url]</p><hr size="1" color="blue">
[b]news n.ro 3[/b]</p>
[b]data: [/b]27.08.2007</p>
[b]titolo: [/b]titolo di prova n'ro i per caratte ri @àè^--strani</p><p align="left" style="padding-left:5px">[b]testo: [/b]1)Usa un campo di tipo date.
&&&&
2) Per estrarre le ultime 5 basta che fai
select * from tabella_news order by campo_data desc limit 5
3) Se la data della news sarà quella odierna basta che imposti nella query di inserimento curdate() senza costringere l'utente ad inserire la data.
Le date nel db dovranno essere memorizzate nel formato aaaa-mm-gg.
Poi le visualizzi nel modo che più ti piace.
es.
insert into tabella_news (notizia,data) values ('$notizia',curdate() )</p>
[url="newshandle.php?category=pool&action=modify&id_news=7"]modifica[/url][url="newshandle.php?category=pool&action=delete&id_news=7"]cancella[/url]</p><hr size="1" color="blue">
[b]news n.ro 4[/b]</p>
[b]data: [/b]27.08.2007</p>
[b]titolo: [/b]ciao</p><p align="left" style="padding-left:5px">[b]testo: [/b]1)Usa un campo di tipo date.
2) Per estrarre le ultime 5 basta che fai
select * from tabella_news order by campo_data desc limit 5
3) Se la data della news sarà quella odierna basta che imposti nella query di inserimento curdate() senza costringere l'utente ad inserire la data.
Le date nel db dovranno essere memorizzate nel formato aaaa-mm-gg.
Poi le visualizzi nel modo che più ti piace.
es.
insert into tabella_news (notizia,data) values ('$notizia',curdate() )</p>
[url="newshandle.php?category=pool&action=modify&id_news=9"]modifica[/url][url="newshandle.php?category=pool&action=delete&id_news=9"]cancella[/url]</p><hr size="1" color="blue">
[b]news n.ro 5[/b]</p>
[b]data: [/b]20.02.2005</p>
[b]titolo: [/b]In arrivo Macromedia Captive</p><p align="left" style="padding-left:5px">[b]testo: [/b]Macromedia Captivate è l'evoluzione del prodotto Macromedia RoboDemo, nuove funzionalità rivolte al mondo dell'e-learning.</p>
[url="newshandle.php?category=pool&action=modify&id_news=5"]modifica[/url][url="newshandle.php?category=pool&action=delete&id_news=5"]cancella[/url]</p><hr size="1" color="blue">
</div>
</div>
</body>
</html>