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

PHP getPermission函数代码示例

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

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



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

示例1: index

 public function index()
 {
     if ($_SESSION['access'] > 2) {
         die('Access denied');
     }
     $this->templates_path = dirname(dirname(dirname(__FILE__))) . ROOT_DIR . 'view';
     $this->tpl_file = isset($_GET['file']) ? $this->templates_path . $_GET['file'] : false;
     if (isset($_POST['action']) && $_POST['action'] == 'save' && $this->tpl_file != false) {
         $this->saveTemplate();
     }
     if (isset($_SESSION['msg']) && $_SESSION['msg'] == 'success') {
         $this->data['text_message'] = $this->language['changes_applied'];
         $this->data['class_message'] = 'success';
         unset($_SESSION['msg']);
     }
     if (isset($_SESSION['msg']) && $_SESSION['msg'] == 'denied') {
         $this->data['text_message'] = $this->language['perm_denied'] . ' ' . $this->language['cur_perm'] . getPermission($this->tpl_file);
         $this->data['class_message'] = 'error';
         unset($_SESSION['msg']);
     }
     $this->engine->document->addHeaderString('<link href="template/css/codemirror.css" rel="stylesheet" media="screen">');
     $this->engine->document->addHeaderString('<script src="template/js/codemirror.js"></script>');
     if ($this->tpl_file != false) {
         $ext = strtolower(pathinfo($this->tpl_file, PATHINFO_EXTENSION));
         if (in_array($ext, array('png', 'jpg', 'jpeg', 'gif'))) {
             $this->tpl_file = false;
         }
         switch ($ext) {
             case 'css':
                 $this->engine->document->addHeaderString('<script src="template/js/css.js"></script>');
                 break;
             case 'xml':
                 $this->engine->document->addHeaderString('<script src="template/js/xml.js"></script>');
                 break;
             case 'js':
                 $this->engine->document->addHeaderString('<script src="template/js/javascript.js"></script>');
                 break;
             case 'tpl':
                 $this->engine->document->addHeaderString('<script src="template/js/matchbrackets.js"></script>');
                 $this->engine->document->addHeaderString('<script src="template/js/htmlmixed.js"></script>');
                 $this->engine->document->addHeaderString('<script src="template/js/xml.js"></script>');
                 $this->engine->document->addHeaderString('<script src="template/js/javascript.js"></script>');
                 $this->engine->document->addHeaderString('<script src="template/js/css.js"></script>');
                 $this->engine->document->addHeaderString('<script src="template/js/clike.js"></script>');
                 $this->engine->document->addHeaderString('<script src="template/js/php.js"></script>');
                 break;
             default:
                 break;
         }
     }
     $this->engine->document->addHeaderString('<script src="template/js/jquery.cookie.js"></script>');
     $this->engine->document->addHeaderString('<script src="template/js/jquery.treeview.js"></script>');
     $this->engine->document->addHeaderString('<link href="template/css/jquery.treeview.css" rel="stylesheet" media="screen">');
     $this->data['templates_path'] = $this->templates_path;
     $this->data['tpl_file'] = $this->tpl_file;
     $this->data['ext'] = isset($ext) ? $ext : '';
     $this->data['breadcrumbs'][] = array('caption' => $this->language['home'], 'link' => ADM_PATH);
     $this->data['breadcrumb_cur'] = $this->language['template_manager'];
     $this->template = 'template/tpl_manager.tpl';
 }
开发者ID:wharin,项目名称:quantum,代码行数:60,代码来源:tpl_manager.php


示例2: fetchResults

 function fetchResults(&$record_count)
 {
     global $AppUI;
     $results = $this->_searchResults();
     if ($results && getPermission($this->table_module, 'access')) {
         $record_count += count($results);
         $outstring = '<tr><th><b>' . $AppUI->_($this->table_title) . ' (' . count($results) . ')' . '</b></th></tr>' . "\n";
         foreach ($results as $records) {
             if (getPermission($this->table_module, 'access', $records[$this->table_key])) {
                 $ii = 0;
                 $display_val = '';
                 foreach ($this->display_fields as $fld) {
                     $ii++;
                     if (!($this->search_options['display_all_flds'] == 'on') && $ii > 2) {
                         break;
                     }
                     $display_val .= ($display_val ? ' ' : '') . $records[preg_replace('/^.*\\.([^\\.]+)$/', '$1', $fld)];
                 }
                 $tmplink = "";
                 if (isset($this->table_link) && isset($this->table_key)) {
                     $tmplink = $this->table_link . $records[preg_replace('/^.*\\.([^\\.]+)$/', '$1', $this->table_key)];
                 }
                 if (isset($this->table_link2) && isset($this->table_key2)) {
                     $tmplink = $this->table_link . $records[preg_replace('/^.*\\.([^\\.]+)$/', '$1', $this->table_key)] . $this->table_link2 . $records[preg_replace('/^.*\\.([^\\.]+)$/', '$1', $this->table_key2)];
                 }
                 $outstring .= '<tr><td>' . "\n" . '<a href="' . $tmplink . '">' . highlight($display_val, $this->keywords) . '</a>' . "\n" . '</td></tr>' . "\n";
             }
         }
     } else {
         if ($this->search_options['show_empty'] == 'on') {
             $outstring = '<tr><th><b>' . $AppUI->_($this->table_title) . ' (' . count($results) . ')' . '</b></th></tr>' . "\n" . '<tr><td>' . $AppUI->_('Empty') . '</td></tr>' . "\n";
         }
     }
     return $outstring;
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:35,代码来源:smartsearch.class.php


示例3: tombolAddItem

function tombolAddItem($kd, $status)
{
    if (getPermission()) {
        if (getPermission()->BTN_EDIT == 1 and $status != 101) {
            $title1 = Yii::t('app', 'AddItem');
            $options1 = ['id' => 'add-item', 'data-toggle' => "modal", 'data-target' => "#additem-ro", 'class' => 'btn btn-warning'];
            $icon1 = '<span class="fa fa-plus fa-lg"></span>';
            $label1 = $icon1 . ' ' . $title1;
            $url1 = Url::toRoute(['/purchasing/request-order/additem', 'kd' => $kd]);
            $content = Html::a($label1, $url1, $options1);
            return $content;
        } else {
            $title1 = Yii::t('app', 'AddItem');
            $options1 = ['id' => 'ro-tambah-detail', 'class' => 'btn btn-warning', 'data-confirm' => 'Permission Failed, The data can not be changed !'];
            $icon1 = '<span class="fa fa-plus fa-lg"></span>';
            $label1 = $icon1 . ' ' . $title1;
            $url1 = Url::toRoute(['#']);
            $content = Html::a($label1, $url1, $options1);
            return $content;
        }
    } else {
        $title1 = Yii::t('app', 'AddItem');
        $options1 = ['id' => 'ro-tambah-detail', 'class' => 'btn btn-warning', 'data-confirm' => 'Permission Failed, The data can not be changed  !'];
        $icon1 = '<span class="fa fa-plus fa-lg"></span>';
        $label1 = $icon1 . ' ' . $title1;
        $url1 = Url::toRoute(['#']);
        $content = Html::a($label1, $url1, $options1);
        return $content;
    }
}
开发者ID:adem-team,项目名称:advanced,代码行数:30,代码来源:edit.php


示例4: tombolReview

function tombolReview($url, $model)
{
    if (getPermission()) {
        // if(getPermission()->BTN_REVIEW==1){
        $title = Yii::t('app', 'Review');
        $options = ['id' => 'term-date-review'];
        $icon = '<span class="glyphicon glyphicon-zoom-in"></span>';
        $label = $icon . ' ' . $title;
        $url = Url::toRoute(['/purchasing/data-term/review', 'id' => $model->TERM_ID, 'cus_kd' => $model->CUST_KD_PARENT]);
        $options['tabindex'] = '-1';
        return '<li>' . Html::a($label, $url, $options) . '</li>' . PHP_EOL;
        // }
    }
}
开发者ID:adem-team,项目名称:advanced,代码行数:14,代码来源:index.php


示例5: canDelete

 function canDelete(&$msg, $oid = null)
 {
     // TODO: check if user permissions are considered when deleting a project
     global $AppUI;
     return getPermission('projects', 'delete', $oid);
     // NOTE: I uncommented the dependencies check since it is
     // very anoying having to delete all tasks before being able
     // to delete a project.
     /*
     $tables[] = array('label' => 'Tasks', 'name' => 'tasks', 'idfield' => 'task_id', 
                       'joinfield' => 'task_project');
     // call the parent class method to assign the oid
     return CDpObject::canDelete($msg, $oid, $tables);
     */
 }
开发者ID:slawekmikula,项目名称:dotproject,代码行数:15,代码来源:projects.class.php


示例6: htmlspecialchars

	</td>
	<td width="30%">
<?php 
        if (getPermission('companies', 'view', $row['project_company'])) {
            ?>
		<a href="?m=companies&amp;a=view&amp;company_id=<?php 
            echo $row['project_company'];
            ?>
" title="<?php 
            echo htmlspecialchars($row['company_description'], ENT_QUOTES);
            ?>
 ">
<?php 
        }
        echo htmlspecialchars($row['company_name'], ENT_QUOTES);
        if (getPermission('companies', 'view', $row['project_company'])) {
            ?>
		</a>
<?php 
        }
        ?>
	</td>
	<td width="100%">
		<a href="?m=projects&amp;a=view&amp;project_id=<?php 
        echo $row['project_id'];
        ?>
" onmouseover="return overlib('<?php 
        echo htmlspecialchars('<div><p>' . str_replace(array("\r\n", "\n", "\r"), '</p><p>', addslashes($row['project_description'])) . '</p></div>', ENT_QUOTES);
        ?>
', CAPTION, '<?php 
        echo $AppUI->_('Description');
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:admin_tab.viewuser.projects.php


示例7: CTask

$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;
if ($tab != -1) {
    array_unshift($file_types, 'All Files');
}
$tabBox = new CTabBox('?m=files', DP_BASE_DIR . '/modules/files/', $tab);
$tabbed = $tabBox->isTabbed();
$i = 0;
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:index.php


示例8: die

<?php

/* FORUMS $Id: view_pdf.php 6149 2012-01-09 11:58:40Z ajdonnison $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not call this file directly.');
}
$AppUI->savePlace();
$sort = dPgetCleanParam($_REQUEST, 'sort', 'asc');
$forum_id = (int) dPgetParam($_REQUEST, 'forum_id', 0);
$message_id = (int) dPgetParam($_REQUEST, 'message_id', 0);
if (!getPermission('forums', 'view', $message_id)) {
    $AppUI->redirect("m=public&a=access_denied");
}
$q = new DBQuery();
$q->addTable('forums');
$q->addTable('forum_messages', 'msg');
$q->addQuery('msg.*, contact_first_name, contact_last_name, contact_email, user_username,
			forum_moderated, visit_user');
$q->addJoin('forum_visits', 'v', "visit_user = {$AppUI->user_id} AND visit_forum = {$forum_id} AND visit_message = msg.message_id");
$q->addJoin('users', 'u', 'message_author = u.user_id');
$q->addJoin('contacts', 'con', 'contact_id = user_contact');
$q->addWhere("forum_id = message_forum AND (message_id = {$message_id} OR message_parent = {$message_id})");
if (dPgetConfig('forum_descendent_order') || dPgetCleanParam($_REQUEST, 'sort', 0)) {
    $q->addOrder("message_date {$sort}");
}
$messages = $q->loadList();
$x = false;
$date = new CDate();
$pdfdata = array();
$pdfhead = array('Date', 'User', 'Message');
$new_messages = array();
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:view_pdf.php


示例9: canUserEditTimeInformation

 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 (dPgetConfig('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 (getPermission('admin', 'edit')) {
             $can_edit_time_information = true;
         }
     } else {
         if (dPgetConfig('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:hoodoogurus,项目名称:dotprojecteap,代码行数:30,代码来源:tasks.class.php


示例10: tombolReview

function tombolReview($url, $model)
{
    if (getPermission()) {
        /* GF_ID>=4 Group Function[Director|GM|M|S] */
        $gF = getPermissionEmp()->GF_ID;
        $Auth2 = getPermission()->BTN_SIGN2;
        // Auth2
        $Auth3 = getPermission()->BTN_SIGN3;
        // Auth3
        $BtnReview = getPermission()->BTN_REVIEW;
        if (($Auth2 == 1 or $Auth3 == 1) and $gF <= 4 and $BtnReview = 1 or getPermissionEmp()->EMP_ID == $model->USER_CC) {
            $title = Yii::t('app', 'Review');
            $options = [];
            $icon = '<span class="glyphicon glyphicon-ok"></span>';
            $label = $icon . ' ' . $title;
            $url = Url::toRoute(['/purchasing/sales-order/review', 'kd' => $model->KD_RO]);
            //$url = Url::toRoute(['/purchasing/sales-order/approved']);
            //$url = Url::toRoute(['/purchasing/sales-order/approved']);
            $options['tabindex'] = '-1';
            return '<li>' . Html::a($label, $url, $options) . '</li>' . PHP_EOL;
        }
    }
}
开发者ID:adem-team,项目名称:advanced,代码行数:23,代码来源:index.php


示例11: die

<?php

/* ADMIN $Id: do_userrole_aed.php 6149 2012-01-09 11:58:40Z ajdonnison $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
require_once $AppUI->getModuleClass('contacts');
$del = (bool) dPgetParam($_POST, 'del', false);
$role_id = (int) dPgetParam($_POST, 'role_id', 0);
$user_id = (int) dPgetParam($_POST, 'user_id', 0);
$user_role = (int) dPgetParam($_POST, 'user_role', 0);
if (!getPermission($m, 'edit', $user_id)) {
    $AppUI->redirect('m=public&a=access_denied');
}
// prepare (and translate) the module name ready for the suffix
$AppUI->setMsg('Role');
$perms =& $AppUI->acl();
if ($del) {
    if ($perms->deleteUserRole($role_id, $user_id)) {
        $AppUI->setMsg('deleted', UI_MSG_ALERT, true);
        if (dPgetConfig('user_contact_inactivate') && !$perms->checkLogin($user_id)) {
            // Mark contact as private
            $obj = new CUser();
            $contact = new CContact();
            $obj->load($user_id);
            if ($contact->load($obj->user_contact)) {
                $contact->contact_private = 1;
                $contact->store();
            }
        }
    } else {
开发者ID:222elm,项目名称:dotprojectFrame,代码行数:31,代码来源:do_userrole_aed.php


示例12: die

<?php

/* COMPANIES $Id: view.php 6080 2010-12-04 08:39:35Z ajdonnison $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$company_id = intval(dPgetParam($_GET, 'company_id', 0));
// check permissions for this record
$canRead = getPermission($m, 'view', $company_id);
$canEdit = getPermission($m, 'edit', $company_id);
if (!$canRead) {
    $AppUI->redirect('m=public&a=access_denied');
}
// retrieve any state parameters
if (isset($_GET['tab'])) {
    $AppUI->setState('CompVwTab', $_GET['tab']);
}
$tab = $AppUI->getState('CompVwTab') !== NULL ? $AppUI->getState('CompVwTab') : 2;
// check if this record has dependencies to prevent deletion
$msg = '';
$obj = new CCompany();
$canDelete = $obj->canDelete($msg, $company_id);
// load the record data
$q = new DBQuery();
$q->addTable('companies', 'co');
$q->addQuery('co.*');
$q->addQuery('con.contact_first_name');
$q->addQuery('con.contact_last_name');
$q->addJoin('users', 'u', 'u.user_id = co.company_owner');
$q->addJoin('contacts', 'con', 'u.user_contact = con.contact_id');
$q->addWhere('co.company_id = ' . $company_id);
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:view.php


示例13: die

<?php

/* PROJECTS $Id$ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
/**
* Generates a report of the task logs for given dates
*/
if (!getPermission('task_log', 'view')) {
    redirect('m=public&a=access_denied');
}
$do_report = dPgetParam($_GET, "do_report", 0);
$log_all = dPgetParam($_GET, 'log_all', 0);
$log_pdf = dPgetParam($_GET, 'log_pdf', 0);
$log_ignore = dPgetParam($_GET, 'log_ignore', 0);
$log_userfilter = dPgetParam($_GET, 'log_userfilter', '0');
$log_start_date = dPgetParam($_GET, "log_start_date", 0);
$log_end_date = dPgetParam($_GET, "log_end_date", 0);
// create Date objects from the datetime fields
$start_date = intval($log_start_date) ? new CDate($log_start_date) : new CDate();
$end_date = intval($log_end_date) ? new CDate($log_end_date) : new CDate();
if (!$log_start_date) {
    $start_date->subtractSpan(new Date_Span("14,0,0,0"));
}
$end_date->setTime(23, 59, 59);
?>
<script language="javascript">
var calendarField = '';

function popCalendar(field) {
开发者ID:hightechcompany,项目名称:dotproject,代码行数:31,代码来源:tasklogs.php


示例14: die

<?php

/* PROJECTS $Id: reports.php 5874 2009-04-25 13:04:46Z merlinyoda $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$project_id = intval(dPgetParam($_REQUEST, 'project_id', 0));
$report_type = dPgetParam($_REQUEST, 'report_type', '');
// check permissions for this record
$canRead = getPermission($m, 'view', $project_id);
if (!$canRead) {
    $AppUI->redirect('m=public&a=access_denied');
}
$project_list = array('0' => $AppUI->_('All', UI_OUTPUT_RAW));
$obj = new CProject();
$ptrc = $obj->getAllowedProjectsInRows($AppUI->user_id);
$nums = db_num_rows($ptrc);
echo db_error();
for ($x = 0; $x < $nums; $x++) {
    $row = db_fetch_assoc($ptrc);
    if ($row['project_id'] == $project_id) {
        $display_project_name = '(' . $row['project_short_name'] . ') ' . $row['project_name'];
    }
    $project_list[$row['project_id']] = '(' . $row['project_short_name'] . ') ' . $row['project_name'];
}
if (!$suppressHeaders) {
    ?>
<script language="javascript">
                                                                                
function changeIt() {
        var f=document.changeMe;
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:31,代码来源:reports.php


示例15: canDelete

function canDelete($mod, $item_id = 0)
{
    return getPermission($mod, 'delete', $item_id);
}
开发者ID:joly,项目名称:web2project,代码行数:4,代码来源:permissions.class.php


示例16:

" />
				<input type="text" class="text" name="start_date" id="date1" value="<?php 
echo $start_date->format($df);
?>
" class="text" disabled="disabled" />

				<a href="#" onClick="popCalendar('start_date', 'start_date');">
					<img src="./images/calendar.gif" width="24" height="12" alt="<?php 
echo $AppUI->_('Calendar');
?>
" border="0" />
				</a>
			</td>
			<td rowspan="6" valign="top">
					<?php 
if ($AppUI->isActiveModule('contacts') && getPermission('contacts', 'view')) {
    echo "<input type='button' class='button' value='" . $AppUI->_("Select contacts...") . "' onclick='javascript:popContacts();' />";
}
// Let's check if the actual company has departments registered
if ($department_selection_list != "") {
    ?>
								<br />
								<?php 
    echo $department_selection_list;
    ?>
							<?php 
}
?>
			</td>
		</tr>
		<tr>
开发者ID:kilivan,项目名称:dotproject,代码行数:31,代码来源:addedit.php


示例17: tombolNewItem

function tombolNewItem($kd, $status, $roHeader)
{
    if (getPermission()) {
        if (getPermission()->BTN_EDIT == 1 and $status == 0) {
            $title1 = Yii::t('app', 'New');
            $options1 = ['id' => 'add-new-item-id', 'data-toggle' => "modal", 'data-target' => "#add-new-item", 'class' => 'btn btn-warning btn-xs'];
            $icon1 = '<span class="fa fa-edit fa-xs"></span>';
            $label1 = $icon1 . ' ' . $title1;
            $url1 = Url::toRoute(['/purchasing/request-term/add-new-invest', 'kd' => $kd, 'term_id' => $roHeader->TERM_ID, 'cust_kd' => $roHeader->CUST_ID_PARENT]);
            $content = Html::a($label1, $url1, $options1);
            return $content;
        } else {
            $title1 = Yii::t('app', 'New');
            $options1 = ['id' => 'ro-tambah-detail', 'data-toggle' => "modal", 'data-target' => "#confirm-permission-alert", 'class' => 'btn btn-warning btn-xs'];
            $icon1 = '<span class="fa fa-plus fa-xs"></span>';
            $label1 = $icon1 . ' ' . $title1;
            $url1 = Url::toRoute(['#']);
            $content = Html::a($label1, $url1, $options1);
            return $content;
        }
    } else {
        $title1 = Yii::t('app', 'AddItem');
        $options1 = ['id' => 'ro-tambah-detail', 'data-toggle' => "modal", 'data-target' => "#confirm-permission-alert", 'class' => 'btn btn-warning btn-xs'];
        $icon1 = '<span class="fa fa-plus fa-xs"></span>';
        $label1 = $icon1 . ' ' . $title1;
        $url1 = Url::toRoute(['#']);
        $content = Html::a($label1, $url1, $options1);
        return $content;
    }
}
开发者ID:adem-team,项目名称:advanced,代码行数:30,代码来源:edit_ver1.php


示例18: CCompany

require_once $AppUI->getModuleClass('companies');
$obj = new CCompany();
$companies = $obj->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$filters2 = arrayMerge(array('all' => $AppUI->_('All Companies', UI_OUTPUT_RAW)), $companies);
// setup the title block
$titleBlock = new CTitleBlock('Tasks', 'applet-48.png', $m, "{$m}.{$a}");
// patch 2.12.04 text to search entry box
if (isset($_POST['searchtext'])) {
    $AppUI->setState('searchtext', $_POST['searchtext']);
}
$search_text = $AppUI->getState('searchtext') ? $AppUI->getState('searchtext') : '';
$search_text = dPformSafe($search_text);
$titleBlock->addCell('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $AppUI->_('Search') . ':');
$titleBlock->addCell('<input type="text" class="text" SIZE="20" name="searchtext"' . ' onChange="document.searchfilter.submit();" value="' . $search_text . '"title="' . $AppUI->_('Search in name and description fields') . '"/><!--<input type="submit" class="button" value=">" title="' . $AppUI->_('Search in name and description fields') . '"/>-->', '', '<form action="?m=tasks" method="post" id="searchfilter">', '</form>');
// Let's see if this user has admin privileges
if (getPermission('admin', 'view')) {
    $titleBlock->addCell();
    $titleBlock->addCell($AppUI->_('User') . ':');
    $q = new DBQuery();
    $q->addTable('users', 'u');
    $q->addTable('contacts', 'con');
    $q->addQuery('user_id');
    $q->addQuery("CONCAT(contact_last_name, ', ', contact_first_name, ' (', user_username, ')')" . ' AS label');
    $q->addOrder('contact_last_name');
    $q->addWhere('u.user_contact = con.contact_id');
    $user_list = $q->loadHashList();
    $titleBlock->addCell(arraySelect($user_list, 'user_id', 'size="1" class="text"' . ' onChange="document.userIdForm.submit();"', $user_id, false, true), '', '<form action="?m=tasks" method="post" name="userIdForm">', '</form>');
}
$titleBlock->addCell();
$titleBlock->addCell($AppUI->_('Company') . '/' . $AppUI->_('Department') . ':');
//get list of all departments, filtered by the list of permitted companies.
开发者ID:hightechcompany,项目名称:dotproject,代码行数:31,代码来源:index.php


示例19: die

<?php

/* SYSTEM $Id: viewmods.php 5585 2007-12-19 23:38:33Z merlinyoda $*/
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$AppUI->savePlace();
$canEdit = getPermission($m, 'edit');
$canRead = getPermission($m, 'view');
if (!$canRead) {
    $AppUI->redirect('m=public&a=access_denied');
}
$hidden_modules = array('public', 'install');
$q = new DBQuery();
$q->addQuery('*');
$q->addTable('modules');
foreach ($hidden_modules as $no_show) {
    $q->addWhere('mod_directory != \'' . $no_show . '\'');
}
$q->addOrder('mod_ui_order');
$modules = db_loadList($q->prepare());
// get the modules actually installed on the file system
$modFiles = $AppUI->readDirs('modules');
$titleBlock = new CTitleBlock('Modules', 'power-management.png', $m, $m . "." . $a);
$titleBlock->addCrumb('?m=system', 'System Admin');
$titleBlock->show();
?>

<table border="0" cellpadding="2" cellspacing="1" width="98%" class="tbl">
<tr>
	<th colspan="2"><?php 
开发者ID:kaz190,项目名称:dotproject,代码行数:31,代码来源:viewmods.php


示例20: 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 (getPermission('links', 'view')) {
    if (getPermission('links', 'edit')) {
        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:klr2003,项目名称:sourceread,代码行数:16,代码来源:tasks_tab.links.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getPermissionLevel函数代码示例发布时间:2022-05-15
下一篇:
PHP getPatientName函数代码示例发布时间: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