Example #1
0
    $xpath = new DOMXPath($xml);
    $nodeList = $xpath->query("//*[@id='header']");
    if ($nodeList->length) {
        if ($headerFound) {
            $header = $nodeList->item(0);
            $header->parentNode->removeChild($header);
        }
        $headerFound = true;
    }
    $nodeList = $xpath->query("//*[@id='footer']");
    if ($nodeList->length) {
        if ($footerFound) {
            $footer = $nodeList->item(0);
            $footer->parentNode->removeChild($footer);
        }
        $footerFound = true;
    }
    $_source .= $xml->saveHTML() . '<br style="page-break-after: always;" />';
}
// Initialisation de CKEditor
$templateManager = new CTemplateManager();
$templateManager->printMode = true;
$templateManager->initHTMLArea();
if (count($documents) == 0) {
    echo '<div class="small-info">Il n\'y a aucun document pour cette consultation</div>';
    Capp::rip();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("_source", $_source);
$smarty->display("../../dPcompteRendu/templates/print_cr.tpl");
Example #2
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkAdmin();
$log = new CUserLog();
$log->object_class = CValue::postOrSession("object_class");
$log->date = CValue::postOrSession("date");
$log->user_id = CValue::postOrSession("user_id");
$do_it = CValue::post("do_it");
$user = new CMediusers();
$users = $user->loadGroupList();
foreach ($users as $_user) {
    $_user->loadRefFunction();
}
$classes = Capp::getInstalledClasses();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("log", $log);
$smarty->assign("users", $users);
$smarty->assign("classes", $classes);
$smarty->assign("do_it", $do_it);
$smarty->display("view_object_restore.tpl");