Ignore:
Timestamp:
Nov 28, 2010, 1:01:06 PM (13 years ago)
Author:
cljosse
Message:

[cl_conflit] save?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/cl_conflit/conflit.inc.php

    r7895 r7905  
    3333 static public function cl_conflit_script()
    3434        {
     35
     36
    3537           global  $template,$user,$conf,$picture ,$page,$cl_plugin;
     38 
    3639                $my_path =  basename(dirname(__FILE__)).'/' ;
    3740            $my_path = dirname(__FILE__).'/';
     
    4346                $template->assign(
    4447                                                array(
    45                                                 'version' => $cl_plugin['version'] ,
     48                                                'cl_version' => $cl_plugin['version'] ,
    4649                                                'name' => $cl_plugin['id'] ,
    4750                                                'cl_conflit' => $cl_conflit  ,
     
    5356                if(     $page['body_id'] == 'theAdminPage' ) return ;
    5457                return $template->parse( 'cl_conflit_init', false);
    55         }// function cl_autosize_script
     58        }// function cl_conflit_script
    5659//=================================================================================
    5760/*
     
    7073                        $template->assign(
    7174                                        array(                                         
    72                                             'version' => $cl_plugin['version'] ,
     75                                            'cl_version' => $cl_plugin['version'] ,
    7376                                                'name' => $cl_plugin['id'] ,
    7477                                                'ma_page' =>    $page['body_id'],
     
    8891
    8992
    90  }// function cl_autosize_script_2
     93 }// function cl_conflit_script_2
    9194
    9295 //=================================================================
     
    109112if ($ThePicture['is_picture'] <> 1 )    {  return $content;  ; }       
    110113
    111          $autosizejs = '<script type="text/javascript" charset="utf-8"  src="';
    112               $autocss =   $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n";
     114         $cl_conflitjs = '<script type="text/javascript" charset="utf-8"  src="';
     115              $autocss =   $cl_conflitjs.'themes/default/js/jquery.packed.js"></script>'."\n";
    113116                  $template->append('head_elements',$autocss);
    114117
     
    121124
    122125
    123  }// function cl_autosize_script_3
    124 
     126 }// function cl_conflit_script_3
     127        /*
     128        *
     129        */
     130        static public function cl_conflit_admin($menu)
     131                {
     132                global  $lang ;
     133                array_push($menu, array('NAME' => 'cl_conflit',
     134                'URL' => get_admin_plugin_menu_link(CONFLIT_PATH . 'admin/cl_conflit_admin.php')));
     135                return $menu;
     136        } //function cl_conflit_admin
    125137
    126138} // class
     139        /*
     140        *
     141        */
     142 function cl_conflit_Get_Options()
     143  {
     144                global $conf,$cl_conflit_parametres;
     145                $cl_conflit_parametres =  unserialize($conf['cl_conflit']);
     146                $cl_conflit_parametres =  cl_conflit_Set_Options();
     147                return $cl_conflit_parametres;
     148  }
     149        /*
     150        *
     151        */
     152function cl_conflit_Set_Options()
     153  {
    127154
     155  global $cl_conflit_parametres;
     156//=============================================================================
     157$cl_conflit_parametres->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($cl_conflit_parametres->query )) ? $cl_conflit_parametres->query : '' ) ;
     158$cl_conflit_parametres->type=(isset($_POST['type']))? $_POST['type']: ((isset($cl_conflit_parametres->type)) ? $cl_conflit_parametres->type:  '') ;
     159
     160 
     161return $cl_conflit_parametres;
     162}
     163        /*
     164        *
     165        */
     166function cl_conflit_sauve_options_inf()
     167{
     168global $options,$infos_message,$conf,$cl_conflit_parametres  ;
     169$infos_message .=l10n("cl_conflit_save_config")."<br>";
     170 $cl_conflit_parametres=cl_conflit_Set_Options();
     171
     172 if ( isset($cl_conflit_parametres) )
     173        {
     174 
     175                $query = '
     176                UPDATE '.CONFIG_TABLE.'
     177                SET value="'.addslashes(serialize($cl_conflit_parametres)).'"
     178                WHERE param = "cl_conflit"
     179                LIMIT 1';
     180                        pwg_query($query);
     181          }
     182         
     183 }
    128184
    129185
Note: See TracChangeset for help on using the changeset viewer.