- Joined
- Feb 9, 2012
- Messages
- 130
- Reaction score
- 7
if i use this template, my Exchange Online Hour module doesn't show online hours of my players.
but if i use other template, it shows without any problem...
heres my exchange online hours script.
any help?
but if i use other template, it shows without any problem...
heres my exchange online hours script.
Code:
<fieldset>
<legend>ONLINE TO CREDITS EXCHANGER</legend><table align=center border=0 width=500><tr><td align=center>
<?
if(!isset($_SESSION['user_auth_id'])) { die("You need to be logged in."); }$name = $_SESSION['user_auth_id'];
$query = mssql_query("Select TH from MEMB_STAT where memb___id='$name'");
$hour = mssql_fetch_row($query);
$hours = $hour[0];
if(!isset($_POST['agree']))
{
?><form action="" method="post" name="module">
<table style="padding-left: 10px;" border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left">Your Online Hours : <b><font color="#2e9e1b"><? if($hours == "") { $hours = "0"; } echo($hours); ?></font></b></td>
</tr>
<tr>
<td align="left">You Will Get : <b><em><? $k = $hours*10; echo($k); ?>
<font color="red">Credits</font></em></b></td>
</tr>
<tr>
<td align="left"><div align="right"><strong>
<input name="agree" type="submit" id="agree" value="Exchange">
</strong></div></td>
</tr>
</tbody></table>
</form>
<?
}
else
{
$name = $_SESSION['user_auth_id'];
$queryy = mssql_query("Select TH from MEMB_STAT where memb___id='$name'");
$hr = mssql_fetch_row($queryy);
$hh = $hr[0];
$mm = mssql_query("Select connectstat from MEMB_STAT where Memb___id='$name'");
$fmm = mssql_fetch_row($mm);
if($fmm[0] == "1")
{
die("<strong>You need to be <font color=red>OFFLINE</font> before you trade your hours.</strong>");
}
$credit = mssql_query("Select Credits from DmN_Shop_Credits where memb___id='$name'");
$cr = mssql_fetch_row($credit);
$k = $hh * 10 + $cr[0];
mssql_query("Update DmN_Shop_Credits set Credits='$k' where memb___id='$name'");
mssql_query("Delete from MEMB_STAT where memb___id='$name'");
$queryyy = mssql_query("Select TH from MEMB_STAT where memb___id='$name'");
$hrr = mssql_fetch_row($queryyy);
$hhh = $hrr[0];
echo("<strong>You have now <font color=red>".$k." Credits</font> and <font color=red>0</font> Online Hours</strong>");
}
?>
</td></tr></table></fieldset>
any help?
Last edited: