本文整理汇总了PHP中Permissions::is_authorized方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::is_authorized方法的具体用法?PHP Permissions::is_authorized怎么用?PHP Permissions::is_authorized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::is_authorized方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: email
public function email()
{
$queryString = $this->input->post_get('emailQuery');
if (!Permissions::is_authorized(Permissions::USER_ADMIN)) {
echo "{}";
return;
}
if (empty($queryString)) {
echo "{}";
return;
}
$results = array();
$this->db->select('email');
$this->db->select('fullname');
$this->db->like('email', $queryString);
$this->db->or_like('fullname', $queryString);
$query = $this->db->get('users', 5)->result();
foreach ($query as $row) {
$result['value'] = $row->email;
$result['label'] = '(' . $row->fullname . ') ' . $row->email;
$results[] = $result;
}
$to_send = json_encode($results);
log_message('debug', $to_send);
echo $to_send;
}
示例2:
"><?php
echo $campaign->name;
?>
</a>
</h3>
<h4><?php
echo $campaign->description;
?>
</h4>
<h5>Expires on <?php
echo $campaign->expiry_date;
?>
</h5>
<?php
if (Permissions::is_authorized(Permissions::CLOTHING_ADMIN)) {
?>
<p>
<a href="/clothing/listview/<?php
echo $campaign->id;
?>
">View List</a>
</p>
<?php
}
?>
<?php
}
}
示例3:
<?php
if (Permissions::is_authorized(Permissions::CLOTHING_ADMIN)) {
?>
<div class="row">
<div class="col">
<p>
<a href="/clothing/listview/">Clothing Admin</a>
</p>
</div>
</div>
<?php
}
?>
<?php
if (Permissions::is_authorized(Permissions::MAILER_ADMIN)) {
?>
<div class="row">
<div class="col">
<p>
<a href="/mailer">Batch Mailing</a>
</p>
</div>
</div>
<?php
}
?>
</div>
示例4: defined
<?php
defined('BASEPATH') or exit('No direct script access allowed');
if (!Permissions::is_authorized(Permissions::USER_CONFIRMED)) {
?>
<div class="row">
<div class="col alert alert-warning">
<p>
<em>NOTE:</em> Your account hasn't yet been confirmed by the committee so your features might be slightly limited
until it is. It'll be done soon, no worries!
</p>
</div>
</div>
<?php
}
示例5: is_logged_in
public static function is_logged_in()
{
return Permissions::is_authorized(0x0);
}
示例6:
?>
<?php
if (Permissions::is_authorized(Permissions::PORTFOLIO_ADMIN)) {
?>
<div class="row">
<div class="col">
<p>Portfolio Admin</p>
</div>
</div>
<?php
}
?>
<?php
if (Permissions::is_authorized(Permissions::BATCH_USER_CREATE)) {
?>
<div class="row">
<div class="col">
<a href="/batch/">Batch User Creation</a>
</div>
</div>
<?php
}
?>
</div>
<?php
$this->load->view('include/footer.php');
$this->load->view('include/bootstrapjs.php');