Location: PHPKode > projects > Exero CMS > upload/admin/items/link_module.php
<?
/*========================================*\
|     Link [Module] Item for Exero CMS    |
|       Copyright © 2006 Jack Polgar       |
|        http://www.jackpolgar.com         |
\*========================================*/

class link_module {
	function _interface() {
	global $iteminfo;
		$modulearray = modulearray();
		$modulearray['rooturl'] = "Home";
		$modulearray['admin'] = "Admin";
		print_form_select("Module","info","",$modulearray,$iteminfo['info'],"0");
		print_form_textarea("Subpages<br />Seperate with comma. Example: article,5 - Will turn out like: &q1=article&q2=5","extra",$iteminfo['extra']);
	}
	function _create() {
	global $ecms, $db, $user, $show;
		$groupaccess = implode(',',$_POST['groupaccess']);
		$db->query("INSERT INTO items VALUES(
			'',
			'".$db->real_escape_string($_POST['name'])."',
			'link_module',
			'".$db->real_escape_string($_POST['info'])."',
			'".$db->real_escape_string($_POST['extra'])."',
			'".$groupaccess."')");
	}
	function _edit() { }
	function _delete() { }
	function _save() {
	global $db;
		$groupaccess = implode(',',$_POST['groupaccess']);
		$db->query("UPDATE items SET title='".$db->real_escape_string($_POST['name'])."', info='".$db->real_escape_string($_POST['info'])."', extra='".$db->real_escape_string($_POST['extra'])."', groupaccess='".$groupaccess."' WHERE id='".$db->real_escape_string($_POST['itemid'])."'");		
	}
}
?>
Return current item: Exero CMS