• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP w2p_Theme_TitleBlock类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: die

<?php

if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
$tab = $AppUI->processIntState('ResourceTypeTab', $_GET, 'tab', 0);
$obj = new CResource();
$perms =& $AppUI->acl();
$canEdit = canEdit('resources');
$titleBlock = new w2p_Theme_TitleBlock('Resources', 'icon.png', $m);
if ($canEdit) {
    $titleBlock->addButton('new resource', '?m=resources&a=addedit');
}
$titleBlock->show();
$resource_types = w2PgetSysVal('ResourceTypes');
$tabBox = new CTabBox('?m=resources', W2P_BASE_DIR . '/modules/resources/', $tab);
if ($tabBox->isTabbed()) {
    array_unshift($resource_types, $AppUI->_('All Resources', UI_OUTPUT_RAW));
}
foreach ($resource_types as $resource_type) {
    $tabBox->add('vw_resources', $resource_type);
}
$tabBox->show();
开发者ID:illuminate3,项目名称:web2project,代码行数:23,代码来源:index.php


示例17: w2PgetParam

        $view = 'folders';
    }
}
$folder = (int) w2PgetParam($_GET, 'folder', 0);
// to pass to "new file" button
// get the list of visible companies
$extra = array('from' => 'files', 'where' => 'projects.project_id = file_project', 'join' => 'project_departments', 'on' => 'projects.project_id = project_departments.project_id');
//get "Allowed" projects for filter list ("All" is always allowed when basing permission on projects)
$project = new CProject();
$projects = $project->getAllowedRecords($AppUI->user_id, 'projects.project_id,project_name', 'project_name', null, $extra, 'projects');
$projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_RAW)), $projects);
// get SQL for allowed projects/tasks
$task = new CTask();
$allowedTasks = $task->getAllowedSQL($AppUI->user_id, 'file_task');
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Files', 'icon.png', $m);
$titleBlock->addFilterCell('Filter', 'project_id', $projects, $project_id);
// override the $canEdit variable passed from the main index.php in order to check folder permissions
/** get permitted folders **/
$cfObj = new CFile_Folder();
$allowed_folders_ary = $cfObj->getAllowedRecords($AppUI->user_id);
$denied_folders_ary = $cfObj->getDeniedRecords($AppUI->user_id);
$limited = count($allowed_folders_ary) < $cfObj->countFolders() ? true : false;
if (!$limited) {
    $canEdit = true;
} elseif ($limited and array_key_exists($folder, $allowed_folders_ary)) {
    $canEdit = true;
} else {
    $canEdit = false;
}
if ($canEdit) {
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:index.php


示例18: clash_suggest

function clash_suggest(w2p_Core_CAppUI $AppUI, $cal_sdf)
{
    global $m, $a;
    $obj = new CEvent();
    $obj->bind($_SESSION['add_event_post']);
    $start_date = new w2p_Utilities_Date($obj->event_start_date);
    $end_date = new w2p_Utilities_Date($obj->event_end_date);
    $df = $AppUI->getPref('SHDATEFORMAT');
    $start_secs = $start_date->getTime();
    $end_secs = $end_date->getTime();
    $duration = (int) (($end_secs - $start_secs) / 60);
    $titleBlock = new w2p_Theme_TitleBlock('Suggest Alternative Event Time', 'myevo-appointments.png', $m, $m . '.' . $a);
    $titleBlock->show();
    $calurl = W2P_BASE_URL . '/index.php?m=calendar&a=clash&event_id=' . $obj->event_id;
    $times = array();
    $t = new w2p_Utilities_Date();
    $t->setTime(0, 0, 0);
    if (!defined('LOCALE_TIME_FORMAT')) {
        define('LOCALE_TIME_FORMAT', '%I:%M %p');
    }
    for ($m = 0; $m < 60; $m++) {
        $times[$t->format('%H%M%S')] = $t->format(LOCALE_TIME_FORMAT);
        $t->addSeconds(1800);
    }
    /* TODO: This needs to be refactored to use the core setDate_new function. */
    ?>
    <script language="javascript" type="text/javascript">
    function setDate( frm_name, f_date ) {
        fld_date = eval( 'document.' + frm_name + '.' + f_date );
        fld_real_date = eval( 'document.' + frm_name + '.' + 'event_' + f_date );
        if (fld_date.value.length>0) {
          if ((parseDate(fld_date.value))==null) {
                alert('The Date/Time you typed does not match your prefered format, please retype.');
                fld_real_date.value = '';
                fld_date.style.backgroundColor = 'red';
            } else {
                fld_real_date.value = formatDate(parseDate(fld_date.value), 'yyyyMMdd');
                fld_date.value = formatDate(parseDate(fld_date.value), '<?php 
    echo $cal_sdf;
    ?>
');
                fld_date.style.backgroundColor = '';
            }
        } else {
            fld_real_date.value = '';
        }
    }

    function set_clash_action(action) {
        document.editFrm.clash_action.value = action;
        document.editFrm.submit();
    }

    </script>
    <form name="editFrm" method="post" action="<?php 
    echo $calurl . '&clash_action=process';
    ?>
" accept-charset="utf-8">
    <table width='100%' class='std addedit'>
    <tr>
      <td width='50%' align='right'><?php 
    echo $AppUI->_('Earliest Date');
    ?>
:</td>
      <td width='50%' align='left' nowrap="nowrap">
        <input type="hidden" name="event_start_date" id="event_start_date" value="<?php 
    echo $start_date ? $start_date->format(FMT_TIMESTAMP_DATE) : '';
    ?>
" />
        <input type="text" name="start_date" id="start_date" onchange="setDate('editFrm', 'start_date');" value="<?php 
    echo $start_date ? $start_date->format($df) : '';
    ?>
" class="text" />
        <a href="javascript: void(0);" onclick="return showCalendar('start_date', '<?php 
    echo $df;
    ?>
', 'editFrm', null, true)">
        <img src="<?php 
    echo w2PfindImage('calendar.gif');
    ?>
" width="24" height="12" alt="<?php 
    echo $AppUI->_('Calendar');
    ?>
" border="0" />
          </a>
      </td>
    </tr>
    <tr>
      <td width='50%' align='right'><?php 
    echo $AppUI->_('Latest Date');
    ?>
:</td>
      <td width='50%' align='left' nowrap="nowrap">
        <input type="hidden" name="event_end_date" id="event_end_date" value="<?php 
    echo $end_date ? $end_date->format(FMT_TIMESTAMP_DATE) : '';
    ?>
" />
        <input type="text" name="end_date" id="end_date" onchange="setDate('editFrm', 'end_date');" value="<?php 
    echo $end_date ? $end_date->format($df) : '';
    ?>
//.........这里部分代码省略.........
开发者ID:caseysoftware,项目名称:web2project-planner,代码行数:101,代码来源:clash.php


示例19: die

<?php

if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
$titleBlock = new w2p_Theme_TitleBlock('', '', $m);
$titleBlock->show();
include $AppUI->getTheme()->resolveTemplate('public/welcome');
开发者ID:illuminate3,项目名称:web2project,代码行数:8,代码来源:welcome.php


示例20: w2p_Theme_TitleBlock

// load the record data
$obj = $AppUI->restoreObject();
if ($obj) {
    $object = $obj;
    $object_id = $object->getId();
} else {
    $object->load($object_id);
}
if (!$object && $object_id > 0) {
    $AppUI->setMsg('Company');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect('m=' . $m);
}
// setup the title block
$ttl = $object_id > 0 ? 'Edit Company' : 'Add Company';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('company', $object_id);
$titleBlock->show();
// load the company types
$types = w2PgetSysVal('CompanyType');
$countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountriesPreferred') + array('-' => '----') + w2PgetSysVal('GlobalCountries');
?>
<script language="javascript" type="text/javascript">
    function submitIt() {
        var form = document.editFrm;
        if (form.company_name.value.length < 3) {
            alert( "<?php 
echo $AppUI->_('companyValidName', UI_OUTPUT_JS);
?>
" );
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:addedit.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP w2p_Utilities_Date类代码示例发布时间:2022-05-23
下一篇:
PHP w2p_Database_Query类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap