X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=cron%2Fk.php;h=8388ca9c477a87bcb9dfc428a37990e2b3da9cd8;hb=340023f1b871b520f6f5d9833e9538f3cb972176;hp=73a5dd1779fa08563fca27ce2f1a3ff975a21d64;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/cron/k.php b/cron/k.php index 73a5dd1..8388ca9 100755 --- a/cron/k.php +++ b/cron/k.php @@ -1,12 +1,19 @@ -#!/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_once($dir.'/../wwwroot/config/config.inc'); + +require_once(INCLUDE_DIR.'/database.inc'); +require_once(INCLUDE_DIR.'/log.inc'); + +$db = new CLASS_DATABASE(); +$db->query('update users set user_k = '. DAILY_K); +?>