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

PHP getDenyEdit函数代码示例

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

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



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

示例1: check_perm

function check_perm(&$var)
{
    global $m;
    if ($var[0] == 0) {
        return true;
    }
    // if folder can be edited, keep in array
    if (!getDenyEdit($m, $var['file_folder_id'])) {
        if (getDenyEdit($m, $var['file_folder_parent'])) {
            $var[2] = 0;
            $var['file_folder_parent'] = 0;
        }
        return true;
    } else {
        return false;
    }
}
开发者ID:magsilva,项目名称:dotproject,代码行数:17,代码来源:functions.php


示例2: canUserEditTimeInformation

 public function canUserEditTimeInformation()
 {
     global $AppUI;
     $project = new CProject();
     $project->load($this->task_project);
     // Code to see if the current user is
     // enabled to change time information related to task
     $can_edit_time_information = false;
     // Let's see if all users are able to edit task time information
     if (w2PgetConfig('restrict_task_time_editing') == true && $this->task_id > 0) {
         // Am I the task owner?
         if ($this->task_owner == $AppUI->user_id) {
             $can_edit_time_information = true;
         }
         // Am I the project owner?
         if ($project->project_owner == $AppUI->user_id) {
             $can_edit_time_information = true;
         }
         // Am I sys admin?
         if (!getDenyEdit('admin')) {
             $can_edit_time_information = true;
         }
     } else {
         if (w2PgetConfig('restrict_task_time_editing') == false || $this->task_id == 0) {
             // If all users are able, then don't check anything
             $can_edit_time_information = true;
         }
     }
     return $can_edit_time_information;
 }
开发者ID:joly,项目名称:web2project,代码行数:30,代码来源:tasks.class.php


示例3: echo

	</td>
</tr>
<tr>
	<td align="right" valign="top"><?php 
echo $AppUI->_('Message');
?>
:</td>
	<td align="left" valign="top">
       <textarea cols="60" name="message_body" style="height:200px"><?php 
echo ($message_id == 0 and $message_parent != -1) ? "\n>" . $last_message_info["message_body"] . "\n" : $message_info["message_body"];
?>
</textarea>
	</td>
</tr>
<tr>
	<td>
		<input type="button" value="<?php 
echo $AppUI->_('back');
?>
" class=button onclick="javascript:window.location='./index.php?m=forums';">
	</td>
	<td align="right"><?php 
if ($AppUI->user_id == $message_info['message_author'] || $AppUI->user_id == $forum_info["forum_owner"] || $message_id == 0 || !empty($perms['all']) && !getDenyEdit('all')) {
    echo '<input type="button" value="' . $AppUI->_('submit') . '" class=button onclick="submitIt()">';
}
?>
</td>
</tr>
</form>
</table>
开发者ID:magsilva,项目名称:dotproject,代码行数:30,代码来源:post_message.php


示例4: foreach

<?php

/* CONTACTS $Id: vcardimport.php,v 1.4.12.1 2005/10/05 12:47:59 gregorerhardt Exp $ */
$canEdit = !getDenyEdit('contacts');
if (!$canEdit) {
    $AppUI->setMsg('Access denied', UI_MSG_ERROR);
    $AppUI->redirect();
}
// check whether vCard file should be fetched from source or parsed for vCardKeys; criteria: get parameters
if (isset($_FILES['vcf']) && isset($_GET['suppressHeaders']) && $_GET['suppressHeaders'] == 'true') {
    //parse and store vCard file
    $vcf = $_FILES['vcf'];
    // include PEAR vCard class
    require_once $AppUI->getLibraryClass('PEAR/Contact_Vcard_Parse');
    if (is_uploaded_file($vcf['tmp_name'])) {
        // instantiate a parser object
        $parse = new Contact_Vcard_Parse();
        // parse a vCard file and store the data
        // in $cardinfo
        $cardinfo = $parse->fromFile($vcf['tmp_name']);
        // store the card info array
        foreach ($cardinfo as $ci) {
            //one file can contain multiple vCards
            $obj = new CContact();
            //transform the card info array to dP store format
            $contactValues["contact_last_name"] = $ci['N'][0]['value'][0][0];
            $contactValues["contact_first_name"] = $ci['N'][0]['value'][1][0];
            $contactValues["contact_title"] = $ci['N'][0]['value'][3][0];
            $contactValues["contact_birthday"] = $ci['BDAY'][0]['value'][0][0];
            $contactValues["contact_company"] = $ci['UID'][0]['value'][0][0];
            $contactValues["contact_type"] = $ci['N'][0]['value'][2][0];
开发者ID:n2i,项目名称:xvnkb,代码行数:31,代码来源:vcardimport.php


示例5: die

<?php

// check access to files module
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly');
}
global $AppUI, $m, $obj, $task_id;
if (!getDenyRead('links')) {
    if (!getDenyEdit('links')) {
        echo '<a href="./index.php?m=links&a=addedit&project_id=' . $obj->task_project . '&link_task=' . $task_id . '">' . $AppUI->_('Attach a link') . '</a>';
    }
    echo dPshowImage(dPfindImage('stock_attach-16.png', $m), 16, 16, '');
    $showProject = false;
    $project_id = $obj->task_project;
    include DP_BASE_DIR . '/modules/links/index_table.php';
}
开发者ID:magsilva,项目名称:dotproject,代码行数:16,代码来源:tasks_tab.links.php


示例6: dPshowImage

<?php

// check access to files module
global $AppUI, $m, $company_id, $dPconfig;
if (!getDenyRead('files')) {
    if (!getDenyEdit('files')) {
        echo '<a href="./index.php?m=files&a=addedit">' . $AppUI->_('Attach a file') . '</a>';
    }
    echo dPshowImage(dPfindImage('stock_attach-16.png', $m), 16, 16, '');
    $showProject = true;
    include $dPconfig['root_dir'] . '/modules/files/index_table.php';
}
开发者ID:Esleelkartea,项目名称:gestion-de-primeras-muestras,代码行数:12,代码来源:companies_tab.files.php


示例7: array

    $q->addQuery('contact_first_name, contact_last_name');
    $q->addTable('user_tasks', 'ut');
    $q->leftJoin('users', 'u', 'u.user_id = ut.user_id');
    $q->leftJoin('contacts', 'c', 'u.user_contact = c.contact_id');
    $q->addWhere('ut.task_id = ' . $row['task_id']);
    $q->addGroup('ut.user_id');
    $q->addOrder('perc_assignment desc, user_username');
    $assigned_users = array();
    $row['task_assigned_users'] = $q->loadList();
    $q->addQuery('count(*) as children');
    $q->addTable('tasks');
    $q->addWhere('task_parent = ' . $row['task_id']);
    $q->addWhere('task_id <> task_parent');
    $row['children'] = $q->loadResult();
    $row['style'] = taskstyle_pd($row);
    $row['canEdit'] = !getDenyEdit('tasks', $row['task_id']);
    $row['canViewLog'] = $perms->checkModuleItem('task_log', 'view', $row['task_id']);
    $i = count($projects[$row['task_project']]['tasks']) + 1;
    $row['task_number'] = $i;
    $row['node_id'] = 'node_' . $i . '-' . $row['task_id'];
    if (strpos($row['task_duration'], '.') && $row['task_duration_type'] == 1) {
        $row['task_duration'] = floor($row['task_duration']) . ':' . round(60 * ($row['task_duration'] - floor($row['task_duration'])));
    }
    //pull the final task row into array
    $projects[$row['task_project']]['tasks'][] = $row;
}
$showEditCheckbox = isset($canEditTasks) && $canEditTasks;
$AppUI->setState('tasks_opened', $tasks_opened);
foreach ($projects as $k => $p) {
    global $done;
    $done = array();
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:vw_projecttask.php


示例8: intval

    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
// one site for both adding and editing timesheet's log items
// besides the following lines show the possiblities of the dPframework
// retrieve GET-Parameters via dPframework
// please always use this way instead of hard code (e.g. there have been some problems with REGISTER_GLOBALS=OFF with hard code)
global $AppUI, $user_id, $percent;
$user_id = $AppUI->user_id;
$task_log_id = intval(dPgetParam($_GET, "task_log_id", 0));
$task_log_name = intval(dPgetParam($_GET, "task_log_name", 0));
// check permissions for this record
$canEdit = !getDenyEdit($m, $task_log_id);
if (!$canEdit) {
    $AppUI->redirect("m=public&a=access_denied");
}
// use the object oriented design of dP for loading the log that should be edited
// therefore create a new instance of the Timesheet Class
$obj = new CTimesheet();
$df = $AppUI->getPref('SHDATEFORMAT');
// pull users
// pull users
$q = new DBQuery();
$q->addTable('tasks', 't');
$q->addTable('projects', 'p');
$q->addTable('user_tasks', 'u');
$q->addQuery('t.task_id');
$q->addQuery('CONCAT_WS(" - ",p.project_short_name, t.task_name)');
开发者ID:seatecnologia,项目名称:dotproject_timesheet,代码行数:31,代码来源:addedit.php


示例9: die

<?php

/* $Id: viewer.php,v 1.25.6.4 2007/03/28 15:00:52 cyberhorse Exp $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
//view posts
$forum_id = isset($_GET["forum_id"]) ? (int) $_GET["forum_id"] : 0;
$message_id = isset($_GET["message_id"]) ? (int) $_GET["message_id"] : 0;
$post_message = isset($_GET["post_message"]) ? $_GET["post_message"] : 0;
$f = dpGetParam($_POST, 'f', 0);
// check permissions
$canRead = !getDenyRead($m, $forum_id);
$canEdit = !getDenyEdit($m, $forum_id);
if (!$canRead || $post_message & !$canEdit) {
    $AppUI->redirect("m=public&a=access_denied");
}
$df = $AppUI->getPref('SHDATEFORMAT');
$tf = $AppUI->getPref('TIMEFORMAT');
$q = new DBQuery();
$q->addTable('forums');
$q->addTable('projects', 'p');
$q->addTable('users', 'u');
$q->addQuery('forum_id, forum_project,	forum_description, forum_owner, forum_name,
	forum_create_date, forum_last_date, forum_message_count, forum_moderated,
	user_username, contact_first_name, contact_last_name,
	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");
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:viewer.php


示例10: intval

<?php

require_once $AppUI->getModuleClass('projects');
// one site for both adding and editing einstein's quote items
// besides the following lines show the possiblities of the dPframework
// retrieve GET-Parameters via dPframework
// please always use this way instead of hard code (e.g. there have been some problems with REGISTER_GLOBALS=OFF with hard code)
$unittest_id = intval(dPgetParam($_GET, "unittest_id", 0));
// check permissions for this record
$canEdit = !getDenyEdit($m, $unittest_id);
if (!$canEdit) {
    $AppUI->redirect("m=public&a=access_denied");
}
// use the object oriented design of dP for loading the quote that should be edited
// therefore create a new instance of the Einstein Class
$obj = new CTesting();
$obj->unittest_lasttested = '2005-07-07';
// format dates
$df = $AppUI->getPref('SHDATEFORMAT');
$lasttested = intval($obj->unittest_lasttested) ? new CDate($obj->unittest_lasttested) : new CDate();
// load the record data in case of that this script is used to edit the quote qith unittest_id (transmitted via GET)
if (!$obj->load($unittest_id, false) && $unittest_id > 0) {
    // show some error messages using the dPFramework if loadOperation failed
    // these error messages are nicely integrated with the frontend of dP
    // use detailed error messages as often as possible
    $AppUI->setMsg('Testing');
    $AppUI->setMsg("invalidID", UI_MSG_ERROR, true);
    $AppUI->redirect();
    // go back to the calling location
}
// check if this record has dependancies to prevent deletion
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:runtest.php


示例11: showtask_pd

function showtask_pd(&$a, $level = 0, $is_opened = true, $today_view = false)
{
    global $AppUI, $dPconfig, $done, $query_string, $durnTypes, $userAlloc, $showEditCheckbox;
    global $task_access, $task_priority, $PROJDESIGN_CONFIG;
    $types = dPgetsysval('TaskType');
    $now = new CDate();
    $tf = $AppUI->getPref('TIMEFORMAT');
    $df = $AppUI->getPref('SHDATEFORMAT');
    $fdf = $df . " " . $tf;
    $perms =& $AppUI->acl();
    $show_all_assignees = @$dPconfig['show_all_task_assignees'] ? true : false;
    $done[] = $a['task_id'];
    $start_date = intval($a["task_start_date"]) ? new CDate($a["task_start_date"]) : null;
    $end_date = intval($a["task_end_date"]) ? new CDate($a["task_end_date"]) : null;
    $last_update = isset($a['last_update']) && intval($a['last_update']) ? new CDate($a['last_update']) : null;
    // prepare coloured highlight of task time information
    $sign = 1;
    $style = "";
    if ($start_date) {
        if (!$end_date) {
            /*
             ** end date calc has been moved to calcEndByStartAndDuration()-function
             ** called from array_csort and tasks.php 
             ** perhaps this fallback if-clause could be deleted in the future, 
             ** didn't want to remove it shortly before the 2.0.2
             */
            $end_date = new CDate('0000-00-00 00:00:00');
        }
        if ($now->after($start_date) && $a["task_percent_complete"] == 0) {
            $style = 'background-color:#ffeebb';
        } else {
            if ($now->after($start_date) && $a["task_percent_complete"] < 100) {
                $style = 'background-color:#e6eedd';
            }
        }
        if ($now->after($end_date)) {
            $sign = -1;
            $style = 'background-color:#cc6666;color:#ffffff';
        }
        if ($a["task_percent_complete"] == 100) {
            $style = 'background-color:#aaddaa; color:#00000';
        }
        $days = $now->dateDiff($end_date) * $sign;
    }
    $s = "\n<tr id=\"row" . $a['task_id'] . "\" onmouseover=\"highlight_tds(this, true, " . $a['task_id'] . ")\" onmouseout=\"highlight_tds(this, false, " . $a['task_id'] . ")\" onclick=\"select_box('selected_task', " . $a['task_id'] . ",'frm_tasks')\">";
    // edit icon
    $s .= "\n\t<td>";
    $canEdit = !getDenyEdit('tasks', $a["task_id"]);
    $canViewLog = $perms->checkModuleItem('task_log', 'view', $a['task_id']);
    if ($canEdit) {
        $s .= "\n\t\t<a href=\"?m=tasks&a=addedit&task_id={$a['task_id']}\">" . "\n\t\t\t" . '<img src="./images/icons/pencil.gif" alt="' . $AppUI->_('Edit Task') . '" border="0" width="12" height="12">' . "\n\t\t</a>";
    }
    $s .= "\n\t</td>";
    // pinned
    /*        $pin_prefix = $a['task_pinned']?'':'un';
            $s .= "\n\t<td>";
            $s .= "\n\t\t<a href=\"?m=tasks&pin=" . ($a['task_pinned']?0:1) . "&task_id={$a['task_id']}\">"
                    . "\n\t\t\t".'<img src="./images/icons/' . $pin_prefix . 'pin.gif" alt="'.$AppUI->_( $pin_prefix . 'pin Task' ).'" border="0" width="12" height="12">'
                    . "\n\t\t</a>";
            $s .= "\n\t</td>";*/
    // New Log
    /*        if (@$a['task_log_problem']>0) {
                    $s .= '<td align="center" valign="middle"><a href="?m=tasks&a=view&task_id='.$a['task_id'].'&tab=0&problem=1">';
                    $s .= dPshowImage( './images/icons/dialog-warning5.png', 16, 16, 'Problem', 'Problem!' );
                    $s .='</a></td>';
            } else if ($canViewLog) {
                    $s .= "\n\t<td><a href=\"?m=tasks&a=view&task_id=" . $a['task_id'] . '&tab=1">' . $AppUI->_('Log') . '</a></td>';
            } else {
                    $s .= "\n\t<td></td>";
                                    }*/
    // percent complete
    $s .= "\n\t<td align=\"right\">" . intval($a["task_percent_complete"]) . '%</td>';
    // priority
    $s .= "\n\t<td align='center' nowrap='nowrap'>";
    if ($a["task_priority"] < 0) {
        $s .= "\n\t\t<img src=\"./images/icons/priority-" . -$a["task_priority"] . '.gif" width=13 height=16>';
    } else {
        if ($a["task_priority"] > 0) {
            $s .= "\n\t\t<img src=\"./images/icons/priority+" . $a["task_priority"] . '.gif" width=13 height=16>';
        }
    }
    $s .= @$a["file_count"] > 0 ? "<img src=\"./images/clip.png\" alt=\"F\">" : "";
    $s .= "</td>";
    // access
    $s .= "\n\t<td nowrap='nowrap'>";
    $s .= '<abbr title="' . $task_access[$a['task_access']] . '">' . substr($task_access[$a["task_access"]], 0, 3) . '</abbr>';
    $s .= "</td>";
    // type
    $s .= "\n\t<td nowrap='nowrap'>";
    $s .= '<abbr title="' . $types[$a['task_type']] . '">' . substr($types[$a["task_type"]], 0, 3) . '</abbr>';
    $s .= "</td>";
    // type
    $s .= "\n\t<td nowrap='nowrap'>";
    $s .= $a["queue_id"] ? 'Yes' : '';
    $s .= "</td>";
    // inactive
    $s .= "\n\t<td nowrap='nowrap'>";
    $s .= $a["task_status"] == '-1' ? 'Yes' : '';
    $s .= "</td>";
    // add log
//.........这里部分代码省略.........
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:101,代码来源:projectdesigner.class.php


示例12: die

<?php

if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
// Add / Edit contact
$risk_id = intval(dPgetParam($_REQUEST, 'risk_id', 0));
// check permissions
$denyEdit = getDenyEdit($m, $risk_id);
if ($denyEdit) {
    $AppUI->redirect("m=help&a=access_denied");
}
$riskProbability = dPgetSysVal('RiskProbability');
$riskStatus = dPgetSysVal('RiskStatus');
$riskImpact = dPgetSysVal('RiskImpact');
$riskDuration = array(1 => 'Hours', 24 => 'Days', 168 => 'Weeks');
$q = new DBQuery();
$q->addQuery('user_id');
$q->addQuery('CONCAT( contact_first_name, \' \', contact_last_name)');
$q->addTable('users');
$q->leftJoin('contacts', 'c', 'user_contact = contact_id');
$q->addOrder('contact_first_name, contact_last_name');
$users = $q->loadHashList();
$q->clear();
$q->addQuery('project_id, project_name');
$q->addTable('projects');
$projects = $q->loadHashList();
$projects[0] = '[All]';
//Pull contact information
$q->clear();
$q->addQuery('*');
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:addedit.php


示例13: die

<?php

/* FILES $Id: addedit_folder.php,v 1.1.2.5 2007/03/29 14:11:53 pedroix Exp $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$file_folder_parent = intval(dPgetParam($_GET, 'file_folder_parent', 0));
$folder = intval(dPgetParam($_GET, 'folder', 0));
// add to allow for returning to other modules besides Files
$referrerArray = parse_url($_SERVER['HTTP_REFERER']);
$referrer = $referrerArray['query'] . $referrerArray['fragment'];
// check permissions for this record
if ($folder == 0) {
    $canEdit = true;
} else {
    $canEdit = !getDenyEdit($m, $folder);
}
if (!$canEdit) {
    $AppUI->redirect("m=public&a=access_denied");
}
$q = new DBQuery();
$q->addTable('file_folders');
$q->addQuery('file_folders.*');
$q->addWhere("file_folder_id={$folder}");
$sql = $q->prepare();
// check if this record has dependancies to prevent deletion
$msg = '';
$obj = new CFileFolder();
if ($folder > 0) {
    $canDelete = $obj->canDelete($msg, $folder);
}
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:addedit_folder.php


示例14: displayFiles

function displayFiles($folder)
{
    global $m, $a, $tab, $AppUI, $xpg_min, $xpg_pagesize;
    global $deny1, $deny2, $project_id, $task_id, $showProject, $file_types, $cfObj;
    global $xpg_totalrecs, $xpg_total_pages, $page;
    global $company_id, $allowed_companies, $current_uri, $dPconfig;
    $canEdit = !getDenyEdit($m, $folder);
    $canRead = !getDenyRead($m, $folder);
    $df = $AppUI->getPref('SHDATEFORMAT');
    $tf = $AppUI->getPref('TIMEFORMAT');
    // SETUP FOR FILE LIST
    $q = new DBQuery();
    $q->addTable('files');
    $q->addQuery('files.*,count(file_version) as file_versions,round(max(file_version), 2) as file_lastversion,file_folder_id, file_folder_name,project_name, project_color_identifier,contact_first_name, contact_last_name,task_name,task_id');
    $q->addJoin('projects', 'p', 'p.project_id = file_project');
    $q->addJoin('users', 'u', 'u.user_id = file_owner');
    $q->addJoin('contacts', 'c', 'c.contact_id = u.user_contact');
    $q->addJoin('tasks', 't', 't.task_id = file_task');
    $q->addJoin('file_folders', 'ff', 'ff.file_folder_id = file_folder');
    $q->addWhere('file_folder = ' . $folder);
    if (count($deny1) > 0) {
        $q->addWhere('file_project NOT IN (' . implode(',', $deny1) . ')');
    }
    if (count($deny2) > 0) {
        $q->addWhere('file_task NOT IN (' . implode(',', $deny2) . ')');
    }
    if ($project_id) {
        $q->addWhere('file_project = ' . $project_id);
    }
    if ($task_id) {
        $q->addWhere('file_task = ' . $task_id);
    }
    if ($company_id) {
        $q->innerJoin('companies', 'co', 'co.company_id = p.project_company');
        $q->addWhere('company_id = ' . $company_id);
        $q->addWhere('company_id IN (' . $allowed_companies . ')');
    }
    $q->addGroup('file_folder');
    $q->addGroup('project_name');
    $q->addGroup('file_name');
    $q->addOrder('file_folder');
    $q->addOrder('project_name');
    $q->addOrder('file_name');
    $q->setLimit($xpg_pagesize, $xpg_min);
    $files_sql = $q->prepare();
    $q->clear();
    $q = new DBQuery();
    $q->addTable('files');
    $q->addQuery('files.file_id, file_version, file_project, file_name, file_task, file_description, user_username as file_owner, file_size, file_category, file_type, file_date, file_folder_name');
    $q->addJoin('projects', 'p', 'p.project_id = file_project');
    $q->addJoin('users', 'u', 'u.user_id = file_owner');
    $q->addJoin('tasks', 't', 't.task_id = file_task');
    $q->addJoin('file_folders', 'ff', 'ff.file_folder_id = file_folder');
    $q->addWhere('file_folder = ' . $folder);
    if ($project_id) {
        $q->addWhere('file_project = ' . $project_id);
    }
    if ($task_id) {
        $q->addWhere('file_task = ' . $task_id);
    }
    if ($company_id) {
        $q->innerJoin('companies', 'co', 'co.company_id = p.project_company');
        $q->addWhere('company_id = ' . $company_id);
        $q->addWhere('company_id IN (' . $allowed_companies . ')');
    }
    $file_versions_sql = $q->prepare();
    $q->clear();
    $files = array();
    $file_versions = array();
    if ($canRead) {
        $files = db_loadList($files_sql);
        $file_versions = db_loadList($file_versions_sql);
    }
    if ($files === array()) {
        return 0;
    }
    ?>
	<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
	<tr>
		<th nowrap="nowrap"><?php 
    echo $AppUI->_('File Name');
    ?>
</th>
		<th><?php 
    echo $AppUI->_('Description');
    ?>
</th>
		<th><?php 
    echo $AppUI->_('Versions');
    ?>
</th>
	    <th><?php 
    echo $AppUI->_('Category');
    ?>
</th>
		<th nowrap="nowrap"><?php 
    echo $AppUI->_('Task Name');
    ?>
</th>
		<th><?php 
//.........这里部分代码省略.........
开发者ID:magsilva,项目名称:dotproject,代码行数:101,代码来源:folders_table.php


示例15: array

<?php

$AppUI->savePlace();
$canEdit = !getDenyEdit($m);
$canRead = !getDenyRead($m);
if (!$canRead) {
    $AppUI->setMsg('Access denied', UI_MSG_ERROR);
    $AppUI->redirect();
}
$sql_table = 'contacts';
//Modify this mapping to match your LDAP->contact structure
//For instance, of you want the contact_phone2 field to be populated out of, say telephonenumber2 then you would just modify
//	'physicaldeliveryofficename' => 'contact_phone2',
// ro
//	'telephonenumber2' => 'contact_phone2',
$sql_ldap_mapping = array('givenname' => 'contact_first_name', 'sn' => 'contact_last_name', 'title' => 'contact_title', 'companyname' => 'contact_company', 'department' => 'contact_department', 'employeeid' => 'contact_type', 'mail' => 'contact_email', 'telephonenumber' => 'contact_phone', 'physicaldeliveryofficename' => 'contact_phone2', 'postaladdress' => 'contact_address1', 'l' => 'contact_city', 'st' => 'contact_state', 'postalcode' => 'contact_zip', 'c' => 'contact_country');
$titleBlock = new CTitleBlock('Import Contacts from LDAP Directory');
$titleBlock->addButton('Main page', '?m=system');
$titleBlock->show();
if (isset($_POST['server'])) {
    $AppUI->setState('LDAPServer', $_POST['server']);
}
$server = $AppUI->getState('LDAPServer', '');
if (isset($_POST['bind_name'])) {
    $AppUI->setState('LDAPBindName', $_POST['bind_name']);
}
$bind_name = $AppUI->getState('LDAPBindName', '');
$bind_password = dPgetParam($_POST, 'bind_password', '');
if (isset($_POST['port'])) {
    $AppUI->setState('LDAPPort', $_POST['port']);
}
开发者ID:n2i,项目名称:xvnkb,代码行数:31,代码来源:contacts_ldap.php


示例16: isset

<?php

/* DEPARTMENTS $Id: addedit.php,v 1.24 2005/04/08 13:41:51 gregorerhardt Exp $ */
// Add / Edit Company
$dept_id = isset($_GET['dept_id']) ? $_GET['dept_id'] : 0;
$company_id = isset($_GET['company_id']) ? $_GET['company_id'] : 0;
// check permissions for this department
$canEdit = !getDenyEdit($m, $dept_id);
if (!$canEdit) {
    $AppUI->redirect("m=public&a=access_denied");
}
// pull data for this department
$q = new DBQuery();
$q->addTable('departments', 'dep');
$q->addQuery('dep.*, company_name');
$q->addJoin('companies', 'com', 'com.company_id = dep.dept_company');
$q->addWhere('dep.dept_id = ' . $dept_id);
$sql = $q->prepare();
$q->clear();
if (!db_loadHash($sql, $drow) && $dept_id > 0) {
    $titleBlock = new CTitleBlock('Invalid Department ID', 'users.gif', $m, "{$m}.{$a}");
    $titleBlock->addCrumb("?m=companies", "companies list");
    if ($company_id) {
        $titleBlock->addCrumb("?m=companies&a=view&company_id={$company_id}", "view this company");
    }
    $titleBlock->show();
} else {
    ##echo $sql.db_error();##
    $company_id = $dept_id ? $drow['dept_company'] : $company_id;
    // check if valid company
    $q = new DBQuery();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:addedit.php


示例17: getReadableModule

<?php

global $TIMECARD_CONFIG;
$m = $AppUI->checkFileName(dPgetParam($_GET, 'm', getReadableModule()));
$denyEdit = getDenyEdit($m);
if ($denyEdit) {
    $AppUI->setMsg('Access denied', UI_MSG_ERROR);
    $AppUI->redirect();
}
//grab hours per day from config
$min_hours_day = $AppUI->cfg['daily_working_hours'];
$can_edit_other_timesheets = $TIMECARD_CONFIG['minimum_edit_level'] >= $AppUI->user_type;
$show_other_worksheets = $TIMECARD_CONFIG['minimum_see_level'] >= $AppUI->user_type;
$show_possible_hours_worked = $TIMECARD_CONFIG['show_possible_hours_worked'];
//print "<pre>";
//print_r($AppUI);
//print "</pre>";
//compute hours/week from config
$min_hours_week = count(explode(",", dPgetConfig("cal_working_days"))) * $min_hours_day;
// get date format
$df = $AppUI->getPref('SHDATEFORMAT');
if (isset($_GET['user_id'])) {
    $sql = "SELECT user_company FROM users WHERE user_id = " . $_GET['user_id'];
    $company_id = db_loadResult($sql);
    if (getDenyRead("companies", $company_id)) {
        $AppUI->setMsg('Access denied', UI_MSG_ERROR);
        $AppUI->redirect();
    }
    $AppUI->setState('TimecardSelectedUser', $_GET['user_id']);
}
$user_id = $AppUI->getState('TimecardSelectedUser') ? $AppUI->getState('TimecardSelectedUser') : $AppUI->user_id;
开发者ID:n2i,项目名称:xvnkb,代码行数:31,代码来源:vw_timecard.php


示例18: DBQuery

<?php

// deny all but system admins
$canEdit = !getDenyEdit('system');
if (!$canEdit) {
    $AppUI->redirect("m=public&a=access_denied");
}
$AppUI->savePlace();
$q = new DBQuery();
if (isset($_POST['forcewatch']) && isset($_POST['forcesubmit'])) {
    // insert row into forum_watch for forcing Watch
    $q->addTable('forum_watch');
    $q->addInsert('watch_user', 0);
    $q->addInsert('watch_forum', 0);
    $q->addInsert('watch_topic', 0);
    if (!$q->exec()) {
        $AppUI->setMsg(db_error(), UI_MSG_ERROR);
    } else {
        $AppUI->setMsg("Watch Forced", UI_MSG_OK);
    }
    $q->clear();
    $AppUI->redirect('m=forums&a=configure');
} elseif (isset($_POST['forcesubmit']) && !isset($_POST['forcewatch'])) {
    // delete row from forum_watch for unorcing Watch
    $q->setDelete('forum_watch');
    $q->addWhere('watch_user = 0');
    $q->addWhere('watch_forum = 0');
    $q->addWhere('watch_topic = 0');
    if (!$q->exec()) {
        $AppUI->setMsg(db_error(), UI_MSG_ERROR);
    } else {
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:configure.php


示例19: arrayMerge

<?php

/* This file will write a php config file to be included during execution of
 * all helpdesk files which require the configuration options. */
// Deny all but system admins
if (getDenyEdit('system')) {
    $AppUI->redirect("m=public&a=access_denied");
}
@(include_once "./functions/admin_func.php");
$CONFIG_FILE = "./modules/helpdesk/config.php";
$AppUI->savePlace();
// Get a list of companies
$sql = "SELECT company_id, company_name\n        FROM companies\n        ORDER BY company_name";
$res = db_exec($sql);
// Add "No Company"
$companies['-1'] = '';
while ($row = db_fetch_assoc($res)) {
    $companies[$row['company_id']] = $row['company_name'];
}
//define user type list
$user_types = arrayMerge($utypes, array('9' => $AppUI->_('None')));
/* All config options, their descriptions and their default values are defined
* here. Add new config options here. Type can be "checkbox", "text", "radio" or
* "select". If the type is "radio," it must include a set of buttons. If it's
* "select" then be sure to include a 'list' entry with the options.  if the key
* starts with headingXXX then it will just display the contents on the value.
* This is used for grouping.
*/
$config_options = array("heading1" => $AppUI->_('Paging Options'), "items_per_page" => array("description" => $AppUI->_('helpdeskItemsPerPage'), "value" => 30, 'type' => 'text'), "status_log_items_per_page" => array("description" => $AppUI->_('helpdeskLogsPerPage'), "value" => 15, 'type' => 'text'), "pages_per_side" => array("description" => $AppUI->_('helpdeskPagesPerSide'), "value" => 5, 'type' => 'text'), "heading2" => $AppUI->_('Permission Options'), "the_company" => array("description" => $AppUI->_('helpdeskHDCompany'), "value" => '', 'type' => 'select', 'list' => $companies), "no_company_editable" => array("description" => $AppUI->_('helpdeskItemsNoCompany'), "value" => '0', 'type' => 'radio', 'buttons' => array(1 => $AppUI->_('Yes'), 0 => $AppUI->_('No'))), 'minimum_edit_level' => array('description' => $AppUI->_('helpdeskMinLevel'), 'value' => 9, 'type' => 'select', 'list' => @$user_types), "use_project_perms" => array("description" => $AppUI->_('helpdeskUseProjectPerms'), "value" => '0', 'type' => 'radio', 'buttons' => array(1 => $AppUI->_('Yes'), 0 => $AppUI->_('No'))), 'minimum_report_level' => array('description' => $AppUI->_('helpdeskMinRepLevel'), 'value' => 9, 'type' => 'select', 'list' => @$user_types), "heading3" => $AppUI->_('New Item Default Selections'), "default_assigned_to_current_user" => array("description" => $AppUI->_('helpdeskDefCurUser'), "value" => 1, 'type' => 'radio', 'buttons' => array(1 => $AppUI->_('Yes'), 0 => $AppUI->_('No'))), "default_notify_by_email" => array("description" => $AppUI->_('helpdeskDefNotify'), "value" => 1, 'type' => 'radio', 'buttons' => array(1 => $AppUI->_('Yes'), 0 => $AppUI->_('No'))), "default_company_current_company" => array("description" => $AppUI->_('helpdeskDefCompany'), "value" => 1, 'type' => 'radio', 'buttons' => array(1 => $AppUI->_('Yes'), 0 => $AppUI->_('No'))), "heading4" => $AppUI->_('Search Fields On Item List'), "search_criteria_search" => array("description" => $AppUI->_('Title/Summary Search'), "value" => 1, 'type' => 'checkbox'), "search_criteria_call_type" => array("description" => $AppUI->_('Call Type'), "value" => 1, 'type' => 'checkbox'), "search_criteria_company" => array("description" => $AppUI->_('Company'), "value" => 1, 'type' => 'checkbox'), "search_criteria_status" => array("description" => $AppUI->_('Status'), "value" => 1, 'type' => 'checkbox'), "search_criteria_call_source" => array("description" => $AppUI->_('Call Source'), "value" => 1, 'type' => 'checkbox'), "search_criteria_project" => array("description" => $AppUI->_('Project'), "value" => 1, 'type' => 'checkbox'), "search_criteria_assigned_to" => array("description" => $AppUI->_('Assigned To'), "value" => 1, 'type' => 'checkbox'), "search_criteria_priority" => array("description" => $AppUI->_('Priority'), "value" => 1, 'type' => 'checkbox'), "search_criteria_application" => array("description" => $AppUI->_('Application'), "value" => 1, 'type' => 'checkbox'), "search_criteria_requestor" => array("description" => $AppUI->_('Requestor'), "value" => 1, 'type' => 'checkbox'), "search_criteria_severity" => array("description" => $AppUI->_('Severity'), "value" => 1, 'type' => 'checkbox'), "search_criteria_os" => array("description" => $AppUI->_('Operating System'), "value" => 1, 'type' => 'checkbox'));
//if this is a submitted page, overwrite the config file.
if (dPgetParam($_POST, "Save", '') != '') {
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:configure.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getDenyRead函数代码示例发布时间:2022-05-15
下一篇:
PHP getDelimiter函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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