<?php
if (!defined('HUCART_COM')) exit('HuCart.COM No direct script access allowed');
class Slide extends HC_Controller
{
	//注意无须构造函数,使用了构造函数得重构父类 parent::__construct();
	private $master_act 	= 'slide';
	private $info_prefix 	= 'sli_';
	function __construct()
	{
		parent::__construct();	
		$this -> load_lang('adminsys/'.$this -> master_act);
		$this -> view -> assign('master_act', $this -> master_act);
		$this -> view -> assign('info_prefix',	$this -> info_prefix);
		$this -> load('admin');
		$this -> admin -> online_admin();
		$this -> load_db();
		$this -> load('helper');     //加载辅助类
		$this -> load_model('sort'); //加载分类模型
	}


	function info_list(  )
	{
		$keyword 	= $this -> input -> req["keyword"];
		$list_val   = $this -> input -> req["list_val"];
		$list_type  = $this -> input -> req["list_type"];

		$table_arr['where_add'] = '';

		if($keyword!='')
		{ 	
			$table_arr['where_add'] .= " AND ( sli_name LIKE  '%".$keyword."%' )";  
		}
		

		$table_arr['order_by']  = 'sli_id';
		if($list_val!='' and $list_type =='DESC' )
		{
			$table_arr['order_by'] = $list_val ."  DESC ";
		}elseif($list_val!='' and $list_type =='ASC')
		{
			$table_arr['order_by'] = $list_val." ASC";
		}else{
			$table_arr['order_by'] =  'sli_id';
		}

		$this -> load('page',$this->lang['page']);

		//列表字段显示
		$show_arr = array('sli_id' => array('th'=>1,'td'=>'id'),'sli_name'=> array('th'=>0,'td'=>''),'sli_sign'=> array('th'=>0,'td'=>''),'sli_view'=>array('th'=>1,'td'=>''),'sli_enabled'=>array('th'=>1,'td'=>'arr'),'sli_up_time'=>array('th'=>1,'td'=>'time'));
		
		$field_show = $this -> helper -> get_th_list( $show_arr , $list_val , $list_type , $lang_arr = $this->lang['field_list'] );

		$table_arr['table']				= $this -> master_act;


		//$table_arr['left']['table'] 	= 'sli_sort';
		//$table_arr['left']['on']		= $this -> db -> prefix.$this -> master_act.'.pis_id = '.$this -> db -> prefix.'sli_sort.sort_id ';
		
		$table_arr['prefix'] 	= $this -> db -> prefix;
		$table_arr['field_arr'] = array_keys($show_arr);
		$table_arr['def_where'] = 'sli_delete =0';
		$table_arr['group_by']  = '';
		$table_arr['limit_val'] = $this -> page ->get_limit_val();

		$re_sql   = $this -> helper -> get_list_sql( $table_arr );

		//var_dump($re_sql);
		
		$info 	  = $this -> db -> select_info( $re_sql['sql_list'] );
		
		$opt = array( 'item_list'=> $this->lang['item_list'], 'edit'=> $this->lang['edit'], 'delete'=> $this->lang['delete']);
 		$key_arr['sli_enabled'] = $this->lang['enabled_arr'];

		$td_rows  = $this -> helper -> get_td_list( $info , $show_arr ,$key_arr ,$this -> master_act ,$opt);
		
		$count 	  = $this -> db -> select_one( $re_sql['sql_count'] );

		$page_str = $this -> page ->get_admin_page( $count["CNUM"] );
		
		$this -> view -> assign('keyword',		$keyword);

		$this -> view -> assign('list_val',		$list_val);
		$this -> view -> assign('list_type',	$list_type);
		
		$this -> view -> assign('colspan_val',	count($show_arr)+1);
		$this -> view -> assign('field_show',	$field_show);
		$this -> view -> assign('page_str',		$page_str);
		$this -> view -> assign('td_rows',		$td_rows);
		$this -> view -> display('table_list.tpl');
		
	}
	
	
	
	function trash_list(  )
	{
		$keyword 	= $this -> input -> req["keyword"];
		$list_val   = $this -> input -> req["list_val"];
		$list_type  = $this -> input -> req["list_type"];

		$table_arr['where_add'] = '';

		if($keyword!='')
		{ 	
			$table_arr['where_add'] .= " AND ( sli_name LIKE  '%".$keyword."%' )";  
		}
		

		$table_arr['order_by']  = 'sli_id';
		if($list_val!='' and $list_type =='DESC' )
		{
			$table_arr['order_by'] = $list_val ."  DESC ";
		}elseif($list_val!='' and $list_type =='ASC')
		{
			$table_arr['order_by'] = $list_val." ASC";
		}else{
			$table_arr['order_by'] =  'sli_id';
		}

		$this -> load('page',$this->lang['page']);

		//列表字段显示
		$show_arr = array('sli_id' => array('th'=>1,'td'=>'id'),'sli_name'=> array('th'=>0,'td'=>''),'sort_name'=> array('th'=>1,'td'=>''),'sli_url'=> array('th'=>0,'td'=>'img'),'sli_view'=>array('th'=>1,'td'=>''),'sli_enabled'=>array('th'=>1,'td'=>'arr'),'sli_up_time'=>array('th'=>1,'td'=>'time'));
		
		$field_show = $this -> helper -> get_th_list( $show_arr , $list_val , $list_type , $lang_arr = $this->lang['field_list'] );

		$table_arr['table']				= $this -> master_act;
		$table_arr['left']['table'] 	= 'sli_sort';
		$table_arr['left']['on']		= $this -> db -> prefix.$this -> master_act.'.pis_id = '.$this -> db -> prefix.'sli_sort.sort_id ';
		
		$table_arr['prefix'] 	= $this -> db -> prefix;
		$table_arr['field_arr'] = array_keys($show_arr);
		$table_arr['def_where'] = 'sli_delete =1';
		$table_arr['group_by']  = '';
		$table_arr['limit_val'] = $this -> page ->get_limit_val();
		
		$re_sql   = $this -> helper -> get_list_sql( $table_arr );

		//var_dump($re_sql);
		
		$info 	  = $this -> db -> select_info( $re_sql['sql_list'] );
		
		$key_arr['sli_enabled'] = $this->lang['enabled_arr'];

		$opt = array( 'restore'=> $this->lang['restore'], 'delete'=> $this->lang['delete']);
		
		$td_rows  = $this -> helper -> get_td_list( $info , $show_arr ,$key_arr ,$this -> master_act ,$opt );
		
		$count 	  = $this -> db -> select_one( $re_sql['sql_count'] );

		$page_str = $this -> page ->get_admin_page( $count["CNUM"] );
		
		$this -> view -> assign('keyword',		$keyword);

		$this -> view -> assign('list_val',		$list_val);
		$this -> view -> assign('list_type',	$list_type);
		
		$this -> view -> assign('colspan_val',	count($show_arr)+1);
		$this -> view -> assign('field_show',	$field_show);
		$this -> view -> assign('page_str',		$page_str);
		$this -> view -> assign('td_rows',		$td_rows);
		$this -> view -> display('table_trash.tpl');
		
	}


	function recycle()
	{
		
		$info_id = $infoid = $this -> input ->  get["id"];
		
		$uprec = " UPDATE `".$this -> db -> prefix.$this -> master_act."` SET sli_delete = 1  WHERE  `sli_id` in ( $info_id ) ";
		$this -> db -> query_sql($uprec);
		
		$this -> view ->  assign('info_title',$this->lang['del_success']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_list");
		$this -> view ->  display('suggestion.tpl');

	}
	
	//还原
	function restore( )
	{
		$infoid = $this -> input ->  delUrl($_REQUEST["id"]);
		
		$uprec = " UPDATE `".$this -> db -> prefix.$this -> master_act."` SET sli_delete = 0  WHERE  `sli_id` in ( $infoid ) ";
		@$this -> db -> query_sql($uprec);
		
		$this -> view ->  assign('info_title',$_LANG['bd_restoresusse']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=trash_list");
		$this -> view ->  display('suggestion.tpl');
	}
	

	function delete( )
	{
		$infoid = $this -> input ->  get["id"];
		$insert_sql = " DELETE FROM `".$this -> db -> prefix.$this -> master_act."` WHERE `sli_id` in ( $infoid ) ";

		$this -> db -> query_sql($insert_sql);
		$this -> view ->  assign('info_title',$this->lang['del_success']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=trash_list");
		$this -> view ->  display('suggestion.tpl');
	}
	
	
	function show( )
	{
		$info_id = $this -> input ->  get["id"];
		$upshow = " UPDATE `".$this -> db -> prefix.$this -> master_act."` SET sli_enabled = 1  WHERE `sli_id` in ( $info_id ) ";

		$this -> db -> query_sql($upshow);
		$this -> view ->  assign('info_title',$_LANG['bd_showsusse']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_list");
		$this -> view ->  display('suggestion.tpl');
	}


	function hide( )
	{
		//$indel = implode(',', $delArray);
		$info_id = $this -> input ->  get["id"];
		
		$up_hide = " UPDATE `".$this -> db -> prefix.$this -> master_act."` SET sli_enabled = 0  WHERE  `sli_id` in ( $info_id ) ";
		$this -> db -> query_sql($up_hide);
		
		$this -> view ->  assign('info_title',$_LANG['bd_hidesusse']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_list");
		$this -> view ->  display('suggestion.tpl');
	}
	
	
	function info(  )
	{
		$act_type 	= $this -> input -> get["act_type"];
		
		if($act_type=='edit'){
			
			$id_val = $this -> input ->  get["id"];
			
			$sql_query = " SELECT *  FROM  ".$this -> db -> prefix.$this -> master_act."  WHERE sli_id = '".$id_val."' ORDER BY `sli_id` ";
			$info = $this -> db -> select_one($sql_query);
			
			$ckeditorLoad 	= $this -> helper -> load_ckeditor( 'sli_desc' ,$info['sli_desc'] );//加载文本编辑器
			$this -> view -> assign( 'ckeditorLoad', $ckeditorLoad);
			
			$this -> view -> assign('txt_title',   $this->lang['edit_title']);
			$this -> view -> assign('edit_submit', $this->lang['edit']);
			$this -> view -> assign('info',$info);
			$this -> view -> assign('act_type',$act_type);
			$this -> view -> assign('act_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=edit_info&act_type=edit");
			
			
		}else{
			
		    //添加信息

			
			$ckeditorLoad 	= $this -> helper -> load_ckeditor( 'sli_desc' ,'','Basic');//加载文本编辑器
			$this -> view -> assign( 'ckeditorLoad', $ckeditorLoad);

			$this -> view -> assign('act_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=edit_info&act_type=add");
			
			$this -> view -> assign('act_type', $act_type);
			$this -> view -> assign('txt_title', $this->lang['add_title']);
			$this -> view -> assign('edit_submit', $this-> lang['add']);
			
		}

		$this -> view ->  display($this -> master_act.'_edit.tpl');
	
	}
	
	
	function edit_info( )
	{	
	
		$sli_idval 		= $this -> input ->  funpost("sli_id");
		$sli_nameval 	= $this -> input ->  funpost("sli_name");
		$sli_signval 	= $this -> input ->  funpost("sli_sign");
	    $sli_widthval 	= $this -> input ->  funpost("sli_width");
		$sli_heightval 	= $this -> input ->  funpost("sli_height");
		$sli_descval 	= html_entity_decode($_POST["sli_desc"]);

		$sli_enabledval = $this -> input ->  funpost("sli_enabled");
		
		$act_type = $this -> input ->  req["act_type"];

		if($act_type=='edit')
		{

		
			if($sli_nameval !='' and $sli_signval !='' and $sli_heightval !='' )
			{
				$update = "UPDATE `".$this -> db -> prefix.$this -> master_act."` SET  sli_name = '".$sli_nameval."' , sli_sign = '".$sli_signval."' ,  sli_width = '".$sli_widthval."',  sli_height = '".$sli_heightval."', sli_desc = '".$sli_descval."', sli_enabled = '".$sli_enabledval."'  WHERE  sli_id = '".$sli_idval."' ";
				
				$this -> db -> query_sql( $update );
				
				$this -> view ->  assign('info_title',$this->lang['edit_success']);
				$this -> view ->  assign('URL_TIME',URL_TIME);
				$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_list");
				$this -> view ->  display('suggestion.tpl');
	
		
			}else{
			
				$this -> view ->  assign('info_title',$this->lang['err_info_missing']);
				$this -> view ->  assign('URL_TIME',URL_TIME);
				$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info&id=".$sli_idval);
				$this -> view ->  display('suggestion.tpl');	
			}
		

		}else{
			
				if($sli_nameval !='' and $sli_signval !='' and $sli_heightval !='')
				{
					$sql_query = " SELECT count(1) as LNUM  FROM  ".$this -> db -> prefix.$this -> master_act."  WHERE sli_name = '".$sli_nameval."' ORDER BY `sli_id` ";
					$info = $this -> db -> select_one($sql_query);
					
					if( $info["LNUM"] < 1 )
					{
						$sli_add_time_val = time();
						$insert_sql =" INSERT INTO `".$this -> db -> prefix.$this -> master_act."` 
						(`sli_name` , `sli_sign` ,`sli_width` ,`sli_height` , `sli_desc` , `sli_enabled`,`sli_add_time`,`sli_up_time` ) VALUES
						( '$sli_nameval', '$sli_signval', '$sli_widthval','$sli_heightval','$sli_descval', '$sli_enabledval','$sli_add_time_val','$sli_add_time_val')";
						
						$this -> db -> query_sql($insert_sql);
						
						$this -> view ->  assign('info_title',$this->lang['add_success']);
						$this -> view ->  assign('URL_TIME',URL_TIME);
						$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_list");
						$this -> view ->  display('suggestion.tpl');	
					}else{
						
						$this -> view ->  assign('info_title',$this->lang['err_info_exist']);
						$this -> view ->  assign('URL_TIME',URL_TIME);
						$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info&act_type=add");
						$this -> view ->  display('suggestion.tpl');	
					}
					
				}else{
					
					$this -> view ->  assign('info_title',$this->lang['err_info_missing']);
					$this -> view ->  assign('URL_TIME',URL_TIME);
					$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info&act_type=add");
					$this -> view ->  display('suggestion.tpl');
				}
		}
		
	}
	

	
	function delete_item()
	{
		
		$id_val 	 = $this -> input ->  get["id"];
		$slt_id_val  = $this -> input ->  get["slt_id"];
		
		$delete_sql ="DELETE FROM `".$this -> db -> prefix."sli_item` WHERE `".$this -> db -> prefix."sli_item`.`slt_id` in ( $slt_id_val ) and  sli_id = '$id_val' ";
		
		$this -> db ->    query_sql( $delete_sql );
		$this -> view ->  assign('info_title',$this->lang['del_success']);
		$this -> view ->  assign('URL_TIME',URL_TIME);  
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=item_list&id=".$id_val);
		$this -> view ->  display('suggestion.tpl');
		
		
	}

	
	function info_item()
	{
		$id_val 	= $this -> input -> get["id"];
		$slt_id_val = $this -> input -> get["slt_id"];
		$act_type 	= $this -> input -> get["act_type"];
		
		if( $id_val != '' ){
			$sql_query = " SELECT sli_id ,sli_name FROM  ".$this -> db -> prefix."".$this -> master_act."  WHERE sli_id = '".$id_val."' ORDER BY `sli_id` ";
			$info 	   = $this -> db -> select_one($sql_query);
			$this -> view -> assign( 'info', $info);
		}
		
		if($act_type=='edit'){
			
			$sql_query = " SELECT *  FROM  ".$this -> db -> prefix."sli_item  WHERE slt_id = '".$slt_id_val."' ORDER BY `slt_id` ";
			$item_info = $this -> db -> select_one($sql_query);
			
			$this -> view -> assign('act_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=edit_item&act_type=edit&id=".$id_val);
			
			$this -> view ->  assign('item_info',$item_info);
			
			$ckeditorLoad = $this -> helper -> load_ckeditor( 'slt_desc' , $item_info["slt_desc"] ,'Basic' );	//加载文本编辑器
			
			$this -> view -> assign( 'edit_submit', $this->lang['edit']);
			
			
		}else{

			$this -> view -> assign('act_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=edit_item&act_type=add&id=".$id_val);
			$ckeditorLoad = $this -> helper -> load_ckeditor( 'slt_desc' , '' ,'Basic' );	//加载文本编辑器
			$this -> view -> assign( 'edit_submit', $this->lang['add_submit']);
		
		}
		$this -> view -> assign( 'slt_id', $slt_id_val);
		$this -> view -> assign( 'act_type', $act_type);
		
		$this -> view -> assign( 'id', $id_val);
		$this -> view -> assign( 'ckeditorLoad', $ckeditorLoad);
		$this -> view ->  display('sli_item_edit.tpl');
	
	}
	
	
	function item_list()
	{	
		
		$id_val = $this -> input ->  get["id"];

		$sql_query = " SELECT sli_id ,sli_name FROM  ".$this -> db -> prefix."".$this -> master_act."  WHERE sli_id = '".$id_val."' ORDER BY `sli_id` ";
		$info 	   = $this -> db -> select_one($sql_query);
		//var_dump( $info );
		//列表字段显示
		$show_arr = array('slt_id' => array('th'=>0,'td'=>'id'),'slt_url'=> array('th'=>0,'td'=>'img'),'slt_title'=> array('th'=>0,'td'=>''),'slt_desc'=> array('th'=>0,'td'=>''),'slt_enabled'=>array('th'=>0,'td'=>'arr'),'slt_up_time'=>array('th'=>0,'td'=>'time'));
		
		$field_show = $this -> helper -> get_th_list( $show_arr , $list_val , $list_type , $lang_arr = $this->lang['field_item_list'] );


		$sql_item  = " SELECT *  FROM  ".$this -> db -> prefix."sli_item  WHERE sli_id = '".$id_val."' ORDER BY `slt_id` Limit 0, 3000 ";
		$info_item = $this -> db -> select_info( $sql_item );
		
		//var_dump( $info_item);
		//$this -> helper -> load_ckeditor( 'slt_desc' ,'' ,'Basic' );	//加载文本编辑器
		
		$this -> view ->  assign('colspan_val',	count($show_arr)+1);
		$this -> view ->  assign('field_show', $field_show);
		$this -> view ->  assign('id', $id_val);
		$this -> view ->  assign('info',$info);
		$this -> view ->  assign('info_item',$info_item);
		$this -> view ->  display('sli_item_list.tpl');
		
	}

	function show_item( )
	{
		$info_id = $this -> input ->  get["id"];
		$upshow = " UPDATE `".$this -> db -> prefix."sli_item` SET slt_enabled = 1  WHERE `slt_id` in ( $info_id ) ";
		$this -> db -> query_sql($upshow);
		
		$sql_query = " SELECT sli_id  FROM  ".$this -> db -> prefix."sli_item  WHERE slt_id in ( $info_id ) ";
		$info_one 	   = $this -> db -> select_one($sql_query);

		
		$this -> view ->  assign('info_title',$_LANG['bd_showsusse']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=item_list&&id=".$info_one['sli_id']);
		$this -> view ->  display('suggestion.tpl');
	}


	function hide_item( )
	{
		//$indel = implode(',', $delArray);
		$info_id = $this -> input ->  get["id"];
		
		$up_hide = " UPDATE `".$this -> db -> prefix."sli_item` SET slt_enabled = 0  WHERE  `slt_id` in ( $info_id ) ";
		$this -> db -> query_sql($up_hide);


		$sql_query = " SELECT sli_id  FROM  ".$this -> db -> prefix."sli_item  WHERE slt_id in ( $info_id ) ";
		$info_one 	   = $this -> db -> select_one($sql_query);
		
		$this -> view ->  assign('info_title',$_LANG['bd_hidesusse']);
		$this -> view ->  assign('URL_TIME',URL_TIME);
		$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=item_list&&id=".$info_one['sli_id']);
		$this -> view ->  display('suggestion.tpl');
	}


	function edit_item()
	{	
	
	
		$id_val 		= $this -> input ->  funpost("id");	
		$slt_idval 		= $this -> input ->  funpost("slt_id");
		$slt_listval 	= $this -> input ->  funpost("slt_list");
		$slt_titleval 	= $this -> input ->  funpost("slt_title");
		$slt_urlval 	= $this -> input ->  funpost("slt_url");
		$slt_descval 	= html_entity_decode($_POST["slt_desc"]);
		$slt_enabledval = $this -> input ->  funpost("slt_enabled");
		
		$act_type 	= $this -> input -> get["act_type"];
		
		if($act_type=='edit'){
			
			if($id_val !='' and  $slt_urlval !='' and $slt_descval !='' )
			{
				$slt_up_time_val =  time();
				
				$updatesql = " UPDATE `".$this -> db -> prefix."sli_item` SET  slt_url = '".$slt_urlval."' ,slt_title = '".$slt_titleval."' , slt_desc = '".$slt_descval."' , slt_enabled = '".$slt_enabledval."', slt_up_time = '".$slt_up_time_val."', slt_list = '".$slt_listval."' WHERE  slt_id = '".$slt_idval."' ";
				
				$this -> db -> query_sql( $updatesql );
				
				$this -> view ->  assign('info_title',$this->lang['edit_success']);
				$this -> view ->  assign('URL_TIME',URL_TIME);
				$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=item_list&id=".$id_val);
				$this -> view ->  display('suggestion.tpl');
					
			}else{
			
				$this -> view ->  assign('info_title',$this->lang['err_info_missing'] );
				$this -> view ->  assign('URL_TIME',URL_TIME);
				$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_item&slt_id=".$slt_idval."&id=".$id_val);
				$this -> view ->  display('suggestion.tpl');	
			}
			
		}else{

	
			if( $id_val !='' and $slt_urlval !='')
			{
			
					$slt_add_time_val 	= time();
	
					$insert_item =" INSERT INTO `".$this -> db -> prefix."sli_item` (`sli_id`,`slt_url` ,`slt_title` , `slt_desc` , `slt_enabled` ,slt_list, slt_add_time ,slt_up_time) VALUES (  '$id_val',  '$slt_urlval', '$slt_titleval','$slt_descval',  '$slt_enabledval','$slt_listval',  '$slt_add_time_val','$slt_add_time_val')";

					$proinsertId = $this -> db -> query_sql( $insert_item );
	
					$this -> view ->  assign('info_title',$this->lang['add_success']);
					
					$this -> view ->  assign('URL_TIME',URL_TIME);
					$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=item_list&id=".$id_val);
					$this -> view ->  display('suggestion.tpl');	
	
				
			}else{
				
				$this -> view ->  assign('info_title',$this->lang['err_info_missing']);
				$this -> view ->  assign('URL_TIME',URL_TIME);
				$this -> view ->  assign('get_url',ADMIN_WEBURL."/index.php?load=".$this -> master_act."&act=info_item&id=".$id_val);
				$this -> view ->  display('suggestion.tpl');		
			}
		}

	}



		
}

