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


PHP utility::havePrivilege方法代码示例

本文整理汇总了PHP中utility::havePrivilege方法的典型用法代码示例。如果您正苦于以下问题:PHP utility::havePrivilege方法的具体用法?PHP utility::havePrivilege怎么用?PHP utility::havePrivilege使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在utility的用法示例。


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

示例1: define

define('INDEX_AUTH', '1');
if (!defined('SENAYAN_BASE_DIR')) {
    // main system configuration
    require '../../../sysconfig.inc.php';
    // start the session
    require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
}
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/simbio_dbop.inc.php';
// privileges checking
$can_read = utility::havePrivilege('master_file', 'r');
$can_write = utility::havePrivilege('master_file', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You don\'t have enough privileges to view this section') . '</div>');
}
/* RECORD OPERATION */
if (isset($_POST['saveData']) and $can_read and $can_write) {
    $gmdCode = trim(strip_tags($_POST['gmdCode']));
    $gmdName = trim(strip_tags($_POST['gmdName']));
    // check form validity
    if (empty($gmdCode) or empty($gmdName)) {
        utility::jsAlert(__('GMD Code And Name can\'t be empty'));
        exit;
    } else {
        $data['gmd_code'] = $dbs->escape_string($gmdCode);
        $data['gmd_name'] = $dbs->escape_string($gmdName);
        $data['input_date'] = date('Y-m-d');
开发者ID:ridorido,项目名称:s3st15_matoa,代码行数:31,代码来源:index.php

示例2: do_checkIP

// main system configuration
require '../../../sysconfig.inc.php';
// IP based access limitation
require LIB_DIR . 'ip_based_access.inc.php';
do_checkIP('smc');
do_checkIP('smc-serialcontrol');
// start the session
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_element.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/simbio_dbop.inc.php';
require MODULES_BASE_DIR . 'serial_control/serial_base_lib.inc.php';
// privileges checking
$can_read = utility::havePrivilege('serial_control', 'r');
$can_write = utility::havePrivilege('serial_control', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You are not authorized to view this section') . '</div>');
}
// page title
$page_title = 'Kardex List';
$serialID = 0;
if (isset($_GET['serialID'])) {
    $serialID = (int) $_GET['serialID'];
}
if (isset($_POST['serialID'])) {
    $serialID = (int) $_POST['serialID'];
}
// start content buffering
ob_start();
$serial = new serial($dbs, $serialID);
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:kardex.php

示例3: die

 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
/* Item barcode print */
// main system configuration
require '../../../sysconfig.inc.php';
// start the session
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/simbio_dbop.inc.php';
// privileges checking
$can_read = utility::havePrivilege('bibliography', 'r');
if (!$can_read) {
    die('<div class="errorBox">' . __('You are not authorized to view this section') . '</div>');
}
$max_print = 50;
/* RECORD OPERATION */
if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
    if (!$can_read) {
        die;
    }
    if (!is_array($_POST['itemID'])) {
        // make an array
        $_POST['itemID'] = array((int) $_POST['itemID']);
    }
    // loop array
    if (isset($_SESSION['barcodes'])) {
开发者ID:purwoko,项目名称:slims3-stable15-jquery,代码行数:31,代码来源:item_barcode_generator.php

示例4: die

    // main system configuration
    require '../../../sysconfig.inc.php';
    // start the session
    require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
}
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/simbio_dbop.inc.php';
require SIMBIO_BASE_DIR . 'simbio_UTILS/simbio_date.inc.php';
require SIMBIO_BASE_DIR . 'simbio_FILE/simbio_file_upload.inc.php';
// privileges checking
$can_read = utility::havePrivilege('membership', 'r');
$can_write = utility::havePrivilege('membership', 'w');
if (!$can_read) {
    die('<div class="errorBox">You dont have enough privileges to view this section</div>');
}
/* member update process */
if (isset($_POST['saveData']) and $can_read and $can_write) {
    // check form validity
    $memberID = trim($_POST['memberID']);
    $memberName = trim($_POST['memberName']);
    $mpasswd1 = trim($_POST['memberPasswd']);
    $mpasswd2 = trim($_POST['memberPasswd2']);
    if (empty($memberID) or empty($memberName)) {
        utility::jsAlert(__('Member ID and Name can\'t be empty'));
        //mfc
        exit;
    } else {
开发者ID:jgoegelein,项目名称:s3st13,代码行数:31,代码来源:index.php

示例5: do_checkIP

}
// IP based access limitation
require LIB_DIR . 'ip_based_access.inc.php';
do_checkIP('smc');
do_checkIP('smc-reporting');
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
// PHPLOT Library
if (file_exists(LIB_DIR . 'phplot' . DIRECTORY_SEPARATOR . 'phplot.php')) {
    require LIB_DIR . 'phplot' . DIRECTORY_SEPARATOR . 'phplot.php';
} else {
    die;
}
// privileges checking
$can_read = utility::havePrivilege('reporting', 'r');
$can_write = utility::havePrivilege('reporting', 'w');
if (!$can_read) {
    die;
}
/**
 * Function to generate random color
 * Taken from http://www.jonasjohn.de/snippets/php/random-color.htm
 * Licensed in Public Domain
 */
function generateRandomColors()
{
    @mt_srand((double) microtime() * 1000000);
    $_c = '';
    while (strlen($_c) < 6) {
        $_c .= sprintf("%02X", mt_rand(0, 255));
    }
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:charts_report.php

示例6: define

define('DB_ACCESS', 'fa');
// start the session
require '../../../sysconfig.inc.php';
// IP based access limitation
require LIB . 'ip_based_access.inc.php';
do_checkIP('smc');
do_checkIP('smc-bibliography');
require SB . 'admin/default/session.inc.php';
require SB . 'admin/default/session_check.inc.php';
require SIMBIO . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO . 'simbio_DB/simbio_dbop.inc.php';
require LIB . 'modsxmlsenayan.inc.php';
// privileges checking
$can_read = utility::havePrivilege('bibliography', 'r');
$can_write = utility::havePrivilege('bibliography', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You are not authorized to view this section') . '</div>');
}
/* RECORD OPERATION */
if (isset($_POST['saveResults']) && isset($_POST['p2precord']) && isset($_POST['p2pserver_save'])) {
    require MDLBS . 'bibliography/biblio_utils.inc.php';
    $p2pserver = trim($_POST['p2pserver_save']);
    $gmd_cache = array();
    $publ_cache = array();
    $place_cache = array();
    $lang_cache = array();
    $author_cache = array();
    $subject_cache = array();
    $input_date = date('Y-m-d H:i:s');
    // record counter
开发者ID:banumelody,项目名称:slims7_cendana,代码行数:31,代码来源:p2p.php

示例7: define

 */
/* Reserve List */
// key to authenticate
define('INDEX_AUTH', '1');
// main system configuration
require '../../../../sysconfig.inc.php';
// IP based access limitation
require LIB_DIR . 'ip_based_access.inc.php';
do_checkIP('smc');
do_checkIP('smc-circulation');
// start the session
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
// privileges checking
$can_read = utility::havePrivilege('circulation', 'r');
$can_write = utility::havePrivilege('circulation', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You don\'t have enough privileges to access this area!') . '</div>');
}
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_element.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require MODULES_BASE_DIR . 'reporting/report_dbgrid.inc.php';
$page_title = 'Reservation List Report';
$reportView = false;
if (isset($_GET['reportView'])) {
    $reportView = true;
}
if (!$reportView) {
    ?>
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:reserve_list.php

示例8: die

 */
/* Dynamic content Management section */
// main system configuration
require '../../../sysconfig.inc.php';
// start the session
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/template_parser/simbio_template_parser.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/simbio_dbop.inc.php';
// privileges checking
$can_read = utility::havePrivilege('system', 'r');
$can_write = utility::havePrivilege('system', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You don\'t have enough privileges to view this section') . '</div>');
}
/* RECORD OPERATION */
if (isset($_POST['saveData'])) {
    $contentTitle = trim(strip_tags($_POST['contentTitle']));
    $contentPath = trim(strip_tags($_POST['contentPath']));
    // check form validity
    if (empty($contentTitle) or empty($contentPath)) {
        utility::jsAlert(__('Title or Path can\'t be empty!'));
        exit;
    } else {
        $data['content_title'] = $dbs->escape_string(strip_tags(trim($contentTitle)));
        $data['content_path'] = strtolower($dbs->escape_string(strip_tags(trim($contentPath))));
        $data['content_desc'] = $dbs->escape_string(trim($_POST['contentDesc']));
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:content.php

示例9: array

 * Copyright (C) 2007,2008  Arie Nugraha (dicarve@yahoo.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
$menu[] = array('Header', __('Panel'));
$menu[] = array(__('Change User Profiles'), MODULES_WEB_ROOT_DIR . 'system/app_user.php?changecurrent=true&action=detail', __('Change Current User Profiles and Password'));
if (utility::havePrivilege('bibliography', 'r') and utility::havePrivilege('bibliography', 'w')) {
    $menu[] = array(__('Add New Bibliography'), MODULES_WEB_ROOT_DIR . 'bibliography/index.php?action=detail', __('Add New Bibliographic Data/Catalog'));
}
if (utility::havePrivilege('circulation', 'r') and utility::havePrivilege('circulation', 'w')) {
    $menu[] = array(__('Start Transaction'), MODULES_WEB_ROOT_DIR . 'circulation/index.php?action=start', __('Start Circulation Transaction Proccess'));
}
if (utility::havePrivilege('circulation', 'r') and utility::havePrivilege('circulation', 'w')) {
    $menu[] = array(__('Quick Return'), MODULES_WEB_ROOT_DIR . 'circulation/quick_return.php', __('Quick Return Collection'));
}
if (utility::havePrivilege('membership', 'r') and utility::havePrivilege('membership', 'w')) {
    $menu[] = array(__('Add New Member'), MODULES_WEB_ROOT_DIR . 'membership/index.php?action=detail', __('Add New Library Member Data'));
}
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:submenu.php

示例10: define

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
// key to authenticate
define('INDEX_AUTH', '1');
sleep(1);
require '../../../sysconfig.inc.php';
// IP based access limitation
require LIB_DIR . 'ip_based_access.inc.php';
do_checkIP('smc');
do_checkIP('smc-membership');
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
// privileges checking
$can_read = utility::havePrivilege('membership', 'r');
if (!$can_read) {
    die;
}
header('Content-type: text/json');
$json_array = array();
// get search value
if (isset($_POST['inputSearchVal'])) {
    $searchVal = $dbs->escape_string(trim($_POST['inputSearchVal']));
} else {
    $json_array[] = '';
    echo json_encode($json_array);
    exit;
}
// query to database
$member_q = $dbs->query("SELECT member_id, member_name\r\n    FROM member WHERE member_id LIKE '%{$searchVal}%' OR member_name LIKE '%{$searchVal}%' LIMIT 10");
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:member_AJAX_response.php

示例11: define

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
/* Overdues Report */
// key to authenticate
define('INDEX_AUTH', '1');
// main system configuration
require '../../../../sysconfig.inc.php';
// start the session
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
// privileges checking
$can_read = utility::havePrivilege('circulation', 'r') || utility::havePrivilege('reporting', 'r');
$can_write = utility::havePrivilege('circulation', 'w') || utility::havePrivilege('reporting', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You don\'t have enough privileges to access this area!') . '</div>');
}
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_element.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require MODULES_BASE_DIR . 'reporting/report_dbgrid.inc.php';
$page_title = 'Overdued List Report';
$reportView = false;
$num_recs_show = 20;
if (isset($_GET['reportView'])) {
    $reportView = true;
}
if (!$reportView) {
开发者ID:ridorido,项目名称:s3st15_matoa,代码行数:31,代码来源:overdued_list.php

示例12: do_checkIP

    // start the session
    require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
}
// IP based access limitation
require LIB_DIR . 'ip_based_access.inc.php';
do_checkIP('smc');
do_checkIP('smc-stocktake');
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/simbio_dbop.inc.php';
// privileges checking
$can_read = utility::havePrivilege('stock_take', 'r');
$can_write = utility::havePrivilege('stock_take', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . __('You don\'t have enough privileges to access this area!') . '</div>');
}
?>
<fieldset class="menuBox">
<div class="menuBoxInner stockTakeIcon">
    <?php 
echo strtoupper(__('Stock Take'));
?>
    <hr />
    <form name="search" action="<?php 
echo MODULES_WEB_ROOT_DIR;
?>
stock_take/index.php" id="search" method="get" style="display: inline;"><?php 
echo __('Search');
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:index.php

示例13: viewKardexes

 /**
  * View kardex list
  * @return  string
  **/
 public function viewKardexes()
 {
     $_can_read = utility::havePrivilege('serial_control', 'r');
     $_can_write = utility::havePrivilege('serial_control', 'w');
     // start the output buffer
     ob_start();
     ?>
     <script type="text/javascript">
     function confirmProcess(int_serial_id, int_kardex_id)
     {
         var confirmBox = confirm('Are you sure to remove selected Kardex data?' + "\n" + 'Once deleted, it can\'t be restored!');
         if (confirmBox) {
             // set hidden element value
             document.hiddenActionForm.serialID.value = int_serial_id;
             document.hiddenActionForm.remove.value = int_kardex_id;
             // submit form
             document.hiddenActionForm.submit();
         }
     }
     </script>
     <?php 
     $_table = new simbio_table();
     $_table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
     $_table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
     $_table->highlight_row = true;
     $_table->setHeader(array('&nbsp;', __('Date Expected'), __('Date Received'), __('Seq. Number'), __('Note')));
     if ($_can_read and $_can_write) {
         $_add_link = '<span title="Add New Kardex" class="extendLink">&nbsp;</span>';
         $_date_exp = simbio_form_element::dateField('dateExpected[0]');
         $_date_rec = simbio_form_element::dateField('dateReceived[0]');
         $_seq_num = simbio_form_element::textField('text', 'seqNumber[0]', '', 'width: 100%;');
         $_notes = simbio_form_element::textField('text', 'notes[0]', '', 'width: 100%;');
         $_table->appendTableRow(array($_add_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
         $_table->setCellAttr(1, null, 'valign="top" class="alterCell2" style="font-weight: bold; width: auto;"');
         $_table->setCellAttr(1, 0, 'valign="top" class="alterCell2" style="font-weight: bold; width: 5%;"');
         $_table->setCellAttr(1, 1, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
         $_table->setCellAttr(1, 2, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
     }
     $_row = 2;
     foreach ($this->getKardexes() as $_kardex) {
         // alternate the row color
         $_row_class = $_row % 2 == 0 ? 'alterCell' : 'alterCell2';
         if ($_can_read and $_can_write) {
             // kardex removal links
             $_remove_link = '<a href="#" onclick="confirmProcess(' . $this->serial_id . ', ' . $_kardex['kardex_id'] . ')" class="trashLink notAJAX">&nbsp;</a>';
             $_date_exp = simbio_form_element::dateField('dateExpected[' . $_kardex['kardex_id'] . ']', $_kardex['date_expected']);
             $_date_rec = simbio_form_element::dateField('dateReceived[' . $_kardex['kardex_id'] . ']', $_kardex['date_received']);
             $_seq_num = simbio_form_element::textField('text', 'seqNumber[' . $_kardex['kardex_id'] . ']', $_kardex['seq_number'], 'width: 100%;');
             $_notes = simbio_form_element::textField('text', 'notes[' . $_kardex['kardex_id'] . ']', $_kardex['notes'], 'width: 100%;');
         } else {
             $_remove_link = '&nbsp;';
             $_date_exp = $_kardex['date_expected'];
             $_date_rec = $_kardex['date_received'];
             $_seq_num = $_kardex['seq_number'];
             $_notes = $_kardex['notes'];
         }
         $_table->appendTableRow(array($_remove_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
         $_table->setCellAttr($_row, null, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: auto;"');
         $_table->setCellAttr($_row, 0, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 5%;"');
         $_table->setCellAttr($_row, 1, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
         $_table->setCellAttr($_row, 2, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
         $_row++;
     }
     // button
     $_button_grp = '<div style="padding: 3px; background: #999999;"><input type="submit" class="button" name="saveKardexes" value="' . __('Save') . '" /></div>';
     // header
     echo '<div style="padding: 5px; background: #CCCCCC;">' . __('Kardex Detail for subscription') . ' <strong>' . $this->serial_period . '</strong></div>';
     if ($_can_read and $_can_write) {
         echo '<form method="post" name="kardexListForm" id="kardexListForm" action="' . $_SERVER['PHP_SELF'] . '">';
         echo $_button_grp;
     }
     echo $_table->printTable();
     if ($_can_read and $_can_write) {
         echo $_button_grp;
         echo simbio_form_element::hiddenField('serialID', $this->serial_id);
         echo '</form>';
         // hidden form
         echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="serialID" value="0" /><input type="hidden" name="remove" value="0" /></form>';
     }
     /* main content end */
     $_content = ob_get_clean();
     return $_content;
 }
开发者ID:slims,项目名称:s3st15_matoa,代码行数:87,代码来源:serial_base_lib.inc.php

示例14: simbio_template_parser

}
// create the template object
$template = new simbio_template_parser($sysconf['admin_template']['dir'] . '/' . $sysconf['admin_template']['theme'] . '/index_template.html');
// page title
$page_title = $sysconf['library_name'] . ' :: Library Automation System';
// main menu
$module = new module();
$module->setModulesDir(MODULES_BASE_DIR);
$main_menu = $module->generateModuleMenu($dbs);
$current_module = '';
// get module from URL
if (isset($_GET['mod']) and !empty($_GET['mod'])) {
    $current_module = trim($_GET['mod']);
}
// read privileges
$can_read = utility::havePrivilege($current_module, 'r');
// submenu
$sub_menu = $module->generateSubMenu(($current_module and $can_read) ? $current_module : '');
// start the output buffering for main content
ob_start();
// info
$info = __('Welcome To The Library Automation System, you are currently logged in as') . ' <strong>' . $_SESSION['realname'] . '</strong>';
//mfc
if ($current_module and $can_read) {
    // get content of module default content with AJAX
    $sysconf['page_footer'] .= "\n" . '<script type="text/javascript">' . 'jQuery(document).ready(function() { jQuery(\'#mainContent\').simbioAJAX(\'' . MODULES_WEB_ROOT_DIR . $current_module . '/index.php\', {method: \'get\'}); });' . '</script>';
} else {
    include 'default/home.php';
}
// page content
$main_content = ob_get_clean();
开发者ID:ridorido,项目名称:s3st15_matoa,代码行数:31,代码来源:index.php

示例15: die

 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
if (!defined('SENAYAN_BASE_DIR')) {
    // main system configuration
    require '../../../sysconfig.inc.php';
    // start the session
    require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
}
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
// privileges checking
$can_read = utility::havePrivilege('plugins', 'r');
$can_write = utility::havePrivilege('plugins', 'w');
if (!$can_read) {
    die('<div class="errorBox">You dont have enough privileges to view this section</div>');
}
require './func.php';
require './conf.php';
checkip($conf);
if (!isset($_SESSION['plugins_enabled'])) {
    $_SESSION['plugins_enabled'] = array();
}
if (!isset($_SESSION['plugins_available'])) {
    $_SESSION['plugins_available'] = array();
}
$enplugins = $_SESSION['plugins_enabled'];
$avplugins = $_SESSION['plugins_available'];
if ($_POST) {
开发者ID:hendrowicaksono,项目名称:plugins,代码行数:31,代码来源:setup.php


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