本文整理汇总了PHP中page_require_level函数的典型用法代码示例。如果您正苦于以下问题:PHP page_require_level函数的具体用法?PHP page_require_level怎么用?PHP page_require_level使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_require_level函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page_require_level
<?php
$page_title = 'Returrapport';
$results = '';
require_once 'includes/load.php';
// Checking userlevel
page_require_level(1);
if (isset($_POST['submit'])) {
$req_dates = array('start-date', 'end-date');
validate_fields($req_dates);
$returnCategories = find_all('returnCategory');
if (empty($errors)) {
$idArray = [];
$resultArray = [];
$end_date_storage = [];
$return_total = [];
$start_date = remove_junk($db->escape($_POST['start-date']));
$end_date = remove_junk($db->escape($_POST['end-date']));
//finner alle unike produktid-er der det har vært trades.
$p_id = get_unique_pid_trades($start_date, $end_date);
//Pusher de til array så de kan lett itereres.
foreach ($p_id as $id) {
array_push($idArray, $id);
array_push($return_total, get_trade_total($start_date, $end_date, $id['product_id']));
}
//skal her hente ut returinfo for produktene. har produkt-id, trenger kun hvor mange som har blitt returnert av hver FK_returncategoryID
//må mekke en funksjon som returnerer summen av antallet som har vært returnert. Array i en array? Sjekke for p_id og deretter RC_id per funksjon? Så springe en liten for-loop inne i foreach.
} else {
$session->msg("d", $errors);
redirect('sales_report.php', false);
}
示例2: page_require_level
<?php
$page_title = 'My profile';
require_once 'includes/load.php';
// Checking userlevel
page_require_level(3);
?>
<?php
$user_id = (int) $_GET['id'];
if (empty($user_id)) {
redirect('home.php', false);
} else {
$user_p = find_by_id('users', $user_id);
}
include_once 'layouts/header.php';
?>
<div class="row">
<div class="col-md-4">
<div class="panel profile">
<div class="jumbotron text-center bg-red">
<img class="img-circle img-size-2" src="uploads/users/<?php
echo $user_p['image'];
?>
" alt="">
<h3><?php
echo first_character($user_p['name']);
?>
</h3>
</div>
<?php
if ($user_p['id'] === $user['id']) {
示例3: page_require_level
<?php
$page_title = 'Dine utleveringer';
require_once 'includes/load.php';
// Checking userlevel
page_require_level(5);
//Show only own sales, unless userlevel is admin
if (get_userlevel() == 1) {
$sales = find_all_entre_sale();
} else {
$sales = find_all_entre_user_sales();
}
include_once 'layouts/header.php';
?>
<div class="row">
<div class="col-md-6">
<?php
echo display_msg($msg);
?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<strong>
<span class="glyphicon glyphicon-th"></span>
<span>Utleveringer </span>
</strong>
示例4: page_require_level
<?php
$page_title = 'Lagerstatus';
require_once 'includes/load.php';
include_once 'layouts/header.php';
// Checking userlevel
page_require_level(2);
//Show only own sales, unless userlevel is admin
if (get_userlevel() == 1) {
$is_admin = true;
} else {
$is_admin = false;
}
$storageStatus = storage_status();
$prod_id = get_last_product_id();
$dbupdate = false;
$storageProd = [];
foreach ($storageStatus as $stg) {
array_push($storageProd, $stg);
}
if (isset($_POST['storage'])) {
$max = count($_POST['hovedlager']);
for ($i = 0; $i < $max; $i++) {
$I_hovedlager = $_POST["hovedlager"][$i];
$I_kslager = $_POST["ks-lager"][$i];
$I_m_storage = $_POST["m_storage"][$i];
$changeKS = $storageProd[$i]['ks_storage'] != $I_kslager;
$changeH = $storageProd[$i]['quantity'] != $I_hovedlager;
$changeM = $storageProd[$i]['m_storage'] != $I_m_storage;
$KS_qty = $I_kslager - $storageProd[$i]['ks_storage'];
$H_qty = $I_hovedlager - $storageProd[$i]['quantity'];
示例5: page_require_level
<?php
$page_title = 'Dine returer';
require_once 'includes/load.php';
// Checking userlevel
page_require_level(4);
//Show only own sales, unless userlevel is admin
if (get_userlevel() == 1) {
$trades = find_all_trades();
} else {
$trades = find_all_user_trades();
}
include_once 'layouts/header.php';
?>
<div class="row">
<div class="col-md-6">
<?php
echo display_msg($msg);
?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<strong>
<span class="glyphicon glyphicon-th"></span>
<span>Returer</span>
</strong>
</div>