X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=cron%2Fk.php;h=82399103eb0521a9a57baf699606e09778f85b37;hb=a3be90c67dddac260c8267cf61ccd0a6b758cb35;hp=73a5dd1779fa08563fca27ce2f1a3ff975a21d64;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/cron/k.php b/cron/k.php index 73a5dd1..8239910 100755 --- a/cron/k.php +++ b/cron/k.php @@ -1,12 +1,20 @@ -#!/usr/local/bin/php +#!/usr/bin/php query("update users set user_k=6"); +/* + * Script that restores number of K for all users. + * Called once a day. + */ -?> \ No newline at end of file +// Use relative address of config file +// Change this, if you move you cron directory. +$dir=substr(__FILE__, 0, strrpos(__FILE__, '/')); +require($dir.'/../wwwroot/config/config.inc'); + +require(INCLUDE_DIR.'/database.inc'); +require(INCLUDE_DIR.'/senate.inc'); +require(INCLUDE_DIR.'/log.inc'); + +$db = new CLASS_DATABASE(); +$db->query('update users set user_k = '. DAILY_K); +?>