echo $setting->value; break; case 'CURRENT_SKIN': $skins = SiteData::GetAvailableSkins(); $skin = SettingsData::GetSetting('CURRENT_SKIN'); echo '<SELECT name="CURRENT_SKIN">'; $tot = count($skins); for ($i = 0; $i < $tot; $i++) { $sel = $skin->value == $skins[$i] ? 'selected' : ''; echo '<option value="' . $skins[$i] . '" ' . $sel . '>' . $skins[$i] . '</option>'; } echo '</SELECT>'; break; case 'DEFAULT_GROUP': $allgroups = PilotGroups::getAllGroups(); $current = SettingsData::getSetting('DEFAULT_GROUP'); echo '<select name="DEFAULT_GROUP">'; foreach ($allgroups as $group) { $sel = $current->value == $group->groupid ? 'selected="selected"' : ''; echo '<option value="' . $group->groupid . '" ' . $sel . '>' . $group->name . '</option>'; } echo '</select>'; break; break; default: if ($setting->value == 'true' || $setting->value == 'false') { if ($setting->value == 'true') { $sel_true = 'selected'; $sel_false = ''; } else { $sel_true = '';
* For more information, visit www.phpvms.net * Forums: http://www.phpvms.net/forum * Documentation: http://www.phpvms.net/docs * * phpVMS is licenced under the following license: * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/ * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.phpvms.net * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ define('ADMIN_PANEL', true); include dirname(__FILE__) . '/includes/loader.inc.php'; $CURRENT_VERSION = SettingsData::getSetting('PHPVMS_VERSION'); if (!$CURRENT_VERSION) { $_GET['force'] = true; } else { $CURRENT_VERSION = $CURRENT_VERSION->value; if (substr_count($CURRENT_VERSION, '-')) { preg_match('/^[v]?(.*)-([0-9]*)-(.*)/', $CURRENT_VERSION, $matches); list($CURR_FULL_VERSION_STRING, $curr_full_version, $curr_revision_count, $curr_hash) = $matches; preg_match('/([0-9]*)\\.([0-9]*)\\.([0-9]*)/', $full_version, $matches); list($CURR_FULL_VERSION, $curr_major, $curr_minor, $curr_revision) = $matches; $CURRENT_VERSION = $curr_major . '.' . $curr_minor . '.' . $curr_revision; } } $CURRENT_VERSION = str_replace('.', '', $CURRENT_VERSION); Template::SetTemplatePath(SITE_ROOT . '/install/templates'); Template::Show('header');
* @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.phpvms.net * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ error_reporting(E_ALL); define('ADMIN_PANEL', true); include '../core/codon.config.php'; include dirname(__FILE__) . '/Installer.class.php'; # phpVMS Updater $revision = file_get_contents(dirname(dirname(__FILE__)) . '/core/version'); $major = file_get_contents(dirname(__FILE__) . '/major'); define('MAJOR_VERSION', $major); define('INSTALLER_VERSION', MAJOR_VERSION . $revision); define('UPDATE_VERSION', MAJOR_VERSION . $revision); define('REVISION', $revision); $version = SettingsData::getSetting('PHPVMS_VERSION'); if (!$version) { $_GET['force'] = true; } else { $version = $version->value; } $version = str_replace('.', '', $version); Template::SetTemplatePath(SITE_ROOT . '/install/templates'); Template::Show('header.tpl'); # Ew echo '<h3 align="left">phpVMS Updater</h3>'; # Check versions for mismatch, unless ?force is passed if (!isset($_GET['force']) && !isset($_GET['test'])) { if ($version == UPDATE_VERSION) { echo '<p>You already have updated! Please delete this /install folder.<br /><br /> To force the update to run again, click: <a href="update.php?force">update.php?force</a></p>';