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

PHP permission函数代码示例

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

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



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


示例16: l_news

function l_news()
{
    global $db, $maxlnews, $lnews, $allowHover;
    if (!permission("intnews")) {
        $int = "AND intern = 0";
    }
    $qry = db("SELECT id,titel,autor,datum,kat,public,timeshift FROM " . $db['news'] . "\n               WHERE public = 1\n\t\t\t\t\t\t\t AND datum <= " . time() . "\n\t\t\t         " . $int . "\n               ORDER BY id DESC\n               LIMIT " . $maxlnews . "");
    while ($get = _fetch($qry)) {
        $qrykat = db("SELECT kategorie FROM " . $db['newskat'] . "\n                    WHERE id = '" . $get['kat'] . "'");
        $getkat = _fetch($qrykat);
        if ($allowHover == 1) {
            $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()"';
        }
        $l_news .= show("menu/last_news", array("id" => $get['id'], "titel" => re(cut($get['titel'], $lnews)), "datum" => date("d.m.Y", $get['datum']), "info" => $info));
    }
    return empty($l_news) ? '' : '<table class="navContent" cellspacing="0">' . $l_news . '</table>';
}
开发者ID:nopuls,项目名称:dzcp,代码行数:17,代码来源:l_news.php


示例17: dir_list

function dir_list($dir)
{
    if ($dir[strlen($dir) - 1] != '/') {
        $dir .= '/';
    }
    if (!is_dir($dir)) {
        return array();
    }
    $dir_handle = opendir($dir);
    $dir_objects = array();
    while ($object = readdir($dir_handle)) {
        if (!in_array($object, array('.', '..'))) {
            $filename = $dir . $object;
            $file_object = array('name' => $object, 'size' => filesize($filename), 'perm' => permission($filename), 'type' => filetype($filename), 'time' => date("d F Y H:i:s", filemtime($filename)));
            $dir_objects[] = $file_object;
        }
    }
    return $dir_objects;
}
开发者ID:royalswe,项目名称:yas26,代码行数:19,代码来源:filelist.inc.php


示例18: shout

function shout($ajax = 0)
{
    global $db, $maxshout, $lshouttext, $lshoutnick, $shout_max_zeichen, $userid, $chkMe;
    $qry = db("SELECT * FROM " . $db['shout'] . "\n               ORDER BY id DESC LIMIT " . $maxshout . "");
    $i = 1;
    while ($get = _fetch($qry)) {
        $class = $color % 2 ? "navShoutContentFirst" : "navShoutContentSecond";
        $color++;
        if (permission("shoutbox")) {
            $delete = '<a href="../shout/?action=admin&amp;do=delete&amp;id=' . $get['id'] . '" onclick="return(DZCP.del(\'' . _confirm_del_shout . '\'))"><img src="../inc/images/delete_small.gif" title="' . _button_title_del . '" alt="' . _button_title_del . '" /></a>';
        } else {
            $delete = "";
        }
        $is_num = preg_match("#\\d#", $get['email']);
        if ($is_num && !check_email($get['email'])) {
            $nick = autor($get['email'], "navShout");
        } else {
            $nick = '<a class="navShout" href="mailto:' . eMailAddr($get['email']) . '" title="' . $get['nick'] . '">' . cut($get['nick'], $lshoutnick) . '</a>';
        }
        $show .= show("menu/shout_part", array("nick" => $nick, "datum" => date("j.m.Y H:i", $get['datum']) . _uhr, "text" => bbcode(wrap(re($get['text']), $lshouttext)), "class" => $class, "del" => $delete));
        $i++;
    }
    if (settings('reg_shout') == 1 && $chkMe == 'unlogged') {
        $dis = ' style="text-align:center;cursor:wait" disabled="disabled"';
        $dis1 = ' style="cursor:wait;color:#888" disabled="disabled"';
        $only4reg = _shout_must_reg;
    } else {
        if ($chkMe == "unlogged") {
            $form = show("menu/shout_form", array("dis" => $dis));
            $sec = show("menu/shout_antispam", array("help" => _login_secure_help, "dis" => $dis));
        } else {
            $form = autor($userid, "navShout");
        }
    }
    $add = show("menu/shout_add", array("form" => $form, "t_zeichen" => _zeichen, "noch" => _noch, "dis1" => $dis1, "dis" => $dis, "only4reg" => $only4reg, "security" => $sec, "zeichen" => $shout_max_zeichen));
    $shout = show("menu/shout", array("shout" => $show, "shoutbox" => _shoutbox_head, "archiv" => _shoutbox_archiv, "add" => $add));
    return empty($ajax) ? '<table class="navContent" cellspacing="0">' . $shout . '</table>' : $show;
}
开发者ID:nopuls,项目名称:dzcp,代码行数:38,代码来源:shout.php


示例19: menu_execute

function menu_execute($menu)
{
    $arguments = array();
    if (permission($menu['access'])) {
        if (!empty($menu['file'])) {
            include DROOT . '/src/' . $menu['file'];
        }
        if (isset($menu['args'])) {
            foreach ($menu['args'] as $key) {
                $arguments[] = arg($key);
            }
        }
        if (isset($menu['jsonData'])) {
            $request_body = file_get_contents('php://input');
            if (!empty($request_body)) {
                array_unshift($arguments, json_decode($request_body, TRUE));
            }
        }
        call_user_func_array($menu['callback'], $arguments);
    } else {
        header('HTTP/1.1 403 Forbidden');
    }
}
开发者ID:artem0793,项目名称:orangutan,代码行数:23,代码来源:menu.php


示例20: strtotime

<?php

// Authentifizierung
if (isset($_COOKIE["nickname"]) && isset($_COOKIE["password"]) && login($_COOKIE["nickname"], $_COOKIE["password"]) && permission($_COOKIE["nickname"], "time_recording")) {
    if (isset($_GET["section"]) && $_GET["section"] == "delete") {
        $sql = "DELETE FROM time_recording WHERE id = " . $_GET["id"] . ";";
        if ($conn->query($sql)) {
            echo "Datensatz gelöscht.";
        } else {
            echo $conn->error;
        }
    }
    // Daten einfügen nachMitarbeiter
    if (isset($_POST["job"]) && $_POST["start"] != "" && $_POST["end"] != "") {
        $zeit1 = strtotime($_POST["start"]);
        $zeit2 = strtotime($_POST["end"]);
        $difference = ($zeit2 - $zeit1) / 60 / 60;
    } elseif (isset($_POST["job"])) {
        $difference = $_POST["difference"];
    }
    if (isset($_POST["formular"]) && $_POST["formular"] == "nachMitarbeiterFormular" && isset($_POST["job"])) {
        $sql = "INSERT INTO time_recording (employee, job, project, date, start, end, difference) VALUES ('" . $_POST["mitarbeiter"] . "','" . $_POST["job"] . "','" . $_POST["project"] . "','" . preg_replace('#^(\\d{2})\\.(\\d{2})\\.(\\d{4})$#', '\\3-\\2-\\1', $_POST["date"]) . "','" . $_POST["start"] . "','" . $_POST["end"] . "','" . $difference . "');";
        $conn->query($sql) or die($conn->error);
    }
    // Daten einfügen nachProjekt
    if (isset($_POST["formular"]) && $_POST["formular"] == "nachProjektFormular") {
        $anz = count($_POST["employee"]);
        for ($i = 0; $i < $anz; $i++) {
            $sql = "INSERT INTO time_recording (employee, job, project, date, start, end, difference) VALUES ('" . $_POST["employee"][$i] . "','" . $_POST["job"] . "','" . $_POST["project"] . "','" . preg_replace('#^(\\d{2})\\.(\\d{2})\\.(\\d{4})$#', '\\3-\\2-\\1', $_POST["date"]) . "','" . $_POST["start"] . "','" . $_POST["end"] . "',{$difference});";
            $conn->query($sql);
        }
开发者ID:oburger,项目名称:TaskERP,代码行数:31,代码来源:time_recording.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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