本文整理汇总了PHP中Members::CheckPermsOrDie方法的典型用法代码示例。如果您正苦于以下问题:PHP Members::CheckPermsOrDie方法的具体用法?PHP Members::CheckPermsOrDie怎么用?PHP Members::CheckPermsOrDie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Members
的用法示例。
在下文中一共展示了Members::CheckPermsOrDie方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sqlesc
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie('PERSO_TROOPS_BATTLE');
require_once TEMPLATE_PATH . 'troops.tpl.php';
$tpl = tpl_troops::getinstance();
$lng = language::getinstance()->GetLngBlock('pillage');
$_GET['player'] = str_replace('%', '', $_GET['player']);
if ($_GET['player'] != '') {
$player = gpc_esc($_GET['player']);
} else {
$player = $_SESSION['_login'];
}
$sql = sqlesc($player);
$sql = <<<sql
SELECT ta.`ID`, ta.`type`, ta.`players_attack`, ta.`players_defender`, ta.`players_pertes`, ta.`when`, ta.`coords_ss`, ta.`coords_3p`, tp.`mid`, tp.`Player`, tp.`ress0`, tp.`ress1`, tp.`ress2`, tp.`ress3`, tp.`ress4`, tp.`ress5`, tp.`ress6`, tp.`ress7`, tp.`ress8`, tp.`ress9`, tp.`date` FROM `SQL_PREFIX_troops_attack` ta
LEFT JOIN `SQL_PREFIX_troops_pillage` tp on (tp.`mid`=ta.`id`)
WHERE `players_attack` LIKE '%"{$sql}"%' OR `players_defender` LIKE '%"{$sql}"%'
ORDER BY `when` DESC LIMIT 0,30
sql;
$result = DataEngine::sql($sql);
$tpl->Setheader();
示例2: foreach
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'parser.class.php';
require_once CLASS_PATH . 'cartographie.class.php';
require_once CLASS_PATH . 'map.class.php';
if (!Members::CheckPermsOrDie('CARTOGRAPHIE')) {
}
$map = map::getinstance();
$carto = cartographie::getinstance();
$lng = language::getinstance()->GetLngBlock('cartographie');
if (isset($_POST['massedit'])) {
foreach ($_POST['item'] as $k => $arr) {
if ($arr['delete']) {
$carto->Delete_Entry($k, $arr['type']);
} else {
if ($arr['edit']) {
unset($arr['edit']);
if (isset($arr['TROOP'])) {
$arr['TROOP'] = DataEngine::strip_number($arr['TROOP']);
}
$carto->Edit_Entry($k, $arr);
}
示例3: sqlesc
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie('MEMBRES_HIERARCHIE');
if (Members::checkPerms('MEMBRES_NEW')) {
if (isset($_POST['Joueur'])) {
Members::NewUser(sqlesc($_POST['Joueur']), sqlesc(md5($_POST['Password'])), AXX_MEMBER, sqlesc($_POST['Points']), intval($_POST['Grade']));
}
//Modification niveaux de grade
if (isset($_POST['GradeId'])) {
if ($_POST['GradeId'] == -1) {
DataEngine::sql('INSERT INTO `SQL_PREFIX_Grade`(`Grade`,`Niveau`,`Rattachement`) VALUES(\'' . $_POST['GradeNom'] . '\',\'' . $_POST['GradeNiv'] . '\',\'' . $_POST['GradePere'] . '\')');
} else {
DataEngine::sql('UPDATE `SQL_PREFIX_Grade` SET `Niveau`=\'' . $_POST['GradeNiv'] . '\', `Rattachement`=\'' . $_POST['GradePere'] . '\', `Grade`=\'' . $_POST['GradeNom'] . '\' WHERE `GradeId`=\'' . $_POST['GradeId'] . '\'');
}
}
if (isset($_POST['GradeSuppr'])) {
if ($_POST['GradeSuppr'] == '1') {
DataEngine::sql('UPDATE `SQL_PREFIX_Grade` SET `Rattachement`=0 WHERE Rattachement=\'' . $_POST['GradeId'] . '\'');
DataEngine::sql('UPDATE `SQL_PREFIX_Membres` SET `Grade`=9 WHERE `Grade`=\'' . $_POST['GradeId'] . '\'');
DataEngine::sql('DELETE FROM `SQL_PREFIX_Grade` Where `GradeId`=\'' . $_POST['GradeId'] . '\'');
}
}
示例4: while
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie('MEMBRES_EDIT');
$lng = language::getinstance()->GetLngBlock('dataengine');
$tabrace = $lng['races'];
if (isset($_POST['ModifJoueur0'])) {
/*
ModifJoueur : Caché id du joueur
ModifGrade - OldGrade
ModifPOS - OldPOS
ModifPoints - OldPoints
ModifDon - OldDon
ModifRace - OldRace
Modification des données pour tous les joueurs.
*/
$i = 0;
while (isset($_POST['ModifJoueur' . $i])) {
$Joueur['ID'] = sqlesc($_POST['ModifJoueur' . $i]);
$OldJoueur['ID'] = sqlesc($_POST['ModifJoueur' . $i]);
$Joueur['ModifGrade'] = sqlesc($_POST['ModifGrade' . $i]);
$OldJoueur['ModifGrade'] = sqlesc($_POST['OldGrade' . $i]);
$Joueur['ModifPermission'] = sqlesc($_POST['ModifPermission' . $i]);
示例5: explode
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'parser.class.php';
Members::CheckPermsOrDie('PERSO');
$lng = language::getinstance()->GetLngBlock('personal');
if (isset($_POST['importation'])) {
// $data = file_get_contents('./test/data/mafiche_ff.txt');
$data = gpc_esc($_POST['importation']);
$parser = parser::getinstance();
// simple détection...
if (p_stripos($parser->GetValueByLabel($data, $lng['ident']), $_SESSION['_login'], 0) !== false) {
$matrix = explode("\n", trim($data));
$info = array();
$info['GameGrade'] = trim($matrix[0]);
$info['Race'] = $parser->GetValueByLabel($data, $lng['Race']);
$info['Titre'] = $parser->GetValueByLabel($data, $lng['Titre']);
$info['Commerce'] = $parser->GetValueByLabel($data, $lng['Commerce']);
$info['Recherche'] = $parser->GetValueByLabel($data, $lng['Recherche']);
$info['Combat'] = $parser->GetValueByLabel($data, $lng['Combat']);
$info['Construction'] = $parser->GetValueByLabel($data, $lng['Construction']);
$info['Economie'] = $parser->GetValueByLabel($data, $lng['Economie']);
$info['Navigation'] = $parser->GetValueByLabel($data, $lng['Navigation']);
示例6:
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'ownuniverse.class.php';
require_once CLASS_PATH . 'parser.class.php';
require_once TEMPLATE_PATH . 'ownuniverse.tpl.php';
Members::CheckPermsOrDie('PERSO_OWNUNIVERSE');
$ownuniverse = ownuniverse::getinstance();
$lng = language::getinstance()->GetLngBlock('ownuniverse');
// initialisation des variables
$info = $warn = '';
if (isset($_GET['reset']) && $_GET['reset'] == $_SESSION['_permkey']) {
DataEngine::sql('DELETE FROM `SQL_PREFIX_ownuniverse` WHERE `UTILISATEUR` = \'' . $_SESSION['_login'] . '\' LIMIT 1');
output::Boink('%ROOT_URL%ownuniverse.php');
}
if ($_GET['showuser'] != '' && Members::CheckPerms('PERSO_OWNUNIVERSE_READONLY')) {
$player = gpc_esc($_GET['showuser']);
$include_form = false;
} else {
$player = false;
$include_form = true;
}
if (isset($_POST['importation'])) {
示例7: scandir
$width = $height = 16;
}
$img = img::Create($width, $height)->FillAlphaHexa($alphacolor);
$img->font = $fontfile;
$img->SetColorHexa($textcolor);
if ($key == 'eude') {
$img->Text($text, 0, 8, $fontsize);
} else {
$img->CenteredText($text, $fontsize);
}
//-- Fin partie personalisable. ------------------------------------------------
$img->SaveAs($key . '.png')->Render();
}
include_once '../../../../init.php';
include_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie(AXX_ROOTADMIN);
addons::getinstance()->ButtonRegen($listing, $defaultsetting);
if (isset($_GET['ident'])) {
include CLASS_PATH . 'img.class.php';
do_btn(gpc_esc($_GET['ident']));
} else {
include TEMPLATE_PATH . 'sample.tpl.php';
$tpl = tpl_sample::getinstance();
$files = scandir('./');
foreach ($files as $file) {
if (p_substr($file, -4) == '.png') {
unlink($file);
}
}
foreach ($listing as $key => $dummy) {
$tpl->PushOutput('<span class="color_header"> %BTN_URL%' . $key . '.png </span><img src="./gen.php?ident=' . $key . '&' . time() . '"/><br/>');
示例8:
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
* @todo Upgrade
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie('PERSO_RESEARCH');
$Rech[0][0] = 0.1;
$Rech[0][1] = 2.6;
$Rech[1][0] = 2.6;
$Rech[1][1] = 5.2;
$Rech[2][0] = 5.2;
$Rech[2][1] = 11;
$Rech[3][0] = 11;
$Rech[3][1] = 16;
$Rech[4][0] = 16;
$Rech[4][1] = 21;
$Rech[5][0] = 21;
$Rech[5][1] = 26;
$Rech[6][0] = 26;
$Rech[6][1] = 32;
$Rech[7][0] = 32;
$Rech[7][1] = 37;
$Rech[8][0] = 37;
$Rech[8][1] = 42;
示例9: array
<?php
/**
* @author Alex10336
* Dernière modification: $Id$
* @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
* @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
*
**/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie('MEMBRES_STATS');
require_once TEMPLATE_PATH . 'stats.tpl.php';
$tpl = tpl_stats::getinstance();
$invert_sort = array('' => 'DESC', 'DESC' => 'ASC', 'ASC' => 'DESC');
if (isset($_GET['act']) && $_GET['act'] == 'pts') {
$tpl->SetheaderPoints();
$sort_key = array('Points', 'pts_architecte', 'pts_mineur', 'pts_commercant', 'pts_science', 'pts_amiral', 'pts_guerrier');
$sort = '`Points` DESC';
foreach ($sort_key as $v) {
$newvalue = array('sort' => array($v => $invert_sort[$_GET['sort'][$v]]));
$tpl->AddToRow(Get_string($newvalue), $v);
if (isset($_GET['sort']) && $_GET['sort'][$v]) {
$sort = $v . ' ' . $_GET['sort'][$v];
}
}
$tpl->PushRow(true);
$sql = 'SELECT `Joueur`, `Points`, `pts_architecte`, `pts_mineur`, `pts_commercant`, `pts_science`, `pts_amiral`, `pts_guerrier` FROM `SQL_PREFIX_Membres` ORDER BY ' . $sort;
$mysql_result = DataEngine::sql($sql);
$cols = array('Points', 'pts_architecte', 'pts_mineur', 'pts_commercant', 'pts_science', 'pts_amiral', 'pts_guerrier');
while ($line = mysql_fetch_assoc($mysql_result)) {