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

PHP get_access函数代码示例

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

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



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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Dashboard_Model", "Order_Model", "Orderspace_Model", "Receive_Model"));
     $this->_accessPaket = get_access("PAKET");
     $this->_accessSpace = get_access("SPACE");
 }
开发者ID:shinichi81,项目名称:ams,代码行数:9,代码来源:dashboard.php


示例2: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Backdatereceive_Model", "Order_Model", "Transaction_Model"));
     $this->_access = get_access("BACKDATE_RECEIVE");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:backdate_receive.php


示例3: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Orderspace_Model", "Expiredspace_Model", "Order_Model", "Transaction_Model"));
     $this->_access = get_access("SPACE");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:expired_space.php


示例4: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("Brandcomm_Model", "Transaction_Model"));
     $this->_access = get_access("BRANDCOMM");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:brandcomm.php


示例5: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model("Cpm_Model");
     $this->_access = get_access("CPM");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:10,代码来源:master_cpm.php


示例6: __construct

 public function __construct()
 {
     parent::__construct();
     check_session();
     // jika session habis, redirect ke logout
     $this->load->model(array("PO_Model", "Transaction_Model"));
     $this->load->helper(array('form', 'url'));
     $this->_access = get_access("PO");
     auth($this->_access);
     // autentikasi menu apakah bisa diakses atau tidak
 }
开发者ID:shinichi81,项目名称:ams,代码行数:11,代码来源:po.php


示例7:

            echo $ca['name'];
            ?>
</td>
				<td><?php 
            echo $ca['comand'];
            ?>
</td>
				<td align="center"><a href="?component=menubuilder&section=edit&edit=<?php 
            echo $ca['id'];
            ?>
"><img src="<?php 
            echo $theme_admin;
            ?>
images/user_edit.png" alt="" title="" border="0" /></a></td>
				<?php 
            if (get_access('admin', 'tools', 'del', false)) {
                ?>
				<td align="center"><a href="?component=menubuilder&delete=<?php 
                echo $ca['id'];
                ?>
" class="ask"><img src="<?php 
                echo $theme_admin;
                ?>
images/trash.png" alt="" title="" border="0" /></a></td>
				<?php 
            }
            ?>
				</tr>
		<?php 
        }
        ?>
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:default.php


示例8: defined

<?php

defined('_JEXEC') or die;
if (get_access('admin', 'contact', 'edit')) {
    ?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<script type="text/javascript">

    var markersArray = [];
    // Deletes all markers in the array by removing references to them
    function deleteOverlays() {
        if (markersArray) {
            for (i in markersArray) {
                markersArray[i].setMap(null);
            }
            markersArray.length = 0;
        }
    }
    // Standard google maps function
    function initialize() {
        var myLatlng = new google.maps.LatLng(<?php 
    echo $registry['contact'][0]['coords'];
    ?>
);
        var myOptions = {
            zoom: 10,
            center: myLatlng,
            mapTypeId: google.maps.MapTypeId.MAP
        }
开发者ID:Vatia13,项目名称:funtime,代码行数:30,代码来源:default.php


示例9: defined

<?php

defined('_JEXEC') or die('Restricted access');
if (get_access('admin', 'article', 'edit')) {
    $photo_concurs = false;
    $err = array();
    $id = intval($_GET['edit']);
    $all = $DB->getAll('SELECT #__news.*, #__category.name,#__category.cat_chpu, #__category.design, #__category.type FROM #__news
		LEFT JOIN #__category ON #__category.id=#__news.cat WHERE #__news.id=' . $id);
    if (count($all) > 0) {
        foreach ($all as $num) {
            $info = unserialize($num['info']);
            $copy = unserialize($num['copy']);
            if (!empty($num['thumbs'])) {
                //http://rche.ru/cms/images/1/100/100/1/83341552_ava.png
                $split = explode('/', $num['thumbs']);
                //$img_path='../images/news/prev/0/0/0/'.$split[5];
                $img_path = $num['thumbs'];
                $size = @GetImageSize($num['thumbs']);
                if ($size[0] > 200 or intval($size[0]) == 0) {
                    $w = 200;
                } else {
                    $w = '';
                }
            }
            if ($num['user_block'] > 0) {
                if ($num['user_block'] !== $user->get_property('userID')) {
                    $err[0] = 'error';
                    $err[1] = 'შერჩეული სტატია დაბლოკილია სხვა მომხმარებლის მიერ.';
                }
            }
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:edit.php


示例10: array

//构建登录信息
$login_array = array('username' => $user, 'password' => $pwd, 'referer' => $baseUrl, 'questionid' => $quest, 'answer' => $answ, 'formhash' => $formhash);
//携带cookie提交登录信息
$res = curl_get($loginSubmitUrl, true, true, null, $login_array);
//访问签到页面
$res = curl_get($signPageUrl, true, true);
if ($gbk) {
    $res = iconv('gbk', 'UTF-8//IGNORE', $res);
}
//根据签到页面上的文字来判断今天是否已经签到
if (strpos($res, '您今天已经签到过了或者签到时间还未开始')) {
    $resultStr = '今天已签过到';
} else {
    //获取formhash验证串
    $formhash = get_formhash($res);
    $access = get_access($res);
    //构造签到信息
    $post_data = array('qdmode' => 1, 'formhash' => $formhash, 'qdxq' => $qdxq, 'fastreply' => 0, 'todaysay' => $todaysay, 'access' => $access);
    //提交签到信息
    $res = curl_get($signSubmitUrl, true, true, null, $post_data);
    if ($gbk) {
        $res = iconv('gbk', 'UTF-8//IGNORE', $res);
    }
    if (strpos($res, '签到成功')) {
        $resultStr = '签到成功';
    } elseif (strpos($res, '需要先登录才能继续本操作')) {
        $resultStr = '登录失败!可能需要验证码';
    } else {
        $resultStr = '签到失败';
    }
}
开发者ID:sembrono,项目名称:mz,代码行数:31,代码来源:dzsign.php


示例11: defined

<?php

defined('_JEXEC') or die('Restricted accessA');
if (get_access('admin', 'group', 'edit')) {
    ?>
<h2>Редактировать группу</h2>
<form method="post" action="?component=users&section=group"/>
<input type="hidden" name="event" value="users"/>
<input type="hidden" name="gredit" value="1"/>
<input type="hidden" name="idd" value="<?php 
    echo $registry['groupitem'][0]['id'];
    ?>
"/>
<table class="formadd">
<tr><td class="td1">Название группы</td><td><input class="inputbox" type="text" name="name" value="<?php 
    echo $registry['groupitem'][0]['name'];
    ?>
"/></td></tr>
</table>
<span class="title-table">Права группы. Админпанель.</span>
<table class="formadd">
<tr>
	<td class="td1 w150"></td>
	<td align="center">Просмотр</td>
	<td align="center">Редактирование</td>
	<td align="center">Удаление</td>
	<td align="center">Только свои</td>
</tr>


<tr>
开发者ID:rcheru,项目名称:vk.rche.ru,代码行数:31,代码来源:gredit.php


示例12: defined

<?php

defined('_JEXEC') or die('Restricted access');
if (get_access('admin', 'group', 'view')) {
    ?>
<div class="message"><?php 
    echo $message;
    ?>
</div>
<?php 
    if (count($all) > 0) {
        ?>
	<h2><?php 
        if ($_GET['section'] !== 'group') {
            ?>
მომხმარებლები<?php 
        } else {
            ?>
ჯგუფების უფლებები<?php 
        }
        ?>
</h2>
		<table id="rounded-corner">
		<thead>
		    	<tr>
		        <th scope="col" class="rounded-company">ID</th>
		            <th scope="col" class="rounded">დასახელება</th>
		            <th scope="col" class="rounded-q4">რედ.</th>
		        </tr>
		</thead>
		<tfoot>
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:group.php


示例13: defined

<?php

/**
 *
 * CMS osRealty 2.1.x
 * Autor: Roman Chernyshov
 * E-mail: [email protected]
 * URL: www.osRealty.ru
 *
 */
defined('_JEXEC') or die('Restricted access');
if (get_access('admin', 'tools', 'view', false)) {
    $i = 0;
    if ($_POST['mail'] == 1 or $_POST['mail'] == 3) {
        $subject = strip_tags($_POST['subject']);
        $emailsup = $DB->getOne("SELECT `#__setting`.`value` FROM `#__setting` WHERE `#__setting`.`name`='emailsup'");
        $sql = 'SELECT `#__users`.`password`,`#__users`.`userID`,`#__users`.`email` FROM `#__users` WHERE `#__users`.`alertmail`=1';
        $mailarr = $DB->getAll($sql);
        $i = 0;
        foreach ($mailarr as $mail) {
            $endsub = '<p><a href="http://' . $_SERVER['HTTP_HOST'] . '/com/mail/del/' . $mail['userID'] . '/' . $mail['password'] . '">Отписаться от рассылки.</p>';
            if (email_check($mail['email'])) {
                $m = new Mail();
                // начинаем
                $m->From($emailsup);
                // от кого отправляется почта
                $m->To($mail['email']);
                // кому адресованно
                $m->Subject($subject);
                $m->Body($_POST['text'] . $endsub);
                $m->Priority(3);
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:.model.php


示例14: date

</a></td>
				<td class="tab-cell-1"><?php 
            echo date('d-m-y h:m', $num['date']);
            ?>
</td>
				<td align="center">
				<a href="?component=comment&section=edit&edit=<?php 
            echo $num['id'];
            ?>
"><img src="<?php 
            echo $theme_admin;
            ?>
images/user_edit.png" alt="" title="" border="0" /></a></td>
				</td>
				<?php 
            if (get_access('admin', 'comments', 'del')) {
                ?>
<td align="center"><a href="?component=comment&delete=<?php 
                echo $num['id'];
                ?>
" class="ask"><img src="<?php 
                echo $theme_admin;
                ?>
images/trash.png" alt="" title="" border="0" /></a></td><?php 
            }
            ?>
				</tr>
	        <?php 
        }
        ?>
		    </tbody>
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:default.php


示例15: intval

            $status = intval($_GET['status']);
            if ($DB->execute("UPDATE #__tests SET status='{$status}' WHERE id='{$val}'")) {
                header('location:/apanel/index.php?component=test');
            }
        }
    }
    if (get_access('admin', 'tests', 'del', false)) {
        if (intval($_GET['delete']) > 0) {
            $del = intval($_GET['delete']);
            if ($DB->execute("DELETE FROM #__tests WHERE id='{$del}'")) {
                header('location:/apanel/index.php?component=test');
            }
        }
    }
}
if (get_access('admin', 'tests', 'edit', false)) {
    if ($_GET['section'] == 'add') {
        if ($_POST) {
            $title = PHP_slashes(htmlspecialchars(strip_tags($_POST['title'])));
            $lid = PHP_slashes(htmlspecialchars(strip_tags($_POST['lid'])));
            $img = PHP_slashes(htmlspecialchars(strip_tags($_POST['img'])));
            $question = base64_encode(serialize($_POST['question']));
            $answer = base64_encode(serialize($_POST['answer']));
            $point = base64_encode(serialize($_POST['point']));
            $result = base64_encode(serialize($_POST['result']));
            $date_dd = intval($_POST['date_dd']);
            $date_mm = intval($_POST['date_mm']);
            $date_yy = intval($_POST['date_yy']);
            if ($date_dd > 31) {
                $date_dd = 31;
            }
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:.model.php


示例16: foreach

                $message[0] = "error";
                $message[1] = "რუბრიკაზე მაქსიმალური 4 ბანერი უკვე დამატებულია. თუ გსურთ უკვე დამატებული ბანერის ახლით შეცვლა გთხოვთ გამოიყენოთ რედაქტირების ფუნქცია.";
            }
        } else {
            $message[0] = "error";
            $message[1] = "გთხოვთ აირჩიოთ ბანერი ან ჩაწეროთ ბმული.";
        }
    } else {
        $message[0] = "error";
        $message[1] = "აუცილებელია რუბრიკის არჩევა.";
    }
}
$all = $DB->getAll('SELECT * FROM #__category WHERE podcat=0 && section="post" && stat="0" order by name asc');
$i = 0;
foreach ($all as $nu) {
    $category[$nu['id']][0] = $nu;
    $i++;
}
$all = $DB->getAll('SELECT * FROM #__category WHERE podcat>0 && section="post" && stat="0" order by name asc');
$i = 0;
foreach ($all as $nu) {
    $category[$nu['podcat']][] = $nu;
    $i++;
}
if (get_access('admin', 'banners', 'view', false)) {
    if ($_GET['banner'] == 'del' && $_GET['del'] > 0) {
        if ($DB->execute('DELETE FROM #__banners WHERE id="' . intval($_GET['del']) . '"')) {
            header('location:/apanel/index.php?component=banners');
        }
    }
}
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:.model.php


示例17: header

                        header('location:/apanel/index.php?component=banner&message[0]=valid&message[1]=საბანერო ადგილის რედაქტირება წარმატებით დასრულდა');
                    } else {
                        header('location:/apanel/index.php?component=banner&message[0]=error&message[1]=შეცდომა ვერ ხერხდება საბანერო ადგილის რედაქტირება');
                    }
                } else {
                    $message[0] = 'error';
                    $message[1] = 'ჩაწერეთ #F1 საბანერო ადგილის დასახელება მაგ:F1';
                }
            } else {
                $message[0] = 'error';
                $message[1] = 'გთხოვთ აირჩიოთ რუბრიკა';
            }
        }
    }
}
if (get_access('admin', 'banners', 'edit', false)) {
    if (intval($_GET['del']) > 0) {
        $title = $DB->getOne("SELECT title FROM #__banner_list WHERE id='" . intval($_GET['del']) . "'");
        $DB->execute("DELETE FROM #__banner_list WHERE id='" . intval($_GET['del']) . "'");
        $LOG->saveLog($user->get_property('userID'), 'საბანერო პოზიციის წაშლა / ID: ' . intval($_GET['del']) . ' TITLE: ' . $title);
        header('location:/apanel/index.php?component=banner&message[0]=valid&message[1]=ბანერი წარმატებით წაიშალა.');
    }
    if (intval($_GET['place']) > 0) {
        $title = $DB->getOne("SELECT title FROM #__banner_place WHERE id='" . intval($_GET['place']) . "'");
        $DB->execute("DELETE FROM #__banner_place WHERE id='" . intval($_GET['place']) . "'");
        $LOG->saveLog($user->get_property('userID'), 'საბანერო პოზიციის წაშლა / ID: ' . intval($_GET['place']) . ' TITLE: ' . $title);
        header('location:/apanel/index.php?component=banner&section=addplace&message[0]=valid&message[1]=საბანერო პოზიცია წარმატებით წაიშალა.');
    }
}
if ($_GET['section'] == 'add' or $_GET['section'] == 'edit') {
    if ($_GET['section'] == 'edit') {
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:.model.php


示例18: modify

/**
 *  Modifies $fields in $table with values $fieldvalues where id=$id
 *
 * Returns true on succes, false on failure
 * Fieldvalues must be an associative array containing all the $fields to be added.
 * If a field is not present in $fieldvalues, it will be set to NULL.  
 * The entry 'id' in $fields will be ignored.
 * Fields lastmodby and lastmoddate will be automatically set
 */
function modify($db, $table, $fields, $fieldvalues, $id, $USER, $tableid)
{
    if (!may_write($db, $tableid, $id, $USER)) {
        return false;
    }
    // delete all entries in trust related to this record first
    $db->Execute("DELETE FROM trust WHERE tableid='{$tableid}' and recordid='{$id}'");
    // then add back trusted users entered on the form
    if (is_array($fieldvalues['trust_read'])) {
        foreach ($fieldvalues['trust_read'] as $userid) {
            $db->Execute("INSERT INTO trust VALUES ('{$tableid}','{$id}','{$userid}','r')");
        }
    }
    if (is_array($fieldvalues['trust_write'])) {
        foreach ($fieldvalues['trust_write'] as $userid) {
            $db->Execute("INSERT INTO trust VALUES ('{$tableid}','{$id}','{$userid}','w')");
        }
    }
    $query = "UPDATE {$table} SET ";
    $column = strtok($fields, ',');
    while ($column) {
        if (!($column == 'id' || $column == 'date' || $column == 'ownerid' || is_array($fieldvalues[$column]))) {
            $test = true;
            if (in_array($column, array('gr', 'gw', 'er', 'ew'))) {
                $fieldvalues[$column] = get_access($fieldvalues, $column);
            }
            if ($column == 'lastmodby') {
                $fieldvalues['lastmodby'] = $USER['id'];
            }
            if ($column == 'lastmoddate') {
                $fieldvalues['lastmoddate'] = time();
            }
            if (isset($fieldvalues[$column]) && strlen($fieldvalues[$column]) > 0) {
                // escape all nasty stuff
                $query .= "{$column}='" . addslashes($fieldvalues[$column]) . "',";
            } else {
                $query .= "{$column}=NULL,";
            }
        }
        $column = strtok(',');
    }
    $query[strrpos($query, ',')] = ' ';
    if ($test) {
        $query .= " WHERE id='{$id}'";
        $result = $db->Execute($query);
        if ($result) {
            if (function_exists('plugin_modify')) {
                plugin_modify($db, $tableid, $id);
            }
            return true;
        } else {
            echo "<h4>Error making the requested modifications.  </h4>\n";
        }
    }
}
开发者ID:nicost,项目名称:phplabware,代码行数:64,代码来源:db_inc.php


示例19: defined

<?php

defined('_JEXEC') or die('Restricted access');
if (get_access('admin', 'banners', 'edit')) {
    ?>
<h3>საბანერო ადგილი</h3>
<?php 
    if (!empty($message[0])) {
        ?>
    <div class="<?php 
        echo $message[0];
        ?>
_box">
        <?php 
        for ($i = 1; $i <= count($message); $i++) {
            ?>
            <?php 
            echo $message[$i];
            ?>
        <?php 
        }
        ?>
    </div>
<?php 
    }
    if ($registry['banner'][0]['id'] > 0) {
        ?>
<form method="post" action="" />
<table class="formadd">
    <tr><td class="td1">რუბრიკა</td><td>
            <select name="cat" class="input_150">
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:editplace.php


示例20:

?>

<?php 
if (!empty($message[0])) {
    ?>
     <div class="<?php 
    echo $message[0];
    ?>
_box">
	<?php 
    echo $message[1];
    ?>
     </div>
<?php 
}
if (get_access('admin', 'user', 'edit')) {
    ?>

<?php 
    if ($message[0] == 'valid') {
        ?>
	<a href="?component=users">ყველა მომხმარებელი</a><br/>
	<a href="?component=users&section=add">მომხმარებლის დამატება</a><br/>
<?php 
    } else {
        ?>
		<h2>მომხმარებლის დამატება: </h2>

		<form method="post" action="" name="adduser" enctype="multipart/form-data"/>

		<input type="hidden" name="event" value="users"/>
开发者ID:Vatia13,项目名称:funtime,代码行数:31,代码来源:add.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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