function show($view, $loc, $title = '') { $template = new template('imagemanagermodule', $view, $loc); $uilevel = 99; // MAX if (exponent_sessions_isset("uilevel")) { $uilevel = exponent_sessions_get("uilevel"); } $template->assign('show', defined('SELECTOR') || $uilevel > UILEVEL_PREVIEW ? 1 : 0); if (!defined('SYS_FILES')) { include_once BASE . 'subsystems/files.php'; } $directory = 'files/imagemanagermodule/' . $loc->src; if (!file_exists(BASE . $directory)) { $err = exponent_files_makeDirectory($directory); if ($err != SYS_FILES_SUCCESS) { $template->assign('noupload', 1); $template->assign('uploadError', $err); } } global $db; $location = serialize($loc); if (!isset($_SESSION['image_cache'][$location])) { $items = $db->selectObjects("imagemanageritem", "location_data='" . serialize($loc) . "'"); $_SESSION['image_cache'][$location] = $items; } else { $items = $_SESSION['image_cache'][$location]; } $files = $db->selectObjectsIndexedArray("file", "directory='{$directory}'"); $template->assign('items', $items); $template->assign('files', $files); $template->assign('moduletitle', $title); $template->register_permissions(array('administrate', 'post', 'edit', 'delete'), $loc); $template->output(); }
function show($view, $loc = null, $title = '') { $ui_levels = exponent_sessions_get('uilevels'); if (count($ui_levels)) { $template = new template('UISwitchermodule', $view, $loc); $template->assign('levels', $ui_levels); $default = exponent_sessions_isset('uilevel') ? exponent_sessions_get('uilevel') : max(array_keys($ui_levels)); $template->assign('default_level', $default); $template->output(); } }
function show($view, $loc = null, $title = '') { $template = new template('previewmodule', $view, $loc); $level = 99; if (exponent_sessions_isset('uilevel')) { $level = exponent_sessions_get('uilevel'); } $template->assign('editMode', exponent_sessions_loggedIn() && $level != UILEVEL_PREVIEW); $template->assign('title', $title); $template->assign('previewMode', $level == UILEVEL_PREVIEW); $template->output($view); }
function show($view, $loc = null, $title = '') { global $db; $id = exponent_sessions_get('last_section'); $current = null; switch ($view) { case "Breadcrumb": //Show not only the location of a page in the hyarchie but also the location of a standalone page $current = $db->selectObject('section', ' id= ' . $id); if ($current->parent == -1) { $sections = NavigationModule::levelTemplate(-1, 0); foreach ($sections as $section) { if ($section->id == $id) { $current = $section; break; } } } else { $sections = NavigationModule::levelTemplate(0, 0); foreach ($sections as $section) { if ($section->id == $id) { $current = $section; break; } } } break; default: $sections = NavigationModule::levelTemplate(0, 0); foreach ($sections as $section) { if ($section->id == $id) { $current = $section; break; } } break; } $template = new template('NavigationModule', $view, $loc); $template->assign('sections', $sections); $template->assign('current', $current); global $user; $template->assign('canManage', $user && $user->is_acting_admin == 1 ? 1 : 0); $template->assign('moduletitle', $title); $template->output(); }
function delete($object, $rerank = false) { if ($object == null) { return false; } $internal = unserialize($object->internal); global $db; $section = exponent_sessions_get("last_section"); $locref = $db->selectObject("locationref", "module='" . $internal->mod . "' AND source='" . $internal->src . "' AND internal='" . $internal->int . "'"); $secref = $db->selectObject("sectionref", "module='" . $internal->mod . "' AND source='" . $internal->src . "' AND internal='" . $internal->int . "' AND section={$section}"); if ($locref) { $locref->refcount -= 1; $db->updateObject($locref, "locationref", "module='" . $internal->mod . "' AND source='" . $internal->src . "' AND internal='" . $internal->int . "'"); } if ($secref) { $secref->refcount -= 1; $db->updateObject($secref, "sectionref", "module='" . $internal->mod . "' AND source='" . $internal->src . "' AND internal='" . $internal->int . "' AND section={$section}"); } // Fix ranks if ($rerank) { $db->decrement("container", "rank", 1, "external='" . $object->external . "' AND rank > " . $object->rank); } }
function smarty_block_permissions($params, $content, &$smarty, &$repeat) { if ($content) { $uilevel = 99; // MAX if (exponent_sessions_isset("uilevel")) { $uilevel = exponent_sessions_get("uilevel"); } if (defined("PREVIEW_READONLY")) { $uilevel = -1; } $blocklevel = isset($params['level']) ? $params['level'] : 0; if ($blocklevel == UILEVEL_PERMISSIONS && substr($smarty->_tpl_vars['__loc']->src, 0, 5) == "@uid_") { return ""; } else { if ($blocklevel <= $uilevel) { return $content; } else { return ""; } } } }
function wrapOutput($modclass, $view, $loc = null, $title = '') { if (defined('SOURCE_SELECTOR') && strtolower($modclass) != 'ContainerModule') { $container = null; $mod = new $modclass(); ob_start(); $mod->show($view, $loc, $title); $container->output = ob_get_contents(); ob_end_clean(); $source_select = exponent_sessions_get('source_select'); $c_view = $source_select['view']; $c_module = $source_select['module']; $clickable_mods = $source_select['showmodules']; if (!is_array($clickable_mods)) { $clickable_mods = null; } $dest = $source_select['dest']; $template = new template($c_module, $c_view, $loc); if ($dest) { $template->assign('dest', $dest); } $container->info = array('module' => $mod->name(), 'source' => $loc->src, 'hasContent' => $mod->hasContent(), 'hasSources' => $mod->hasSources(), 'hasViews' => $mod->hasViews(), 'class' => $modclass, 'clickable' => $clickable_mods == null || in_array($modclass, $clickable_mods)); $template->assign('container', $container); $template->output(); } else { call_user_func(array($modclass, 'show'), $view, $loc, $title); } }
# # Exponent 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 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } if (!$user && SITE_ALLOW_REGISTRATION == 1) { $i18n = exponent_lang_loadFile('modules/LoginModule/actions/saveuser.php'); $capcha_real = exponent_sessions_get('capcha_string'); if (!defined('SYS_USERS')) { require_once BASE . 'subsystems/users.php'; } if (!defined('SYS_SECURITY')) { require_once BASE . 'subsystems/security.php'; } $username_error = exponent_security_checkUsername($_POST['username']); if ($username_error != '') { $post = $_POST; unset($post['username']); $post['_formError'] = sprintf($i18n['username_failed'], $username_error); exponent_sessions_set('last_POST', $post); header('Location: ' . $_SERVER['HTTP_REFERER']); } else { if (exponent_users_getUserByName($_POST['username']) != null) {
function toHTML($form_id) { // Form validation script if ($this->validationScript != "") { $this->scripts[] = $this->validationScript; $this->controls["submit"]->validateJS = "validate(this.form)"; } // Persistent Form Data extension $formError = ""; if (exponent_sessions_isset("last_POST")) { // We have cached POST data. Use it to update defaults. $last_POST = exponent_sessions_get("last_POST"); foreach (array_keys($this->controls) as $name) { // may need to look to control a la parseData $this->controls[$name]->default = @$last_POST[$name]; } $formError = @$last_POST['_formError']; exponent_sessions_unset("last_POST"); } $html = "<!-- Form Object '" . $this->name . "' -->\r\n"; $html = "<!-- initialize eXp.Forms namespace -->\r\n"; $html .= "<script type=\"text/javascript\" src=\"" . PATH_RELATIVE . "subsystems/forms/lib/js/initNS.js\"></script>\r\n"; $html .= "<script type=\"text/javascript\" src=\"" . PATH_RELATIVE . "subsystems/forms/js/inputfilters.js.php\"></script>\r\n"; foreach ($this->scripts as $name => $script) { $html .= "<script type=\"text/javascript\" src=\"{$script}\"></script>\r\n"; } $html .= $formError; $html .= "<form name=\"" . $this->name . "\" method=\"" . $this->method . "\" action=\"" . $this->action . "\" enctype=\"" . $this->enctype . "\">\r\n"; foreach ($this->meta as $name => $value) { $html .= "<input type=\"hidden\" name=\"{$name}\" id=\"{$name}\" value=\"{$value}\" />\r\n"; } $html .= "<table cellspacing=\"0\" cellpadding=\"5\" width=\"100%\">\r\n"; $rank = 0; foreach ($this->controlIdx as $name) { $html .= "<tr><td valign=\"top\">" . $this->controlLbl[$name] . "</td><td style='padding-left: 5px;' valign=\"top\">"; $html .= $this->controls[$name]->controlToHTML($name) . "\r\n"; $html .= "<td>"; if ($rank != count($this->controlIdx) - 1) { $html .= '<a href="?module=formbuilder&action=order_controls&p=' . $form_id . '&a=' . $rank . '&b=' . ($rank + 1) . '">'; $html .= "<img border='0' src='" . ICON_RELATIVE . "down.png' />"; $html .= '</a>'; } else { $html .= "<img src='" . ICON_RELATIVE . "down.disabled.png' />"; } $html .= " "; if ($rank != 0) { $html .= '<a href="?module=formbuilder&action=order_controls&p=' . $form_id . '&a=' . $rank . '&b=' . ($rank - 1) . '">'; $html .= "<img border='0' src='" . ICON_RELATIVE . "up.png' />"; $html .= '</a>'; } else { $html .= "<img src='" . ICON_RELATIVE . "up.disabled.png' />"; } $html .= " "; if (!$this->controls[$name]->_readonly) { $html .= '<a href="?module=formbuilder&action=edit_control&id=' . $this->controls[$name]->_id . '&form_id=' . $form_id . '">'; $html .= '<img border="0" src="' . ICON_RELATIVE . 'edit.png" />'; $html .= '</a>'; } else { $html .= '<img border="0" src="' . ICON_RELATIVE . 'edit.disabled.png" />'; } $html .= ' '; if (!$this->controls[$name]->_readonly && $this->controls[$name]->_controltype != 'htmlcontrol') { $html .= '<a href="?module=formbuilder&action=delete_control&id=' . $this->controls[$name]->_id . '" onClick="return confirm(\'Are you sure you want to delete this control? All data associated with it will be removed from the database!\');">'; } else { $html .= '<a href="?module=formbuilder&action=delete_control&id=' . $this->controls[$name]->_id . '" onClick="return confirm(\'Are you sure you want to delete this?\');">'; } $html .= '<img border="0" src="' . ICON_RELATIVE . 'delete.png" />'; $html .= '</a>'; $html .= "</td>"; $html .= "</td></tr>"; $rank++; } $html .= "<tr><td width='5%'></td><td wdith='90%'><td></td width='5%'></tr>\r\n"; $html .= "</table>\r\n"; $html .= "</form>\r\n"; return $html; }
function exponent_theme_goDefaultSection() { $last_section = exponent_sessions_get("last_section"); if (defined("SITE_DEFAULT_SECTION") && SITE_DEFAULT_SECTION != $last_section) { header("Location: " . URL_FULL . "index.php?section=" . SITE_DEFAULT_SECTION); exit; } else { global $db; $section = $db->selectObject("section", "public = 1 AND active = 1"); // grab first section, go there if ($section) { header("Location: " . URL_FULL . "index.php?section=" . $section->id); exit; } else { echo SITE_404_HTML; } } }
# it and/or modify it under the terms of the GNU # General Public License as published by the Free # Software Foundation; either version 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } ob_start(); if (isset($_GET['redirecturl'])) { $redirect = urldecode($_GET['redirecturl']); if (substr($redirect, 0, 4) != 'http') { $redirect = URL_FULL . $redirect; } exponent_sessions_set('redirecturl', $redirect); } //$SYS_FLOW_REDIRECTIONPATH = 'loginredirect'; exponent_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION); if (exponent_sessions_loggedIn()) { header('Location: ' . exponent_sessions_get('redirecturl')); exit('Redirecting...'); } $i18n = exponent_lang_loadFile('modules/loginmodule/actions/loginredirect.php'); loginmodule::show('Default', null, $i18n['login']); $template = new template('loginmodule', '_login_redirect'); $template->assign('output', ob_get_contents()); ob_end_clean(); $template->output();
function exponent_permissions_initialize() { global $exponent_permissions_r; $exponent_permissions_r = exponent_sessions_get("permissions"); }
# This file is part of Exponent # # Exponent 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 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } $dest_dir = exponent_sessions_get('dest_dir'); $files = exponent_sessions_get('files_data'); if (!defined('SYS_FILES')) { require_once BASE . 'subsystems/files.php'; } if (!file_exists(BASE . 'files')) { mkdir(BASE . 'files', 0777); } foreach (array_keys($files) as $mod) { exponent_files_copyDirectoryStructure($dest_dir . '/files/' . $mod, BASE . 'files/' . $mod); foreach (array_keys($files[$mod][1]) as $file) { copy($dest_dir . '/files/' . $mod . '/' . $file, BASE . 'files/' . $mod . '/' . $file); } } exponent_sessions_unset('dest_dir'); exponent_sessions_unset('files_data'); exponent_files_removeDirectory($dest_dir);
exponent_modules_initialize(); // Initialize the Template Subsystem. require_once BASE . 'subsystems/template.php'; // Initialize the Permissions Subsystem. require_once BASE . 'subsystems/permissions.php'; // Initialize the Flow Subsystem. if (!defined('SYS_FLOW')) { require_once BASE . 'subsystems/flow.php'; } // Validate session exponent_sessions_validate(); // Initialize permissions variables exponent_permissions_initialize(); #$section = (exponent_sessions_isset('last_section') ? exponent_sessions_get('last_section') : SITE_DEFAULT_SECTION); if (isset($_REQUEST['action']) && isset($_REQUEST['module'])) { $section = exponent_sessions_isset('last_section') ? exponent_sessions_get('last_section') : SITE_DEFAULT_SECTION; } else { $section = isset($_REQUEST['section']) ? $_REQUEST['section'] : SITE_DEFAULT_SECTION; } $section = $db->selectObject('section', 'id=' . intval($section)); if (!NavigationModule::canView($section)) { define('AUTHORIZED_SECTION', 0); } else { define('AUTHORIZED_SECTION', 1); } if (!NavigationModule::isPublic($section)) { define('PUBLIC_SECTION', 0); } else { define('PUBLIC_SECTION', 1); } function eDebug($var)
$container->rank = $_GET['rank']; $container->is_private = 0; } else { $container->internal = unserialize($container->internal); $locref = $db->selectObject('locationref', "module='" . $container->internal->mod . "' AND source='" . $container->internal->src . "'"); } if (isset($_SESSION['containers_cache'])) { unset($_SESSION['containers_cache']); } $template = new template('containermodule', '_form_edit', $loc); $template->assign('rerank', isset($_GET['rerank']) ? 1 : 0); $template->assign('container', $container); $template->assign('locref', $locref); $template->assign('is_edit', isset($container->id) ? 1 : 0); $template->assign('can_activate_modules', $user->is_acting_admin); $template->assign('current_section', exponent_sessions_get('last_section')); if (!defined('SYS_JAVASCRIPT')) { include_once BASE . 'subsystems/javascript.php'; } $haveclass = false; $mods = array(); $modules_list = isset($container->id) ? exponent_modules_list() : exponent_modules_listActive(); if (!count($modules_list)) { // No active modules $template->assign('nomodules', 1); } else { $template->assign('nomodules', 0); } if (!defined('SYS_SORTING')) { include_once BASE . 'subsystems/sorting.php'; }
require_once BASE . 'subsystems/sessions.php'; } if (isset($_GET['redirecturl'])) { $redirect = urldecode($_GET['redirecturl']); if (substr($redirect, 0, 4) != 'http') { $redirect = URL_FULL . $redirect; } exponent_sessions_set('redirecturl', $redirect); } // Initialize the Theme Subsystem if (!defined('SYS_THEME')) { require_once BASE . 'subsystems/theme.php'; } $SYS_FLOW_REDIRECTIONPATH = 'loginredirect'; if (exponent_sessions_loggedIn()) { $url = exponent_sessions_get('redirecturl'); if ($url . '' == '') { $SYS_FLOW_REDIRECTIONPATH = 'default'; exponent_flow_redirect(); } header('Location: ' . $url); exit('Redirecting...'); } else { if (isset($_REQUEST['module']) && isset($_REQUEST['action'])) { exponent_theme_runAction(); LoginModule::show(DEFAULT_VIEW, null); } else { exponent_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_SECTIONAL); LoginModule::show(DEFAULT_VIEW, null); } }
# ################################################## define('SCRIPT_EXP_RELATIVE', 'modules/NavigationModule/actions/'); define('SCRIPT_FILENAME', 'edit_page.php'); ob_start(); include_once '../../../exponent.php'; if (!defined('SYS_THEME')) { include_once BASE . 'subsystems/theme.php'; } $id = -1; if (isset($_GET['sitetemplate_id'])) { exponent_sessions_set('sitetemplate_id', intval($_GET['sitetemplate_id'])); $id = intval($_GET['sitetemplate_id']); } else { if (exponent_sessions_isset('sitetemplate_id')) { $id = exponent_sessions_get('sitetemplate_id'); } } $template = $db->selectObject('section_template', 'id=' . $id); $page = $template && $template->subtheme != '' && is_readable(BASE . 'themes/' . DISPLAY_THEME . '/subthemes/' . $template->subtheme . '.php') ? 'themes/' . DISPLAY_THEME . '/subthemes/' . $template->subtheme . '.php' : 'themes/' . DISPLAY_THEME . '/index.php'; $i18n = exponent_lang_loadFile('modules/NavigationModule/actions/edit_page.php'); exponent_sessions_set('themeopt_override', array('src_prefix' => '@st' . $id, 'ignore_mods' => array('NavigationModule', 'LoginModule'), 'mainpage' => PATH_RELATIVE . 'modules/NavigationModule/actions/edit_page.php', 'backlinktext' => $i18n['back'])); #define('PREVIEW_READONLY',1); $REDIRECTIONPATH = 'section_template'; if ($user && $user->is_acting_admin == 1) { if (is_readable(BASE . $page)) { include_once BASE . $page; } else { echo sprintf($i18n['err_not_readable'], BASE . $page); } exponent_sessions_unset('themeopt_override');
<?php ################################################## # # Copyright (c) 2004-2006 OIC Group, Inc. # Written and Designed by James Hunt # # This file is part of Exponent # # Exponent 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 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined("EXPONENT")) { exit(""); } $levels = exponent_sessions_get('uilevels'); exponent_sessions_set('uilevel', max(array_keys($levels))); exponent_flow_redirect();
# # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined("EXPONENT")) { exit(""); } // PERM CHECK $source_select = array(); $module = "ContainerModule"; $view = "_sourcePicker"; $clickable_mods = null; // Show all $dest = null; if (exponent_sessions_isset("source_select") && (defined("SOURCE_SELECTOR") || defined("CONTENT_SELECTOR"))) { $source_select = exponent_sessions_get("source_select"); $view = $source_select["view"]; $module = $source_select["module"]; $clickable_mods = $source_select["showmodules"]; $dest = $source_select['dest']; } if (isset($_SESSION['containers_cache'])) { unset($_SESSION['containers_cache']); } $orphans = array(); foreach ($db->selectObjects("locationref", "module='" . preg_replace('/[^A-Za-z0-9_]/', '', $_GET['module']) . "' AND refcount=0") as $orphan) { $obj = null; $loc = exponent_core_makeLocation($orphan->module, $orphan->source, $orphan->internal); if (class_exists($orphan->module)) { $modclass = $orphan->module; $mod = new $modclass();
function exponent_flow_redirect($url_type = SYS_FLOW_NONE) { global $SYS_FLOW_REDIRECTIONPATH; $access_level = exponent_sessions_loggedIn() ? SYS_FLOW_PROTECTED : SYS_FLOW_PUBLIC; // Fallback to the default redirection path in strange edge cases. if (!exponent_sessions_isset($SYS_FLOW_REDIRECTIONPATH . '_flow_last_' . $access_level)) { $SYS_FLOW_REDIRECTIONPATH = 'exponent_default'; } $url = ''; switch ($url_type) { case SYS_FLOW_NONE: $url = exponent_sessions_get($SYS_FLOW_REDIRECTIONPATH . '_flow_last_' . $access_level); break; case SYS_FLOW_SECTIONAL: case SYS_FLOW_ACTION: $url = exponent_sessions_get($SYS_FLOW_REDIRECTIONPATH . '_flow_' . $access_level . '_' . $url_type); break; } if ($url == '') { $url = URL_FULL . 'index.php?section=' . SITE_DEFAULT_SECTION; } if (DEVELOPMENT >= 2) { echo '<a href="' . $url . '">' . $url . '</a>'; } else { header("Location: {$url}"); } exit('Redirecting...'); }
# This file is part of Exponent # # Exponent 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 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } if (exponent_sessions_isset('installer_config')) { $config = exponent_sessions_get('installer_config'); } else { $config = array('db_engine' => 'mysql', 'db_host' => 'localhost', 'db_port' => '3306', 'db_name' => '', 'db_user' => '', 'db_pass' => '', 'db_table_prefix' => 'exponent'); } $i18n = exponent_lang_loadFile('install/pages/dbconfig.php'); ?> <h2 id="subtitle"><?php echo $i18n['subtitle']; ?> </h2> <form method="post" action="index.php"> <input type="hidden" name="page" value="dbcheck" /> <div class="form_section_header"><?php echo $i18n['server_info'];
# # This file is part of Exponent # # Exponent 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 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## include_once dirname(realpath(__FILE__)) . '/exponent.php'; include_once dirname(realpath(__FILE__)) . '/subsystems/image.php'; $w = isset($_GET['w']) ? $_GET['w'] : 200; $h = isset($_GET['h']) ? $_GET['h'] : 50; $name = isset($_GET['name']) ? $_GET['name'] : 'capcha_string'; if (exponent_sessions_isset($name)) { $str = exponent_sessions_get($name); } else { $str = strtoupper(substr(md5(rand()), 17, 6)); exponent_sessions_set($name, $str); } if (intval($w) > 0 && intval($h > 0)) { $img = exponent_image_captcha($w, $h, $str); } if ($img) { $sizeinfo = array('mime' => 'image/png'); ob_end_clean(); exponent_image_output($img, $sizeinfo); }
function toHTML() { // Form validation script if ($this->validationScript != "") { $this->scripts[] = $this->validationScript; $this->controls["submit"]->validateJS = "validate(this.form)"; } // Persistent Form Data extension $formError = ""; if (exponent_sessions_isset("last_POST")) { // We have cached POST data. Use it to update defaults. $last_POST = exponent_sessions_get("last_POST"); foreach (array_keys($this->controls) as $name) { // may need to look to control a la parseData $this->controls[$name]->default = @$last_POST[$name]; $this->controls[$name]->inError = 1; // Status flag for controls that need to do some funky stuff. } $formError = @$last_POST['_formError']; exponent_sessions_unset("last_POST"); } $html = "<!-- Form Object '" . $this->name . "' -->\r\n"; $html .= "<script type=\"text/javascript\" src=\"" . PATH_RELATIVE . "subsystems/forms/js/inputfilters.js.php\"></script>\r\n"; foreach ($this->scripts as $name => $script) { $html .= "<script type=\"text/javascript\" src=\"{$script}\"></script>\r\n"; } $html .= '<div class="error">' . $formError . '</div>'; $html .= "<form name=\"" . $this->name . "\" method=\"" . $this->method . "\" action=\"" . $this->action . "\" enctype=\"" . $this->enctype . "\">\r\n"; foreach ($this->meta as $name => $value) { $html .= "<input type=\"hidden\" name=\"{$name}\" id=\"{$name}\" value=\"{$value}\" />\r\n"; } $html .= "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n"; foreach ($this->controlIdx as $name) { $html .= $this->controls[$name]->toHTML($this->controlLbl[$name], $name) . "\r\n"; } $html .= "<tr><td width='5%'></td><td width='95%'></td></tr>\r\n"; $html .= "</table>\r\n"; $html .= "</form>\r\n"; return $html; }
# # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## define('SCRIPT_EXP_RELATIVE', ''); define('SCRIPT_FILENAME', 'orphan_source_selector.php'); // Initialize the Exponent Framework include_once 'exponent.php'; define('PREVIEW_READONLY', 1); // for mods define('SOURCE_SELECTOR', 2); define('SELECTOR', 1); $SYS_FLOW_REDIRECTIONPATH = 'source_selector'; $source_select = array(); if (exponent_sessions_isset('source_select')) { $source_select = exponent_sessions_get('source_select'); } $count_orig = count($source_select); if (isset($_REQUEST['vview'])) { $source_select['view'] = $_REQUEST['vview']; } else { if (!isset($source_select['view'])) { $source_select['view'] = '_sourcePicker'; } } if (isset($_REQUEST['vmod'])) { $source_select['module'] = $_REQUEST['vmod']; } else { if (!isset($source_select['module'])) { $source_select['module'] = 'ContainerModule'; }
<?php define("SCRIPT_EXP_RELATIVE", "external/editors/connector/"); define("SCRIPT_FILENAME", "content_linked.php"); require_once "../../../exponent.js.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> /* <![CDATA[ */ var f_url = window.opener.document.getElementById("f_href"); f_url.value = "?section=<?php echo exponent_sessions_get("last_section"); ?> #mod_<?php echo $_GET['cid']; ?> "; var f_extern = window.opener.document.getElementById("f_extern"); f_extern.checked = false; //TODO: find a way(maybe via containermod:_source_picker.tpl) to pass the title of the contained module to the Link Picker window.close(); /* ]]> */ </script> </head> <body/> </html>