// Find the current version to install $current_version = '0.0.0'; foreach ($versions as $version => $actions) { $current_version = $version; } $template->assign_var('L_TITLE_EXPLAIN', (isset($user->lang[$mod_name . '_EXPLAIN']) ? $user->lang[$mod_name . '_EXPLAIN'] . '<br /><br />' : '') . sprintf($user->lang['VERSIONS'], $current_version, isset($config[$version_config_name]) ? $config[$version_config_name] : $user->lang['NONE'])); $submit = isset($_POST['submit']) ? true : false; $action = request_var('action', ''); $version_select = request_var('version_select', ''); $current_page = strpos($user->page['page'], '?') !== false ? substr($user->page['page'], 0, strpos($user->page['page'], '?')) : $user->page['page']; $stages = array('CONFIGURE' => array('url' => append_sid($phpbb_root_path . $current_page)), 'CONFIRM', 'ACTION'); if (!isset($options) || !is_array($options)) { $options = array(); } $options = array('legend1' => 'OPTIONS', 'action' => array('lang' => 'ACTION', 'type' => 'custom', 'function' => 'umil_install_update_uninstall_select', 'explain' => false), 'version_select' => array('lang' => 'VERSION_SELECT', 'type' => 'custom', 'function' => 'umil_version_select', 'explain' => true), 'display_results' => array('lang' => 'DISPLAY_RESULTS', 'type' => 'radio:yes_no', 'explain' => true, 'default' => $force_display_results)) + $options; if (!$submit && !$umil->confirm_box(true)) { $umil->display_stages($stages); $umil->display_options($options); $umil->done(); } else { if (!$umil->confirm_box(true)) { $umil->display_stages($stages, 2); $hidden = array(); foreach ($options as $key => $data) { $hidden[$key] = request_var($key, '', true); } switch ($action) { case 'install': if (!isset($user->lang['INSTALL_' . $mod_name])) { $user->lang['INSTALL_' . $mod_name] = sprintf($user->lang['INSTALL_MOD'], $user->lang[$mod_name]); $user->lang['INSTALL_' . $mod_name . '_CONFIRM'] = sprintf($user->lang['INSTALL_MOD_CONFIRM'], $user->lang[$mod_name]);
*/ define('IN_PHPBB', true); $phpbb_root_path = defined('PHPBB_ROOT_PATH') ? PHPBB_ROOT_PATH : '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include $phpbb_root_path . 'common.' . $phpEx; require $phpbb_root_path . 'ads/constants.' . $phpEx; // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup('mods/info_acp_ads'); // Display a login box if they are not logged in if (!$user->data['is_registered']) { login_box(); } if (!file_exists($phpbb_root_path . 'umil/umil_frontend.' . $phpEx)) { trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR); } include $phpbb_root_path . 'umil/umil_frontend.' . $phpEx; $umil = new umil_frontend('ACP_ADVERTISEMENT_MANAGEMENT', true); // Check after initiating UMIL. if ($user->data['user_type'] != USER_FOUNDER) { trigger_error('FOUNDERS_ONLY'); } if ($umil->confirm_box(true)) { include $phpbb_root_path . 'ads/versions.' . $phpEx; $umil->run_actions('uninstall', $versions, 'ads_version'); } else { $umil->display_stages(array('CONFIRM', 'UNINSTALL')); $umil->confirm_box(false, 'UNINSTALL'); } $umil->done();
$phpEx = substr(strrchr(__FILE__, '.'), 1); include $phpbb_root_path . 'common.' . $phpEx; $user->session_begin(); $auth->acl($user->data); $user->setup('mods/asacp'); $user->add_lang('mods/info_acp_asacp'); if (!$user->data['is_registered']) { login_box(); } if ($user->data['user_type'] != USER_FOUNDER) { trigger_error('FOUNDER_ONLY'); } if (!defined('SPAM_WORDS_TABLE')) { define('SPAM_WORDS_TABLE', $table_prefix . 'spam_words'); define('SPAM_LOG_TABLE', $table_prefix . 'spam_log'); } if (!file_exists($phpbb_root_path . 'umil/umil_frontend.' . $phpEx)) { trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR); } include $phpbb_root_path . 'umil/umil_frontend.' . $phpEx; $umil = new umil_frontend('REMOVE_ASACP', true); $stages = array('CONFIRM' => array('url' => append_sid($phpbb_root_path . 'antispam/remove_asacp.' . $phpEx)), 'UNINSTALL'); if ($umil->confirm_box(true)) { $umil->display_stages($stages, 2); include $phpbb_root_path . 'antispam/asacp_versions.' . $phpEx; $umil->run_actions('uninstall', $versions, 'asacp_version'); } else { $umil->display_stages($stages); $umil->confirm_box(false, 'REMOVE_ASACP'); } $umil->done();