set_filenames(array('cl_conflit_init'=>$my_path. "template/conflit.tpl" ) );
$DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ;
$cl_conflit_parametres = cl_conflit_Get_Options() ;
$theme=$user['theme'];
$url = get_root_url();
$template->assign(
array(
'cl_conflit_parametres' => $cl_conflit_parametres ,
'cl_plugins' => $cl_plugin ,
'cl_version' => $cl_plugin['version'] ,
'name' => $cl_plugin['name'] ,
'MY_ROOT' => $url,
'theme' => $theme ,
'DEBUG' => $DEBUG ,
'CONFLIT_PATH' => CONFLIT_PATH,
'CONFLIT_PATH_ABS' => CONFLIT_PATH_ABS
) );
return $template->parse( 'cl_conflit_init', false);
}// function cl_conflit_script_1
//=================================================================================
/*
* cl_conflit_script_2
*/
static public function cl_conflit_script_2()
{
global $template,$user,$conf,$picture ,$page,$cl_plugin;
$my_path = dirname(__FILE__).'/';
$DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ;
$ma_page=isset($page['body_id'])?$page['body_id']:"" ;
$theme=$user['theme'];
if ($ma_page=='thePiwiShackControllerPage') return ;
$template->assign(
array(
'cl_version' => $cl_plugin['version'] ,
'name' => $cl_plugin['name'] ,
'ma_page' => $ma_page,
'theme' => $theme ,
'DEBUG' => $DEBUG ,
'CONFLIT_PATH' => CONFLIT_PATH,
'CONFLIT_PATH_ABS' => CONFLIT_PATH_ABS
)
);
$autoscript="";
$template->append('footer_elements',$autoscript);
return ;
}// function cl_conflit_script_2
//================================================
/*
* cl_conflit_admin
*/
static public function cl_conflit_admin($menu)
{
global $lang ;
array_push($menu, array('NAME' => 'cl_conflit',
'URL' => get_admin_plugin_menu_link(CONFLIT_PATH . 'admin/cl_conflit_admin.php')));
return $menu;
} //function cl_conflit_admin
} // class
/*
*
*/
function cl_conflit_Get_Options()
{
global $conf,$cl_conflit_parametres;
$cl_conflit_parametres = unserialize($conf['cl_conflit']);
$cl_conflit_parametres = cl_conflit_Set_Options();
return $cl_conflit_parametres;
}
/*
*
*/
function cl_conflit_Set_Options()
{
global $cl_conflit_parametres;
//=============================================================================
$cl_conflit_parametres->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($cl_conflit_parametres->query )) ? $cl_conflit_parametres->query : 'Qt' ) ;
$cl_conflit_parametres->type=(isset($_POST['type']))? $_POST['type']: ((isset($cl_conflit_parametres->type)) ? $cl_conflit_parametres->type: 'Ty') ;
return $cl_conflit_parametres;
}
/*
*
*/
function cl_conflit_sauve_options_inf()
{
global $options,$infos_message,$conf,$cl_conflit_parametres ;
$infos_message .=l10n("cl_conflit_save_config")."
";
$cl_conflit_parametres=cl_conflit_Set_Options();
if ( isset($cl_conflit_parametres) )
{
$query = '
UPDATE '.CONFIG_TABLE.'
SET value="'.addslashes(serialize($cl_conflit_parametres)).'"
WHERE param = "cl_conflit"
LIMIT 1';
pwg_query($query);
}
}
?>