Online Time point..
#26

<!DOCTYPE html>

<html>

<head>

<title>Credit ToXiC L33T</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script type="text/javascript">

 

<?PHP

error_reporting(E_ALL);

ini_set(display_errors, 1);

 

if ($_SERVER[REMOTE_ADDR] == "127.0.0.1"){ ?>

 

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;};

})()

};

 

// Usage: new Timer(id_of_counting_element, #_of_mins, callback_function(){});

new Timer(timer1, 5, function(){this.el.parentNode.style.color = red});

</script>

</head>

<body bgcolor="#C7C7C9">

<?php

// Mysql IP

$dbset["host"] = 127.0.0.1; // dns or ip

// Mysql Login

$dbset["username"] = root; // Mysql username

$dbset["password"] = password; // Mysql password

// Mysql Databases

$dbset["lc_auth"] = newproject_db_auth; // auth database

$dbset["lc_authORdb"] = newproject_db_user; // user database

 

    try {

    $conn234 = new PDO(mysql:host=.$dbset["host"]., $dbset["username"], $dbset["password"]);

    } catch(PDOException $e) {

    echo ERROR: . $e->getMessage();

    }

    

    echo "<b><font size=6>Online Time by ToXiC L33T</font></b><br /><font color=red>KEEP THIS FILE HIDDEN, ONLY RUN ON ROOT</font><br/>";

 

$query = sprintf("SELECT a_portal_index from %s.t_users WHERE a_zone_num > -1", $dbset["lc_authORdb"] );

$dbh = $conn234->prepare( $query );

$dbh->execute();

$query1 = sprintf("SELECT count(a_index) from %s.t_users WHERE a_zone_num > -1", $dbset["lc_authORdb"] );

$dbh1 = $conn234->prepare( $query1 );

$dbh1->execute();

    $r1a = $dbh1->fetch();

    $Effected = $r1a[0];

    

    while( $r1 = $dbh->fetch() ){

$UID = $r1[a_portal_index];

$query2 = sprintf("UPDATE %s.bg_user SET cash = cash + 3 WHERE user_code = ". $UID ."", $dbset["lc_auth"] );

$dbh2 = $conn234->prepare( $query2 );

$dbh2->execute();

}

?>

<hr/><br/>

Effected Accounts: <font color=green><?PHP print $Effected; ?></font>

<div>Next OLT in 5 minutes: <font color=orange><span id="timer1">00:00</span></font></div>

<meta http-equiv="refresh" content="300; url=onlinetime.php">

</body>

 

<?php 

} else {

echo "</head><body>Please run this from 127.0.0.1 on your root server</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)