本文整理汇总了PHP中Gallery::user_screen_privielge_allowed方法的典型用法代码示例。如果您正苦于以下问题:PHP Gallery::user_screen_privielge_allowed方法的具体用法?PHP Gallery::user_screen_privielge_allowed怎么用?PHP Gallery::user_screen_privielge_allowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gallery
的用法示例。
在下文中一共展示了Gallery::user_screen_privielge_allowed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: base_url
<?php
$this->load->view('admin/includes/header');
?>
<form id="frm_display_data" name="frm_display_data" action="<?php
echo base_url() . $this->lang->lang() . '/' . ADMIN;
?>
/gallery/delete_all" method="post">
<div class="form-actions">
<?php
$this_object = new Gallery();
if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_delete)) {
?>
<a class='btn btn-danger' href="javascript: submitform()" class="bt_red" onclick="return delete_all_confirm('<?php
echo $this->lang->lang();
?>
');">
<i class='icon-trash icon-white'></i>
<?php
echo $this->lang->line('btn_delete_all');
?>
</a>
<?php
}
if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_add)) {
?>
<a class='btn btn-info' href="<?php
echo base_url() . $this->lang->lang() . '/' . ADMIN;
?>
示例2: display_data_table
public function display_data_table($array_of_data, $link_to_screen = '', $object)
{
echo "\n\t\t<script type='text/javascript' src='" . base_url() . "js/includes/functions.js' > </script>\n\t\t<script type='text/javascript' src='" . base_url() . "js/admin/gallery/form.js' > </script>\n\t\t";
//echo "<table style=' width:962px; table-layout:fixed;' border='0' cellpadding='3' cellspacing='1'>";
echo "<table class='table table-striped table-bordered bootstrap-datatable datatable'>";
$index = 0;
$color_row = '';
$height_row = '';
foreach ($array_of_data as $record) {
$current_row_id = 0;
if ($index == 0) {
echo "<thead><tr>";
foreach ($record as $key => $value) {
if ($key == 'id') {
echo "<th > <input type='checkbox' name='chk_all' id='chk_all' onchange='checkUncheck_DisplayDataForm()' /> </th> ";
} else {
if ($key == 'approved') {
if ($object->session->userdata('user_session')->admin == 1) {
echo "<th >" . lang($key) . " </th>";
}
} else {
if ($key != 'are_canceled') {
echo "<th >" . lang($key) . " </th>";
}
}
}
}
echo "<th >" . lang('btn_actions') . "</th>";
echo "</tr></thead>";
}
echo "<tbody><tr>";
foreach ($record as $key => $value) {
if ($index % 2 == 1) {
//$color_row='#e6f6fd';
$height_row = '30px';
} else {
//$color_row='#FFFFFF';
$height_row = '25px';
}
$color_row = '';
if ($key == 'id') {
echo "<td ><input type='checkbox' id='chk_current_row[]' name='chk_current_row[]' value='{$value}' ></td>";
$current_row_id = $value;
} else {
if ($key == 'are_canceled') {
if ($value == 0) {
$what_will = 1;
$icon = "cancel_for_table.png";
$title = $object->lang->line('btn_cancel');
} else {
$what_will = 0;
$icon = "uncancel_for_table.png";
$title = $object->lang->line('btn_uncancel');
}
//$cancel_link="<a href='$link_to_screen/cancel_uncancel/$current_row_id/$what_will/view' ><img src='".base_url()."/images/icons/$icon' width='15'; height='15' title='".$title."' /></a>";
} else {
if ($key == 'name') {
$width_row = '210px';
echo "<td class='center'> <a href='{$link_to_screen}/form/{$current_row_id}/view' >{$value}</a> </td>";
} else {
if ($key == 'banner_image_thumb_selected') {
$width_row = '210px';
echo "<td class='center' > <img src='" . base_url() . $value . "' title='{$value}' width='100px' height='50px' /> </td>";
} else {
if ($key == 'approved') {
if ($object->session->userdata('user_session')->admin == 1) {
if ($value == 0) {
echo "<td class='center'> <a href='{$link_to_screen}/approve/{$current_row_id}/1' ><span class='label label-warning'>" . lang('no') . "</span></a> </td>";
} else {
echo "<td class='center'> <a href='{$link_to_screen}/approve/{$current_row_id}/0' ><span class='label label-success'>" . lang('yes') . "</span></a> </td>";
}
}
} else {
$width_row = '150px';
echo "<td class='center'> {$value} </td>";
}
}
}
}
}
}
echo "\n\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t\t<a class='btn btn-success' href='{$link_to_screen}/form/{$current_row_id}/view'>\n\t\t\t\t\t\t\t\t\t\t<i class='icon-zoom-in icon-white'></i> \n\t\t\t\t\t\t\t\t\t\t\t" . lang('btn_view') . " \n\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t\t\t\t\t";
$this_object = new Gallery();
if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_edit)) {
echo "<a class='btn btn-info' href='{$link_to_screen}/form/{$current_row_id}/edit'>\n\t\t\t\t\t\t\t\t\t\t<i class='icon-edit icon-white'></i> \n\t\t\t\t\t\t\t\t\t\t" . lang('btn_edit') . " \n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t";
}
if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_delete)) {
echo "<a class='btn btn-danger' href='{$link_to_screen}/delete/{$current_row_id}' onclick='return delete_confirm(\"" . $object->lang->lang() . "\")'>\n\t\t\t\t\t\t\t\t\t\t<i class='icon-trash icon-white'></i> \n\t\t\t\t\t\t\t\t\t\t" . lang('btn_delete') . "\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t";
}
echo "</td></tr>";
$index = $index + 1;
}
echo "</tbody></table>";
}