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]
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]