/** * Handles the plugin administration. * * @return void * * @global bool Whether the plugin administration is requested. * @global string The value of the <var>admin</var> GP parameter. * @global string The value of the <var>action</var> GP parameter. * @global array The paths of system files and folders. * @global string The (X)HTML fragment to insert into the head element. * @global string The (X)HTML fragment to insert into the contents area. */ protected static function handleAdministration() { global $advancedform, $admin, $action, $pth, $hjs, $o; if (isset($advancedform) && $advancedform == 'true') { if (include_once $pth['folder']['plugins'] . 'jquery/jquery.inc.php') { include_jQuery(); include_jQueryUI(); } $hjs .= PHP_EOL . '<script type="text/javascript">/* <[CDATA[ */' . 'var ADVFRM_TX = ' . json_encode(self::getJSLocalization()) . ';/* ]]> */</script>' . PHP_EOL; $hjs .= '<script type="text/javascript" src="' . $pth['folder']['plugins'] . 'advancedform/admin.js"></script>' . PHP_EOL; $o .= print_plugin_admin('on'); switch ($admin) { case '': $o .= self::renderVersion() . self::renderSystemCheck(); break; case 'plugin_main': switch ($action) { case 'new': $o .= self::createForm(); break; case 'edit': $o .= Editor::editForm($_GET['form']); break; case 'save': $o .= self::saveForm($_GET['form']); break; case 'delete': $o .= self::deleteForm($_GET['form']); break; case 'copy': $o .= self::copyForm($_GET['form']); break; case 'import': $o .= self::importForm($_GET['form']); break; case 'export': $o .= self::exportForm($_GET['form']); break; case 'template': $o .= self::createFormTemplate($_GET['form']); break; default: $o .= Editor::renderFormsAdministration(); } break; default: $o .= plugin_admin_common($action, $admin, 'advancedform'); } } }
/** * Dispatches on administration requests. * * @return void * * @global string The value of the <var>admin</var> GP parameter. * @global string The value of the <var>action</var> GP parameter. * @global string The (X)HTML to insert into the contents area. */ public function dispatch() { global $admin, $action, $o; $this->useCalendar(); $o .= print_plugin_admin('on'); switch ($admin) { case '': $o .= $this->renderInfoView(); break; case 'plugin_main': $this->handleMainAdministration(); break; default: $o .= plugin_admin_common($action, $admin, 'realblog'); } }
function recaptcha_version() { return '<h1>Recaptcha_XH</h1>' . "\n" . '<p>Version: ' . RECAPTCHA_VERSION . '</p>' . "\n" . '<p>Recaptcha_XH is powered by ' . '<a href="http://recaptcha.net/" target="_blank">' . 'reCAPTCHA</a>.</p>' . "\n" . '<p>Copyright © 2011 Christoph M. Becker</p>' . "\n" . '<p style="text-align:justify">This program is free software: you can redistribute it and/or modify' . ' it under the terms of the GNU General Public License as published by' . ' the Free Software Foundation, either version 3 of the License, or' . ' (at your option) any later version.</p>' . "\n" . '<p style="text-align:justify">This program is distributed in the hope that it will be useful,' . ' but WITHOUT ANY WARRANTY; without even the implied warranty of' . ' MERCHAN­TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the' . ' GNU General Public License for more details.</p>' . "\n" . '<p style="text-align:justify">You should have received a copy of the GNU General Public License' . ' along with this program. If not, see' . ' <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>' . "\n"; } /** * Plugin administration */ if (!empty($recaptcha)) { // check requirements // RELEASE-TODO if (version_compare(PHP_VERSION, RECAPTCHA_PHP_VERSION) < 0) { $e .= '<li>' . sprintf($plugin_tx['recaptcha']['error_phpversion'], TETRIS_PHP_VERSION) . '</li>' . "\n"; } foreach (array('pcre') as $ext) { if (!extension_loaded($ext)) { $e .= '<li>' . sprintf($plugin_tx['recaptcha']['error_extension'], $ext) . '</li>' . "\n"; } } if (strtoupper($tx['meta']['codepage']) != 'UTF-8') { $e .= '<li>' . $plugin_tx['recaptcha']['error_encoding'] . '</li>' . "\n"; } initvar('admin'); initvar('action'); $o .= print_plugin_admin('off'); switch ($admin) { case '': $o .= recaptcha_version(); break; default: $o .= plugin_admin_common($action, $admin, $plugin); } }
if (!defined('CMSIMPLE_XH_VERSION')) { header('HTTP/1.0 403 Forbidden'); exit; } /* * Register the plugin menu items. */ if (function_exists('XH_registerStandardPluginMenuItems')) { // XH_registerStandardPluginMenuItems(false); } // } /* * Handle the plugin administration. */ if (isset($hook_xh) && $hook_xh == 'true') { $o .= print_plugin_admin('on'); if ($action == 'plugin_text') { include_once $pth['folder']['plugins'] . 'hook_xh/tool/list_hooked.php'; $o .= list_hooked_functions(); } switch ($admin) { case '': // case 'plugin_main': $o .= hook_xh_version() . HookXH_systemCheck(); break; default: //Handles reading and writing of plugin files $o .= plugin_admin_common($action, $admin, $plugin); } } /**
/** * Handles the plugin administration. * * @return void * * @global string The value of the admin GP parameter. * @global string The value of the action GP parameter. * @global string The (X)HTML of the contents area. */ protected function handleAdministration() { global $admin, $action, $o; $o .= print_plugin_admin('off'); switch ($admin) { case '': $o .= $this->infoView(); break; default: $o .= plugin_admin_common($action, $admin, 'forum'); } }