# not, write to: # # Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: finish.php,v 1.4 2005/04/18 15:23:54 filetreefrog Exp $ ################################################## if (!defined('PATHOS')) { exit(''); } $dest_dir = pathos_sessions_get('dest_dir'); $files = pathos_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) { pathos_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); } } pathos_sessions_unset('dest_dir'); pathos_sessions_unset('files_data'); pathos_files_removeDirectory($dest_dir); $template = new template('importer', '_files_final'); $template->output();
define("SCRIPT_FILENAME", "edit_page.php"); ob_start(); require_once "../../../pathos.php"; if (!defined("SYS_THEME")) { require_once BASE . "subsystems/theme.php"; } $id = -1; if (isset($_GET['sitetemplate_id'])) { pathos_sessions_set("sitetemplate_id", $_GET['sitetemplate_id']); $id = $_GET['sitetemplate_id']; } else { if (pathos_sessions_isset("sitetemplate_id")) { $id = pathos_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"; pathos_sessions_set("themeopt_override", array("src_prefix" => "@st" . $id, "ignore_mods" => array("navigationmodule", "loginmodule"), "mainpage" => PATH_RELATIVE . "modules/navigationmodule/actions/edit_page.php", "backlinktext" => "Back to Template")); #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 BASE . "{$page} not readable"; } pathos_sessions_unset("themeopt_override"); } else { echo SITE_403_HTML; } ob_end_flush();
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 (pathos_sessions_isset("last_POST")) { // We have cached POST data. Use it to update defaults. $last_POST = pathos_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']; pathos_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 .= $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 pathos_permissions_clear() { pathos_sessions_unset("permissions"); }
# You should have received a copy of the GNU # General Public License along with Exponent; if # not, write to: # # Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: final.php,v 1.8 2005/03/21 17:15:22 filetreefrog Exp $ ################################################## //GREP:HARDCODEDTEXT if (!defined('PATHOS')) { exit(''); } pathos_sessions_unset("installer_config"); ?> <div class="installer_title"> <img src="images/blocks.png" width="32" height="32" /> Installation Compete - Congratulations! </div> <?php unlink(BASE . 'install/not_configured'); if (file_exists(BASE . 'install/not_configured')) { echo '<br /><br />'; echo '<span style="color: red">Unable to remove the file install/not_configured. You will have to manually remove this file.</span>'; } ?> <br /><br /> Configuration and setup for your new website is complete. <br /><br />
header('Location: ' . $_SERVER['HTTP_REFERER']); } else { $strength_error = pathos_security_checkPasswordStrength($_POST['username'], $_POST['pass1']); if ($strength_error != '') { $post = $_POST; unset($post['pass1']); unset($post['pass2']); $post['_formError'] = sprintf(TR_LOGINMODULE_STRENGTHFAILED, $strength_error); pathos_sessions_set('last_POST', $post); header('Location: ' . $_SERVER['HTTP_REFERER']); } else { // Finally, check the capcha if (SITE_USE_CAPTCHA && strtoupper($_POST['captcha_string']) != $capcha_real) { $post = $_POST; unset($post['captcha_string']); $post['_formError'] = TR_LOGINMODULE_WRONGCAPTCHA; pathos_sessions_set('last_POST', $post); header('Location: ' . $_SERVER['HTTP_REFERER']); } else { pathos_sessions_unset('capcha_string'); $u = pathos_users_create($_POST, null); $u = pathos_users_saveProfileExtensions($_POST, $u, true); pathos_users_login($_POST['username'], $_POST['pass1']); pathos_flow_redirect(); } } } } } else { echo SITE_403_HTML; }
# Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Exponent is distributed in the hope that it # will be useful, but WITHOUT ANY WARRANTY; # without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU # General Public License along with Exponent; if # not, write to: # # Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: logout.php,v 1.7 2005/04/18 15:24:22 filetreefrog Exp $ ################################################## if (!defined('PATHOS')) { exit(''); } if (!defined('SYS_USERS')) { require_once 'subsystems/users.php'; } pathos_users_logout(); pathos_permissions_clear(); pathos_sessions_unset('uilevel'); pathos_flow_redirect();
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 (pathos_sessions_isset("last_POST")) { // We have cached POST data. Use it to update defaults. $last_POST = pathos_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']; pathos_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; }