Location: PHPKode > projects > chillyCMS > chillyCMS/admin/edit.site.php
<?php
//#################################################################################################
//	Edit content page
//#################################################################################################
//	chillyCMS - Content Management System
//	Copyright (C) 2008
//	Stefanie Wiegand <hide@address.com> & Johannes Cox <hide@address.com>
//	
//	This program is licensed under the GPL 3.0 license. For more information see LICENSE.txt.
//#################################################################################################
define('DOIT',true);

require_once("../core/session.backend.include.php");
require_once(PATH."/core/menuitem.class.php");
require_once(PATH."/admin/edit.include.php");

if (isset($_POST["id"])) { $id = intval($_POST["id"]); } else { $id = intval($_GET["id"]); }
if (isset($_POST["save"])) {
	$msg = save_all($id);
	//if item was just inserted update id
	if ($id==0 && $msg[1]=="good") {
		$page->query("select max(id) as maxid from site_content limit 1");
		$result = $page->db->getdata();
		$id = $result["maxid"];
	}
} else {
	$msg = "";
}

$page->use_scripts("ckeditor");
$page->print_head();
$page->add(editform($id));
$page->print_body($msg);
?>
Return current item: chillyCMS