<?php
/**
 *\licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
 *\portion code Copyright (c) 2002 osCommerce
 *\package osCSS-2 <www http://www.oscss.org>
 *\version 2.1.0
 *\date  15/12/10, 22:12
 *\author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
 *\encode UTF-8
 *\file ajax_exe.php
 *\brief prise en charge action et affichage via ajax
*/

  require('includes/application_top.php');

  $action=(isset($_GET['action'])? $_GET['action'] : (isset($_POST['action'])? $_POST['action'] : '')) ;

  switch($action){
    default:
  /**
    @brief code is part of execution call trigger by name $action
    @param $action string
  */
    $file= $page->getPathTemplate(). DIR_WS_TRIGGERS . $action . '.inc';
    if( ($r=page::TestFile($file)) && $r !=false ){
      require_once($file);
      exit;
    }

  /**
    @brief code is part of execution call box
    @param $_GET['box'] string  le nom de la boxe
  */
      $page->post_init();
      $c=$page->oscss_boxes->_add($_GET['box'],'ajax','');
      $box_left=$page->oscss_boxes->_call($_GET['box'],'ajax');
      $boxe =$page->oscss_boxes->_return($_GET['box']);
      include(DIR_WS_TEMPLATES.$page->the_template().'/boxe.php');
  }

?>