Documentation is available at action.php
- <?
- /**
- * action.php
- *
- * 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 2 of the License, or
- * (at your option) any later version.
- * This program 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.
- * @package generator
- * @author Stephan Raabe
- */
- // Logging START
- if (isAdmin())
- {
- if (isset($_POST["action"]))
- {
- writeLog($_SESSION["account_email"],$_POST["action"],$page["page_path"]);
- }
- if (isset($_GET["action"]))
- {
- writeLog($_SESSION["account_email"],$_GET["action"],$page["page_path"]);
- }
- }
- if (isset($_POST["action"]))
- {
- switch ($_POST["action"]) {
- case "login":
- if (!login($_POST["account_email"],$_POST["account_password"],$_POST["page_path"]))
- {
- $admin_lang["profile"][1] = $admin_lang["profile"][2];
- }
- else
- {
- if ($_POST["page_path"] != $page["page_path"])
- {
- $path_redirect = $_POST["page_path"];
- }
- else
- {
- $path_redirect = $page["page_path"];
- }
- ?>
- <script language="javascript">
- location.href = "website.php?id=<?= $path_redirect; ?>";
- </script>
- <?
- }
- break;
- case "loginInt":
- if (!loginInt($_POST["account_email"],$_POST["account_password"],$_POST["page_path"]))
- {
- $admin_lang["profile"][1] = $admin_lang["profile"][2];
- }
- break;
- case "logout": logout($_POST["page_path"]);
- break;
- case "logoutInt": logoutInt($_POST["page_path"]);
- break;
- case "newaccount":
- if ((isset($_POST["account_info"])) && ($_POST["account_info"] != ""))
- {
- $accountn_info = 1;
- }
- else
- {
- $accountn_info = 0;
- }
- if (isset($_POST["redirect"]))
- {
- $link_redirect = $_POST["redirect"];
- }
- else
- {
- $link_redirect = $site_home;
- }
- newAccountExt($_POST["account_firstname"],$_POST["account_lastname"],$_POST["account_telefon"],$_POST["account_company"],$_POST["account_homepage"],$_POST["account_email"],$_POST["account_password"],$accountn_info,$account_register,$link_redirect);
- break;
- case "getaccount": getAccountExt($_POST["account_email"]);
- break;
- case "deleteaccount":
- if (($_SESSION["account_group"] > 0) && ($_SESSION["account_key"] == $_POST["account_key"]))
- {
- deleteAccountExt($_POST["account_email"],$_POST["account_key"]);
- }
- break;
- case "updateaccount":
- if (($_SESSION["account_group"] > 0) && ($_SESSION["account_key"] == $_POST["account_key"]))
- {
- if (isset($_POST["account_info"]))
- {
- $accountn_info = 1;
- }
- else
- {
- $accountn_info = 0;
- }
- updateAccountExt($_POST["account_firstname"],$_POST["account_lastname"],$_POST["account_telefon"],$_POST["account_company"],$_POST["account_homepage"],$_POST["account_email"],$_POST["account_emailnew"],$_POST["account_password"],$_POST["account_key"],$_POST["account_lang"],$accountn_info);
- }
- break;
- }
- if (isset($_POST["action"]))
- {
- if (isAdmin())
- {
- switch ($_POST["action"])
- {
- case "settings": updateSettings($_POST["page_key"],$_POST["site_name"],$_POST["site_admin"],$_POST["site_home"],$_POST["site_url"],$_POST["lang_default"],$_POST["account_register"],$_POST["pool_path"],$_POST["site_staging"],$_POST["author_release"],$_POST["author_profile"],$_POST["site_static"],$_POST["author_export"],$_POST["site_help"],$_POST["menu_top"],$_POST["site_encoding"],$_POST["nl_timer"],$_POST["nl_stepsize"],$_POST["nl_encoding"],$_POST["export_timer"],$_POST["export_stepsize"],$_POST["author_delete"],$_POST["tree_static"],$_POST["check_useragent"],$_POST["log_path"]);break;
- case "updatecss": updateCss($_POST["page_key"],$_POST["site_css"]);break;
- case "properties": updateProperties($_POST["page_key"],$_POST["page_path"],$_POST["page_path_old"],$_POST["page_extern"],$_POST["page_status"],$_POST["page_headline"],$_POST["page_title"],$_POST["page_keywords"],$_POST["page_description"],$_POST["page_template"],$_POST["page_att1"],$_POST["page_att2"],$_POST["page_navigation"],$_POST["page_date_unformated"],$_POST["page_count"],$_POST["page_start"],$_POST["page_lang"],$_POST["page_lock"]);break;
- case "authorization": updateAuthorization($_POST["page_key"],$_POST["page_status"],$_POST["page_lock"],$_POST["page_lockexport"],$_POST["page_access"],$_POST["status_subpages"]);break;
- case "addpage": addPage($_POST["page_key"],$_POST["page_pathnew"],$_POST["page_status"],$_POST["page_headline"],$_POST["page_title"],$_POST["page_keywords"],$_POST["page_description"],$_POST["page_template"],$_POST["page_att1"],$_POST["page_att2"],$_POST["page_navigation"],$_POST["page_date"],$_POST["page_date_unformated"]);break;
- case "copypage": copyPage($_POST["page_key"],$_POST["page_keynew"]);break;
- case "cutpage": cutPage($_POST["page_key"],$_POST["page_keynew"]);break;
- case "user": updateUser($_POST["page_key"],$_POST["account_key"],$_POST["account_email"],$_POST["account_password"],$_POST["account_firstname"],$_POST["account_lastname"],$_POST["account_editor"],$_POST["account_menu"]);break;
- case "addnewsletter": addNewsletter($_POST["page_key"],$_POST["nl_subject"],$_POST["nl_sender"],$_POST["nl_date"],$_POST["nl_date_unformated"],$_POST["nl_test"],$_POST["nl_text"],$_POST["nl_html"],$_POST["nl_status"]);break;
- case "message": sendMessage($_POST["msg_receiver"],$_POST["msg_subject"],$_POST["msg_message"],$_POST["msg_from"]);break;
- case "editnewsletter": updateNewsletter($_POST["page_key"],$_POST["nl_multi"],$_POST["nl_subject"],$_POST["nl_sender"],$_POST["nl_date_unformated"],$_POST["nl_test"],$_POST["nl_text"],$_POST["nl_html"],$_POST["nl_status"],$_POST["nl_target"],$_POST["nl_key"]);break;
- case "addaccount": addAccount($_POST["page_key"],$_POST["account_email"],$_POST["account_password"],$_POST["account_firstname"],$_POST["account_lastname"],$_POST["account_telefon"],$_POST["account_company"],$_POST["account_group"],$_POST["account_lock"]);break;
- case "editaccount": updateAccount($_POST["page_key"],$_POST["account_key"],$_POST["account_email"],$_POST["account_password"],$_POST["account_firstname"],$_POST["account_lastname"],$_POST["account_telefon"],$_POST["account_company"],$_POST["account_homepage"],$_POST["account_group"],$_POST["account_lock"],$_POST["account_info"],$_POST["account_lang"],$_POST["account_editor"],$_POST["account_access"],$_POST["account_menu"]);break;
- case "deletepage": deletePage($_POST["page_key"]);break;
- case "changes": changesPage($_POST["page_key"]);break;
- case "savemenu": saveMenu($_POST["page_key"],$_POST["oemenux"],$_POST["oemenuy"]);break;
- case "deletecache": deleteCache($_POST["page_path"]);break;
- case "edittemplate": updateTemplate($_POST["page_key"],$_POST["template_key"],$_POST["template_name"],$_POST["template_description"],$_POST["template_select"],$_POST["template_hide"],$_POST["template_short"]);break;
- case "release": releasePage($_POST["page_key"],$_POST["block"]);break;
- case "edittext": updateText($_POST["page_key"],$_POST["page_edit"],$_POST["page_input"]);break;
- case "newdata": addPage($_POST["page_key"],$_POST["page_pathnew"],$_POST["page_status"],$_POST["page_headline"],$_POST["page_headline"],$_POST["page_keywords"],$_POST["page_description"],$_POST["page_template"],$_POST["page_att1"],$_POST["page_att2"],$_POST["page_headline"],$_POST["page_date"],$_POST["page_date_unformated"]);break;
- case "navigation": updateNavigation($_POST["page_key"],$_POST["keys"],$_POST["page_hide"]);break;
- case "grouporder": updateGroupOrder($_POST["page_key"],$_POST["keys"]);break;
- case "delstatistic": delStatistic();break;
- case "addTableItem": addTableItem();break;
- case "delTableItem": delTableItem();break;
- case "editTableItem": editTableItem();break;
- case "upload":
- if ($_POST["del"] != "true")
- {
- if ($_POST["page_fileexists"] == "")
- {
- if (move_uploaded_file($_FILES['upFile']['tmp_name'], $site_pool."/".$_POST["page_key"]."_".$_FILES['upFile']['name']))
- {
- $reloadkey = get_page_key($page["page_parent"]);
- if (isset($_POST["caching"]))
- {
- updateTextNoCache($_POST["page_key"],$_POST["field"],$_POST["page_key"]."_".$_FILES['upFile']['name']);
- }
- else
- {
- updateText($_POST["page_key"],$_POST["field"],$_POST["page_key"]."_".$_FILES['upFile']['name']);
- }
- }
- else
- {
- ?>
- <script language="Javascript">
- alert("Upload ERROR!");
- </script>
- <?
- }
- }
- else
- {
- updateText($_POST["page_key"],$_POST["field"],$_POST["page_fileexists"]);
- }
- }
- else
- {
- updateText($_POST["page_key"],$_POST["field"],"");
- }
- break;
- }
- }
- }
- }
- if ((isset($_GET["action"])) && (isAdmin()))
- {
- switch ($_GET["action"])
- {
- case "delaccount": deleteAccount($_GET["account_key"]);break;
- case "delnewsletter": deleteNewsletter($_GET["nl_key"]);break;
- case "copynewsletter": copyNewsletter($_GET["nl_key"]);break;
- case "startexport": startExport($_GET["paKey"],1,$export_stepsize);break;
- case "unlocknewsletter": unlockNewsletter();break;
- }
- }
- ?>
Documentation generated on Tue, 16 Aug 2005 17:28:43 +0200 by phpDocumentor 1.3.0RC3