本文整理汇总了PHP中CTitleBlock::addCrumbRight方法的典型用法代码示例。如果您正苦于以下问题:PHP CTitleBlock::addCrumbRight方法的具体用法?PHP CTitleBlock::addCrumbRight怎么用?PHP CTitleBlock::addCrumbRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTitleBlock
的用法示例。
在下文中一共展示了CTitleBlock::addCrumbRight方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: goProject
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="?m=contacts&where=0">' . $AppUI->_('All') . '</a></td>';
for ($c = 65; $c < 91; $c++) {
$cu = chr($c);
$cell = mb_strpos($let, "{$cu}") > 0 ? '<a href="?m=contacts&where=' . $cu . '">' . $cu . '</a>' : '<font color="#999999">' . $cu . '</font>';
$a2z .= "\n\t<td>{$cell}</td>";
}
$a2z .= "\n</tr>\n<tr>" . '<td colspan="28">' . '<form action="./index.php" method="get">' . $AppUI->_('Search for') . '<input type="text" name="search_string" value="' . $default_search_string . '" />' . '<input type="hidden" name="m" value="contacts" /><input type="submit" value=">" />' . '<a href="./index.php?m=contacts&search_string=">' . $AppUI->_('Reset search') . '</a></form></td></tr>' . "\n</table>\n";
// setup the title block
// what purpose is the next line for? Commented out by gregorerhardt, Bug #892912
// $contact_id = $carr[$z][$x]["contact_id"];
$titleBlock = new CTitleBlock('Contacts', 'monkeychat-48.png', $m, "{$m}.{$a}");
$titleBlock->addCell($a2z);
if ($canAuthor) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new contact') . '">', '', '<form action="?m=contacts&a=addedit" method="post">', '</form>');
$titleBlock->addCrumbRight('<a href="?m=contacts&a=csvexport&suppressHeaders=true">' . $AppUI->_('CSV Download') . '</a> | ' . '<a href="?m=contacts&a=vcardimport&dialog=0">' . $AppUI->_('Import vCard') . '</a>');
}
$titleBlock->show();
// TODO: Check to see that the Edit function is separated.
?>
<script language="javascript" type="text/javascript">
// Callback function for the generic selector
function goProject(key, val) {
var f = document.modProjects;
if (val != '') {
f.project_id.value = key;
f.submit();
}
}
</script>
<form action="./index.php" method='get' name="modProjects">
示例2: db_error
$q->addWhere("project_company = {$company_id}");
}
$projects = array('0' => '') + $q->loadHashList();
echo db_error();
if (!in_array($forum_project, array_keys($projects))) {
$forum_project = 0;
}
$perms =& $AppUI->acl();
$permittedUsers =& $perms->getPermittedUsers();
$users = array('0' => '') + $permittedUsers;
// setup the title block
$ttl = $forum_id > 0 ? "Edit Forum" : "Add Forum";
$titleBlock = new CTitleBlock($ttl, 'support.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb("?m=forums", "forums list");
if ($canDelete) {
$titleBlock->addCrumbRight('<a href="javascript:delIt()"><img align="absmiddle" src="' . dPfindImage('stock_delete-16.png', $m) . '" width="16" height="16" alt="" border="0" /> ' . $AppUI->_('delete forum') . '</a>');
}
$titleBlock->show();
?>
<script language="javascript">
function submitIt() {
var form = document.changeforum;
if (form.forum_name.value.search(/^\s*$/) >= 0) {
alert("<?php
echo $AppUI->_('forumName', UI_OUTPUT_JS);
?>
");
form.forum_name.focus();
} else if (form.forum_project.selectedIndex < 1) {
alert("<?php
echo $AppUI->_('forumSelectProject', UI_OUTPUT_JS);
示例3: popChgPwd
if (!db_loadHash($sql, $user)) {
$titleBlock = new CTitleBlock('Invalid User ID', 'helix-setup-user.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb('?m=admin', 'users list');
$titleBlock->show();
} else {
// setup the title block
$titleBlock = new CTitleBlock('View User', 'helix-setup-user.png', $m, "{$m}.{$a}");
if ($canRead) {
$titleBlock->addCrumb('?m=admin', 'users list');
}
if ($canEdit) {
$titleBlock->addCrumb('?m=admin&a=addedituser&user_id=' . $user_id, 'edit this user');
}
if ($canEdit || $user_id == $AppUI->user_id) {
$titleBlock->addCrumb('?m=system&a=addeditpref&user_id=' . $user_id, 'edit preferences');
$titleBlock->addCrumbRight('<a href="#" onclick="popChgPwd();return false">' . $AppUI->_('change password') . '</a>');
$titleBlock->addCell('<input type="button" class=button value="' . $AppUI->_('add user') . '" onClick="javascript:window.location=\'./index.php' . '?m=admin&a=addedituser\';" />');
}
$titleBlock->show();
?>
<script type="text/javascript" language="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'];
?>
示例4: CTitleBlock
if (!$user) {
$titleBlock = new CTitleBlock('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 CTitleBlock('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;
?>
示例5: submitIt
$prj = new CProject();
if ($forum_id) {
$projects = $prj->getAllowedProjects($AppUI->user_id, false);
} else {
$projects = $prj->getAllowedProjects($AppUI->user_id, true);
}
foreach ($projects as $project_id => $project_info) {
$projects[$project_id] = $project_info['project_name'];
}
$projects = arrayMerge(array(0 => $all_projects), $projects);
$users = $perms->getPermittedUsers('forums');
$ttl = $forum_id > 0 ? 'Edit Forum' : 'Add Forum';
$titleBlock = new CTitleBlock($ttl, 'support.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=forums', 'forums list');
if ($canDelete && $forum_id > 0) {
$titleBlock->addCrumbRight('<table cellspacing="0" cellpadding="0" border="0"?<tr><td><a class="delete" href="javascript:delIt()"><span>' . $AppUI->_('delete forum') . '</span></a></td></tr></table>');
}
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function submitIt(){
var form = document.changeforum;
if(form.forum_name.value.search(/^\s*$/) >= 0 ) {
alert("<?php
echo $AppUI->_('forumName', UI_OUTPUT_JS);
?>
");
form.forum_name.focus();
} else if(form.forum_owner.value < 1) {
alert("<?php
echo $AppUI->_('forumSelectOwner', UI_OUTPUT_JS);
示例6: goProject
$a2z .= "<td width='100%' align='right'>" . $AppUI->_('Show') . ": </td>";
$a2z .= '<td><a href="./index.php?m=contacts&where=0">' . $AppUI->_('All') . '</a></td>';
for ($c = 65; $c < 91; $c++) {
$cu = chr($c);
$cell = mb_strpos($let, "{$cu}") > 0 ? "<a href=\"?m=contacts&where={$cu}\">{$cu}</a>" : "<font color=\"#999999\">{$cu}</font>";
$a2z .= "\n\t<td>{$cell}</td>";
}
$a2z .= "\n</tr>\n<tr><td colspan='28'>{$form}</td></tr></table>";
// setup the title block
// what purpose is the next line for? Commented out by gregorerhardt, Bug #892912
// $contact_id = $carr[$z][$x]["contact_id"];
$titleBlock = new CTitleBlock('Contacts', 'monkeychat-48.png', $m, "{$m}.{$a}");
$titleBlock->addCell($a2z);
if ($canAuthor) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new contact') . '">', '', '<form action="?m=contacts&a=addedit" method="post">', '</form>');
$titleBlock->addCrumbRight('<a href="./index.php?m=contacts&a=csvexport&suppressHeaders=true">' . $AppUI->_('CSV Download') . "</a> | " . '<a href="./index.php?m=contacts&a=vcardimport&dialog=0">' . $AppUI->_('Import vCard') . '</a>');
}
$titleBlock->show();
// TODO: Check to see that the Edit function is separated.
?>
<script language="javascript">
// Callback function for the generic selector
function goProject(key, val) {
var f = document.modProjects;
if (val != '') {
f.project_id.value = key;
f.submit();
}
}
</script>
<form action="./index.php" method='get' name="modProjects">
示例7: delIt
if (isset($risk['risk_project'])) {
$q->clear();
$q->addQuery('task_id, task_name');
$q->addTable('tasks');
$q->addWhere('task_project = ' . $risk['risk_project']);
$tasks = $q->loadHashList();
} else {
$tasks = array();
}
// setup the title block
$ttl = $risk_id > 0 ? "Edit Risk" : "Add Risk";
$titleBlock = new CTitleBlock($ttl, 'folder5.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb("?m=risks", "risks list");
$titleBlock->addCrumb("?m=risks&a=view&risk_id={$risk_id}", "View Risk");
if ($canDelete) {
$titleBlock->addCrumbRight('<a href="javascript:delIt()">' . '<img align="absmiddle" src="' . dPfindImage('trash.gif', $m) . '" width="16" height="16" alt="" border="0" /> ' . $AppUI->_('delete risk') . '</a>');
}
$titleBlock->show();
?>
<script language="javascript">
function delIt(){
var form = document.changecontact;
if(confirm( "<?php
echo $AppUI->_('risksDelete');
?>
" )) {
form.del.value = "<?php
echo $risk_id;
?>
";
form.submit();