本文整理匯總了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;
?>