Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
var
/
www
/
50mmla
/
admin
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
//var/www/50mmla/admin/userDelete.php
<? include_once('../includes/static/configure.php'); include_once('../includes/static/util.php'); include_once('../includes/static/dbcon.php'); include_once('../includes/static/gdimg.php'); include_once('../includes/static/sessions.php'); include_once('includes/static/util.php'); include_once('includes/appTop.php'); $page_id = str_replace(".php","",basename($_SERVER['PHP_SELF'])); if(!has_permission($page_id)){ die("You don't have permission to view this page!"); } ?> <? $uid = 0; if(isset($_REQUEST['userId'])){ $uid = $_REQUEST['userId']; } $html = ""; if(isset($_REQUEST['action'])){ if($_REQUEST['action'] == 'delete'){ $sql = "DELETE FROM 50mm_users WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_artists WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_stories WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_forum_topics WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_forum_replies WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_links WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_permissions WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html = "<div class=\"hilite\">operation successful</div>"; } } $sql="SELECT username,email,profile,image,url,user_type,banned,password FROM 50mm_users WHERE user_id = '$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $profile = $row['profile']; $uname = $row['username']; $password = $row['password']; $email = $row['email']; $url = $row['url']; $user_type = $row['user_type']; $banned = $row['banned']; $img = ""; if(!empty($row['image'])){ $img ='<img src="'.PROFILE_IMG_DIR.$row['image'].'">'; } include_once('includes/header.php'); ?> <?echo $html;?> Are you sure that you want to delete this user. All stories,forums,pictures associated with this user will be deleted.<br> If in doubt you should simply ban this user. <a href="<?echo $_SERVER['PHP_SELF']?>?action=delete&userId=<?echo $uid?>">Delete</a> | <a href="userSearch.php">Do not delete</a> <script>registerDivs = new Array('email','username','password');</script> <form action="<?echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" onSubmit="return validateForm(this,registerDivs,'errorUpdate');"> <table cellspacing="0" cellpadding="4" border="0"> <tr> <td><span class="title">Modify Your Profile</span></td> </tr> <tr> <td>Ban User: <br> <?if($banned){?> Yes <input name="banned" type="radio" value="1" checked> No <input name="banned" type="radio" value="0"> <?}else{?> Yes <input name="banned" type="radio" value="1"> No <input name="banned" type="radio" value="0" checked> <?}?> </td> </tr> <tr> <td> <? $menu ="<select name=\"userType\">"; if($user_type == "WEB"){ $menu.="<option value=\"WEB\" selected>WEB</option>\n"; $menu.="<option value=\"EDITOR\">EDITOR</option>\n"; $menu.="<option value=\"ADMIN\">ADMIN</option>\n"; }elseif($user_type == "EDITOR"){ $menu.="<option value=\"WEB\">WEB</option>\n"; $menu.="<option value=\"EDITOR\" selected>EDITOR</option>\n"; $menu.="<option value=\"ADMIN\">ADMIN</option>\n"; }elseif($user_type == "ADMIN"){ $menu.="<option value=\"WEB\">WEB</option>\n"; $menu.="<option value=\"EDITOR\">EDITOR</option>\n"; $menu.="<option value=\"ADMIN\" selected>ADMIN</option>\n"; } $menu.="</select>"; echo $menu; ?> </td> </tr> <tr> <td>Email<span id="erremail" class="error" style="visibility:hidden;"> *</span> <br> <input type="text" name="email" value="<?echo $email?>" class="field"> </td> </tr> <tr> <td>Username<span id="errusername" class="error" style="visibility:hidden;"> *</span> <br> <input type="text" name="username" value="<?echo $uname?>" class="field"> </td> </tr> <tr> <td>Password<span id="errpassword" class="error" style="visibility:hidden;"> *</span> <br> <input type="text" name="password" value="<?echo $password?>" class="field"> </td> </tr> <tr> <td>Website <br> <input type="text" name="website" value="<?echo $url?>" class="field"> </td> </tr> <tr valign="top"> <td> <?echo $img?><br> Replace Profile Image <br> <input type="file" name="file" class="field"> </td> </tr> <tr valign="top"> <td>Profile Text <br> <textarea class="body" name="profile" style="width: 400px; height: 200px;"><?echo $profile?></textarea> </td> </tr> <tr> <td> <input name="update" type="submit" class="button" value="Save Changes"><br> <?echo $html?> <input type="hidden" name="userId" value="<?echo $uid?>"> <div id="errorUpdate" class="error" style="visibility:hidden;">Please correct the fields marked by *</div> </td> </tr> </table> </form> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>