本文整理汇总了PHP中Protocol::hasDecisions方法的典型用法代码示例。如果您正苦于以下问题:PHP Protocol::hasDecisions方法的具体用法?PHP Protocol::hasDecisions怎么用?PHP Protocol::hasDecisions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Protocol
的用法示例。
在下文中一共展示了Protocol::hasDecisions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* show returns the protocoltext as html-string
*
* @param int $pid entry-id for protocol
* @return string html-string with the protocoltext
*/
private function show($pid)
{
// pagecaption
$this->tpl->assign('pagecaption', parent::lang('class.ProtocolView#page#caption#show'));
// get protocol
$protocol = new Protocol($pid);
// get status
$correctable = $protocol->get_correctable(false);
// check rights
if (Rights::check_rights($pid, 'protocol', true) && ($correctable['status'] == 2 || $_SESSION['user']->get_userinfo('name') == $protocol->get_owner())) {
// smarty
$sP = new JudoIntranetSmarty();
// prepare marker-array
$infos = array('version' => date('dmy'));
// add calendar-fields to array
$protocol->addMarks($infos, false);
// add tmce-css
$fh = fopen('templates/protocols/tmce_' . $protocol->get_preset()->get_path() . '.css', 'r');
$css = fread($fh, filesize('templates/protocols/tmce_' . $protocol->get_preset()->get_path() . '.css'));
fclose($fh);
$infos['tmceStyles'] = $css;
// smarty
$sP->assign('p', $infos);
// check marks in values
foreach ($infos as $k => $v) {
if (preg_match('/\\{\\$p\\..*\\}/U', $v)) {
$infos[$k] = $sA->fetch('string:' . $v);
}
}
// decision link
$decisionLink = array("href" => "protocol.php?id=showdecisions&pid={$pid}", "title" => parent::lang('class.ProtocolView#show#decisionLink#title'), "text" => parent::lang('class.ProtocolView#show#decisionLink#text'), "number" => $protocol->hasDecisions());
// smarty
$sP->assign('p', $infos);
$div_out = $sP->fetch('templates/protocols/' . $protocol->get_preset()->get_path() . '.tpl');
// smarty
$sPd = new JudoIntranetSmarty();
$sPd->assign('decisionlink', $decisionLink);
$sPd->assign('page', $div_out);
return $sPd->fetch('smarty.protocol.show.tpl');
} else {
// error
$errno = $GLOBALS['Error']->error_raised('NotAuthorized', 'entry:' . $this->get('id'), $this->get('id'));
$GLOBALS['Error']->handle_error($errno);
return $GLOBALS['Error']->to_html($errno);
}
}