<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class link_editAction extends security_login {
	function action(){
		ModuleLimit(__CLASS__);
		global $conn;
		$link_id=$this->_getParam('link_id');
		if($link_id){
			$link=new model_Link();
			$link->setSubsection('WHERE link_id='.$link_id);
			$results=$link->doSelectOne();
		}else{
			$results=new model_Link();
		}

		$category=new model_Category();
		$category->setSubsection('WHERE type = \'link\' ORDER BY path');
		$categorys=$category->doSelect();

		

		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileAdmin');
		$smarty->assign('results',$results);
		$smarty->assign('categorys',$categorys);
		$smarty->assign('usergroups',$usergroups);
		$smarty->assign('editor',$editor);
		$smarty->assign('startdate',$startdate);
		$smarty->assign('stopdate',$stopdate);
		$smarty->assign('index',MICE_URL.'admin.php/link');
		$smarty->assign('formaction',MICE_URL.'admin.php/link/update');
		$filename = new getTPLFileName(__CLASS__);
		$smarty->display($filename->TPLFileName);
	}
}
?>