set_filenames(array('cl_conflit_init'=>$my_path. "template/conflit.tpl" ) ); $debug = isset($conf['debug']) ? $conf['debug'] : false ; $cl_conflit_parametres = cl_conflit_Get_Options() ; $theme=$user['theme']; $template->assign( array( 'cl_conflit_parametres' => $cl_conflit_parametres , 'cl_plugins' => $cl_plugin , 'cl_version' => $cl_plugin['version'] , 'name' => $cl_plugin['name'] , 'theme' => $theme , 'DEBUG' => $debug , 'CONFLIT_ROOT' => CONFLIT_PATH) ); if( $page['body_id'] == 'theAdminPage' ) return ; return $template->parse( 'cl_conflit_init', false); }// function cl_conflit_script //================================================================================= /* * */ static public function cl_conflit_script_2() { global $template,$user,$conf,$picture ,$page,$cl_plugin; $my_path = basename(dirname(__FILE__)).'/' ; $my_path = dirname(__FILE__).'/'; $debug = isset($conf['debug']) ? $conf['debug'] : false ; $theme=$user['theme']; $template->assign( array( 'cl_version' => $cl_plugin['version'] , 'name' => $cl_plugin['name'] , 'ma_page' => $page['body_id'], 'theme' => $theme , 'DEBUG' => $debug , 'CONFLIT_ROOT' => CONFLIT_PATH) ); $autoscript=""; $template->append('footer_elements',$autoscript); return ; }// function cl_conflit_script_2 //================================================================= /* * */ static public function cl_conflit_script_3($content) { global $template,$user,$conf,$picture ,$page,$cl_plugin; $my_path = basename(dirname(__FILE__)).'/' ; $my_path = dirname(__FILE__).'/'; $debug = isset($conf['debug']) ? $conf['debug'] : false ; $theme=$user['theme']; $ThePicture = $template->get_template_vars('current'); $tpl_name = $user['theme'] ; if ( !empty($content) ) { return $content; } if ($ThePicture['is_picture'] <> 1 ) { return $content; ; } $cl_conflitjs = ''."\n"; $template->append('head_elements',$autocss); $autocss=""; $template->append('footer_elements',"\n".$autocss); return $content ; }// function cl_conflit_script_3 /* * */ 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); } } ?>