本文整理汇总了PHP中w2p_Theme_TitleBlock::addCrumbRight方法的典型用法代码示例。如果您正苦于以下问题:PHP w2p_Theme_TitleBlock::addCrumbRight方法的具体用法?PHP w2p_Theme_TitleBlock::addCrumbRight怎么用?PHP w2p_Theme_TitleBlock::addCrumbRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类w2p_Theme_TitleBlock
的用法示例。
在下文中一共展示了w2p_Theme_TitleBlock::addCrumbRight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: void
if (!$user) {
$titleBlock = new w2p_Theme_TitleBlock('Invalid User ID', 'helix-setup-user.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb('?m=admin', 'users list');
$titleBlock->show();
} else {
$countries = w2PgetSysVal('GlobalCountries');
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View User', 'helix-setup-user.png', $m, "{$m}.{$a}");
if ($canRead) {
$titleBlock->addCrumb('?m=admin', 'users list');
}
if ($canEdit || $user_id == $AppUI->user_id) {
$titleBlock->addCrumb('?m=admin&a=addedituser&user_id=' . $user_id, 'edit this user');
$titleBlock->addCrumb('?m=contacts&a=addedit&contact_id=' . $user->contact_id, 'edit this contact');
$titleBlock->addCrumb('?m=system&a=addeditpref&user_id=' . $user_id, 'edit preferences');
$titleBlock->addCrumbRight('<div class="crumb"><ul style="float:right;"><li><a href="javascript: void(0);" onclick="popChgPwd();return false"><span>' . $AppUI->_('change password') . '</span></a></li></ul></div>');
$titleBlock->addCell('<td align="right" width="100%"><input type="button" class=button value="' . $AppUI->_('add user') . '" onclick="javascript:window.location=\'./index.php?m=admin&a=addedituser\';" /></td>');
}
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
<?php
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canEdit || $user_id == $AppUI->user_id) {
?>
function popChgPwd() {
window.open( './index.php?m=public&a=chpwd&dialog=1&user_id=<?php
echo $user->user_id;
?>