<?php /** * $Id$ * * @package Mediboard * @subpackage Hospi * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $printer_id = CView::get("printer_id", "num default|0", true); CView::checkin(); $printer = new CPrinter(); $printer->load($printer_id); if ($printer->_id) { $printer->loadTargetObject(); } $source = new CSourceLPR(); $sources = $source->loadlist(); $source = new CSourceSMB(); $sources = array_merge($sources, $source->loadlist()); $function = new CFunctions(); $where = array("group_id" => "= '" . CGroups::loadCurrent()->_id . "'"); $functions = $function->loadListWithPerms(PERM_READ, $where, "text"); $smarty = new CSmartyDP(); $smarty->assign("printer", $printer); $smarty->assign("sources", $sources); $smarty->assign("functions", $functions); $smarty->display("inc_edit_printer.tpl");
<?php /** * View Print Sources * * @category PRINTING * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version SVN: $Id:$ * @link http://www.mediboard.org */ CCanDo::checkEdit(); $source_id = CValue::getOrSession("source_id", 0); $class = CValue::getOrSession("class", "CSourceLPR"); $sources = array(); // Récupération des sources $source_lpr = new CSourceLPR(); $sources = $source_lpr->loadlist(); $source_smb = new CSourceSMB(); $sources = array_merge($sources, $source_smb->loadlist()); // Création du template $smarty = new CSmartyDP(); $smarty->assign("sources", $sources); $smarty->assign("source_id", $source_id); $smarty->assign("class", $class); $smarty->display("inc_list_sources.tpl");
<?php /** * View Edit Source * * @category PRINTING * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version SVN: $Id:$ * @link http://www.mediboard.org */ CCanDo::checkEdit(); $source_id = CView::get("source_id", "num default|0", true); CValue::setSession("class", "CSourceLPR"); CView::checkin(); $source_lpr = new CSourceLPR(); $source_lpr->load($source_id); if (!$source_lpr->_id) { $source_lpr->valueDefaults(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("source_lpr", $source_lpr); $smarty->display("inc_edit_source_lpr.tpl");