View file wapforum2/newreply.php

File size: 2.47Kb
<?php
header("Content-type: text/vnd.wap.wml");
print "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

?>
<wml>
<card id="login" title="WAP FORUMS">
<p align="center">
<?php
$nick=$_GET["nick"];
$pass=$_GET["pass"];
$tname="";
$ttext=$_POST["ttext"];
$name=$_POST["name"];
$forumas=$_GET["forumas"];
include("core.php"); //load main functions
include("conf.php"); //load config
str_replace("$","\$",$tname);
str_replace("$","\$",$ttext);
echo connect($dbuser,$dbpass,$dbserver,$dbname);
//$name=base64_decode($name);
echo login($nick,$pass);
echo "<br/><br/>";
global $logged;
if ($logged)
   {
   $isclosed=mysql_fetch_array(mysql_query("SELECT closed FROM posts WHERE name='".$name."' AND thread='1'"));
   if ($isclosed[0] != 1) {
        $phone = explode(" ",$HTTP_USER_AGENT);
                                                        $phone = $phone[0];
echo post(0,$nick,$pass,$name,$ttext,$forumas,$phone);
echo "<br/>";
} else {ismod($nick,$pass,$forumas);
   global $moderator;
   if ($moderator) {$phone = explode(" ",$HTTP_USER_AGENT);
                    $phone = $phone[0];
                    echo post(0,$nick,$pass,$name,$ttext,$forumas,$phone);
                    echo "<br/>";} else echo "Thread closed!<br/>"; }
} else echo "Please login first!<br/>";
$name=substr($name,0,31);
         $ttext=str_replace("$","-",$ttext);
         $tname=str_replace("$","",$tname);
         $tname=str_replace("&lt;","",$tname);
         $tname=str_replace("<","",$tname);
         $tname=str_replace(">","",$tname);
         $tname=str_replace("&gt;","",$tname);
         $tname=str_replace("\"","",$tname);
         $tname=str_replace("'","",$tname);
         $tname=str_replace("\\","",$tname);
         $tname=str_replace("&","",$tname); 
$name=base64_encode($name);
if ($logged) echo "<a href=\"index.php?action=viewpost&amp;name=$name&amp;nick=$nick&amp;pass=$pass&amp;read=new&amp;forumas=$forumas&amp;page=1\">&#x41F;&#x43E;&#x441;&#x43C;&#x43E;&#x442;&#x440;&#x435;&#x442;&#x44C; &#x441;&#x43E;&#x43E;&#x431;&#x449;&#x435;&#x43D;&#x438;&#x435;</a><br/>";
echo "<a href=\"index.php?action=viewforum&amp;nick=$nick&amp;pass=$pass&amp;id=$forumas&amp;page=1\">&#x412;&#x435;&#x440;&#x43D;&#x443;&#x442;&#x44C;&#x441;&#x44F; &#x432; &#x444;&#x43E;&#x440;&#x443;&#x43C;</a><br/>";
echo "<a href=\"index.php?nick=$nick&amp;pass=$pass\">BACK</a>";
?>
</p>
</card>
</wml>