<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: login_page.php,v 1.22 2002/09/22 04:17:38 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; ### Check to see if already logged in if (isset($g_string_cookie_val) && !empty($g_string_cookie_val)) { login_cookie_check($g_admin_page); } $f_msg = gpc_get_string('f_msg', ''); print_html_top(); print_head_top(); print_title($g_window_title); print_css($g_css_inc_file); print_meta_inc($g_meta_inc_file); print_head_bottom(); print_body_top(); print_header($g_page_title); print_top_page($g_top_page_inc); if ($f_msg === 'error') { echo <<<EOT \t\t<div class="error" align="center"> \t\t\t<strong>ERROR:</strong> Unauthorised access for supplied user name and password. \t\t</div> EOT; }
<?php /** * Theme * * @package GetSimple * @subpackage Theme */ # setup inclusions $load['plugin'] = true; include 'inc/common.php'; login_cookie_check(); # variable settings $path = GSDATAOTHERPATH; $file = GSWEBSITEFILE; $theme_options = ''; # was the form submitted? if (isset($_POST['submitted']) && isset($_POST['template'])) { check_for_csrf("activate"); # get passed value from form $newTemplate = var_in($_POST['template']); if (!path_is_safe(GSTHEMESPATH . $newTemplate, GSTHEMESPATH)) { die; } # backup old GSWEBSITEFILE (website.xml) file $bakpath = GSBACKUPSPATH . getRelPath(GSDATAOTHERPATH, GSDATAPATH); // backups/other/ createBak($file, $path, $bakpath); # udpate GSWEBSITEFILE (website.xml) file with new theme $xml = new SimpleXMLExtended('<item></item>'); $note = $xml->addChild('SITENAME');
/**************************************************** * * @File: components.php * @Package: GetSimple * @Action: Displays and creates static components * of the website. * *****************************************************/ // Setup inclusions $load['plugin'] = true; // Relative $relative = '../'; // Include common.php include 'inc/common.php'; // Variable settings $userid = login_cookie_check(); $file = "components.xml"; $path = GSDATAOTHERPATH; $bakpath = GSBACKUPSPATH . 'other/'; $update = ''; $table = ''; $list = ''; // if the components are being saved... if (isset($_POST['submitted'])) { $value = $_POST['val']; $slug = $_POST['slug']; $title = $_POST['title']; $ids = $_POST['id']; $nonce = $_POST['nonce']; if (!check_nonce($nonce, "modify_components")) { die("CSRF detected!");