<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @package oscss-2 <www http://www.oscss.org>
  @version 2.0.9
  @date  16/05/10, 11:28
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8

  @class cfg_xx Gestion deporté de configuration.
  La page content/configuration.php gere les appels

  LE nom de la class, porte le numero du gID, celui enregister dans la table osc_configuration_group
  Ex: INSERT INTO osc_configuration_group ( configuration_group_id , configuration_group_title , configuration_group_description , sort_order , visible , configuration_group_parentid , configuration_group_group_id , configuration_group_key ) VALUES ( '45', 'TITLE Class cfg_xx', NULL , NULL , '1', '110', '', '' );


*/

Class cfg_xx{

  /**
    Le contructeur, init la class, et ce charge de l'appel vers le fichier de langues
  */
  function __construct(){

    $this->code='cfg_xx';

    global $messageStack, $language;
    $file=DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/'.$this->code.'.php';
    if(file_exists($file))include($file);
  }


  /**
    Action en remplacement des action par defaut
  */
  public function draw_action(){
    global $action,$messageStack;
    switch ($action) {
      case 'insert':
      break;
      default:
    }

  }

  /**
    Ce charge appel db pour recuperer les valeurs
  */
  public function load_db_values(){
    global $action,$languages_id;

  }

  /**
    Appelé dans le header de page
  */
  public static function draw_header(){
  }

  /**
    Contenu central
  */
  public function draw(){
    global $action,$gparentID,$current_theme;

    if($action=='cfg')  return;
    $liste = $this->load_db_values();

     $sor =
      '<div class="box_left">'."\n".
      '<div id="ssmenu">'."\n".
	tep_ssmenu_configuration($gparentID).
      '</div>'."\n".
      '<table width="100%" class="dataTable">'."\n".
	'<thead>'."\n".
	  '<tr>'."\n".
	  '</tr>'."\n".
	'</thead>'."\n".
	'<tbody>'."\n";
	foreach ($liste as $theme) {
	}

      $sor .= '</tbody>'."\n".
      '</table>'."\n".
      '</div>'."\n";

    print $sor;


    $this->draw_right_columm($action);
  }
  /* Private function class */

  private function divers(){
  }

  /**
    Col de droite
  */
  private function draw_right_columm($action) {
    $heading = array();
    $contents = array();
    $oInfo=$this->oInfo;
    switch ($action) {
      case 'new':
      default:
	break;
    }

    echo '<div class="box_right">';
      if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
	$box = new box;
	echo $box->infoBox($heading, $contents);
      }
    echo '</div>';
  }


}


?>
