C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\zomplog\admin\users.php


1
<?php/* Written by Gerben Schmidt, http://scripts.zomp.nl */include_once("config.php");include('session.php');include('header.php');include("../language/$language");if(!$_POST["submit"]){echo "<form name='input' method='post' action='users.php'>";echo "<table width='600' border='0' cellspacing='0' class='admin'>";echo "<tr>"; echo "<td class='admin'>&nbsp;</td>";echo "</tr>";echo "<tr>"; echo "<td class='admin_title'>$lang_newuser</td>";echo "</tr>";echo "<tr>"; echo "<td class='admin'>&nbsp;</td>";echo "</tr>";echo "<tr>";echo "<td class='admin'>$lang_username</td>";echo "</tr>";echo "<tr>";echo "<td class='admin'><input name='login' type='text' id='login' maxlength='15'>";echo "</tr>";echo "<tr>";echo "<td class='admin'>$lang_password</td>";echo "</tr>";echo "<tr>";echo "<td class='admin'><input name='password' type='password' id='password'></td>";echo "</tr>";echo "<tr>";echo "<td class='admin'>$lang_admin</td>";echo "</tr>";echo "<tr>";echo "<td class='admin'><input type='checkbox' name='permissions' value='1'></td>";echo "</tr>";echo "<tr>"; echo "<td class='admin'>&nbsp;</td>";echo "</tr>";echo "<tr>"; echo "<td class='admin'><input type='submit' name='submit' value='submit'></td>";echo "</tr>";echo "<tr>"; echo "<td class='admin'>&nbsp;</td>";echo "</tr>";echo "</form>";echo "</table>";echo "<table width='600' border='0' cellspacing='0' class='admin'>";echo "<tr>";echo "<td class='admin'>&nbsp;</td>";echo "</tr>";echo "<tr><td class='admin_title'>$lang_currentusers</tr></td>";echo "<tr>";echo "<td class='admin'>&nbsp;</td>";echo "</tr>";$query mysql_query("SELECT * FROM $table_users"); while ($row mysql_fetch_array ($query)) {$admin $row['permissions'];$id $row['id'];$username $row['login'];echo "<tr><td class='admin'>$username</td>";if($admin!=0){echo "<td class='admin'>$lang_isadmin</td>";}else{echo "<td class='admin'>$lang_isuser</td>";}echo "<td class='admin'><A HREF='schredder.php?tablename=$table_users&id=$id' onclick=\"return verify()\">$delete</A></td></tr>";}echo "<tr>";echo "<td>&nbsp;</td>";echo "</tr>";echo "</table>";}$username $_SESSION['login'];if($_POST["submit"]){if(!$_POST[login]) {$error "$provideusername $back <a href='$_SERVER[HTTP_REFERER]'>$prevpage</a>";}elseif(!$_POST[password]) {$error "$providepassword $back <a href='$_SERVER[HTTP_REFERER]'>$prevpage</a>";}else {mysql_query("INSERT INTO $table_users (login,password,permissions) VALUES ('$_POST[login]','$_POST[password]','$_POST[permissions]')") or die (mysql_error()); $error "$lang_usercreated $lang_username <b>$_POST[login]</b>, $lang_password: <b>$_POST[password]</b>. $backmembersarea";}}DisplayError($error);include('footer.php');?>