Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Class Change
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2015-04-08 11:48:44
Hello,
 
Here is a mod that allows you to change classes without going through your database, but through your login block.
 
It is very old and I just put it updated.
 
Modified file: Yes
 
SQL: YES
 
BEFORE ANY CHANGES MAKE A Service
 
 
SQL :
 
ALTER TABLE users ADD `changemode` enum('yes','no') NOT NULL default 'no';

Once the query executed go in your users table to put 'yes' to your nickname in the ChangeMode column.

Open your blocks / login_block.php and searching

<?php if ($CURUSER["control_panel"]=="yes") {print("<a href="admincp.php">".T_("STAFFCP")."</a>");}?>

Add below:

<?php
if ($CURUSER["changemode"]=="yes") {
   print("<center><form name='mod_form_1' method=post action=changemode.php>n");
$actualclass=$CURUSER['class'];
$class = "<option value=0>---Sélectionnez ----</option>n";
$query = SQL_Query_exec("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>Changer de Grade</b></font><br/><select name=class>n$classn</select>");
   print("<br/><br/><center><input type=submit class=buton value='Envoyer'></center>");
   print("</form></center>");
}
   else
   print("<input type=hidden name=class value=$actualclass>");
   print("</form></center>");
?>

Changemode.php open the file (I provide) and search

$maxclass = 10;

Replace the figure by the number of groups you have on your site.

result


[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7209"]changemode.php[/url]
changemode.php
Download
Unknown User
2019-07-15 19:17:27
[php]
<?php
if ($CURUSER["changemode"]=="yes") {
   print("<center><form name='mod_form_1' method=post action=changemode.php>\n");
   $actualclass=$CURUSER['class'];
   $class = "<option value=0>---Sélectionnez ----</option>\n";
   $query = SQL_Query_exec("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>Changer de Grade</b></font><br /><select name=class>\n$classn</select>");
   print("<br /><br/><center><input type=submit class=buton value='Envoyer'></center>");
   print("</form></center>");
} else
   print("<input type=hidden name=class value=$actualclass>");
   print("</form></center>");
?>
[/php]
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728