当前位置: 首页>>代码示例>>PHP>>正文


PHP w2p_Theme_TitleBlock类代码示例

本文整理汇总了PHP中w2p_Theme_TitleBlock的典型用法代码示例。如果您正苦于以下问题:PHP w2p_Theme_TitleBlock类的具体用法?PHP w2p_Theme_TitleBlock怎么用?PHP w2p_Theme_TitleBlock使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了w2p_Theme_TitleBlock类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: readfile

    } else {
        $localeFile = W2P_BASE_DIR . '/locales/' . $lang . '/' . $modules[$module] . '.inc';
        if (file_exists($localeFile)) {
            readfile($localeFile);
        }
    }
    eval("\$locale=array(" . ob_get_contents() . "\n'0');");
    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'));
开发者ID:,项目名称:,代码行数:31,代码来源:

示例2: intval

     $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
     $AppUI->redirect();
 } else {
     $AppUI->savePlace();
 }
 $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();
开发者ID:,项目名称:,代码行数:31,代码来源:

示例3: __construct

 public function __construct($title, $icon = '', $module = '', $helpref = '')
 {
     parent::__construct($title, $icon, $module, $helpref);
     trigger_error("CTitleBlock_core has been deprecated in v3.0 and will be removed by v4.0. Please use w2p_Theme_TitleBlock instead.", E_USER_NOTICE);
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例4: die

<?php

/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
$AppUI->savePlace();
$obj = new CResource();
$perms =& $AppUI->acl();
$canEdit = canEdit('resources');
$titleBlock = new w2p_Theme_TitleBlock('Resources', 'resources.png', $m, $m . '.' . $a);
if ($canEdit) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new resource') . '">', '', '<form action="?m=resources&a=addedit" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->show();
if (isset($_GET['tab'])) {
    $AppUI->setState('ResourcesIdxTab', w2PgetParam($_GET, 'tab', null));
}
$resourceTab = $AppUI->getState('ResourcesIdxTab', 0);
$tabBox = new CTabBox('?m=resources', W2P_BASE_DIR . '/modules/resources/', $resourceTab);
$tabbed = $tabBox->isTabbed();
foreach ($obj->loadTypes() as $type) {
    if ($type['resource_type_id'] == 0 && !$tabbed) {
        continue;
    }
    $tabBox->add('vw_resources', $type['resource_type_name']);
}
$tabBox->show();
开发者ID:,项目名称:,代码行数:28,代码来源:

示例5: intval

    $AppUI->setState('CalIdxCompany', intval(w2PgetParam($_REQUEST, 'company_id', 0)));
}
$company_id = $AppUI->getState('CalIdxCompany', $AppUI->user_company);
// Using simplified set/get semantics. Doesn't need as much code in the module.
$event_filter = $AppUI->checkPrefState('CalIdxFilter', w2PgetParam($_REQUEST, 'event_filter', ''), 'EVENTFILTER', 'my');
// 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;
开发者ID:victorrod,项目名称:web2project,代码行数:31,代码来源:year_view.php

示例6: CCompany

    } else {
        $orderdir = 'asc';
    }
}
$AppUI->setState('ProjIdxOrderDir', $orderdir);
// collect the full projects list data via function in projects.class.php
$search_text = $search_string;
// @note this is only because the projects_list_data function takes a bunch of globals
//$projects = projects_list_data();
$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';
开发者ID:victorrod,项目名称:web2project,代码行数:31,代码来源:index.php

示例7: w2p_Database_Query

    $AppUI->redirect('m=public&a=access_denied');
}
// load the preferences
$q = new w2p_Database_Query();
$q->addTable('user_preferences');
$q->addQuery('pref_name, pref_value');
$q->addWhere('pref_user = ' . (int) $user_id);
$prefs = $q->loadHashList();
$q->clear();
// get the user name
if ($user_id) {
    $user = CContact::getContactByUserid($user_id);
} else {
    $user = 'Default';
}
$titleBlock = new w2p_Theme_TitleBlock('Edit User Preferences', 'myevo-weather.png', $m, $m . '.' . $a);
$perms =& $AppUI->acl();
if ($canEdit) {
    $titleBlock->addCrumb('?m=system', 'system admin');
    $titleBlock->addCrumb('?m=system&a=systemconfig', 'system configuration');
}
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function submitIt() {
	var form = document.changeuser;
	// Collate the checked states of the task log stuff
	var defs = document.getElementById('task_log_email_defaults');
	var mask = 0;
	if (form.tl_assign.checked) {
		mask += 1;
开发者ID:,项目名称:,代码行数:31,代码来源:

示例8: canEdit

$canEdit = canEdit($m, $dept_id);
if (!$canRead) {
    $AppUI->redirect('m=public&a=access_denied');
}
$department = new CDepartment();
$department->loadFull(null, $dept_id);
if (!$department) {
    $AppUI->setMsg('Department');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect();
} else {
    $AppUI->savePlace();
}
$countries = w2PgetSysVal('GlobalCountries');
$types = w2PgetSysVal('DepartmentType');
$titleBlock = new w2p_Theme_TitleBlock('View Department', 'departments.png', $m, $m . '.' . $a);
if ($canEdit) {
    $titleBlock->addCell();
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new department') . '">', '', '<form action="?m=departments&a=addedit&company_id=' . $department->dept_company . '&dept_parent=' . $dept_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=departments', 'department list');
$titleBlock->addCrumb('?m=companies', 'company list');
$titleBlock->addCrumb('?m=companies&a=view&company_id=' . $department->dept_company, 'view this company');
if ($canEdit) {
    $titleBlock->addCrumb('?m=departments&a=addedit&dept_id=' . $dept_id, 'edit this department');
    if ($canDelete) {
        $titleBlock->addCrumbDelete('delete department', $canDelete, $msg);
    }
}
$titleBlock->show();
$htmlHelper = new w2p_Output_HTMLHelper($AppUI);
开发者ID:,项目名称:,代码行数:31,代码来源:

示例9: w2p_Utilities_Date

// get current week
$this_week = Date_Calc::beginOfWeek($dd, $mm, $yy, FMT_TIMESTAMP_DATE, LOCALE_FIRST_DAY);
// prepare time period for 'events'
$first_time = clone $this_day;
$first_time->setTime(0, 0, 0);
$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', 'icon.png', $m);
$titleBlock->addCrumb('?m=events&a=year_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'year view');
$titleBlock->addCrumb('?m=events&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=events&a=week_view&date=' . $this_week, 'week view');
$titleBlock->addCrumb('?m=events&a=day_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'day view');
$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($AppUI->_('Company') . ':');
$titleBlock->addButton('New event', '?m=events&a=addedit&date=' . $today);
$titleBlock->show();
?>
<script language="javascript">
function clickDay( idate, fdate ) {
        window.location = './index.php?m=events&a=day_view&date='+idate+'&tab=0';
}
</script>
开发者ID:illuminate3,项目名称:web2project,代码行数:30,代码来源:day_view.php

示例10: elseif

    } else {
        $AppUI->setMsg($CONFIG_FILE . ' ' . $AppUI->_('is not writable'), UI_MSG_ERROR);
    }
} elseif (w2PgetParam($_POST, $AppUI->_('Cancel'), '') != '') {
    $AppUI->redirect('m=system&a=viewmods');
}
//$PROJDESIGN_CONFIG = array();
include $CONFIG_FILE;
//Read the current config values from the config file and update the array.
foreach ($config_options as $key => $value) {
    if (isset($PROJDESIGN_CONFIG[$key])) {
        $config_options[$key]['value'] = $PROJDESIGN_CONFIG[$key];
    }
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Project Designer Module Configuration', 'projectdesigner.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=system', 'System Admin');
$titleBlock->addCrumb('?m=system&a=viewmods', 'Modules');
$titleBlock->show();
?>

<form method="post" accept-charset="utf-8">
    <table class="std">
    <?php 
foreach ($config_options as $key => $value) {
    ?>
        <tr>
            <?php 
    // the key starts with hr, then just display the value
    if (substr($key, 0, 7) == 'heading') {
        ?>
开发者ID:,项目名称:,代码行数:31,代码来源:

示例11: chr

		 </form>';
// En of contact search form
$a2z = '<table cellpadding="2" cellspacing="1" border="0">';
$a2z .= '<tr>';
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="./index.php?m=contacts&where=">' . $AppUI->_('All') . '</a></td>';
// Pull First Letters
$letters = CContact::getFirstLetters($AppUI->user_id);
for ($c = 65; $c < 91; $c++) {
    $cu = chr($c);
    $cell = !(mb_strpos($letters, $cu) === false) ? '<a href="?m=contacts&search_string=' . $cu . '">' . $cu . '</a>' : '<font color="#999999">' . $cu . '</font>';
    $a2z .= '<td>' . $cell . '</td>';
}
$a2z .= '</tr><tr><td colspan="28">' . $form . '</td></tr></table>';
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Contacts', 'monkeychat-48.png', $m, $m . '.' . $a);
$titleBlock->addCell($a2z);
if ($canEdit) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new contact') . '">', '', '<form action="?m=contacts&a=addedit" method="post" accept-charset="utf-8">', '</form>');
    $titleBlock->addCrumb('?m=contacts&a=csvexport&suppressHeaders=1', 'CSV Download');
    $titleBlock->addCrumb('?m=contacts&a=vcardimport&dialog=0', 'Import vCard');
}
$titleBlock->show();
$tabBox = new CTabBox('?m=contacts&search_string=' . $default_search_string, W2P_BASE_DIR . '/modules/contacts/', $tab);
$tabBox->add('vw_idx_updated', $AppUI->_('Recently Updated'));
$tabBox->add('vw_idx_contacts', $AppUI->_('All Contacts'));
$tabBox->show();
// TODO: Check to see that the Edit function is separated.
?>
<script language="javascript" type="text/javascript">
	// Callback function for the generic selector
开发者ID:,项目名称:,代码行数:31,代码来源:

示例12: canEdit

if (!$canEdit) {
    $AppUI->redirect(ACCESS_DENIED);
}
$canAdmin = canEdit('system');
$file_parent = intval(w2PgetParam($_GET, 'file_parent', 0));
// check if this record has dependencies to prevent deletion
$msg = '';
$obj = new CFile();
// load the record data
if ($file_id > 0 && !$obj->load($file_id)) {
    $AppUI->setMsg('File');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect('m=' . $m);
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Checkout', 'folder5.png', $m);
$titleBlock->addCrumb('?m=files', 'files list');
$titleBlock->show();
if ($obj->file_project) {
    $file_project = $obj->file_project;
}
if ($obj->file_task) {
    $file_task = $obj->file_task;
    $task_name = $obj->getTaskName();
} elseif ($file_task) {
    $q = new w2p_Database_Query();
    $q->addTable('tasks');
    $q->addQuery('task_name');
    $q->addWhere('task_id=' . (int) $file_task);
    $task_name = $q->loadResult();
    $q->clear();
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:co.php

示例13: intval

// Now check if the project is editable/viewable.
$denied = $project->getDeniedRecords($AppUI->user_id);
if (in_array($project_id, $denied)) {
    $AppUI->redirect(ACCESS_DENIED);
}
// get critical tasks (criteria: task_end_date)
$criticalTasks = $project_id > 0 ? $project->getCriticalTasks($project_id) : null;
// create Date objects from the datetime fields
$end_date = intval($project->project_end_date) ? new w2p_Utilities_Date($project->project_end_date) : null;
$actual_end_date = null;
if (isset($criticalTasks)) {
    $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"' : '';
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View Project', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($canEdit) {
    $titleBlock->addButton('new link', '?m=links&a=addedit&project_id=' . $project_id);
    $titleBlock->addButton('new event', '?m=events&a=addedit&project_id=' . $project_id);
    $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 ($canDelete) {
        $titleBlock->addCrumbDelete('delete project', $canDelete);
    }
}
if (canAdd('tasks')) {
    $titleBlock->addButton('new task', '?m=tasks&a=addedit&task_project=' . $project_id);
}
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $project, 'Project');
开发者ID:victorrod,项目名称:web2project,代码行数:31,代码来源:view.php

示例14: canView

if (!$obj->canAccess($AppUI->user_id)) {
    $AppUI->redirect('m=public&a=access_denied');
}
// Clear any reminders
if ($reminded) {
    $obj->clearReminder();
}
$tab = $AppUI->processIntState('TaskLogVwTab', $_GET, 'tab', 0);
//check permissions for the associated project
$canReadProject = canView('projects', $obj->task_project);
$users = $obj->getAssignedUsers($task_id);
$durnTypes = w2PgetSysVal('TaskDurationType');
$task_types = w2PgetSysVal('TaskType');
$billingCategory = w2PgetSysVal('BudgetCategory');
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View Task', 'applet-48.png', $m, $m . '.' . $a);
$titleBlock->addCell();
if ($canEdit) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $obj->task_project . '&task_parent=' . $task_id . '" method="post" accept-charset="utf-8">', '</form>');
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $obj->task_project . '&file_task=' . $obj->task_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=tasks', 'tasks list');
if ($canReadProject) {
    $titleBlock->addCrumb('?m=projects&a=view&project_id=' . $obj->task_project, 'view this project');
}
if ($canEdit && 0 == $obj->task_represents_project) {
    $titleBlock->addCrumb('?m=tasks&a=addedit&task_id=' . $task_id, 'edit this task');
}
//$obj->task_represents_project
if ($obj->task_represents_project) {
    $titleBlock->addCrumb('?m=projects&a=view&project_id=' . $obj->task_represents_project, 'view subproject');
开发者ID:,项目名称:,代码行数:31,代码来源:

示例15: CProject

$prj = new CProject();
if ($object_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 => $AppUI->_('All Projects')), $projects);
// check permissions for this record
$perms =& $AppUI->acl();
$users = $perms->getPermittedUsers('forums');
// setup the title block
$ttl = $object_id > 0 ? 'Edit Forum' : 'Add Forum';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('forum', $object_id, 'viewer');
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function submitIt(){
	var form = document.editFrm;
	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 
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:addedit.php


注:本文中的w2p_Theme_TitleBlock类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。