<?php

/**
 * $Id$
 *  
 * @category Drawing
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$cat_id = CValue::get("category_id");
$category = new CDrawingCategory();
$category->load($cat_id);
$category->loadRefsFiles();
$smarty = new CSmartyDP();
$smarty->assign("category", $category);
$smarty->display("inc_list_files_for_category.tpl");
<?php

/**
 * $Id$
 *  
 * @category Drawing
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
$id = CValue::get("id");
$mode_id = CValue::get("mode_id");
$mode = CValue::get("mode");
$cat = new CDrawingCategory();
$cat->load($id);
if (!$cat->_id) {
    $cat->{$mode} = $mode_id;
}
$nb_files = $cat->loadRefsFiles();
//smarty
$smarty = new CSmartyDP();
$smarty->assign("cat", $cat);
$smarty->display("inc_edit_category.tpl");