本文整理汇总了PHP中w2PgetSysVal函数的典型用法代码示例。如果您正苦于以下问题:PHP w2PgetSysVal函数的具体用法?PHP w2PgetSysVal怎么用?PHP w2PgetSysVal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了w2PgetSysVal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
/**
* parse file for indexing
* @todo convert to using the FileSystem methods
*/
public function index(CFile $file)
{
/* Workaround for indexing large files:
** Based on the value defined in config data,
** files with file_size greater than specified limit
** are not indexed for searching.
** Negative value :<=> no filesize limit
*/
$index_max_file_size = w2PgetConfig('index_max_file_size', 0);
if ($file->file_size > 0 && ($index_max_file_size < 0 || (int) $file->file_size <= $index_max_file_size * 1024)) {
// get the parser application
$parser = w2PgetConfig('parser_' . $file->file_type);
if (!$parser) {
$parser = w2PgetConfig('parser_default');
}
if (!$parser) {
return false;
}
// buffer the file
$file->_filepath = W2P_BASE_DIR . '/files/' . $file->file_project . '/' . $file->file_real_filename;
if (file_exists($file->_filepath)) {
$fp = fopen($file->_filepath, 'rb');
$x = fread($fp, $file->file_size);
fclose($fp);
$ignore = w2PgetSysVal('FileIndexIgnoreWords');
$ignore = $ignore['FileIndexIgnoreWords'];
$ignore = explode(',', $ignore);
$x = strtolower($x);
$x = preg_replace("/[^A-Za-z0-9 ]/", "", $x);
foreach ($ignore as $ignoreWord) {
$x = str_replace(" {$ignoreWord} ", ' ', $x);
}
$x = str_replace(' ', ' ', $x);
$words = explode(' ', $x);
foreach ($words as $index => $word) {
if ('' == trim($word)) {
continue;
}
$q = $this->query;
$q->addTable('files_index');
$q->addInsert('file_id', $file->file_id);
$q->addInsert('word', $word);
$q->addInsert('word_placement', $index);
$q->exec();
$q->clear();
}
} else {
//TODO: if the file doesn't exist.. should we delete the db record?
}
}
$file->file_indexed = 1;
$file->store();
return count($words);
}
开发者ID:illuminate3,项目名称:web2project,代码行数:58,代码来源:Indexer.class.php
示例2: showAddress
public function showAddress($name, $object)
{
$countries = w2PgetSysVal('GlobalCountries');
$output = '<div style="margin-left: 11em;">';
$output .= '<a href="http://maps.google.com/maps?q=' . $object->{$name . '_address1'} . '+' . $object->{$name . '_address2'} . '+' . $object->{$name . '_city'} . '+' . $object->{$name . '_state'} . '+' . $object->{$name . '_zip'} . '+' . $object->{$name . '_country'} . '" target="_blank">';
$output .= '<img src="' . w2PfindImage('googlemaps.gif') . '" class="right" alt="Find It on Google" />';
$output .= '</a>';
$output .= $object->{$name . '_address1'} . ($object->{$name . '_address2'} ? '<br />' . $object->{$name . '_address2'} : '') . ($object->{$name . '_city'} ? '<br />' . $object->{$name . '_city'} : '') . ($object->{$name . '_state'} ? ' ' . $object->{$name . '_state'} : '') . ($object->{$name . '_zip'} ? ', ' . $object->{$name . '_zip'} : '') . ($object->{$name . '_country'} ? '<br />' . $countries[$object->{$name . '_country'}] : '');
$output .= '</div>';
echo $output;
}
开发者ID:illuminate3,项目名称:web2project,代码行数:11,代码来源:ViewHelper.class.php
示例3: typeSelect
/**
* @deprecated
*/
public function typeSelect()
{
trigger_error("CResource->typeSelect() has been deprecated in v3.0 and will be removed in v4.0. Please use w2PgetSysVal('ResourceTypes') instead.", E_USER_NOTICE);
$typelist = w2PgetSysVal('ResourceTypes');
if (!count($typelist)) {
include W2P_BASE_DIR . '/modules/resources/setup.php';
$setup = new SResource();
$setup->upgrade('1.0.1');
$typelist = w2PgetSysVal('ResourceTypes');
}
return $typelist;
}
开发者ID:illuminate3,项目名称:web2project,代码行数:15,代码来源:resources.class.php
示例4: _fetchCustomRecordTypes
public function _fetchCustomRecordTypes()
{
switch ($this->custom_record_type) {
case 'TaskCustomFields':
$field_types = 'TaskType';
break;
case 'CompanyCustomFields':
$field_types = 'CompanyType';
break;
}
$this->custom_record_types = w2PgetSysVal($field_types);
}
开发者ID:illuminate3,项目名称:web2project,代码行数:12,代码来源:CustomFieldsParser.class.php
示例5: license
LICENSE
=====================================
The Dayplanner module was built by Klaus Buecher and is released here
under modified BSD license (see GNU.org).
Uses jquery, jqueryui and fullcalendar. Please see their separate licences.
*
Copyright (c) 2013/2014 Klaus Buecher (Opto)
No warranty whatsoever is given - use at your own risk. See index.php
*
*/
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
global $this_day, $prev_day, $next_day, $first_time, $last_time, $company_id, $event_filter, $event_filter_list, $AppUI;
// load the event types
$types = w2PgetSysVal('EventType');
$links = array();
$df = $AppUI->getPref('SHDATEFORMAT');
$perms =& $AppUI->acl();
$user_id = $AppUI->user_id;
$other_users = false;
$no_modify = false;
if (canView('admin')) {
$other_users = true;
if (($show_uid = w2PgetParam($_REQUEST, 'show_user_events', 0)) != 0) {
$user_id = $show_uid;
$no_modify = true;
$AppUI->setState('event_user_id', $user_id);
}
}
class CTask_ex extends CTask
开发者ID:caseysoftware,项目名称:web2project-planner,代码行数:31,代码来源:vw_day_planner.php
示例6: w2PgetParam
if (isset($_GET['pin'])) {
$pin = (int) w2PgetParam($_GET, 'pin', 0);
$msg = '';
// load the record data
if ($pin) {
$msg = CTask::pinUserTask($AppUI->user_id, $task_id);
} else {
$msg = CTask::unpinUserTask($AppUI->user_id, $task_id);
}
if (!$msg) {
$AppUI->setMsg($msg, UI_MSG_ERROR, true);
}
$AppUI->redirect('', -1);
}
$durnTypes = w2PgetSysVal('TaskDurationType');
$taskPriority = w2PgetSysVal('TaskPriority');
$task_project = (int) w2PgetParam($_GET, 'task_project', null);
$task_sort_item1 = w2PgetParam($_GET, 'task_sort_item1', '');
$task_sort_type1 = w2PgetParam($_GET, 'task_sort_type1', '');
$task_sort_item2 = w2PgetParam($_GET, 'task_sort_item2', '');
$task_sort_type2 = w2PgetParam($_GET, 'task_sort_type2', '');
$task_sort_order1 = (int) w2PgetParam($_GET, 'task_sort_order1', 0);
$task_sort_order2 = (int) w2PgetParam($_GET, 'task_sort_order2', 0);
if (isset($_POST['show_task_options'])) {
$AppUI->setState('TaskListShowIncomplete', w2PgetParam($_POST, 'show_incomplete', 0));
}
$showIncomplete = $AppUI->getState('TaskListShowIncomplete', 0);
$project = new CProject();
$allowedProjects = $project->getAllowedSQL($AppUI->user_id, 'p.project_id');
$where_list = count($allowedProjects) ? implode(' AND ', $allowedProjects) : '';
$working_hours = $w2Pconfig['daily_working_hours'] ? $w2Pconfig['daily_working_hours'] : 8;
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:tasks.php
示例7: w2PgetSysVal
$AppUI->redirect('m=public&a=access_denied');
}
$perms =& $AppUI->acl();
$countries = w2PgetSysVal('GlobalCountries');
// retrieve any state parameters
$searchString = w2PgetParam($_GET, 'search_string', '');
if ($searchString != '') {
$AppUI->setState('ContIdxWhere', $searchString);
}
$where = $AppUI->getState('ContIdxWhere') ? $AppUI->getState('ContIdxWhere') : '%';
$orderby = 'contact_first_name';
$search_map = array($orderby, 'contact_first_name', 'contact_last_name');
// optional fields shown in the list (could be modified to allow brief and verbose, etc)
$showfields = array('contact_address1' => 'contact_address1', 'contact_address2' => 'contact_address2', 'contact_city' => 'contact_city', 'contact_state' => 'contact_state', 'contact_zip' => 'contact_zip', 'contact_country' => 'contact_country', 'contact_company' => 'contact_company', 'company_name' => 'company_name', 'dept_name' => 'dept_name', 'contact_phone' => 'contact_phone', 'contact_email' => 'contact_email', 'contact_job' => 'contact_job');
$contactMethods = array('phone_alt', 'phone_mobile', 'phone_fax');
$methodLabels = w2PgetSysVal('ContactMethods');
// assemble the sql statement
$rows = CContact::searchContacts($AppUI, $where);
$carr[] = array();
$carrWidth = 4;
$carrHeight = 4;
$rn = count($rows);
$t = ceil($rn / $carrWidth);
if ($rn < $carrWidth * $carrHeight) {
$i = 0;
for ($y = 0; $y < $carrWidth; $y++) {
$x = 0;
while ($x < $carrHeight && isset($rows[$i]) && ($row = $rows[$i])) {
$carr[$y][] = $row;
$x++;
$i++;
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:index.php
示例8: foreach
$titleBlock->addCrumb('?m=system', 'system admin');
$titleBlock->addCrumb('?m=system&a=addeditpref', 'default user preferences');
$titleBlock->show();
// prepare the automated form fields based on db system configuration data
$output = null;
$last_group = '';
foreach ($rs as $c) {
$tooltip = $AppUI->_($c['config_name'] . '_tooltip');
// extraparse the checkboxes and the select lists
$extra = '';
$value = '';
switch ($c['config_type']) {
case 'select':
// Build the select list.
if ($c['config_name'] == 'system_timezone') {
$timezones = w2PgetSysVal('Timezones');
$entry = arraySelect($timezones, 'w2Pcfg[system_timezone]', 'class=text size=1', w2PgetConfig('system_timezone'), true);
} else {
$entry = '<select class="text" name="w2Pcfg[' . $c['config_name'] . ']">';
// Find the detail relating to this entry.
$children = $w2Pcfg->getChildren($c['config_id']);
foreach ($children as $child) {
$entry .= '<option value="' . $child['config_list_name'] . '"';
if ($child['config_list_name'] == $c['config_value']) {
$entry .= ' selected="selected"';
}
$entry .= '>' . $AppUI->_($child['config_list_name'] . '_item_title') . '</option>';
}
$entry .= '</select>';
}
break;
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:systemconfig.php
示例9: indexStrings
public function indexStrings()
{
global $AppUI, $w2Pconfig;
$nwords_indexed = 0;
/* Workaround for indexing large files:
** Based on the value defined in config data,
** files with file_size greater than specified limit
** are not indexed for searching.
** Negative value :<=> no filesize limit
*/
$index_max_file_size = w2PgetConfig('index_max_file_size', 0);
if ($index_max_file_size < 0 || $obj->file_size <= $index_max_file_size * 1024) {
// get the parser application
$parser = $w2Pconfig['parser_' . $this->file_type];
if (!$parser) {
$parser = $w2Pconfig['parser_default'];
}
if (!$parser) {
return false;
}
// buffer the file
$this->_filepath = W2P_BASE_DIR . '/files/' . $this->file_project . '/' . $this->file_real_filename;
$fp = fopen($this->_filepath, 'rb');
$x = fread($fp, $this->file_size);
fclose($fp);
// parse it
$parser = $parser . ' ' . $this->_filepath;
$pos = strpos($parser, '/pdf');
if (false !== $pos) {
$x = `{$parser} -`;
} else {
$x = `{$parser}`;
}
// if nothing, return
if (strlen($x) < 1) {
return 0;
}
// remove punctuation and parse the strings
$x = str_replace(array('.', ',', '!', '@', '(', ')'), ' ', $x);
$warr = explode(' ', $x);
$wordarr = array();
$nwords = count($warr);
for ($x = 0; $x < $nwords; $x++) {
$newword = $warr[$x];
if (!preg_match('[[:punct:]]', $newword) && mb_strlen(mb_trim($newword)) > 2 && !preg_match('[[:digit:]]', $newword)) {
$wordarr[$newword] = $x;
}
}
// filter out common strings
$ignore = w2PgetSysVal('FileIndexIgnoreWords');
$ignore = str_replace(' ,', ',', $ignore);
$ignore = str_replace(', ', ',', $ignore);
$ignore = explode(',', $ignore);
foreach ($ignore as $w) {
unset($wordarr[$w]);
}
$nwords_indexed = count($wordarr);
// insert the strings into the table
while (list($key, $val) = each($wordarr)) {
$q = new DBQuery();
$q->addTable('files_index');
$q->addReplace('file_id', $this->file_id);
$q->addReplace('word', $key);
$q->addReplace('word_placement', $val);
$q->exec();
$q->clear();
}
}
return $nwords_indexed;
}
开发者ID:joly,项目名称:web2project,代码行数:70,代码来源:files.class.php
示例10: 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
示例11: w2PgetParam
$AppUI->setState('CompIdxOrderDir', $orderdir);
}
$orderby = $AppUI->getState('CompIdxOrderBy') ? $AppUI->getState('CompIdxOrderBy') : 'company_name';
$orderdir = $AppUI->getState('CompIdxOrderDir') ? $AppUI->getState('CompIdxOrderDir') : 'asc';
$owner_filter_id = $AppUI->processIntState('owner_filter_id', $_POST, 'owner_filter_id', 0);
$search_string = w2PgetParam($_POST, 'search_string', '');
$search_string = w2PformSafe($search_string, true);
$company = new CCompany();
$canCreate = $company->canCreate();
$perms =& $AppUI->acl();
$baseArray = array(0 => $AppUI->_('All', UI_OUTPUT_RAW));
$allowedArray = $perms->getPermittedUsers('companies');
$owner_list = is_array($allowedArray) ? $baseArray + $allowedArray : $baseArray;
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Companies', 'icon.png', $m);
$titleBlock->addSearchCell($search_string);
$titleBlock->addFilterCell('Owner', 'owner_filter_id', $owner_list, $owner_filter_id);
if ($canCreate) {
$titleBlock->addButton('new company', '?m=companies&a=addedit');
}
$titleBlock->show();
// load the company types
$companyTypes = w2PgetSysVal('CompanyType');
$tabBox = new CTabBox('?m=companies', W2P_BASE_DIR . '/modules/companies/', $tab);
if ($tabBox->isTabbed()) {
array_unshift($companyTypes, $AppUI->_('All Companies', UI_OUTPUT_RAW));
}
foreach ($companyTypes as $type_name) {
$tabBox->add('vw_companies', $type_name);
}
$tabBox->show();
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:index.php
示例12: array
<input type="checkbox" name="show_empty_date" id="show_empty_date" onclick="document.form_buttons.submit()" <?php
echo $showEmptyDate ? 'checked="checked"' : '';
?>
/>
</td>
<td nowrap="nowrap">
<label for="show_empty_date"><?php
echo $AppUI->_('Empty Dates');
?>
</label>
</td>
</tr>
<tr>
<td colspan = "12" align="right">
<?php
$types = array('' => '(Task Type Filter)') + w2PgetSysVal('TaskType');
echo arraySelect($types, 'task_type', 'class="text" onchange="document.form_buttons.submit()"', $task_type, true);
?>
</td>
</tr>
</table>
</form>
<form name="form" method="post" action="index.php?<?php
echo "m={$m}&a={$a}&date={$date}";
?>
" accept-charset="utf-8">
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
<tr>
<th width="10"> </th>
<th width="10"><?php
echo $AppUI->_('Pin');
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:todo_tasks_sub.php
示例13: CTask
$canAddProject = $canRead;
if (!$canRead) {
$AppUI->redirect('m=public&a=access_denied');
}
$task = new CTask();
$tasks = $task->getAllowedRecords($AppUI->user_id, 'task_id,task_name', 'task_name', null, $extra);
$tasks = arrayMerge(array('0' => $AppUI->_('(None)', UI_OUTPUT_RAW)), $tasks);
$canViewTasks = canView('tasks');
$canAddTasks = canAdd('tasks');
$canEditTasks = canEdit('tasks');
$canDeleteTasks = canDelete('tasks');
// get ProjectPriority from sysvals
$projectPriority = w2PgetSysVal('ProjectPriority');
$projectPriorityColor = w2PgetSysVal('ProjectPriorityColor');
$pstatus = w2PgetSysVal('ProjectStatus');
$ptype = w2PgetSysVal('ProjectType');
$priorities = w2Pgetsysval('TaskPriority');
$types = w2Pgetsysval('TaskType');
$project = new CProject();
// load the record data
$project->loadFull($AppUI, $project_id);
$obj = $project;
if (!$project) {
$AppUI->setMsg('Project');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect();
} else {
$AppUI->savePlace();
}
global $w2Pconfig;
$task = new CTask();
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:printproject.php
示例14: die
<?php
/* $Id: vw_usr.php 1595 2011-01-17 07:37:10Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/tags/version2.4/modules/admin/vw_usr.php $ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
$utypes = w2PgetSysVal('UserType');
?>
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="tbl">
<tr>
<th>
</th>
<?php
if (w2PgetParam($_REQUEST, 'tab', 0) == 0) {
?>
<th width="125">
<?php
echo $AppUI->_('Login History');
?>
</th>
<?php
}
$fieldList = array('user_username', 'contact_last_name', 'user_type', 'company_name', 'dept_name');
$fieldNames = array('Login Name', 'Real Name', 'Type', 'Company', 'Department');
foreach ($fieldNames as $index => $name) {
?>
<th nowrap="nowrap">
<a href="?m=admin&orderby=<?php
echo $fieldList[$index];
?>
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:vw_usr.php
示例15: die
<?php
/* $Id: projects.class.php 2024 2011-08-08 04:38:24Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/tags/version2.4/modules/projects/projects.class.php $ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
/**
* @package web2Project
* @subpackage modules
* @version $Revision: 2024 $
*/
// project statii
$pstatus = w2PgetSysVal('ProjectStatus');
$ptype = w2PgetSysVal('ProjectType');
$ppriority_name = w2PgetSysVal('ProjectPriority');
$ppriority_color = w2PgetSysVal('ProjectPriorityColor');
$priority = array();
foreach ($ppriority_name as $key => $val) {
$priority[$key]['name'] = $val;
}
foreach ($ppriority_color as $key => $val) {
$priority[$key]['color'] = $val;
}
/*
// kept for reference
$priority = array(
-1 => array(
'name' => 'low',
'color' => '#E5F7FF'
),
0 => array(
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:projects.class.php
示例16: file_show_attr
function file_show_attr()
{
global $AppUI, $obj, $ci, $canAdmin, $projects, $file_project, $file_task, $task_name, $preserve, $file_helpdesk_item;
if ($ci) {
$str_out = '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Minor Revision') . '</td><td><input type="Radio" name="revision_type" value="minor" checked />' . '</td><tr><td align="right" nowrap="nowrap">' . $AppUI->_('Major Revision') . '</td><td><input type="Radio" name="revision_type" value="major" /></td>';
} else {
$str_out = '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Version') . ':</td>';
}
$str_out .= '<td align="left">';
if ($ci || $canAdmin && $obj->file_checkout == 'final') {
$str_out .= '<input type="hidden" name="file_checkout" value="" /><input type="hidden" name="file_co_reason" value="" />';
}
if ($ci) {
$the_value = strlen($obj->file_version) > 0 ? $obj->file_version + 0.01 : '1';
$str_out .= '<input type="hidden" name="file_version" value="' . $the_value . '" />';
} else {
$the_value = strlen($obj->file_version) > 0 ? $obj->file_version : '1';
$str_out .= '<input type="text" name="file_version" maxlength="10" size="5" value="' . $the_value . '" class="text" />';
}
$str_out .= '</td>';
$select_disabled = ' ';
$onclick_task = ' onclick="popTask()" ';
if ($ci && $preserve) {
$select_disabled = ' disabled="disabled" ';
$onclick_task = ' ';
// need because when a html is disabled, it's value it's not sent in submit
$str_out .= '<input type="hidden" name="file_project" value="' . $file_project . '" />';
$str_out .= '<input type="hidden" name="file_category" value="' . $obj->file_category . '" />';
}
// Category
$str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Category') . ':</td>';
$str_out .= '<td align="left">' . arraySelect(w2PgetSysVal('FileType'), 'file_category', 'class="text"' . $select_disabled, $obj->file_category, true) . '<td>';
// ---------------------------------------------------------------------------------
if ($file_helpdesk_item) {
$hd_item = new CHelpDeskItem();
$hd_item->load($file_helpdesk_item);
//Helpdesk Item
$str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Helpdesk Item') . ':</td>';
$str_out .= '<td align="left"><strong>' . $hd_item->item_id . ' - ' . $hd_item->item_title . '</strong></td></tr>';
// Project
$str_out .= '<input type="hidden" name="file_project" value="' . $file_project . '" />';
// Task
$str_out .= '<input type="hidden" name="file_task" value="0" />';
} else {
// Project
$str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Project') . ':</td>';
$str_out .= '<td align="left">' . projectSelectWithOptGroup($AppUI->user_id, 'file_project', 'size="1" class="text" style="width:270px"' . $select_disabled, $file_project) . '</td></tr>';
// ---------------------------------------------------------------------------------
// Task
$str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Task') . ':</td><td align="left" colspan="2" valign="top"><input type="hidden" name="file_task" value="' . $file_task . '" /><input type="text" class="text" name="task_name" value="' . $task_name . '" size="40" disabled /><input type="button" class="button" value="' . $AppUI->_('select task') . '..."' . $onclick_task . '/></td></tr>';
}
return $str_out;
}
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:53,代码来源:cleanup_functions.php
示例17: array
</tr>
<tr>
<td align="right"><?php
echo $AppUI->_('Postcode') . ' / ' . $AppUI->_('Zip Code');
?>
:</td>
<td colspan="2"><input type="text" class="text" name="contact_zip" value="" maxlength="50" size="40" /> </td>
</tr>
<tr>
<td align="right"><?php
echo $AppUI->_('Country');
?>
:</td>
<td colspan="2">
<?php
$countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountries');
echo arraySelect($countries, 'contact_country', 'size="1" class="text"', 0);
?>
</td>
</tr>
<tr>
<td valign="middle" align="right">* <?php
echo $AppUI->_('Anti Spam Security');
?>
:</td>
<td valign="middle" width="50"><input type="text" class="text" id="spam" name="spam_check" value="" maxlength="5" size="5" /></td>
<td valign="middle" align="left"><img src="<?php
echo W2P_BASE_URL;
?>
/lib/captcha/CaptchaImage.php?uid=54;<?php
echo $uid;
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:createuser.php
示例18: w2PgetSysVal
// we are editing an existing task
$canEdit = $perms->checkModuleItem('tasks', 'edit', $task_id);
} else {
// do we have access on this project?
$canEdit = $perms->checkModuleItem('projects', 'view', $task_project);
// And do we have add permission to tasks?
if ($canEdit) {
$canEdit = $perms->checkModule('tasks', 'add');
}
}
if (!$canEdit) {
$AppUI->redirect('m=public&a=access_denied&err=noedit');
}
//check permissions for the associated project
$canReadProject = $perms->checkModuleItem('projects', 'view', $task->task_project);
$durnTypes = w2PgetSysVal('TaskDurationType');
// check the document access (public, participant, private)
if (!$task->canAccess($AppUI->user_id)) {
$AppUI->redirect('m=public&a=access_denied&err=noaccess');
}
// pull the related project
$project = new CProject();
$project->load($task_project);
//Pull all users
// TODO: There's an issue that can arise if a user is assigned full access to
// a company which is not their own. They will be allowed to create
// projects but not create tasks since the task_owner dropdown does not get
// populated by the "getPermittedUsers" function.
$users = $perms->getPermittedUsers('tasks');
function getSpaces($amount)
{
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:addedit.php
示例19: isset
?>
" />
<input type="hidden" name="opt_view_addtsks" value="<?php
echo isset($view_options[0]['pd_option_view_addtasks']) ? $view_options[0]['pd_option_view_addtasks'] : 1;
?>
" />
<input type="hidden" name="opt_view_files" value="<?php
echo isset($view_options[0]['pd_option_view_files']) ? $view_options[0]['pd_option_view_files'] : 1;
?>
" />
</form>
<?php
$priorities = w2Pgetsysval('TaskPriority');
$types = w2Pgetsysval('TaskType');
$durntype = w2PgetSysVal('TaskDurationType');
global $task_access;
$task_access = is_array($task_access) ? $task_access : array();
$extra = array(0 => '(none)', 1 => 'Milestone', 2 => 'Dynamic Task', 3 => 'Inactive Task');
$sel_priorities = arraySelect($priorities, 'add_task_priority0', 'style="width:80px" class="text"', '0');
$sel_types = arraySelect($types, 'add_task_type0', 'style="width:80px" class="text"', '');
$sel_access = arraySelect($task_access, 'add_task_access0', 'style="width:80px" class="text"', '');
$sel_extra = arraySelect($extra, 'add_task_extra0', 'style="width:80px" class="text"', '');
$sel_durntype = arraySelect($durntype, 'add_task_durntype0', 'style="width:80px" class="text"', '', true);
?>
<script language="javascript">
// 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
<?php
if ($canEdit) {
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:index.php
示例20: intval
$tab = $AppUI->processIntState('LinkIdxTab', $_GET, 'tab', 0);
$active = intval(!$AppUI->getState('LinkIdxTab'));
// get the list of visible companies
$extra = array('from' => 'links', 'where' => 'projects.project_id = link_project');
$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_JS)), $projects);
// setup the title block
$titleBlock = new CTitleBlock('Links', 'folder5.png', $m, "{$m}.{$a}");
$titleBlock->addCell($AppUI->_('Search') . ':');
$search = '';
$titleBlock->addCell('<input type="text" class="text" SIZE="10" name="search" onChange="document.searchfilter.submit();" value=' . "'{$search}'" . 'title="' . $AppUI->_('Search in name and description fields', UI_OUTPUT_JS) . '"/>', '', '<form action="?m=links" method="post" id="searchfilter" accept-charset="utf-8">', '</form>');
$titleBlock->addCell($AppUI->_('Filter') . ':');
$titleBlock->addCell(arraySelect($projects, 'project_id', 'onChange="document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=links" method="post" accept-charset="utf-8">', '</form>');
if ($canEdit) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new link') . '">', '', '<form action="?m=links&a=addedit" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->show();
$link_types = w2PgetSysVal('LinkType');
if ($tab != -1) {
array_unshift($link_types, 'All Links');
}
array_map(array($AppUI, '_'), $link_types);
$tabBox = new CTabBox('?m=links', W2P_BASE_DIR . '/modules/links/', $tab);
$i = 0;
foreach ($link_types as $link_type) {
$tabBox->add('index_table', $link_type);
++$i;
}
$showProject = true;
$tabBox->show();
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:index.php
注:本文中的w2PgetSysVal函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论