Online Time point..
#4

onlinetime cash 

 

you can do it with 3 method

 

-with php but you need to run it every time on youre windows

- with .sh scripte you can creat it and every time you start server you start it too with ./onlineCash.sh it is hard to do it

- with onlinecash.exe you cann creat one give cash for online user and you can start it with mono cashonline like cashserver

 

here is fixed php scripte

 

credit Max 

 

Paramount

 

Siban

 

 

<?php

 
// Verificacion de la IP
$MyIP = array(yourhome ip);
if(!in_array($_SERVER["REMOTE_ADDR"], $MyIP)) 
{
header("HTTP/1.0 403 protection");
die("Error: access denied!");
}
$ServerIP = "127.0.0.1";
$UserName = "root";
$Password = "";
$DataBase = "auth";
$Points = 5;
$MySQL_Connect = mysql_connect( $ServerIP , $UserName , $Password ) or die( mysql_error() );
 
$mysql = mysql_select_db( $DataBase, $MySQL_Connect) or die( mysql_error() );
$result = mysql_query("SELECT a_portal_index from t_users WHERE a_zone_num > -1");
$resulta = mysql_query("SELECT count(a_index) from t_users WHERE a_zone_num > -1");
$r1 = mysql_fetch_row( $resulta );
$Effected = $r1[0];
while($r2 = mysql_fetch_array( $result ))
{
$uID = $r2[a_portal_index];
mysql_query("UPDATE bg_user SET cash = cash + 4 where user_code = $uID");
}
?>
<html>
<head>
<title>Auto-Cash for Online Time</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function Timer(id, minLimit, callback){
var thisTimer = this;
this.limit = minLimit * 60;
this.callback = callback;
this.timer = 0;
this.addEvent(window, load, function(){
thisTimer.el = document.getElementById(id);
thisTimer.txt = thisTimer.el.firstChild;
thisTimer.intv = setInterval(function(){thisTimer.intvFunc();}, 1000);
});
}
Timer.prototype = {
 
intvFunc: function(){
this.txt.nodeValue = this.formatTime(++this.timer);
if(this.timer === this.limit){
clearInterval(this.intv);
this.callback.call(this);
}
},
formatNum: function(n){
return n < 10? 0 + n : n;
},
formatTime: function (n, m, s){
s = n % 60;
m = (n - s) / 60;
return [this.formatNum(m), :, this.formatNum(s)].join();
},
addEvent: (function(){return window.addEventListener? function(el, ev, f){
el.addEventListener(ev, f, false);
}:window.attachEvent? function(el, ev, f){
el.attachEvent(on + ev, f);
}:function(){return;};
})()
};
new Timer(timer1, 5, function(){this.el.parentNode.style.color = red});
</script>
</head>
<body>
<font color = blue>accounts Affected: <?php print $Effected; ?>
<div> 1 minuto: <font color = red><b><span id="timer1">00:00</span></b></font></div>
Players receive <font color = red><b><?php print $Points; ?></b></font> Points to be in every one minute.</font>
<meta http-equiv="refresh" content="60; url=online.php">
</body>
</html>



Messages In This Thread
[No subject] - by MrBuSta - 01-21-2014, 08:59 PM
[No subject] - by Wrong - 01-22-2014, 08:02 AM
[No subject] - by LikeToMove - 01-23-2014, 11:47 AM
[No subject] - by SibaN - 01-23-2014, 06:57 PM
[No subject] - by Paramount - 01-23-2014, 07:02 PM
[No subject] - by MrBuSta - 01-23-2014, 07:04 PM
[No subject] - by MrBuSta - 01-23-2014, 07:11 PM
[No subject] - by SibaN - 01-23-2014, 07:30 PM
[No subject] - by MrBuSta - 01-23-2014, 07:33 PM
[No subject] - by MrBuSta - 01-23-2014, 07:39 PM
[No subject] - by SibaN - 01-23-2014, 07:48 PM
[No subject] - by MrBuSta - 01-23-2014, 07:59 PM
[No subject] - by SibaN - 01-23-2014, 08:04 PM
[No subject] - by MrBuSta - 01-23-2014, 08:06 PM
[No subject] - by MrBuSta - 01-23-2014, 08:11 PM
[No subject] - by Wizatek - 01-23-2014, 08:16 PM
[No subject] - by MrBuSta - 01-23-2014, 08:25 PM
[No subject] - by MrBuSta - 01-23-2014, 08:29 PM
[No subject] - by Wizatek - 01-23-2014, 08:45 PM
[No subject] - by MrBuSta - 01-23-2014, 08:45 PM
[No subject] - by Wizatek - 01-23-2014, 09:16 PM
[No subject] - by MrBuSta - 01-23-2014, 09:24 PM
[No subject] - by Wizatek - 01-23-2014, 10:57 PM
[No subject] - by MrBuSta - 01-24-2014, 10:49 PM
[No subject] - by Wizatek - 01-25-2014, 09:20 AM
[No subject] - by BlaSteDGames - 01-25-2014, 09:20 PM
[No subject] - by Canton - 01-28-2014, 10:22 PM
[No subject] - by MrBuSta - 01-28-2014, 10:32 PM
[No subject] - by Paramount - 01-28-2014, 10:34 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)