本文整理汇总了PHP中Acl::Access方法的典型用法代码示例。如果您正苦于以下问题:PHP Acl::Access方法的具体用法?PHP Acl::Access怎么用?PHP Acl::Access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Acl
的用法示例。
在下文中一共展示了Acl::Access方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Acl
<?php
$this->setTitle("Admin - Settings");
$this->setSidebar(true);
try {
$acl = new Acl(USER_ID);
if (!$acl->Access("z")) {
throw new Exception("Access denied");
}
$tpl = new Template(PATH_APPLICATIONS . "admin/tpl/translations/");
$action = isset($this->args["var_a"]) ? $this->args['var_a'] : "";
switch ($action) {
default:
$tpl->loadFile("main.php");
break;
case 'edit':
$tpl->lang_id = isset($this->args['var_b']) ? $this->args['var_b'] : 0;
$tpl->loadFile("edit.php");
break;
case 'import':
$tpl->loadFile("import.php");
break;
case 'export':
$tpl->lang_id = isset($this->args['var_b']) ? $this->args['var_b'] : 0;
$tpl->loadFile("export.php");
break;
case 'delete':
$tpl->loadFile("delete.php");
break;
case 'create':
$tpl->loadFile("create.php");
示例2: Acl
<?php
$this->setTitle("Admin - Members");
$this->setSidebar(true);
try {
$acl = new Acl(USER_ID);
if (!$acl->Access("x")) {
throw new Exception("Access denied");
}
$action = isset($this->args["var_a"]) ? $this->args['var_a'] : "";
$tpl = new Template(PATH_APPLICATIONS . "admin/tpl/members/");
switch ($action) {
default:
$tpl->loadFile("main.php");
break;
case 'edit':
$tpl->userid = getID($this->args['var_b']) ? getID($this->args['var_b']) : 0;
$tpl->loadFile("edit.php");
break;
case 'log':
$tpl->userid = getID($this->args['var_b']) ? getID($this->args['var_b']) : 0;
$tpl->loadFile("log.php");
break;
case 'create':
$tpl->loadFile("create.php");
break;
}
$tpl->build();
} catch (Exception $e) {
echo error(_t($e->getMessage()));
}
示例3: page
" style="float:left; margin-right: 5px;" alt="">
<a href="<?php
echo page("profile", "view", $acl->name);
?>
"><b><?php
echo $acl->name;
?>
</b></a> (<?php
echo $acl->group_name;
?>
) <?php
echo $online;
?>
<br />
<?php
if (!$acl->anonymous || $user->Access("x")) {
?>
<img src="images/icons/up.gif" /> <?php
echo $acl->uploaded();
?>
<br />
<img src="images/icons/down.gif" /> <?php
echo $acl->downloaded();
?>
<br />
<?php
}
?>
<br />
<a href="<?php
echo page("profile", "friends", "accept", $acl->name);
示例4: page
}
$friends = true;
} else {
$friends = false;
}
if ($acl->id == USER_ID) {
$friend_show = false;
}
?>
<div id="profile">
<h4><?php
echo $acl->name;
?>
</h4>
<?php
if ($user->Access("x") && $acl->id != USER_ID) {
?>
<a href="<?php
echo page("admin", "members", "edit", $acl->name);
?>
" style="float:right;"><span class="btn blue"><?php
echo _t("Edit profile");
?>
</span></a>
<?php
}
if ($friend_show) {
if (!$friends) {
?>
<a href="<?php
echo page("profile", "friends", "add", cleanurl($acl->name));
示例5: Acl
try {
$acl = new Acl(USER_ID);
$tid = isset($_GET['torrent']) ? $_GET['torrent'] : "";
if (!intval($_GET['torrent'])) {
throw new Exception("invalid id");
}
$db = new DB("peers");
$db->setColPrefix("peer_");
$db->select("peer_torrent = '" . $db->escape($tid) . "' AND peer_seeder = '1'");
$no_peers = true;
if ($db->numRows()) {
echo "<h4>" . _t("Seeders") . "</h4>";
echo "\n <table width='100%' class='forum' cellspacing='0' cellpadding='5'>\n <thead>\n <tr>\n <td class='border-bottom border-right' width='200px'>Seeder</td>\n <td class='border-bottom border-right'>Downloaded</td>\n <td class='border-bottom border-right'>Uploaded</td>\n <td class='border-bottom border-right' align='center'>Seeded for</td>\n </tr>\n </thead>\n <tbody>\n ";
while ($db->nextRecord()) {
$user = new Acl($db->userid);
echo "\n <tr>\n <td class='border-bottom border-right'>" . (!$user->anonymous || $acl->Access("x") ? "<a href='" . page("profile", "view", $user->name) . "'>" . $user->name . "</a>" : "Anonymous") . "</td>\n <td class='border-bottom border-right'>" . bytes($db->downloaded) . "</td>\n <td class='border-bottom border-right'>" . bytes($db->uploaded) . "</td>\n <td class='border-bottom border-right' align='center'>" . timediff($db->started, time()) . "</td>\n </tr>";
}
echo "</tbody></table>";
$no_peers = false;
}
$db->select("peer_torrent = '" . $db->escape($tid) . "' AND peer_seeder = '0'");
if ($db->numRows()) {
echo "<h4>" . _t("Leechers") . "</h4>";
echo "\n <table width='100%' class='forum' cellspacing='0' cellpadding='5'>\n <thead>\n <tr>\n <td class='border-bottom border-right' width='200px'>Leecher</td>\n <td class='border-bottom border-right'>Downloaded</td>\n <td class='border-bottom border-right'>Uploaded</td>\n <td class='border-bottom border-right' align='center'>Leeching for</td>\n </tr>\n </thead>\n <tbody>\n ";
while ($db->nextRecord()) {
$user = new Acl($db->userid);
echo "\n <tr>\n <td class='border-bottom border-right'>" . (!$user->anonymous || $acl->Access("x") ? "<a href='" . page("profile", "view", $user->name) . "'>" . $user->name . "</a>" : "Anonymous") . "</td>\n <td class='border-bottom border-right'>" . bytes($db->downloaded) . "</td>\n <td class='border-bottom border-right'>" . bytes($db->uploaded) . "</td>\n <td class='border-bottom border-right' align='center'>" . timediff($db->started, time()) . "</td>\n </tr>";
}
echo "</tbody></table>";
$no_peers = false;
}
示例6: foreach
?>
</title>
<link rel="stylesheet" href="css/site_root.css" />
<link rel="stylesheet" href="css/impromptu.css" />
<link href="siteadmin/css/structure.css" rel="stylesheet" type="text/css" />
<script src='javascript/javascript.js.php?app=<?php
echo $this->data['url']['application'];
?>
' type='text/javascript' ></script>
<script src='javascript/jquery-1.7.2.min.js' type='text/javascript' ></script>
<script src='javascript/jquery-ui-1.8.21.custom.min.js' type='text/javascript' ></script>
<script src='javascript/global.js' type='text/javascript' ></script>
<script src='javascript/jquery-impromptu.js' type='text/javascript' ></script>
<script src='javascript/jquery-impromptu-ext.js' type='text/javascript' ></script>
<?php
if ($acl->Access("x")) {
?>
<link rel="stylesheet" href="siteadmin/css/toolbar.css" />
<?php
}
if ($acl->Access("x")) {
?>
<script src='siteadmin/javascript/toolbar.js' type='text/javascript'></script>
<?php
}
if (count($control->javascript) > 0) {
foreach ($control->javascript as $javascript) {
?>
<script src='CMS/applications/<?php
echo $this->data['url']['application'] . "/javascript/" . $javascript;
?>