本文整理汇总了PHP中CTitleBlock::addCrumbDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP CTitleBlock::addCrumbDelete方法的具体用法?PHP CTitleBlock::addCrumbDelete怎么用?PHP CTitleBlock::addCrumbDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTitleBlock
的用法示例。
在下文中一共展示了CTitleBlock::addCrumbDelete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delIt
<!--<input type="submit" class="button" value=">" title="' . $AppUI->_('Search in name and description fields') . '"/>-->', '', '<form action="?m=projects&a=view&project_id=' . $project_id . '" method="post" id="searchfilter">', '</form>');
if ($canEditT) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $project_id . '" method="post">', '</form>');
}
if ($canEdit) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new event') . '">', '', '<form action="?m=calendar&a=addedit&event_project=' . $project_id . '" method="post">', '</form>');
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $project_id . '" method="post">', '</form>');
}
$titleBlock->addCrumb("?m=projects", "projects list");
if ($canEdit) {
$titleBlock->addCrumb("?m=projects&a=addedit&project_id={$project_id}", "edit this project");
if ($canDelete) {
$titleBlock->addCrumbDelete('delete project', $canDelete, $msg);
}
$titleBlock->addCrumb("?m=tasks&a=organize&project_id={$project_id}", "organize tasks");
}
$titleBlock->addCrumb("?m=projects&a=reports&project_id={$project_id}", "reports");
$titleBlock->show();
?>
<script 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) {
?>
function delIt() {
if (confirm( "<?php
示例2: dPgetSysVal
$AppUI->savePlace();
}
// load the list of project statii and company types
$pstatus = dPgetSysVal('ProjectStatus');
$types = dPgetSysVal('CompanyType');
// setup the title block
$titleBlock = new CTitleBlock('View Company', 'handshake.png', $m, "{$m}.{$a}");
if ($canEdit) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new company') . '" />', '', '<form action="?m=companies&a=addedit" method="post">', '</form>');
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&a=addedit&company_id=' . $company_id . '" method="post">', '</form>');
}
$titleBlock->addCrumb("?m=companies", "company list");
if ($canEdit) {
$titleBlock->addCrumb("?m=companies&a=addedit&company_id={$company_id}", "edit this company");
$titleBlock->addCrumbDelete('delete company', $canDelete, $msg);
}
$titleBlock->show();
?>
<table border="0" cellpadding="4" cellspacing="0" width="100%" class="std">
<?php
if ($canDelete) {
?>
<form name="frmDelete" action="./index.php?m=companies" method="post">
<input type="hidden" name="dosql" value="do_company_aed" />
<input type="hidden" name="del" value="1" />
<input type="hidden" name="company_id" value="<?php
echo $company_id;
示例3: CTitleBlock
$AppUI->redirect();
} else {
if ($row->contact_private && $row->contact_owner != $AppUI->user_id && $row->contact_owner && $contact_id != 0) {
$AppUI->redirect('m=public&a=access_denied');
}
}
// setup the title block
$ttl = 'View Contact';
$titleBlock = new CTitleBlock($ttl, 'monkeychat-48.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb('?m=contacts', 'contacts list');
if ($canEdit && $contact_id) {
$titleBlock->addCrumb('?m=contacts&a=addedit&contact_id=' . $contact_id, 'edit');
}
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&a=addedit&company_id=' . $row->contact_company . '&contact_id=' . $contact_id . '" method="post">', '</form>');
if ($canDelete && $contact_id) {
$titleBlock->addCrumbDelete('delete contact', $canDelete, $msg);
}
$titleBlock->show();
?>
<form name="changecontact" action="?m=contacts" method="post">
<input type="hidden" name="dosql" value="do_contact_aed" />
<input type="hidden" name="del" value="0" />
<input type="hidden" name="contact_id" value="<?php
echo $contact_id;
?>
" />
<input type="hidden" name="contact_owner" value="<?php
echo $row->contact_owner ? $row->contact_owner : $AppUI->user_id;
?>
" />
</form>
示例4: delIt
$tf = $AppUI->getPref('TIMEFORMAT');
$start_date = $obj->event_start_date ? new CDate($obj->event_start_date) : null;
$end_date = $obj->event_end_date ? new CDate($obj->event_end_date) : null;
$event_project = db_LoadResult('SELECT project_name FROM projects where project_id=' . $obj->event_project);
// setup the title block
$titleBlock = new CTitleBlock('View Event', 'myevo-appointments.png', $m, "{$m}.{$a}");
if ($canAuthor) {
$titleBlock->addCell();
$titleBlock->addCell('<form action="?m=calendar&a=addedit" method="post">' . '<input type="submit" class="button" value="' . $AppUI->_('new event') . '" /></form>', '', '', '');
}
$titleBlock->addCrumb('?m=calendar&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $start_date->format(FMT_TIMESTAMP_DATE) . '&tab=0', 'day view');
if ($canEdit) {
$titleBlock->addCrumb('?m=calendar&a=addedit&event_id=' . $event_id, 'edit this event');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete event', $canDelete, $msg);
}
}
$titleBlock->show();
?>
<script 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 ($canDelete) {
?>
function delIt() {
if (confirm("<?php
echo $AppUI->_('eventDelete', UI_OUTPUT_JS);
?>
示例5: submitIt
// and task id
$link->link_project = $project_id;
$link->link_task = $task_id;
if ($task_id) {
$link_task = new CTask();
$link_task->load($task_id);
$link->task_name = $link_task->task_name;
}
}
// setup the title block
$ttl = $link_id ? 'Edit Link' : 'Add Link';
$titleBlock = new CTitleBlock($AppUI->_($ttl), 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=' . $m, 'links list');
$canDelete = $perms->checkModuleItem($m, 'delete', $link_id);
if ($canDelete && $link_id) {
$titleBlock->addCrumbDelete('delete link', $canDelete, $msg);
}
$titleBlock->show();
$prj = new CProject();
$projects = $prj->getAllowedProjects($AppUI->user_id, false);
foreach ($projects as $project_id => $project_info) {
$projects[$project_id] = $project_info['project_name'];
}
$projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_JS)), $projects);
?>
<script language="javascript" type="text/javascript">
function submitIt() {
var f = document.uploadFrm;
f.submit();
}
function delIt() {
示例6: CTitleBlock
$AppUI->setMsg('Resource');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect();
} else {
$AppUI->savePlace();
}
$titleBlock = new CTitleBlock('View Resource', 'helpdesk.png', $m, "{$m}.{$a}");
if ($canAuthor) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new resource') . '" />', '', '<form action="?m=resources&a=addedit" method="post">', '</form>');
}
$titleBlock->addCrumb('?m=resources', 'resource list');
if ($canEdit) {
$titleBlock->addCrumb("?m=resources&a=addedit&resource_id={$resource_id}", "edit this resource");
}
if ($canDelete) {
$titleBlock->addCrumbDelete('delete resource', $canDelete, 'no delete permission');
}
$titleBlock->show();
if ($canDelete) {
?>
<script type="text/javascript" language="javascript">
can_delete = true;
delete_msg = "<?php
echo $AppUI->_('doDelete') . ' ' . $AppUI->_('Resource') . '?';
?>
";
</script>
<form name="frmDelete" action="?m=resources" method="post">
<input type="hidden" name="dosql" value="do_resource_aed" />
<input type="hidden" name="del" value="1" />
<input type="hidden" name="resource_id" value="<?php
示例7: CTitleBlock
}
// setup the title block
$titleBlock = new CTitleBlock('View Company', 'handshake.png', $m, "{$m}.{$a}");
$titleBlock->addCell();
if ($canAdd) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new company') . '" />', '', '<form action="?m=companies&a=addedit" method="post" accept-charset="utf-8">', '</form>');
}
if ($canEdit) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new department') . '" />', '', '<form action="?m=departments&a=addedit&company_id=' . $company_id . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&a=addedit&company_id=' . $company_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=companies', 'company list');
if ($canEdit) {
$titleBlock->addCrumb('?m=companies&a=addedit&company_id=' . $company_id, 'edit this company');
if ($canDelete && $deletable) {
$titleBlock->addCrumbDelete('delete company', $deletable, $msg);
}
}
$titleBlock->show();
// 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 ($canDelete && $deletable) {
?>
<script language="javascript" type="text/javascript">
function delIt() {
if (confirm( '<?php
echo $AppUI->_('doDelete') . ' ' . $AppUI->_('Company') . '?';
?>
' )) {
document.frmDelete.submit();
示例8: CTitleBlock
$q->addUpdate('history_item = history_id');
$q->addWhere('history_table = \'history\'');
$okMsg = 'History deleted';
}
$q->clear();
$AppUI->redirect();
}
// pull the history
$q->addTable('history');
$q->addQuery('*');
$q->addWhere('history_id =' . $history_id);
$history = $q->loadHash();
$q->clear();
$titleBlock = new CTitleBlock($history_id ? 'Edit history' : 'New history', 'stock_book_blue_48.png', 'history', 'history.' . $a);
if ($canDelete) {
$titleBlock->addCrumbDelete('delete history', $canDelete, $msg);
}
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function delIt() {
document.AddEdit.action.value = 'del';
document.AddEdit.submit();
}
function cancel() {
if (confirm('<?php
echo $AppUI->_('Are you sure you want to cancel?', UI_OUTPUT_JS);
?>
')) {
示例9: CTitleBlock
if ($file->file_checkout != $AppUI->user_id) {
$ci = false;
}
if (!$canAdmin) {
$canAdmin = $file->canAdmin();
}
if ($file->file_checkout == 'final' && !$canAdmin) {
$AppUI->redirect('m=public&a=access_denied');
}
// setup the title block
$ttl = $file_id ? 'Edit File' : 'Add File';
$ttl = $ci ? 'Checking in' : $ttl;
$titleBlock = new CTitleBlock($ttl, 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=files', 'files list');
if ($canDelete && $file_id > 0 && !$ci) {
$titleBlock->addCrumbDelete('delete file', $canDelete, $msg);
}
$titleBlock->show();
//Clear the file id if checking out so a new version is created.
if ($ci) {
$file_id = 0;
}
if ($file->file_project) {
$file_project = $file->file_project;
}
if ($file->file_task) {
$file_task = $file->file_task;
$task_name = $file->getTaskName();
} else {
if ($file_task) {
$task = new CTask();
示例10: submitIt
}
if ($folder && !($canEdit_folder && $canRead_folder) || !$folder && !$canAuthor_folder) {
$AppUI->redirect("m=public&a=access_denied");
}
$msg = '';
// check if this record has dependancies to prevent deletion
if ($folder > 0) {
$canDelete_folder = $obj->canDelete($msg, $folder);
}
$folders = getFolderSelectList();
// setup the title block
$ttl = $folder ? "Edit File Folder" : "Add File Folder";
$titleBlock = new CTitleBlock($ttl, 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb("?m=files", "files list");
if ($canDelete_folder) {
$titleBlock->addCrumbDelete('delete file folder', $canDelete_folder, $msg);
}
$titleBlock->show();
?>
<script language="javascript">
function submitIt() {
var f = document.folderFrm;
var msg = '';
if (f.file_folder_name.value.length < 1) {
msg += "\n<?php
echo $AppUI->_('Folder Name');
?>
";
f.file_folder_name.focus();
}
if (msg.length > 0) {