Пример #1
0
/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 */
define('WP_DEBUG', false);
// Deactivate the loading of compressed Javascript and CSS files
define('SCRIPT_DEBUG', false);
// Activates the saving of database queries in an array ($wpdb->queries).
// Set to true and uncomment code in theme reactor-primaria-1 in footer.php
//  and in wp-admin/admin-footer.php for admin pages, to use it.
define('SAVEQUERIES', false);
// Default blog creation theme.
define('WP_DEFAULT_THEME', 'NODES');
// Autosave time
define('AUTOSAVE_INTERVAL', 300);
// 5 minuts
// Number of revisions of each post
define('WP_POST_REVISIONS', 3);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if (!defined('ABSPATH')) {
    define('ABSPATH', dirname(__FILE__) . '/');
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
// Call to XTEC function to collect basic stats info
save_stats();
Пример #2
0
         continue;
     }
     $res = @$sq->query('SELECT MIN(tar0),MAX(tar0),MIN(tar1),MAX(tar1) FROM edata');
     if (!$res instanceof Sqlite3Result) {
         close_sqlite();
         continue;
     }
     while ($r = $res->fetchArray(SQLITE3_NUM)) {
         //print(($r[1]-$r[0])*(0.2003+0.4144+0.0115)."\n");
         //print(($r[3]-$r[2])*(0.0691+0.2023+0.0115)."\n");
         $peak = $r[1] - $r[0];
         $off_peak = $r[3] - $r[2];
     }
     $res->finalize();
     close_sqlite();
     save_stats($i, array($peak, $off_peak));
 }
 if ($peak) {
     $tm = localtime($t, true);
     if ($tm['tm_wday'] == 0 || $tm['tm_wday'] == 6) {
         $class = "weekend";
     } else {
         $class = "";
     }
     $price_peak = $peak * (0.4105 + 0.2023 + 0.0);
     $price_off_peak = $off_peak * (0.2006 + 0.0698 + 0.0);
     $alt_price = ($peak + $off_peak) * (0.3132 + 0.1654 + 0.0);
     if ($alt_price < $price_peak + $price_off_peak) {
         $alt = "red";
     } else {
         $alt = "green";