本文整理匯總了PHP中w2p_Theme_TitleBlock::addCell方法的典型用法代碼示例。如果您正苦於以下問題:PHP w2p_Theme_TitleBlock::addCell方法的具體用法?PHP w2p_Theme_TitleBlock::addCell怎麽用?PHP w2p_Theme_TitleBlock::addCell使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類w2p_Theme_TitleBlock
的用法示例。
在下文中一共展示了w2p_Theme_TitleBlock::addCell方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
global $AppUI, $deny1, $canRead, $canEdit, $project_id, $task_id, $showProject, $tab;
if ($task_id && !$project_id) {
$task = new CTask();
$task->load($task_id);
$project_id = $task->task_project;
}
// modified later by Pablo Roca (proca) in 18 August 2003 - added page support
// Files modules: index page re-usable sub-table
if ($canEdit && 'links' != $m) {
$titleBlock = new w2p_Theme_TitleBlock('', '', $m, "{$m}.{$a}");
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new link') . '">', '', '<form action="?m=links&a=addedit&project_id=' . $project_id . '&task_id=' . $task_id . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->show();
}
$page = (int) w2PgetParam($_GET, 'page', 1);
$search = w2PgetParam($_POST, 'search', '');
if (!isset($project_id)) {
$project_id = (int) w2PgetParam($_POST, 'project_id', 0);
}
if ($canRead) {
$link = new CLink();
$links = $link->getProjectTaskLinksByCategory(null, $project_id, $task_id, $tab - 1, $search);
} else {
$AppUI->redirect('m=public&a=access_denied');
}
$xpg_pagesize = w2PgetConfig('page_size', 50);
$xpg_min = $xpg_pagesize * ($page - 1);
示例2: delMe
// Pull First Letters
$letters = CUser::getFirstLetters();
$letters = $letters . CContact::getFirstLetters($AppUI->user_id, true);
$a2z = '<table cellpadding="2" cellspacing="1" border="0"><tr>';
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="./index.php?m=admin&stub=0">' . $AppUI->_('All') . '</a></td>';
for ($c = 65; $c < 91; $c++) {
$cu = chr($c);
$cell = !(mb_strpos($letters, $cu) === false) ? '<a href="?m=admin&stub=' . $cu . '">' . $cu . '</a>' : '<font color="#999999">' . $cu . '</font>';
$a2z .= '<td>' . $cell . '</td>';
}
$a2z .= '</tr></table>';
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('User Management', 'helix-setup-users.png', $m, "{$m}.{$a}");
$where = w2PformSafe($where, true);
$titleBlock->addCell('<input type="text" name="where" class="text" size="10" value="' . $where . '" />' . ' <input type="submit" value="' . $AppUI->_('search') . '" class="button" />', '', '<form action="index.php?m=admin" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->addCell($a2z);
$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 ($canDelete) {
?>
function delMe( x, y ) {
if (confirm( "<?php
echo $AppUI->_('doDelete', UI_OUTPUT_JS) . ' ' . $AppUI->_('User', UI_OUTPUT_JS);
?>
" + y + "?" )) {
示例3: foreach
ob_end_clean();
foreach ($locale as $k => $v) {
if ($v != '0') {
$trans[$k]['lang'] = $v;
}
}
}
ksort($trans);
$titleBlock = new w2p_Theme_TitleBlock('Translation Management', 'rdf2.png', $m, $m . '.' . $a);
/*
* TODO: While this implementation is close, I'd rather use the normal setMsg
* functionality as it handles marking the message as an error and inserting
* linebreaks, etc.
*/
if (file_exists($localeFile) && !is_writable($localeFile)) {
$titleBlock->addCell('', '', '<span class="error">' . $AppUI->_("Locales file ({$localeFile}) is not writable.") . '</span><br />', '');
}
$localeFolder = pathinfo($localeFile, PATHINFO_DIRNAME);
if (!is_writable($localeFolder)) {
$titleBlock->addCell('', '', '<span class="warning">' . $AppUI->_("Locales folder ({$localeFolder}) is not writable.") . '</span>', '');
}
$titleBlock->addCell($AppUI->_('Module'), '', '<form action="?m=system&a=translate" method="post" name="modlang" accept-charset="utf-8">', '');
$titleBlock->addCell(arraySelect($modules, 'module', 'size="1" class="text" onchange="document.modlang.submit();"', $module));
$titleBlock->addCell($AppUI->_('Language'));
$temp = $AppUI->setWarning(false);
$titleBlock->addCell(arraySelect($locales, 'lang', 'size="1" class="text" onchange="document.modlang.submit();"', $lang, true), '', '', '</form>');
$AppUI->setWarning($temp);
$titleBlock->addCrumb('?m=system', 'system admin');
$titleBlock->show();
?>
示例4: clickDay
// get the passed timestamp (today if none)
$date = w2PgetParam($_GET, 'date', '');
$today = new w2p_Utilities_Date();
$today = $today->format(FMT_TIMESTAMP_DATE);
// get the list of visible companies
$company = new CCompany();
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => $AppUI->_('All')), $companies);
$event_filter_list = array('my' => 'My Events', 'own' => 'Events I Created', 'all' => 'All Events');
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Yearly Calendar', 'icon.png', $m);
$titleBlock->addCrumb('?m=events&a=year_view&date=' . $date, 'year view');
$titleBlock->addCrumb('?m=events&date=' . $date, 'month view');
$titleBlock->addCrumb('?m=events&a=week_view&date=' . $date, 'week view');
$titleBlock->addCrumb('?m=events&a=day_view&date=' . $date, 'day view');
$titleBlock->addCell('<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany" accept-charset="utf-8">' . arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id) . '</form>');
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCell(arraySelect($event_filter_list, 'event_filter', 'onChange="document.pickFilter.submit()" class="text"', $event_filter, true), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickFilter" accept-charset="utf-8">', '</form>');
$titleBlock->addCell($AppUI->_('Event Filter') . ':');
$titleBlock->addButton('New event', '?m=events&a=addedit&date=' . $today);
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function clickDay( uts, fdate ) {
window.location = './index.php?m=events&a=day_view&date='+uts;
}
function clickWeek( uts, fdate ) {
window.location = './index.php?m=events&a=week_view&date='+uts;
}
</script>
示例5: intval
$worked_hours = $obj->project_worked_hours;
$total_project_hours = $total_hours = $obj->getTotalProjectHours();
// create Date objects from the datetime fields
$start_date = intval($obj->project_start_date) ? new w2p_Utilities_Date($obj->project_start_date) : null;
$end_date = intval($obj->project_end_date) ? new w2p_Utilities_Date($obj->project_end_date) : null;
$actual_end_date = intval($criticalTasks[0]['task_end_date']) ? new w2p_Utilities_Date($criticalTasks[0]['task_end_date']) : null;
$style = $actual_end_date > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
$style = $obj->project_percent_complete < 99.98999999999999 && $today > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : $style;
// setup the title block
$ttl = 'ProjectDesigner';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'projectdesigner.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=projects', 'projects list');
$titleBlock->addCrumb('?m=' . $m, 'select another project');
$titleBlock->addCrumb('?m=projects&a=view&bypass=1&project_id=' . $project_id, 'normal view project');
if ($canAddProject) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '">', '', '<form action="?m=projects&a=addedit" method="post" accept-charset="utf-8">', '</form>');
}
if ($canAddTask) {
$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" accept-charset="utf-8">', '</form>');
}
if ($canEditProject) {
$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" accept-charset="utf-8">', '</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" accept-charset="utf-8">', '</form>');
$titleBlock->addCrumb('?m=projects&a=addedit&project_id=' . $project_id, 'edit this project');
if ($canDeleteProject) {
$titleBlock->addCrumbDelete('delete project', $canDelete, $msg);
}
示例6: array
} else {
$search_string = $AppUI->getState('dept_search_string');
}
$search_string = w2PformSafe($search_string, true);
$perms =& $AppUI->acl();
$owner_list = array(0 => $AppUI->_('All', UI_OUTPUT_RAW)) + $perms->getPermittedUsers('departments');
$owner_combo = arraySelect($owner_list, 'owner_filter_id', 'class="text" onchange="javascript:document.searchform.submit()"', $owner_filter_id, false);
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Departments', 'departments.png', $m, $m . '.' . $a);
$titleBlock->addCell('<form name="searchform" action="?m=departments&search_string=' . $search_string . '" method="post" accept-charset="utf-8">
<table>
<tr>
<td>
<strong>' . $AppUI->_('Search') . '</strong>
<input class="text" type="text" name="search_string" value="' . $search_string . '" /><br />
<a href="index.php?m=departments&search_string=-1">' . $AppUI->_('Reset search') . '</a>
</td>
<td valign="top">
<strong>' . $AppUI->_('Owner filter') . '</strong> ' . $owner_combo . '
</td>
</tr>
</table>
</form>');
$titleBlock->show();
if (isset($_GET['tab'])) {
$AppUI->setState('DeptIdxTab', w2PgetParam($_GET, 'tab', null));
}
$deptsTypeTab = defVal($AppUI->getState('DeptIdxTab'), 0);
$deptsType = $deptsTypeTab;
// load the department types
$deptTypes = w2PgetSysVal('DepartmentType');
$tabBox = new CTabBox('?m=departments', W2P_BASE_DIR . '/modules/departments/', $deptsTypeTab);
示例7: CCompany
$oCompany = new CCompany();
$allowedCompanies[-1] = $AppUI->_('all');
$allowedCompanies += $oCompany->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$project_types = array(-1 => '(' . $AppUI->_('all') . ')') + w2PgetSysVal('ProjectType');
$user_list = array(0 => '(' . $AppUI->_('all') . ')') + CProject::getOwners();
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Projects', 'icon.png', $m);
//$titleBlock->addSearchCell($search_string);
$titleBlock->addFilterCell('Type', 'project_type', $project_types, $project_type);
$titleBlock->addFilterCell('Company', 'project_company', $allowedCompanies, $company_id);
$titleBlock->addFilterCell('Owner', 'project_owner', $user_list, $owner);
if ($canCreate) {
$titleBlock->addButton('new project', '?m=projects&a=addedit');
}
$titleBlock->addCell('<span title="' . $AppUI->_('Projects') . '::' . $AppUI->_('Print projects list') . '.">' . '<a href="javascript: void(0);" onclick ="window.open(\'index.php?m=projects&a=printprojects&dialog=1&suppressHeaders=1&company_id=' . $company_id . '&project_type=' . $project_type . '&project_owner=' . $owner . '\', \'printprojects\',\'width=1200, height=600, menubar=1, scrollbars=1\')">
<img src="' . w2PfindImage('printer.png') . '" />
</a></span>');
$titleBlock->show();
$project_statuses = array();
$project_statuses = w2PgetSysVal('ProjectStatus');
$project_statuses[-2] = 'All Projects';
$project_statuses[-1] = 'All Active';
$project_statuses[] = 'Archived';
ksort($project_statuses);
$counts = $project->getProjectsByStatus($company_id);
$counts[-2] = count($project->loadAll(null, $company_id > 0 ? 'project_company = ' . $company_id : ''));
$counts[-1] = count($project->loadAll(null, 'project_active = 1' . ($company_id > 0 ? ' AND project_company = ' . $company_id : '')));
$counts[count($project_statuses) - 3] = $counts[-2] - $counts[-1];
$tabBox = new CTabBox('?m=projects', W2P_BASE_DIR . '/modules/projects/', $tab);
foreach ($project_statuses as $key => $project_status) {
$tabname = $project_status . '(' . (int) $counts[$key] . ')';
示例8: array
if (isset($_REQUEST['owner_filter_id'])) {
$AppUI->setState('dept_owner_filter_id', w2PgetParam($_REQUEST, 'owner_filter_id', null));
$owner_filter_id = w2PgetParam($_REQUEST, 'owner_filter_id', null);
} else {
$owner_filter_id = $AppUI->getState('dept_owner_filter_id');
if (!isset($owner_filter_id)) {
$owner_filter_id = 0;
//By default show all companies instead of $AppUI->user_id current user.
$AppUI->setState('dept_owner_filter_id', $owner_filter_id);
}
}
$search_string = w2PgetParam($_POST, 'search_string', '');
$AppUI->setState($m . '_search_string', $search_string);
$search_string = w2PformSafe($search_string, true);
$perms =& $AppUI->acl();
$owner_list = array(0 => $AppUI->_('All', UI_OUTPUT_RAW)) + $perms->getPermittedUsers('departments');
$titleBlock = new w2p_Theme_TitleBlock('Departments', 'icon.png', $m);
$titleBlock->addSearchCell($search_string);
$titleBlock->addCell('<form name="searchform2" action="?m=departments" method="post" accept-charset="utf-8">' . arraySelect($owner_list, 'owner_filter_id', 'onChange="document.searchform2.submit()" size="1" class="text"', $owner_filter_id) . '</form>');
$titleBlock->addCell($AppUI->_('Owner filter') . ':');
$titleBlock->show();
// load the department types
$deptTypes = w2PgetSysVal('DepartmentType');
$tabBox = new CTabBox('?m=departments', W2P_BASE_DIR . '/modules/departments/', $tab);
if ($tabBox->isTabbed()) {
array_unshift($deptTypes, $AppUI->_('All Departments', UI_OUTPUT_RAW));
}
foreach ($deptTypes as $deptType) {
$tabBox->add('vw_depts', $deptType);
}
$tabBox->show();
示例9: max
$dept_id = (int) w2PgetParam($_GET, 'dept_id', 0);
$department_id = (int) w2PgetParam($_GET, 'department_id', 0);
$dept_id = max($dept_id, $department_id);
$tab = $AppUI->processIntState('DeptVwTab', $_GET, 'tab', 0);
$department = new CDepartment();
if (!$department->load($dept_id)) {
$AppUI->redirect(ACCESS_DENIED);
}
$canEdit = $department->canEdit();
$canDelete = $department->canDelete();
$titleBlock = new w2p_Theme_TitleBlock('View Department', 'icon.png', $m);
$titleBlock->addCrumb('?m=companies', 'company list');
$titleBlock->addCrumb('?m=companies&a=view&company_id=' . $department->dept_company, 'view this company');
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($canEdit) {
$titleBlock->addCell();
$titleBlock->addButton('New department', '?m=departments&a=addedit&company_id=' . $department->dept_company . '&dept_parent=' . $dept_id);
$titleBlock->addCrumb('?m=departments&a=addedit&dept_id=' . $dept_id, 'edit this department');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete department', $canDelete, $msg);
}
}
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $department, 'Department');
$view->setDoSQL('do_dept_aed');
$view->addField('dept_company', $department->dept_company);
$view->setKey('dept_id');
echo $view->renderDelete();
$types = w2PgetSysVal('DepartmentType');
include $AppUI->getTheme()->resolveTemplate('departments/view');
// tabbed information boxes
示例10: substr
// $department variable, and populate the $company_id variable.
if (!(strpos($department, $company_prefix) === false)) {
$company_id = substr($department, strlen($company_prefix));
$AppUI->setState('UsrProjIdxCompany', $company_id);
unset($department);
}
$contact = new CContact();
$contact->contact_id = $user->user_contact;
$methods = $contact->getContactMethods();
$methodLabels = w2PgetSysVal('ContactMethods');
$countries = w2PgetSysVal('GlobalCountries');
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View User', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($canEdit || $user_id == $AppUI->user_id) {
$titleBlock->addCell('<div class="crumb"><ul><li><a href="javascript: void(0);" onclick="popChgPwd();return false"><span>' . $AppUI->_('change password') . '</span></a></li></ul></div>');
$titleBlock->addCrumb('?m=users&a=addedit&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->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
示例11: void
$canDeleteProject = $obj->canDelete($msg, $project_id);
$obj->load($project_id);
if (!$obj) {
$AppUI->setMsg('Project');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect('m=' . $m);
}
// setup the title block
$ttl = 'ProjectDesigner';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=projects', 'projects list');
$titleBlock->addCrumb('?m=' . $m, 'select another project');
$titleBlock->addCrumb('?m=projects&a=view&bypass=1&project_id=' . $project_id, 'normal view project');
$titleBlock->addButton('new link', '?m=links&a=addedit&project_id=' . $project_id);
if ($canEditProject) {
$titleBlock->addCell();
$titleBlock->addButton('New event', '?m=events&a=addedit&event_project=' . $project_id);
$titleBlock->addCell();
$titleBlock->addButton('New file', '?m=files&a=addedit&project_id=' . $project_id);
$titleBlock->addCrumb('?m=projects&a=addedit&project_id=' . $project_id, 'edit this project');
if ($canDeleteProject) {
$titleBlock->addCrumbDelete('delete project', false, $msg);
}
}
if ($canAddTasks) {
$titleBlock->addCell();
$titleBlock->addButton('New task', '?m=tasks&a=addedit&task_project=' . $project_id);
}
$titleBlock->addCell();
$titleBlock->addCell(w2PtoolTip($m, 'print project') . '<a href="javascript: void(0);" onclick ="window.open(\'index.php?m=projectdesigner&a=printproject&dialog=1&suppressHeaders=1&project_id=' . $project_id . '\', \'printproject\',\'width=1200, height=600, menubar=1, scrollbars=1\')">
<img src="' . w2PfindImage('printer.png') . '" />
示例12: CTask
if (isset($_POST['company_id'])) {
$AppUI->setState('CompanyIdxFilter', $_POST['company_id']);
}
$company_id = $AppUI->getState('CompanyIdxFilter') ? $AppUI->getState('CompanyIdxFilter') : 'all';
$log_all_projects = true;
// show tasks for all projects
if (!isset($user_id)) {
$user_id = $AppUI->user_id;
}
$task = new CTask();
$obj = $task;
$canAddEdit = $obj->canAddEdit();
$canAuthor = $obj->canCreate();
$canEdit = $obj->canEdit();
if (!$canEdit) {
$AppUI->redirect(ACCESS_DENIED);
}
// get CCompany() to filter tasks by company
$comp = new CCompany();
$companies = $comp->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$compFilter = arrayMerge(array('all' => $AppUI->_('All Companies')), $companies);
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Tasks per User', 'icon.png', $m);
$titleBlock->addCell(arraySelect($compFilter, 'company_id', 'size="1" class="text" onChange="document.companyFilter.submit();"', $company_id, false), '', '<form action="?m=tasks&a=tasksperuser" method="post" name="companyFilter" accept-charset="utf-8">', '</form>');
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCrumb('?m=tasks', 'tasks list');
$titleBlock->addCrumb('?m=tasks&a=todo&user_id=' . $user_id, 'my todo');
$titleBlock->show();
// include the re-usable sub view
$min_view = false;
include W2P_BASE_DIR . '/modules/tasks/tasksperuser_sub.php';
示例13: pathinfo
$trans[$k]['lang'] = $v;
}
}
}
ksort($trans);
/**
* TODO: I don't like that this error is handled outside the normal flow but
* it's better than echo'ing which is what we had before.
*/
$localeFolder = pathinfo($localeFile, PATHINFO_DIRNAME);
if (file_exists($localeFile) && !is_writable($localeFile)) {
$AppUI->setMsg($AppUI->_("Locales file ({$localeFile}) is not writable."), UI_MSG_ERROR);
}
echo '' != $AppUI->msg ? $AppUI->getMsg() : '';
$titleBlock = new w2p_Theme_TitleBlock('Translation Management', 'rdf2.png', $m);
$titleBlock->addCell(' ', '', '<form action="?m=system&a=translate" method="post" name="modlang" accept-charset="utf-8">', '');
$titleBlock->addCell(arraySelect($modules, 'module', 'size="1" class="text" onchange="document.modlang.submit();"', $module));
$titleBlock->addCell($AppUI->_('Module'));
$temp = $AppUI->setWarning(false);
$titleBlock->addCell(arraySelect($locales, 'lang', 'size="1" class="text" onchange="document.modlang.submit();"', $lang, true), '', '', '</form>');
$titleBlock->addCell($AppUI->_('Language'));
$AppUI->setWarning($temp);
$titleBlock->addCrumb('?m=system', 'system admin');
$titleBlock->show();
?>
<form action="?m=system&a=translate_save" method="post" name="editlang" accept-charset="utf-8">
<input type="hidden" name="module" value="<?php
echo $modules[$module];
?>
" />
<input type="hidden" name="lang" value="<?php
示例14: clickDay
$last_time = clone $this_day;
$last_time->setTime(23, 59, 59);
$prev_day = new w2p_Utilities_Date(Date_calc::prevDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE));
$next_day = new w2p_Utilities_Date(Date_calc::nextDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE));
// get the list of visible companies
$company = new CCompany();
global $companies;
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => $AppUI->_('All')), $companies);
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Day View', 'myevo-appointments.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=calendar&a=year_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'year view');
$titleBlock->addCrumb('?m=calendar&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=calendar&a=week_view&date=' . $this_week, 'week view');
$titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'day view');
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCell(arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany" accept-charset="utf-8">', '</form>');
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new event') . '">', '', '<form action="?m=calendar&a=addedit&date=' . $this_day->format(FMT_TIMESTAMP_DATE) . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->show();
?>
<script language="javascript">
function clickDay( idate, fdate ) {
window.location = './index.php?m=calendar&a=day_view&date='+idate+'&tab=0';
}
</script>
<table class="std view" width="100%" cellspacing="0" cellpadding="4">
<tr>
<td valign="top">
<table border="0" cellspacing="1" cellpadding="2" width="100%" class="motitle">
<tr>
示例15:
$AppUI->setMsg('Forum');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect('m=' . $m);
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Forum', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($message_id) {
$titleBlock->addCrumb('?m=forums&a=viewer&forum_id=' . $forum_id, 'topics for this forum');
}
if ($canEdit) {
$titleBlock->addCrumb('?m=forums&a=addedit&forum_id=' . $forum_id, 'edit this forum');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete forum', true, $msg);
}
}
$titleBlock->addCell(arraySelect($filters, 'f', 'size="1" class="text" onchange="document.filterFrm.submit();"', $f, true), '', '<form action="?m=forums&a=viewer&forum_id=' . $forum_id . '" method="post" name="filterFrm" accept-charset="utf-8">', '</form>');
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $forum, 'Forum');
echo $view->renderDelete();
include $AppUI->getTheme()->resolveTemplate('forums/view');
echo $AppUI->getTheme()->styleRenderBoxBottom();
if ($post_message) {
include W2P_BASE_DIR . '/modules/forums/post_message.php';
} else {
if ($message_id) {
include W2P_BASE_DIR . '/modules/forums/view_messages.php';
} else {
include W2P_BASE_DIR . '/modules/forums/view_topics.php';
}
}