All pastes #568694 Raw Edit

Unnamed

public php v1 · immutable
·published 2007-06-15 17:29 UTC
rendered paste body
<?phpif ( ! defined( 'IN_ACP' ) ){	print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";	exit();}class ad_filters{	var $ipsclass;	var $html;	var $base_url;	function auto_run ( )	{		$this->html            = $this->ipsclass->acp_load_template ( 'cp_skin_filters' );		if ( !empty ( $this->ipsclass->input[ 'submit' ] ) )		{			if ( $this->ipsclass->input[ 'type' ] == 'new_mf' )			{				$this->ipsclass->DB->do_insert (					'catfilters',					array (						'filter_id' => 'NULL',						'filter_name' => $this->ipsclass->input[ 'mf_name' ],						'filter_type' => 'mf' 					)				);			}			else if ( $this->ipsclass->input[ 'type' ] == 'new_sf' )			{				$this->ipsclass->DB->do_insert (					'catfilters',					array (						'filter_id' => 'NULL',						'filter_name' => $this->ipsclass->input[ 'sf_name' ],						'filter_type' => 'sf',						'filter_joined' => $this->ipsclass->input[ 'mf_name' ]					)				);			}			else if ( $this->ipsclass->input[ 'type' ] == 'new_ssf' )			{				$this->ipsclass->DB->do_insert (					'catfilters',					array (						'filter_id' => 'NULL',						'filter_name' => $this->ipsclass->input[ 'ssf_name' ],						'filter_type' => 'ssf',						'filter_joined' => $this->ipsclass->input[ 'sf_name' ]					)				);			}		}		else		{	 		$this->ipsclass->DB->simple_construct ( array (					'select' => '*',	 				'from'   => 'catfilters',					'where' => 'filter_type = "mf"' )			);	 		$this->ipsclass->DB->simple_exec ( );			$one	= array ( $this->ipsclass->DB->get_num_rows ( ), $this->ipsclass->DB->fetch_row ( ) );	 		$this->ipsclass->DB->simple_construct ( array (					'select' => '*',	 				'from'   => 'catfilters',					'where' => 'filter_type = "sf"' )			);	 		$this->ipsclass->DB->simple_exec ( );			$two	= array ( $this->ipsclass->DB->get_num_rows ( ), $this->ipsclass->DB->fetch_row ( ) );			$this->html->show_form ( $this->html->show_dropdown ( 1, $one ), $this->html->show_dropdown ( 2, $two ), $this->html->show_list ( ) );		}	}}?>