View file forum/edituser.php

File size: 3.69Kb
<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
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"];
$useris=$_POST["useris"];
include("core.php"); //load main functions
include("conf.php"); //load config
echo connect($dbuser,$dbpass,$dbserver,$dbname);
//$name=base64_decode($name);
echo login($nick,$pass);
echo "<br/><br/>";
global $logged;
if ($logged)
   {
           isadmin($nick,$pass);
           global $administrator;
           if (!$administrator) echo "You are not allowed to do this!"; else
                     {
                      $info=mysql_fetch_array(mysql_query("SELECT name, owntext, email, tlphone, avatar, site FROM users WHERE name='".$useris."'"));
                      $modas=mysql_fetch_array(mysql_query("SELECT name,forum FROM moderators WHERE name='".$useris."'"));
                      $permissions=mysql_fetch_array(mysql_query("SELECT name,forum FROM permissions WHERE name='".$useris."'"));
                      echo "Editing <b>$useris</b><br/><br/>";
                      echo "Change name to:<input name=\"username\" value=\"$info[0]\"/><br/>";
                      $info[1]=htmlspecialchars($info[1]);
                      $info[2]=htmlspecialchars($info[2]);
                      $info[3]=htmlspecialchars($info[3]);
                       $info[4]=htmlspecialchars($info[4]);
                        $info[5]=htmlspecialchars($info[5]);
                      echo "Change signature to:<input name=\"signature\" value=\"$info[1]\"/><br/>";
                      echo "Change email to:<input name=\"email\" value=\"$info[2]\"/><br/>";
                      echo "Change tlphone to:<input name=\"tlphone\" value=\"$info[3]\"/><br/>";
                      echo "Change avatar to:<input name=\"avatar\" value=\"$info[4]\"/><br/>";
                      echo "Change site to:<input name=\"site\" value=\"$info[5]\"/><br/>";
                      echo "<anchor title=\"update\">update!";
                      echo "<go href=\"edituser1.php?nick=$nick&amp;pass=$pass\" method=\"post\">";
                      echo "<postfield name=\"useris\" value=\"$info[0]\"/>";
                      echo "<postfield name=\"username\" value=\"\$username\"/>";
                      echo "<postfield name=\"signature\" value=\"\$signature\"/>";
                      echo "<postfield name=\"email\" value=\"\$email\"/>";
                      echo "<postfield name=\"tlphone\" value=\"\$tlphone\"/>";
                      echo "<postfield name=\"avatar\" value=\"\$avatar\"/>";
                      echo "<postfield name=\"site\" value=\"\$site\"/>";
                      echo "</go>";
                      echo "</anchor><br/><br/>";
                      echo "Change password to:<input name=\"pwd1\" value=\"\"/><br/>";
                      echo "Repeat password:<input name=\"pwd2\" value=\"\"/><br/>";
                      echo "<anchor title=\"change\">change!";
                      echo "<go href=\"chpwdadmin.php?nick=$nick&amp;pass=$pass\" method=\"post\">";
                      echo "<postfield name=\"npass1\" value=\"\$pwd1\"/>";
                      echo "<postfield name=\"npass2\" value=\"\$pwd2\"/>";
                      echo "<postfield name=\"useris\" value=\"$useris\"/>";
                      echo "</go>";
                      echo "</anchor>";
                      echo "<br/><br/>";
                     };
   };
echo "<a href=\"index.php?nick=$nick&amp;pass=$pass\">BACK</a>";
?>
</p>
</card>
</wml>