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


PHP permission函数代码示例

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


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

示例1: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:7,代码来源:payroll_tax_progressive.php

示例2: fvote

function fvote($id, $ajax = false)
{
    global $db, $balken_vote_menu, $prev;
    if (!permission("votes")) {
        $intern = ' AND intern = 0';
    }
    $qry = db("SELECT * FROM " . $db['votes'] . "  WHERE id = '" . $id . "' " . $intern . "");
    $get = _fetch($qry);
    if (_rows($qry)) {
        $qryv = db("SELECT * FROM " . $db['vote_results'] . " WHERE vid = '" . $get['id'] . "' ORDER BY id ASC");
        while ($getv = _fetch($qryv)) {
            $stimmen = sum($db['vote_results'], " WHERE vid = '" . $get['id'] . "'", "stimmen");
            if ($stimmen != 0) {
                if (ipcheck("vid_" . $get['id']) || isset($_COOKIE[$prev . "vid_" . $get['id']]) || $get['closed'] == 1) {
                    $percent = round($getv['stimmen'] / $stimmen * 100, 1);
                    $rawpercent = round($getv['stimmen'] / $stimmen * 100, 0);
                    $balken = show(_votes_balken, array("width" => $rawpercent));
                    $votebutton = "";
                    $results .= show("forum/vote_results", array("answer" => re($getv['sel']), "percent" => $percent, "stimmen" => $getv['stimmen'], "balken" => $balken));
                } else {
                    $votebutton = '<input id="contentSubmitFVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />';
                    $results .= show("forum/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel'])));
                }
            } else {
                $votebutton = '<input id="contentSubmitFVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />';
                $results .= show("forum/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel'])));
            }
        }
        $qryf = db("SELECT id,kid FROM " . $db['f_threads'] . " WHERE vote = '" . $get['id'] . "'");
        $getf = _fetch($qryf);
        $vote = show("forum/vote", array("titel" => re($get['titel']), "vid" => $get['id'], "fid" => $getf['id'], "kid" => $getf['kid'], "umfrage" => _forum_vote, "results" => $results, "votebutton" => $votebutton, "stimmen" => $stimmen));
    }
    return empty($vote) ? '' : ($ajax ? $vote : '<div id="navFVote">' . $vote . '</div>');
}
开发者ID:nopuls,项目名称:dzcp,代码行数:34,代码来源:fvote.php

示例3: __construct

 function __construct()
 {
     parent::__construct();
     if (!permission("logs", "extra")) {
         redirect("admin");
     }
 }
开发者ID:ultraauchz,项目名称:asean_cultural_mapping,代码行数:7,代码来源:logs.php

示例4: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     $this->data['period'] = getAll('payroll_period');
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:8,代码来源:medical.php

示例5: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     $this->data['component_type'] = $this->payroll->get_component_type();
     $this->data['tax_component'] = $this->payroll->get_tax_component();
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:mazhters,项目名称:ci2,代码行数:9,代码来源:payroll_component.php

示例6: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     $filter = array('is_deleted' => 'where/0');
     $this->data['p_component'] = $list_component = $this->all_model->GetAll('payroll_component', $filter);
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:mazhters,项目名称:ci2,代码行数:9,代码来源:payroll_group.php

示例7: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     $year_now = date('Y');
     $this->data['period'] = $this->payroll->render_periode($year_now);
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:9,代码来源:payroll_monthly_report.php

示例8: component_permission

function component_permission($json_data)
{
    global $data;
    if (!empty($json_data['permissions']) && is_array($json_data['permissions'])) {
        $data['permissions'] = array();
        foreach ($json_data['permissions'] as $type) {
            $data['permissions'][$type] = permission($type);
        }
    }
}
开发者ID:artem0793,项目名称:orangutan,代码行数:10,代码来源:permission.php

示例9: delete

 public function delete($id)
 {
     if (permission("reports", "extra")) {
         if ($id) {
             $data = new Result($id);
             $data->delete();
             save_logs('delete', $id);
         }
     }
     redirect("admin/reports");
 }
开发者ID:ultraauchz,项目名称:asean_cultural_mapping,代码行数:11,代码来源:reports.php

示例10: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     $year_now = date('Y');
     $this->data['period'] = $this->payroll->render_periode($year_now);
     $this->data['period'] = getAll('payroll_period', array('year' => 'order/asc', 'month' => 'order/asc'));
     $this->data['ireg_comp'] = GetAllSelect('payroll_component', 'id, title', array('is_annualized' => 'where/0'));
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:11,代码来源:payroll_setup.php

示例11: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     $filter = array('is_deleted' => 'where/0', 'is_active' => 'where/1', 'component_type_id' => 'order/asc', 'code' => 'order/asc');
     $this->data['p_component'] = $list_component = getAll('payroll_component', $filter)->result_array();
     $filter = array('status_cd' => 'where/normal');
     $this->data['job_class'] = $this->all_model->GetAll('hris_job_class', $filter, 'job_class_level');
     //lastq();
     permission();
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:12,代码来源:payroll_group.php

示例12: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     permission();
     $year_now = date('Y');
     $this->data['period'] = $this->setup->render_periode($year_now);
     $this->data['session'] = getAll('hris_global_sess', array('id' => 'order/desc'));
     $this->data['ptkp'] = options_row('payroll', 'get_ptkp', 'id', 'title', '-- Choose Tax Status --');
     $this->data['currency'] = options_row('payroll', 'get_currency', 'id', 'title', '-- Choose Currency --');
     $this->data['tax_method'] = options_row('payroll', 'get_tax_method', 'id', 'title', '-- Choose Tax Method --');
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:13,代码来源:payroll_master.php

示例13: edit

 function edit()
 {
     $session_id = $this->input->post('session_id');
     permission();
     $filter = array('session_id' => 'where/' . $session_id);
     $num_rows = getAll('payroll_umk', $filter)->num_rows();
     //lastq();
     $data = array('value' => str_replace(',', '', $this->input->post('value')), 'session_id' => $session_id);
     if ($num_rows > 0) {
         $this->db->where('session_id', $session_id)->update('payroll_umk', $data);
     } else {
         $this->db->insert('payroll_umk', $data);
     }
     return true;
 }
开发者ID:pay-test,项目名称:ci2,代码行数:15,代码来源:payroll_umk.php

示例14: index

 function index()
 {
     $this->data['title'] = ucfirst($this->title);
     $this->data['page_title'] = $this->page_title;
     permission();
     $year_now = date('Y');
     //$this->data['period'] = $this->setup->render_periode($year_now);
     $this->data['period'] = getAll('payroll_period', array('year' => 'order/asc', 'month' => 'order/asc'));
     $this->data['options_group'] = options_row('payroll', 'get_group', 'id', 'title', '-- Choose Payroll Group --');
     $filter = array('is_deleted' => 'where/0', 'is_active' => 'where/1');
     $this->data['component'] = getAll('payroll_component', $filter)->result();
     $this->data['ptkp'] = options_row('payroll', 'get_ptkp', 'id', 'title', '-- Choose Tax Status --');
     $this->data['currency'] = options_row('payroll', 'get_currency', 'id', 'title', '-- Choose Currency --');
     $this->data['tax_method'] = options_row('payroll', 'get_tax_method', 'id', 'title', '-- Choose Tax Method --');
     $this->_render_page($this->filename, $this->data);
 }
开发者ID:pay-test,项目名称:ci2,代码行数:16,代码来源:monthly_income.php

示例15: newsticker

function newsticker()
{
    global $db, $allowHover;
    if (!permission("intnews")) {
        $int = "AND intern = 0";
    }
    $qry = db("SELECT id,titel,autor,datum,kat FROM " . $db['news'] . " WHERE public = '1'AND datum <= '" . time() . "' " . $int . " ORDER BY id DESC LIMIT 20");
    while ($get = _fetch($qry)) {
        if ($allowHover == 1) {
            $getkat = _fetch(db("SELECT kategorie FROM " . $db['newskat'] . " WHERE id = '" . $get['kat'] . "'"));
            $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['titel'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _autor . ':</b></td><td>' . rawautor($get['autor']) . '</td></tr><tr><td><b>' . _news_admin_kat . ':</b></td><td>' . jsconvert(re($getkat['kategorie'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['newscomments'], "WHERE news = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $news .= '<a href="../news/?action=show&amp;id=' . $get['id'] . '" ' . $info . '>' . re($get['titel']) . '</a> | ';
    }
    return show("menu/newsticker", array("news" => $news));
}
开发者ID:nopuls,项目名称:dzcp,代码行数:16,代码来源:newsticker.php


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