<?php
/*
Copyright (C) 2008 by oscim   Project lossim  [ 15.09.2009, 09:17:59] @oscim
// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
ENCODE UTF-8
*/
/**
  Tableau de bord
*/
  error_reporting(E_ALL);

//! ACTION
 $action=(isset($post['action']) ) ?$post['action'] : 'list';

//! obj
 $cstr->_add_class('db_posts',_BO_CLASS .'class.db_posts.php');
 $cstr->_add_class('view_posts',_BO_CLASS .'class.view_posts.php');

// print_r($cstr);
 switch($action){
  case 'up_posts':
    $cstr->_add_class('i_db_link',_BO_CLASS .'class.i_db_link.php');
    if(!$cstr->_call('db_posts','up_posts_multi',$post))  $cstr->_call('message_stack','add_session',UPDATE_POSTS_NOT_OK,'erreur');
    else $cstr->_call('message_stack','add_session',UPDATE_POSTS_OK,'erreur');

    redirect(_FILENAME_ADMIN);
  break;
  case 'add_cat':
  break;
  case 'phpinfo':
  break;
  case 'reindex':
    $cstr->_add_class('i_db_link',_BO_CLASS .'class.i_db_link.php');
    $cstr->_call('db_posts','reindex_posts_multi');
    redirect(_FILENAME_ADMIN);
  break;
  case 'list';
  default:

// 			print $final;

    $cstr->_add_class('db_rubrique',_BO_CLASS .'class.db_rubrique.php');

    $array1[]['text']='<h3>'.ADD_NEW_POST.'</h3>';
    $array1[]['text']= CHOOSE_CAT.' '.$cstr->_call('db_rubrique','c_cat','racine');
    $array1[]['text']= CHOOSE_LANG.' '.$cstr->_call('db_lang','cat_lang',LANG_POST);
    $array1[]['text']= php_f_hidden('etat_page','I').php_f_hidden('action','new')/*.php_f_hidden('row_by_page',$post['row_by_page'])*/;
    $array1[]['text']= '<input class="r" type="submit" name="submit" value="'.SUBMIT_AJOUTER.'" /> <br style="clear:both; display:block"/>';

    $array[0]['form']=tep_form (_FILENAME_MODIFIER_UN_FICHIER,'','',"post","GET",false,"" );
    $array[0]['text']= $cstr->_call('table_block','table_block',$array1) ;


 }


  array_push($js_lib, "add_click_onload"); array_push($function_js_init, "add_click_onload('menu','');");

//   print_r($_SESSION)
?>