本文整理汇总了PHP中Api::getLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP Api::getLevel方法的具体用法?PHP Api::getLevel怎么用?PHP Api::getLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Api
的用法示例。
在下文中一共展示了Api::getLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Api
include 'config.php';
include 'libs/Link.class.php';
include 'functions.php';
include 'libs/Socket.class.php';
include 'libs/Guest.class.php';
include 'libs/User.class.php';
include 'libs/Admin.class.php';
include 'libs/Root.class.php';
include 'libs/Api.class.php';
$request = new Api();
$result = $request->send_request();
if (empty($_GET['page'])) {
$_GET['page'] = '';
}
if ($request->is_co()) {
if ($request->getLevel() > 1) {
switch ($_GET['page']) {
//Profile
case 'profile':
$page = $_GET['page'];
break;
//Profile installation
//Profile installation
case 'profile_user_installation':
$page = $_GET['page'];
break;
//Conf_general
//Conf_general
case 'conf_general':
$page = $_GET['page'];
break;
示例2: Api
<?php
include 'header.php';
$request = new Api();
$result = $request->send_request();
if ($request->getLevel() < 2) {
redirect();
}
if (empty($_GET['file']) or !($_GET['file'] > 0)) {
redirect();
}
$path = '/etc/domoleaf/sql/backup/';
$file = 'domoleaf_backup_' . $_GET['file'] . '.sql.tar.gz';
if (!file_exists($path . $file)) {
redirect();
}
ob_clean();
header("content-type: application/x-gzip");
header("Content-Disposition: filename=" . $file);
flush();
readfile($path . $file);