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

class image {
	function _interface() {
	global $iteminfo;
		print_form_textbox("Image Location","info",$iteminfo['info']);
		print_form_textbox("Link to URL<br /><em>If you want to link the image to a page, enter it here.</em>","extra",$iteminfo['extra']);
	}
	function _create() {
	global $db;
		$groupaccess = implode(',',$_POST['groupaccess']);
		$db->query("INSERT INTO items VALUES(
			'',
			'".$db->real_escape_string($_POST['name'])."',
			'image',
			'".$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