readded process-images script to cron and added 101.gif
[mirrors/Kyberia-bloodline.git] / cron / k.php
index 73a5dd1779fa08563fca27ce2f1a3ff975a21d64..82399103eb0521a9a57baf699606e09778f85b37 100755 (executable)
@@ -1,12 +1,20 @@
-#!/usr/local/bin/php
+#!/usr/bin/php
 <?php
-require('../config/config.inc');
-//connecting to database and creating universal $db object
-require(SYSTEM_ROOT.'/inc/log.inc');
-require(SYSTEM_ROOT.'/inc/database.inc');
-require(SYSTEM_ROOT.'/inc/nodes.inc');
-$db=new CLASS_DATABASE();
-$db->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);
+?>
This page took 0.126852 seconds and 4 git commands to generate.