Просмотр файла wapforum2/edituserhard.php

Размер файла: 2.33Kb
<?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"];
$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 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 "<anchor title=\"remove\">Make admin!";
                      echo "<go href=\"addadmin.php?nick=$nick&amp;pass=$pass\" method=\"post\">";
                      echo "<postfield name=\"useris\" value=\"$info[0]\"/>";
                      echo "</go>";
                      echo "</anchor>";
                      echo "<br/><anchor title=\"remove\">Remove from admins!";
                      echo "<go href=\"removeadmin.php?nick=$nick&amp;pass=$pass\" method=\"post\">";
                      echo "<postfield name=\"useris\" value=\"$info[0]\"/>";
                      echo "</go>";
                      echo "</anchor>";
                        echo "<br/><br/><anchor title=\"remove\">remove user!";
                      echo "<go href=\"removeuser.php?nick=$nick&amp;pass=$pass\" method=\"post\">";
                      echo "<postfield name=\"useris\" value=\"$info[0]\"/>";
                      echo "</go>";
                      echo "</anchor>";
                      echo "<br/><br/>";
                     };
   };
echo "<a href=\"index.php?nick=$nick&amp;pass=$pass\">BACK</a>";
?>
</p>
</card>
</wml>