- Home
- Categorie
- Coding e Sistemistica
- Coding
- Conversione pagina aiuto
- 
							
							
							
							
							
Conversione pagina aiutoRagazzi come potrei organizzare questa pagina in xhtml? [php] 
 <?php
 $rand = rand(0, 100000);
 include "./ini.php";
 //авÑ?оÑ?изаÑ?иÑ�
 $login = autorize();
 header ("Content-type:text/vnd.wap.wml; charset=utf-8");
 print '<?xml version="1.0" encoding="utf-8"?>'.
 '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">'.
 '<wml>'.
 '<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>'.
 '<card title="'.$login['title'].'">'.
 '<p><small>';
 //
 if($login) {
 if($action)
 {
 $query = @mysql_query("selectmsgfrom".$px.$mtable."where login='$name'");
 $dbmsg = @mysql_fetch_array($query);
 $error="";
 $name=trim($name);
 $msg=trim($msg);
 if($msg == $dbmsg['msg'])
 {
 $action="";
 $error=$error."<b>comment not added</b><br/>";
 }
 if(empty($msg))
 {
 $action="";
 $error=$error."<b>nickname not added</b><br/>";
 }
 if(empty($name))
 {
 $action="";
 $error=$error."<b>email not added</b><br/>";
 }
 if(!empty($email))
 {
 if(!preg_match("/[0-9a-z_]+@[0-9a-z_^.]+.[a-z]{2,3}/i", $email))
 {
 $action="";
 $error=$error."<b>error4</b><br/>";
 }
 }
 $name=substr($name,0,50);
 $name=htmlspecialchars(stripslashes($name));
 $msg=substr($msg,0,100);
 $msg=htmlspecialchars(stripslashes($msg));
 $exsoft=explode(" ",getenv(HTTP_USER_AGENT));
 $soft=$exsoft[0];
 if(empty($error))
 {
 //
 @mysql_query("insert into".$px.$mtable."values(0,'".$name."','".$msg."','".$email."','".$url."','".$login['login']."','".time()."','$soft');");
 print "</small></p></card><card id="added" title="MESSAGE ADDED" ontimer="wapgb.php?login=".$login['login']."&r=$rand"><timer value="10"/><p><small><a href="wapgb.php?login=".$login['login']."&r=$rand">[to gbook]</a><br/><img src="http://hifi-project.net/rating/count.php?id=4" alt="w@p rating"/>";
 }
 else
 print "</small></p></card><card id="added" title="test3" ontimer="wapgb.php?login=".$login['login']."&r=$rand"><timer value="30"/><p><small>you do not post nothing !!!<br/>$error<a href="wapgb.php?login=".$login['login']."&r=$rand">[to gbook]</a><br/><img src="http://hifi-project.net/rating/count.php?id=4" alt="w@p rating"/><br/>";
 } else {
 $q = @mysql_query("selectlogin,msg,time,email,url,softfrom".$px.$mtable."whereuser='".$login['login']."' order bytimedesc;");
 while($mdata = @mysql_fetch_array($q)) {
 $name[] = $mdata['login'];
 $msg[] = $mdata['msg'];
 $time[] = $mdata['time'];
 $email[] = $mdata['email'];
 $url[] = $mdata['url'];
 $softs[] = $mdata['soft'];
 }
 $i=count($name);
 $count=$i;
 $count1=$count;
 if(empty($start))
 $start=0;
 $start=intval($start);
 if($start<0)
 $start=0;
 if($count>$start+8) $count=$start+8;
 print '°<a href="wapgb.php?login='.$login['login'].'&r='.$rand.'">refresh</a><br/>';
 print ' <a href="#add">write</a><br/>';
 if($start!=0)
 print '«<a href="wapgb.php?login='.$login['login'].'&start='.($start-8).'">back</a><br/>';
 if($count1>$start+8)
 print '»<a href="wapgb.php?login='.$login['login'].'&start='.($start+8).'">next</a><br/>';
 for($i=$start;$i<$count;$i++)
 {
 print "<img src="http://hifi-project.net/gbook/gbook.gif" alt="logo"/><br/>";
 print '<b>NICK: </b><anchor>'.$name*.'<go href="./wapgb.php?login='.$login['login'].'#add" method="post"><postfield name="who" value="'.$name*.',"/></go></anchor><br/>';
 print "<b>TIME: </b>";
 print date("H.i", $time*)."<br/>";
 print "<b>DATE: </b>";
 print date("d.m.Y", $time*)."<br/>";
 print "<b>NET: </b>";
 print "".$softs*."<br/>";
 print "<b>MSG: </b>";
 print $msg*.'<br/>';
 print "<b>MAIL: </b>";
 print $email*.'<br/>';
 print "<b>SITE: </b>";
 print "<a href="".$url*."">".$url*."</a><br/>";
 print "----------<br/>";
 }
 print "«<a href="".$login['link']."">HOME</a><br/>";
 print '»<a href="./regform.php">GET YOURS</a><br/>
 »<a href="./enter.php">MANAGE GBOOK</a><br/>----------<br/>'.
 '<a href="http://hifi-project.net/rating/?cid=4"><img src="http://hifi-project.net/rating/count.php?id=4" alt="new rating"/></a></small></p></card>'.
 '<card id="add" title="ADD COMMENT"><p><small>';
 print "<a href="http://">ADVERTISING</a><br/>NICKNAME:</small><br/>".
 "<input type="text" name="nik" maxlength="32" value="$(nik)"/><br/>".
 "<small>COMMENT:</small><br/>".
 "<input type="text" name="msg$rand" value="".$who.""/><br/>".
 "<small>E-MAIL:</small><br/>".
 "<input type="text" name="email" value="$(email)"/><br/>".
 "<small>SITE URL:</small><br/>".
 "<input type="text" name="url" value="http://"/><br/>".
 "<small><anchor>[send]<go href="wapgb.php?login=".$login['login']."&action=add#added" method="post">".
 "<postfield name="name" value="$(nik)"/>".
 "<postfield name="msg" value="$(msg$rand)"/>".
 "<postfield name="email" value="$(email)"/>".
 "<postfield name="url" value="$(url)"/>".
 "</go></anchor>";}
 } else print "<b>test</b><br/>";
 print '</small></p></card></wml>';
 ?>
 [/php]Grazie dell'aiutoooo 
 
- 
							
							
							
							
							
Ciao hiwap3, 
 non è chiaro cosa chiedi... :bho:Se vuoi un output che sia xhtml devi formattare l'output in tal modo, modificando i vari *print *e echo... ma il php c'entra poco... 
 