You are alone, and you want to test some codes, you're tired by edit your class in PHPMyadmin, you need this mod!
This mod allow to change your account to any class you want, and back to your admin status. Usefull to test perms in code, etc...
Let's go:
In PHPMyAdmin run this query:
Edit blocks/login_block.php
Find:
upload attached file to your root directory.
Tell me if i forget something.
Enjoy.
How to use: Edit your user in account-details.php and set teh "Can change class" to yes, you can make that to any user you want to give this feature. Use it carrefully!

Screens:


[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=3257"]changemode.php[/url]
This mod allow to change your account to any class you want, and back to your admin status. Usefull to test perms in code, etc...
Let's go:
In PHPMyAdmin run this query:
ALTER TABLE `users` ADD `changemode` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no';Now let's go to edits:Edit blocks/login_block.php
Find:
end_block();
Add above:
if ($CURUSER["changemode"]=="yes") {
print("<form name='mod_form_1' method=post action=changemode.php>\n");
$actualclass=$CURUSER['class'];
$class = "<option value=0>--- Nothing Selected ----</option>\n";
$query = mysql_query("SELECT group_id,level FROM groups ORDER BY level") or die;
while ($result = mysql_fetch_array($query))
$class .= "<option value=$result[group_id]" . ($actualclass == $result['group_id'] ? " selected" : "") . ">$result[level]</option>\n";
print("<br/> <font color=red><b>Class Change</b></font><br/><br/><select name=class>\n$class\n</select>");
print("<br/><br/><center><input type=submit class=buton value='Submit'></center>");
print("</form>");
}
else
print("<input type=hidden name=class value=$actualclass>");
print("</form>");
Edit account-details.php
Find:
print("<tr><td>Forum Banned: </td><td align=left><input name=forumbanned value=yes type=radio" . ($forumbanned ? " checked" : "") . ">Yes <input name=forumbanned value=no type=radio" . (!$forumbanned ? " checked" : "") . ">No</td></tr>\n");
Add After:
if ($CURUSER["class"] == 7){
print("<tr><td>Can Change Class?: </td><td align=left><input name=changemode value=yes type=radio" . ($changemode ? " checked" : "") . ">Yes <input name=changemode value=no type=radio" . (!$changemode ? " checked" : "") . ">No</td></tr>\n");
}
Note: Assuming that you have the admin class 7, if not you have to change te 7 by your admin class ID
Then Find:
$forumbanned = $user["forumbanned"] == 'yes';
Add After:
$changemode = $user["changemode"] == 'yes';
Edit admin-modtask.php
Find:
$forumbanned = $_POST["forumbanned"];
Add After:
$changemode = $_POST["changemode"];
In the query find:
forumbanned='$forumbanned',
Add after:
changemode='$changemode',upload attached file to your root directory.
Tell me if i forget something.
Enjoy.
How to use: Edit your user in account-details.php and set teh "Can change class" to yes, you can make that to any user you want to give this feature. Use it carrefully!

Screens:


[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=3257"]changemode.php[/url]