foxed K cron script
authorniekt0 <niekt0@kyberia.cz>
Wed, 27 Oct 2010 21:39:38 +0000 (23:39 +0200)
committerniekt0 <niekt0@kyberia.cz>
Wed, 27 Oct 2010 21:39:38 +0000 (23:39 +0200)
cron/k.php

index 6adda066f9d46df20bf18433197e8fc0aa09c978..17c85609149cffd65fc631d1d106fba05e860ba2 100755 (executable)
@@ -1,8 +1,19 @@
 #!/usr/bin/php
 <?php
-require('/storage/system/www-root/kyberia.sk/config/config.inc');
-require(SYSTEM_ROOT.'/inc/database.inc');
-require(SYSTEM_ROOT.'/inc/senate.inc');
+/*
+ * Script that restores number of K for all users.
+ * Called once a day.
+ */
+
+
+// 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('../config/config.inc');
+require(INCLUDE_DIR.'/database.inc');
+require(INCLUDE_DIR.'/senate.inc');
 
 $db = new CLASS_DATABASE();
 $db->query('update users set user_k = '. DAILY_K);
This page took 0.103217 seconds and 4 git commands to generate.