function error_check() { $errors = array(); // Check for older versions if (version_compare(ANCHOR_VERSION, $version = latest_version(), '<')) { $errors[] = 'Your version of Anchor is out of date. Please <a href="http://anchorcms.com">download the latest version</a>.'; } // do something useful with it return count($errors) ? $errors : false; }
function check_for_wizard_update($echo_message = false) { $latest_version = latest_version(); $update_available = update_is_available($latest_version); if ($update_available) { if ($echo_message) { echo '<p class="alert">An updated version of this script is available <a href="' . LOADER_WIZARD_URL . '">here</a></p>'; } return $latest_version; } else { return $update_available; } }
function download_link($pname, $button = false) { global $platforms; global $url_base; global $client_info; $p = $platforms[$pname]; $v = latest_version($p); $file = $v['file']; if (array_key_exists('vbox_file', $v)) { $vbox_file = $v['vbox_file']; $vbox_version = $v['vbox_version']; $vbox_url = $url_base . $vbox_file; $vbox_path = "dl/{$vbox_file}"; $vbox_size = number_format(filesize($vbox_path) / 1000000, 2); } else { $vbox_file = null; } if (strstr($client_info, 'Windows NT 4') || strstr($client_info, 'Windows NT 5')) { $vbox_file = null; } $long_name = $p['name']; $num = $v['num']; $path = "dl/{$file}"; $url = $url_base . $file; $dlink = "<a href=\"{$url}\">{$file}</a>"; $s = number_format(filesize($path) / 1000000, 2); if ($button) { if ($vbox_file) { echo tra("We recommend that you also install VirtualBox, so your computer can work on science projects that require it."); echo " <a href=wiki/VirtualBox>"; echo tra("Learn more about VirtualBox."); echo "</a>"; echo "<table><tr valign=top><td>\n"; echo "\n <table cellpadding=10><tr valign=top><td class=button>\n <a href=\"{$vbox_url}\"><font size=4><u>" . tra("Download BOINC + VirtualBox") . "</u></font></a>\n <br>" . sprintf(tra("for %s"), $long_name) . " ({$vbox_size} MB)" . "<br><span class=note>" . sprintf(tra("BOINC %s"), $num) . ", " . sprintf(tra("VirtualBox %s"), $vbox_version) . "</span></td></tr>\n </table>\n "; echo "</td><td>\n"; } echo "\n <table cellpadding=10><tr valign=top><td class=button>\n <a href=\"{$url}\"><font size=4><u>" . tra("Download BOINC") . "</u></font></a>\n <br>" . sprintf(tra("for %s"), $long_name) . " ({$s} MB)" . "<br><span class=note>" . sprintf(tra("BOINC %s"), $num) . "</span></td></tr>\n </table>\n "; if ($vbox_file) { echo "</td></tr></table>\n"; } if ($pname == 'linux' || $pname == 'linuxx64') { echo "<p>", linux_info(); } } else { if ($vbox_file) { echo "<tr>\n <td class=rowlineleft>{$long_name}</td>\n <td class=rowline> {$num} (with Virtualbox {$vbox_version})</td>\n <td class=rowlineright><a href={$vbox_url}>Download</a> ({$vbox_size} MB)</td>\n </tr>\n "; } echo "<tr>\n <td class=rowlineleft>{$long_name}</td>\n <td class=rowline> {$num}</td>\n <td class=rowlineright><a href={$url}>Download</a> ({$s} MB)</td>\n </tr>\n "; } }
function get_download_url($pname, $need_vbox) { global $platforms; global $url_base; $need_vbox = get_str("need_vbox", true); $p = $platforms[$pname]; $v = latest_version($p); $file = $v['file']; if ($need_vbox && array_key_exists('vbox_file', $v)) { $file = $v['vbox_file']; } $url = $url_base . $file; return $url; }
function error_check() { $errors = array(); // Check for older versions if (version_compare(ANCHOR_VERSION, $version = latest_version(), '<')) { $errors[] = 'Your version of Anchor is out of date. Please <a href="http://anchorcms.com">download the latest version</a>.'; } // Check if the install directory is still present if (file_exists(PATH . 'install')) { $errors[] = 'Please delete the install directory or rename it.'; } // Check if the upgrade directory is still present if (file_exists(PATH . 'upgrade')) { $errors[] = 'Please delete the upgrade directory or rename it.'; } // do something useful with it return count($errors) ? $errors : false; }
function download_link($pname, $button = false) { global $platforms; global $url_base; $p = $platforms[$pname]; $v = latest_version($p); $file = $v['file']; $long_name = $p['name']; $num = $v['num']; $path = "dl/{$file}"; $url = $url_base . $file; $dlink = "<a href=\"{$url}\">{$file}</a>"; $s = number_format(filesize($path) / 1000000, 2); if ($button) { echo "\n <table cellpadding=10><tr><td class=heading>\n <a href=\"{$url}\"><font size=4><u>" . tra("Download BOINC") . "</u></font></a>\n <br>" . sprintf(tra("%s for %s (%s MB)"), $num, $long_name, $s) . "\n </td></tr> </table>\n "; if ($pname == 'linux' || $pname == 'linuxx64') { echo "<p>", linux_info(); } } else { echo "<tr>\n <td class=rowlineleft>{$long_name}</td>\n <td class=rowline> {$num}</td>\n <td class=rowlineright><a href={$url}>Download</a> ({$s} MB)</td>\n </tr>\n "; } }
<?php if (!defined('BASEPATH')) { exit(__('No direct script access allowed')); } ?> <p class="clear"> </p> <div class="footer"> powered by <a href="http://codefight.org/">codefight cms</a><?php echo latest_version(); ?> </div> </div> </body> </html>
<p><h4>Application Version</h4> <ul> <li>The latest Application version is <?php echo latest_version("app"); ?> </li> <li>You are running Application version <?php echo current_version("app"); ?> </li> </ul> </p> <p><h4>Database Version</h4> <ul> <li>The latest Database version is <?php echo latest_version("db"); ?> </li> <li>You are running Database version <?php echo current_version("db"); ?> </li> </ul> </p> <p>You can download the most recent code <a href="http://code.google.com/p/simplerisk/downloads/list" target="newwindow">here</a>.</p> </div> </div> </div> <div class="row-fluid"> <div class="span6"> <div class="hero-unit">