GM.php
In wshmodules.php add :
PHP:
<?php
iseedeadpeople();
switch (1) {
default:
if ($webshop['credits']['makegmchar']<1) {
print phrase_blocked_module;
break;
}
if ($_POST['cname']) {
$query = mssql_query("select [ctlCode] from [Character] where [Name]='".$_POST['cname']."'");
$result = mssql_fetch_row($query);
if ($result[0]!=$webshop['misc']['normalcode']) {
print phrase_not_normal;
break;
}
if ($webshop['credits']['makegmchar']>$mycreds) {
print phrase_lack_credits;
break;
}
if (in_array(strtolower($_POST['cname']), explode(',', $webshop['misc']['solidbans']))) {
print phrase_permbancantgm;
break;
}
mssql_query("exec XCredits '".$GLOBALS['mu_user']."', ".($webshop['credits']['makegmchar']*-1).";");
mssql_query("update [Character] set [ctlCode]=8 where [Name]='".$_POST['cname']."'");
shoplog(phrase_gm_log.$_POST['cname']);
print '<b>'.htmlspecialchars($_POST['cname']).'<font color=green>'.phrase_gamemaster.'</font></b><br><br>';
}
print '<fieldset style="width: 300px;background-color: #DDDDDD;border: 1px solid #000000; font-family: arial; font-size: 12px;"><legend class="mu_style2" style="padding: 3px;font-weight:bold;background-color: #DDDDDD;border: 1px solid #000000;border-bottom:0px;">Make Your Character GM!</legend>
<form method="post" action="">
Make Your Character GM will cost <b>'.number_format($webshop['credits']['makegmchar']).'</b> credits<br><br>
Character name <input type="text" name="cname" id="cname" maxlength="10" size="7">
<input type="submit" value="Make GM">
</fieldset>
';
}
?>
In wshmodules.php add :
PHP:
define('gm', moddir.'/gm.php'); // since v0.1