コード例 #1
0
ファイル: edit_params.php プロジェクト: fbone/mediboard4
 * $Id: edit_params.php 19621 2013-06-20 20:40:45Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage GestionCab
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19621 $
 */
CCanDo::checkRead();
$employecab_id = CValue::getOrSession("employecab_id", null);
$user = CMediusers::get();
$employe = new CEmployeCab();
$where = array();
$where["function_id"] = "= '{$user->function_id}'";
$listEmployes = $employe->loadList($where);
if ($employecab_id) {
    $employe =& $listEmployes[$employecab_id];
} else {
    $employe->function_id = $user->function_id;
}
$paramsPaie = new CParamsPaie();
if ($employe->employecab_id) {
    $paramsPaie->loadFromUser($employe->employecab_id);
    $paramsPaie->loadRefsFwd();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("employe", $employe);
$smarty->assign("paramsPaie", $paramsPaie);
$smarty->assign("listEmployes", $listEmployes);
$smarty->display("edit_params.tpl");
コード例 #2
0
ファイル: CFichePaie.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::store()
  */
 function store()
 {
     // Must store to get all fields
     if ($this->_final_store) {
         $this->loadRefsFwd();
         $this->_ref_params_paie->loadRefsFwd();
         $this->updateFormFields();
         // Création du template
         $smarty = new CSmartyDP();
         $smarty->assign("fichePaie", $this);
         $this->final_file = $smarty->fetch("print_fiche.tpl");
         file_put_contents("tmp/fichePaie.htm", $this->final_file);
     }
     return parent::store();
 }