File size: 3.7Kb
<?
include ("config.php");
?>
<? if ($version=="html"){ echo "<html>
<head ('Content-type: text/vnd.wap.wml');>
<title>Новости $homesite</title>
<style type='text/css'>
.top
{
border-top: solid 3px #000000;
background-color: #FFFF00;
border-bottom: solid 3px #CCCCCC;
}
.cov
{
padding-left: 4px;
padding-top: 2px;
padding-bottom: 4px;
border-top: solid 1px #CCCCCC;
}
.news
{
background-color: #FFFF00;
border-top: solid 1px #000000;
border-bottom: solid 1px #000000;
color: #000000;
padding: 3px;
}
.dwap
{
background-color: #FFFF99;
border-top: solid 1px #000000;
border-bottom: solid 1px #000000;
color: #333333;
padding: 3px;
}
.btm
{
background-color: #BBBBBB;
border-top: solid 1px #999999;
color: #FFFFFF;
padding: 3px;
}
.atation
{
color: #FF0000;
text-decoration: underline;
}
</style>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">
<meta http-equiv='Cache-Control' content='no-cache' forua='true'/>
</head>
<body>";} else {header("Content-type:text/vnd.wap.wml");
echo "
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml1.2.dtd\">\n
<wml>
<card id=\"\" title=\"Новости $homesite\">";}?>
<?if ($version=="html"){echo "<div class='cov' align='center'>";} else { echo "<p align='center'><small>";}?> <img src="http://dwap.tj/images/dwap_logo.gif"/><br/>
http://dwap.tj
<?if ($version=="html"){echo "</div>";} else {echo "</small></p>";}?><p>
<?if ($version=="html"){echo "<div class='top' align='center'></div>";} ?>
<?if ($version=="html"){echo "<div class='cov'> <span class='atation'> ";}else {echo "<small><small>---<br/> ";}?>
Реклама
<?if ($version=="html"){echo "</div> </span> ";} else {echo "<br/>---<br/><br/></small>";}?>
<?
if ($version=="html"){ echo "<div class='news'>";}?>
<b>..::
<? echo "<a href='addcomment.php?version=$version&newsid=$newsid&login=$login&pass=$pass'>Добавить коментарий </a>";?>
::.</b>
<?if ($version=="html"){ echo "</div>";} else ?>
<?if ($version=="html"){ echo "<div class='dwap'>";} else {echo "<br/>";}?>
<?
$q=mysql_query ("Select * from newscomments WHERE newsid='$newsid' order by date DESC ");
$c=mysql_num_rows($q);
for ($i=0; $i<$c; $i++){
$nick=mysql_result ($q, $i, 'nick');
$date=mysql_result ($q, $i, 'date');
$com=mysql_result ($q, $i, 'com');
echo " :: <b>$nick</b> (";
echo date ("d.m.y", "$date");
echo "): <br/>";
echo "$com<br/>" ;
}?>
<?if ($version=="html"){ echo "</div>";} else {echo "<br/><br/>******<br/>";}?>
<?if ($version=="html"){echo "<div>";}else {echo "---<br/><b> ";}?>
Рекомендуем:
<?if ($version=="html"){echo "</div>";}else {echo "<br/></b> ";}?>
<?if ($version=="html"){echo "<div class='cov'> <span class='atation'> ";}else {echo "<small>";}?>
Реклама
<?if ($version=="html"){echo "</div> </span> ";} else {echo "<br/>---<br/><br/></small>";}?>
<small>
<?if ($version=="html"){echo "<div class='btm'>[<a href='?version=wap&newsid=$newsid&login=$login&pass=$pass'>wap</a> | html]";} else {echo "[wap | <a href='?version=html&newsid=$newsid&login=$login&pass=$pass'>html</a>]";} ?><br/>
<- <? echo "<a href='index.php?version=$version&login=$login&pass=$pass'>Новости</a>";?><br/>
© <a href="<?echo $homeurl?>"><?echo $homesite?></a> , 2006-2007 <br/>
</small>
<?if ($version=="html"){echo "</div> ";} else {echo"</small>";} ?>
</p><? if ($version=="html"){ echo "</body></html>";} else {echo "</card></wml>";}?>