Exemplo n.º 1
0
 function output()
 {
     global $vars;
     if (file_exists(ROOT_PATH . "config/startup.html")) {
         $this->tpl['startup_html'] = file_get_contents(ROOT_PATH . "config/startup.html");
     }
     $this->tpl['wind_version'] = format_version($vars['info']['version']);
     $this->tpl['community_name'] = $vars['community']['name'];
     $this->tpl['community_short_name'] = $vars['community']['short_name'];
     return template($this->tpl, __FILE__);
 }
Exemplo n.º 2
0
 function output()
 {
     global $db, $php_start, $main, $vars;
     if ($this->hide) {
         return;
     }
     $this->tpl['php_time'] = getmicrotime() - $php_start;
     $this->tpl['mysql_time'] = $db->total_time;
     $this->tpl['wind_version'] = format_version($vars['info']['version']);
     if (isset($main->userdata->privileges['admin']) && $main->userdata->privileges['admin'] === TRUE && $vars['debug']['enabled'] == TRUE) {
         $this->tpl['debug_mysql'] = ROOT_PATH . "debug/mysql.php?" . get_query_string();
     }
     return template($this->tpl, __FILE__);
 }
Exemplo n.º 3
0
 public function __construct()
 {
     $this->info = $this->info();
     $slug = isset($this->info['slug']) ? trim($this->info['slug']) : FALSE;
     if (empty($slug)) {
         $this->info['slug'] = $this->slug();
     }
     //version check
     $ver = get_app_version(true);
     $min_ver = $this->get_info('min_ver');
     if (!empty($min_ver)) {
         $min_ver = format_version($min_ver, true);
         if ($ver < $min_ver) {
             //not required version, disallow!
             $plg = Plugin::factory()->get_by_slug($this->get_info('slug'));
             if ($plg->exists()) {
                 $plg->active = FALSE;
                 $plg->save();
             }
             $ver = format_version($ver);
             $min_ver = format_version($min_ver);
             $lnk = site_url('administration/dashboard');
             $plglnk = anchor($this->get_info('url'), $this->get_info('name'));
             show_error("Version mismatch for plugin {$plglnk}! " . "You are running version {$ver} and minimum required version is {$min_ver}. " . "Plugin is disabled, please <a href='{$lnk}'>click here</a>!");
         }
     }
 }
Exemplo n.º 4
0
# @projectManager David DuVal <*****@*****.**>
# @package        PHPLinkDirectory
# ######################################################################
*/
require_once 'init.php';
//Clear the entire cache
$tpl->clear_all_cache();
//Clear all compiled template files
$tpl->clear_compiled_tpl();
$url = get_url('http://code.google.com/p/scriptmind-links/wiki/CurrentVersion?show=content', URL_CONTENT, $_SERVER['SERVER_NAME'] . request_uri());
$sv = parse_version($url['content']);
$cv = parse_version(CURRENT_VERSION);
//Version check
if ($sv > $cv) {
    $version = _L('A new version (##VERSION##) is available.');
    $version = str_replace('##VERSION##', format_version($sv), $version);
    $tpl->assign('update_available', 1);
} else {
    $version = _L('Your installation is up to date, no updates are available for your version of ScriptMind::Links.');
    $tpl->assign('update_available', 0);
}
//Security check
$security_warnings = install_security_check();
if (!empty($security_warnings)) {
    $tpl->assign('security_warnings', $security_warnings);
}
unset($security_warnings);
//Directory statistics
$stats[0] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` > '1'");
$stats[1] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = '1'");
$stats[2] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = '0'");
Exemplo n.º 5
0
 public function finish()
 {
     if (is_db_conf_empty()) {
         redirect('setup/help/database-config-missing');
     }
     file_put_contents(FCPATH . "installed.txt", format_version(CS_SETUP_VERSION));
     $this->templatemanager->assign('login_url', 'administration/dashboard');
     $this->templatemanager->show_template("finish");
 }