[Help] Online Time Script

piparins

Member
Joined
Jul 27, 2010
Messages
64
Reaction score
7
Hello, can anyone put here Online Time script, which counts day, hour and minutes for 97d+99i server, I can`t found anything.
 
I have problem, with this script. I`m using MFS team 0.5 web and everything is ok, but when I trade my online hours, that numbers don`t delete and it`s continuing counting from last number, not from 0.
 
Give your script for trading the time and may we can help you. :)
 
Here you go.
<?
?>
<?php
if(isset($_POST['submit'])) { online_hours(); }
include ("config.php");
global $resethours;
global $wincredits;
?>
Trade you Online Hours for CREDITS !
<br>
Receive <?php echo $wincredits; ?> credits per hour !<br> <?php echo $resethours; ?>H Online = <?php echo $wincredits; ?> Credits !<br>
<table border=0 cellspacing=5 cellpadding=0>
<td width='250'>
<form name="" method="post" action="">
<table width="100%" border="0" cellspacing="1" cellpadding="1">

<tr>
<td width="70">Login ID :</td>
<td>
<input name="login" type="text" id="login" maxlength="10">
</td>
</tr>
<tr>
<td width="70">Password :</td>
<td><input name="password" type="password" id="password" maxlength="16">
</td>
</tr>
<tr>
<td width="70">&nbsp;</td>

</tr>
<tr>
<tr>
<td width="100" align="right"><input type="submit" class=button name="submit" value="Submit"></td>
<td><input type="reset" class=button name="Submit2" value="Reset"></td>
</tr>
</table>

</form>
</div>
</td>
</table>
 
The script actually is this function: online_hours()... I don't know which web are you using, but it must be in file in "includes" folder.
 
I am using MFS team web 0.5
So, can anyone help me? Maybe give new script for online hours trade!?
 
Last edited:
Give us the online_hours function and we will help you.
 
Here you go.
// Exchange Online Time normal
function online_hours()
{
global $resethours;
global $wincredits;

$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$query = mssql_query("Select memb___id,TotalTime,ConnectTM,DisConnectTM from MEMB_STAT where memb___id='$account'");
$row = mssql_fetch_row($query);

$querypass = mssql_query("Select memb___id,memb__pwd,memb_name,bloc_code,vip From MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$char = mssql_fetch_row($querypass);

$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);

if($account != $char[0]) { echo"<font color='red'>Your Account is incorrect!</font><br><br>"; $error=1; }
if($password != $char[1]) { echo"<font color='red'>Your Password is incorrect!</font><br><br>"; $error=1;}
else
{
if($error != 1) {

$onhourss = $char[3];
$creditshourss = $row[1] * $wincredits;

if($row[1] <= 0) { echo"Account $account must have<font color=red> minimum $resethours Online hour in game</font> !</font><br><br>"; $error=2;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!<br> Please LogOff First!</font><br><br>"; $error=2;}

else
{
if($error != 2)
{
echo"All the hours spent in game were removed and you earned <font color='orange'>$creditshourss </font><font color='green'>credits !</font><br><br>";
$a = mssql_query("DELETE FROM MEMB_STAT Where memb___id='$account'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$creditshourss WHERE memb___id='$account'");
}
}
}
}
}

And this is for VIP users.
// Exchange Online Time VIP
function online_hours_vip()
{
global $resethours_vip;
global $wincredits_vip;

$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();


$query = mssql_query("Select memb___id,TotalTime,ConnectTM,DisConnectTM from MEMB_STAT where memb___id='$account'");
$row = mssql_fetch_row($query);

$querypass = mssql_query("Select memb___id,memb__pwd,memb_name,bloc_code,vip From MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$char = mssql_fetch_row($querypass);


$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);



if($account != $char[0]) { echo"<font color='orange'>Your $char[0] Account is not correct!</font><br>"; $error=1; }
if($password != $char[1]) { echo"<font color='red'>Password is not correct</font><br>"; $error=1; }
else
{
if($error != 1) {

$onhourss = $char[3];

$creditshourss = $row[1] * $wincredits_vip;



if($char[4] == 0) {echo"<font color='red'>You are not a <font color='green'>VIP</font> member <img src='_img/vip-no.gif'></img></font><br>"; $error=2;}
if($row[1] <= 0) { echo"<font color='red'>Account $account must have minimum $resethours_vip Online hours in game !</font><br><br>"; $error=2;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!<br> Please LogOff First!</font><br><br>"; $error=2;}



else
{
if($error != 2)
{
echo"All the hours spent in game were removed and you earned <font color=orange>$creditshourss</font> credits!<br>";
$a = mssql_query("DELETE FROM MEMB_STAT Where memb___id='$account'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$creditshourss WHERE memb___id='$account'");
}
}
}
$query2 = mssql_query("Select CREDITS from MEMB_CREDITS where memb___id='$account'");
$row2 = mssql_fetch_row($query2);

echo"<font color=green>Now you have $row2[0] credits</font><br><br>";
}
}
 
darksteam.net/attachment.php?attachmentid=3186&stc=1&d=1342545743
Try this one
 

Attachments

  • onlinetime.rar
    1.3 KB · Views: 133
  • Like
Reactions: piparins
This is working fine, thanx HOLIGAN, but now guys, I have problem with Online Time Trade script, when I sell hours, It sells even Minutes, and if I have for example 30minutes, not 1hour online, script will sell 30minutes for credits *2, can anyone help me with Trade Online Hours Script?
 
I don`t want to make new Thread, so, can anyone help me with MU NEWS, I want to make like when I press on news title, it opens, I know that it could be realized with JavaScript, can anyone help me with it!?