01-23-2014, 06:57 PM
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>

