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


PHP CTitleBlock::addCell方法代码示例

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


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

示例1: db_error

	project_name, project_color_identifier');
$q->addJoin('contacts', 'con', 'contact_id = user_contact');
$q->addWhere("user_id = forum_owner");
$q->addWhere("forum_id = {$forum_id}");
$q->addWhere("forum_project = project_id");
$q->exec(ADODB_FETCH_ASSOC);
$forum = $q->fetchRow();
$forum_name = $forum["forum_name"];
echo db_error();
$q->clear();
$start_date = intval($forum["forum_create_date"]) ? new CDate($forum["forum_create_date"]) : null;
//20090907 KSen@Itsutsubashi
$project_id = $forum['forum_project'];
// setup the title block
$titleBlock = new CTitleBlock('Forum', 'support.png', $m, "{$m}.{$a}");
$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">', '</form>');
$titleBlock->show();
?>
<table width="100%" cellspacing="0" cellpadding="2" border="0" class="std">
<tr>
	<td height="20" colspan="3" style="border: outset #D1D1CD 1px;background-color:#<?php 
echo $forum["project_color_identifier"];
?>
">
		<font size="2" color=<?php 
echo bestColor($forum["project_color_identifier"]);
?>
><strong><?php 
echo @$forum["forum_name"];
?>
</strong></font>
开发者ID:kaz190,项目名称:dotproject,代码行数:31,代码来源:viewer.php

示例2: CProject

 */
$project = new CProject();
$extra = array('from' => 'files', 'where' => 'project_id = file_project');
$projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra);
$projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_RAW)), $projects);
// get SQL for allowed projects/tasks and folders
$task = new CTask();
$allowedProjects = $project->getAllowedSQL($AppUI->user_id, 'file_project');
$allowedTasks = $task->getAllowedSQL($AppUI->user_id, 'file_task');
$cfObj = new CFileFolder();
$allowedFolders = $cfObj->getAllowedSQL($AppUI->user_id, 'file_folder');
//get permissions for folder tab
$canAccess_folders = getPermission('file_folders', 'access');
// setup the title block
$titleBlock = new CTitleBlock('Files', 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCell($AppUI->_('Filter') . ':');
$titleBlock->addCell(arraySelect($projects, 'project_id', 'onchange="javascript:document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=files" method="post">', '</form>');
/*
 * override the file module's $canEdit variable passed from the main index.php 
 * in order to check on file folder permissions
 */
$canAuthor_folders = getPermission('file_folders', 'add');
if ($canAuthor) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '" />', '', '<form action="?m=files&amp;a=addedit&amp;folder=' . $folder . '" method="post">', '</form>');
}
if ($canAuthor_folders) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new folder') . '" />', '', '<form action="?m=files&amp;a=addedit_folder" method="post">', '</form>');
}
$titleBlock->show();
$file_types = dPgetSysVal('FileType');
$fts = $file_types;
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:index.php

示例3: clickDay

$event_filter = $AppUI->checkPrefState('CalIdxFilter', w2PgetParam($_REQUEST, 'event_filter', 'my'), 'EVENTFILTER', 'my');
// get the passed timestamp (today if none)
$ctoday = new w2p_Utilities_Date();
$today = $ctoday->format(FMT_TIMESTAMP_DATE);
$date = w2PgetParam($_GET, 'date', $today);
// 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);
// setup the title block
$titleBlock = new CTitleBlock('Monthly Calendar', 'myevo-appointments.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=calendar&a=year_view&date=' . $date, 'year view');
$titleBlock->addCrumb('?m=calendar&date=' . $date, 'month view');
$titleBlock->addCrumb('?m=calendar&a=week_view&date=' . $date, 'week view');
$titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $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($AppUI->_('Event Filter') . ':');
$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->show();
?>

<script language="javascript" type="text/javascript">
function clickDay( uts, fdate ) {
	window.location = './index.php?m=calendar&a=day_view&date='+uts+'&tab=0';
}
function clickWeek( uts, fdate ) {
	window.location = './index.php?m=calendar&a=week_view&date='+uts;
}
</script>
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:30,代码来源:index.php

示例4: chr

// 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=0">' . $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 class="button">' . $cell . '</td>';
}
$a2z .= '</tr><tr><td colspan="28">' . $form . '</td></tr></table>';
// setup the title block
$titleBlock = new CTitleBlock('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();
// 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();
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:index.php

示例5: die

<?php

/* TICKETSMITH $Id: index.php 6150 2012-01-09 12:21:18Z ajdonnison $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
if (!$canAccess) {
    $AppUI->redirect("m=public&a=access_denied");
}
// setup the title block
$titleBlock = new CTitleBlock('Trouble Ticket Management', 'gconf-app-icon.png', $m, "{$m}.{$a}");
if ($canAuthor) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new ticket') . '">', '', '<form name="ticketform" action="?m=ticketsmith&amp;a=post_ticket" method="post">', '</form>');
}
$titleBlock->show();
require DP_BASE_DIR . '/modules/ticketsmith/config.inc.php';
require DP_BASE_DIR . '/modules/ticketsmith/common.inc.php';
$column = $CONFIG["order_by"];
$direction = $CONFIG["message_order"];
$offset = 0;
$limit = $CONFIG["view_rows"];
$dbprefix = dPgetConfig('dbprefix', '');
$type = dPgetCleanParam($_GET, 'type', '');
$column = dPgetCleanParam($_GET, 'column', $column);
$direction = dPgetCleanParam($_GET, 'direction', $direction);
$offset = dPgetCleanParam($_GET, 'offset', $offset);
$action = dPgetCleanParam($_REQUEST, 'action', null);
if ($type == '') {
    if ($AppUI->getState("ticket_type")) {
        $type = $AppUI->getState("ticket_type");
    } else {
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:index.php

示例6: CTitleBlock

    case 4:
        $q->addWhere("project_status <> 7 AND project_company = {$AppUI->user_company}");
        break;
    case 5:
        $q->addWhere("project_status = 7");
        break;
    default:
        $q->addWhere("project_status <> 7");
        break;
}
$q->addGroup('forum_id');
$q->addOrder("{$orderby} {$orderdir}");
$forums = $q->loadList();
// setup the title block
$titleBlock = new CTitleBlock('Forums', 'support.png', $m, "{$m}.{$a}");
$titleBlock->addCell(arraySelect($filters, 'f', 'size="1" class="text" onChange="document.forum_filter.submit();"', $f, true), '', '<form name="forum_filter" action="?m=forums" method="post">', '</form>');
if ($canAuthor) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new forum') . '">', '', '<form action="index.php" method="get"><input type="hidden" name="m" value="forums" /><input type="hidden" name="a" value="addedit" />', '</form>');
}
$titleBlock->show();
?>

<table width="100%" cellspacing="1" cellpadding="2" border="0" class="tbl">
<form name="watcher" action="./index.php?m=forums&f=<?php 
echo $f;
?>
" method="post">
<tr>
	<th nowrap="nowrap">&nbsp;</th>
	<th nowrap="nowrap" width="25"><a href="?m=forums&orderby=watch_user" class="hdr"><?php 
echo $AppUI->_('Watch');
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:index.php

示例7: intval

 $total_project_hours = $obj->getTotalProjectHours();
 // create Date objects from the datetime fields
 $start_date = intval($obj->project_start_date) ? new CDate($obj->project_start_date) : null;
 $end_date = intval($obj->project_end_date) ? new CDate($obj->project_end_date) : null;
 $actual_end_date = intval($criticalTasks[0]['task_end_date']) ? new CDate($criticalTasks[0]['task_end_date']) : null;
 $today = new CDate();
 $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 CTitleBlock($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);
     }
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:index.php

示例8: popChgPwd

    $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&amp;a=addedituser&amp;user_id=' . $user_id, 'edit this user');
    }
    if ($canEdit || $user_id == $AppUI->user_id) {
        $titleBlock->addCrumb('?m=system&amp;a=addeditpref&amp;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&amp;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'];
        ?>
', 'chpwd', 'top=250,left=250,width=350, height=220, scrollbars=no');
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:31,代码来源:viewuser.php

示例9: CProject

    $project_status = $tab;
} else {
    if ($tab == 0) {
        $project_status = 0;
    }
}
if ($tab == 5 || $tab == 7) {
    $project_active = 0;
}
//for getting permissions for records related to projects
$obj_project = new CProject();
// collect the full (or filtered) projects list data via function in projects.class.php
projects_list_data();
// setup the title block
$titleBlock = new CTitleBlock('Projects', 'applet3-48.png', $m, $m . '.' . $a);
$titleBlock->addCell($AppUI->_('Owner') . ':');
$titleBlock->addCell('<form action="?m=projects" method="post" name="pickUser">' . "\n" . $bufferUser . "\n" . '</form>' . "\n");
$titleBlock->addCell($AppUI->_('Company') . '/' . $AppUI->_('Division') . ':');
$titleBlock->addCell('<form action="?m=projects" method="post" name="pickCompany">' . "\n" . $cBuffer . "\n" . '</form>' . "\n");
$titleBlock->addCell();
if ($canAuthor) {
    $titleBlock->addCell('<form action="?m=projects&amp;a=addedit" method="post">' . "\n" . '<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />' . "\n" . '</form>' . "\n");
}
$titleBlock->show();
$project_types = dPgetSysVal('ProjectStatus');
// count number of projects per project_status
$q->addTable('projects', 'p');
$q->addQuery('p.project_status, COUNT(p.project_id) as count');
$obj_project->setAllowedSQL($AppUI->user_id, $q, null, 'p');
if ($owner > 0) {
    $q->addWhere('p.project_owner = ' . $owner);
开发者ID:hightechcompany,项目名称:dotproject,代码行数:31,代码来源:index.php

示例10: eval

    if (file_exists(DP_BASE_DIR . '/modules/' . $modules[$module] . '/locales/' . $lang . '.inc')) {
        @readfile(DP_BASE_DIR . '/modules/' . $modules[$module] . '/locales/' . $lang . '.inc');
    } else {
        @readfile(DP_BASE_DIR . '/locales/' . $lang . '/' . $modules[$module] . '.inc');
    }
    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 CTitleBlock('Translation Management', 'rdf2.png', $m, "{$m}.{$a}");
$titleBlock->addCell($AppUI->_('Module'), '', '<form action="?m=system&a=translate" method="post" name="modlang">', '');
$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();
?>

<table width="100%" border="0" cellpadding="1" cellspacing="1" class="tbl">
<tr>
	<th width="15%" nowrap><?php 
echo $AppUI->_('Abbreviation');
?>
</th>
开发者ID:TheIdeaMan,项目名称:dotproject,代码行数:31,代码来源:translate.php

示例11: CTitleBlock

$sql = "select company_name, company_id from companies where company_type = 3";
$ar_mold = db_loadList($sql);
$buf = '';
$buf = '<select name = "fmoldista" class="text">' . '<option value="no"></option>';
foreach ($ar_mold as $ar) {
    $buf .= '<option value = ' . $ar["company_id"] . ' ';
    if ($ar["company_id"] == $fmoldista) {
        $buf .= 'selected';
    }
    $buf .= '>' . $ar["company_name"] . '</option>';
}
$titleBlock->addCell($buf, "", "");
////////////////////////////////////////////////////////////////////////////////////////////////////////////
$titleBlock->show();
$titleBlock = new CTitleBlock('');
$titleBlock->addCell($AppUI->_('etiq_Cliente') . ':');
$sql = "select company_name, company_id from companies where company_type = 2";
$ar_mold = db_loadList($sql);
$buf = '';
$buf = '<select name = "fcliente" class="text">' . '<option value="no"></option>';
foreach ($ar_mold as $ar) {
    $buf .= '<option value = ' . $ar["company_id"] . ' ';
    if ($ar["company_id"] == $fcliente) {
        $buf .= ' selected ';
    }
    $buf .= '>' . $ar["company_name"] . '</option>';
}
$titleBlock->addCell($buf, "", "", "");
$buf = '<input type="text" name="alias_string" size=12 value="' . $alias_string . '" class="text">
		';
$titleBlock->addCell($AppUI->_('etiq_Referencia') . ':');
开发者ID:Esleelkartea,项目名称:gestion-de-primeras-muestras,代码行数:31,代码来源:index_2.php

示例12: CDepartment

    $AppUI->redirect('m=public&a=access_denied');
}
$department = new CDepartment();
$department->loadFull($AppUI, $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 CTitleBlock('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();
?>
<script language="javascript" type="text/javascript">
<?php 
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:view.php

示例13: dPgetSysVal

$canReadProject = !getDenyRead('projects', $obj->task_project);
// get the users on this task
$q->addTable('users', 'u');
$q->addTable('user_tasks', 't');
$q->leftJoin('contacts', 'c', 'user_contact = contact_id');
$q->addQuery('u.user_id, u.user_username, contact_email');
$q->addWhere('t.task_id = ' . $task_id);
$q->addWhere('t.user_id = u.user_id');
$q->addOrder('u.user_username');
$sql = $q->prepare();
$q->clear();
$users = db_loadList($sql);
$durnTypes = dPgetSysVal('TaskDurationType');
// setup the title block
$titleBlock = new CTitleBlock('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">', '</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">', '</form>');
}
$titleBlock->addCrumb("?m=tasks", "tasks list");
if ($canReadProject) {
    $titleBlock->addCrumb("?m=projects&a=view&project_id={$obj->task_project}", "view this project");
}
if ($perms->checkModule('tasks', 'edit')) {
    $titleBlock->addCrumb("?m=tasks&a=addedit&task_id={$task_id}", "edit this task");
}
if ($canDelete) {
    $titleBlock->addCrumbDelete('delete task', $canDelete, $msg);
}
$titleBlock->show();
开发者ID:Esleelkartea,项目名称:gestion-de-primeras-muestras,代码行数:31,代码来源:view.php

示例14: CTitleBlock

    $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;
        ?>
', 'chpwd', 'top=250,left=250,width=350, height=220, scrollbars=no' );
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:viewuser.php

示例15: die

<?php

/* TASKS $Id: tasksperuser.php,v 1.5.6.2 2007/03/06 00:34:45 merlinyoda Exp $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$AppUI->savePlace();
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
$df = $AppUI->getPref('SHDATEFORMAT');
// get the prefered date format
// get CCompany() to filter tasks by company
require_once $AppUI->getModuleClass('companies');
$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 CTitleBlock('Tasks per User', 'applet-48.png', $m, "{$m}.{$a}");
$titleBlock->addCell($AppUI->_('Company') . ':');
$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">', '</form>');
$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 DP_BASE_DIR . '/modules/tasks/tasksperuser_sub.php';
开发者ID:magsilva,项目名称:dotproject,代码行数:30,代码来源:tasksperuser.php


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