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


PHP page::validatePageAccess方法代码示例

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


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

示例1: Copyright

<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Pages');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    ?>

<div class="box_right_title">Pages</div>

<?php 
    if (!isset($_GET['action'])) {
        ?>

<table class="center">
<tr>
		<th>Name</th><th>File name</th><th>Actions</th>
</tr>
<?php 
        $result = mysql_query("SELECT * FROM custom_pages ORDER BY id ASC");
        while ($row = mysql_fetch_assoc($result)) {
            $check = mysql_query("SELECT COUNT(filename) FROM disabled_pages WHERE filename='" . $row['filename'] . "'");
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:31,代码来源:pages.php

示例2: Anthony

		-[ Created by ©Nomsoft
		  `-[ Original core by Anthony (Aka. CraftedDev)

				-CraftedWeb Generation II-                  
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Donations');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    $donationsTotal = mysql_query("SELECT mc_gross FROM payments_log");
    $donationsTotalAmount = 0;
    while ($row = mysql_fetch_assoc($donationsTotal)) {
        $donationsTotalAmount = $donationsTotalAmount + $row['mc_gross'];
    }
    $donationsThisMonth = mysql_query("SELECT mc_gross FROM payments_log WHERE paymentdate LIKE '%" . date('Y-md') . "%'");
    $donationsThisMonthAmount = 0;
    while ($row = mysql_fetch_assoc($donationsThisMonth)) {
        $donationsThisMonthAmount = $donationsThisMonthAmount + $row['mc_gross'];
    }
    $q = mysql_query("SELECT mc_gross,userid FROM payments_log ORDER BY paymentdate DESC LIMIT 1");
    $row = mysql_fetch_assoc($q);
开发者ID:nero08,项目名称:CraftedWeb,代码行数:31,代码来源:donations.php

示例3: Copyright

<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Logs');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    ?>
        <div class='box_right_title'>Hey! You shouldn't be here!</div>
        
		<pre>The script might have redirected you wrong. Or... did you try to HACK!? Anyways, good luck.</pre>
        
        <a href="?p=logs&s=voteshop" class="content_hider">Vote Shop logs</a>
		<a href="?p=logs&s=donateshop" class="content_hider">Donation Shop logs</a>
		<?php 
}
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:24,代码来源:logs.php

示例4: Copyright

<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
$page = new page();
$page->validatePageAccess('Shop');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    $server->selectDB('webdb');
    $inShop = mysql_query("SELECT COUNT(*) FROM shopitems");
    $purchToday = mysql_query("SELECT COUNT(*) FROM shoplog WHERE date LIKE '%" . date('Y-m-d') . "%'");
    $getAvg = mysql_query("SELECT AVG(*) AS priceAvg FROM shopitems");
    $totalPurch = mysql_query("SELECT COUNT(*) FROM shoplog");
    //Note: The round() function will return 0 if no value is set :)
    ?>
<div class="box_right_title">Shop Overview</div>
<table style="width: 100%;">
<tr>
<td><span class='blue_text'>Items in shop</span></td><td><?php 
    echo round(mysql_result($inShop, 0));
    ?>
</td>
</tr>
<tr>
    <td><span class='blue_text'>Purchases today</span></td><td><?php 
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:31,代码来源:shop.php

示例5: Anthony

		-[ Created by ©Nomsoft
		  `-[ Original core by Anthony (Aka. CraftedDev)

				-CraftedWeb Generation II-                  
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Realms');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    ?>
<div class='box_right_title'>New Realm</div>
<?php 
    if (isset($_POST['add_realm'])) {
        $server->addRealm($_POST['realm_id'], $_POST['realm_name'], $_POST['realm_desc'], $_POST['realm_host'], $_POST['realm_port'], $_POST['realm_chardb'], $_POST['realm_sendtype'], $_POST['realm_rank_username'], $_POST['realm_rank_password'], $_POST['realm_ra_port'], $_POST['realm_soap_port'], $_POST['realm_a_host'], $_POST['realm_a_user'], $_POST['realm_a_pass']);
    }
    ?>

                        <form action="?p=realms" method="post" style="line-height: 15px;">
                        <b>General Realm Information</b><hr/>
                        Realm ID: <br/>
                        <input type="text" name="realm_id" placeholder="Default: 1"/> <br/>
开发者ID:nero08,项目名称:CraftedWeb,代码行数:31,代码来源:realms.php

示例6: Anthony

		  `-[ Original core by Anthony (Aka. CraftedDev)

				-CraftedWeb Generation II-                  
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
$server = new server();
$account = new account();
$page = new page();
$page->validatePageAccess('Tools->Account Access');
?>
<div class="box_right_title">Account Access</div>
All GM accounts are listed below.
<br/>&nbsp;
<table>
	<tr>
    	<th>ID</th>
        <th>Username</th>
        <th>Rank</th>
        <th>Realms</th>
        <th>Status</th>
        <th>Last Login</th>
        <th>Actions</th>
    </tr>
    <?php 
开发者ID:nero08,项目名称:CraftedWeb,代码行数:31,代码来源:tools-accountaccess.php

示例7: Anthony

		-[ Created by ©Nomsoft
		  `-[ Original core by Anthony (Aka. CraftedDev)

				-CraftedWeb Generation II-                  
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Interface');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    ?>
<div class="box_right_title">Template</div>          
    
 Here you can choose which template that should be active on your website. This is also where you install new themes for your website.<br/><br/>
 <h3>Choose Template</h3>
        <select id="choose_template">
                <?php 
    $result = mysql_query("SELECT * FROM template ORDER BY id ASC");
    while ($row = mysql_fetch_assoc($result)) {
        if ($row['applied'] == 1) {
            echo "<option selected='selected' value='" . $row['id'] . "'>[Active] ";
        } else {
开发者ID:nero08,项目名称:CraftedWeb,代码行数:31,代码来源:interface.php

示例8: Copyright

<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Services');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    echo '<h2>Forbidden!</h2>Or actually... there\'s nothing here!';
}
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:17,代码来源:services.php

示例9: Copyright

<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('Users');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    $server->selectDB('logondb');
    $usersTotal = mysql_query("SELECT COUNT(*) FROM account");
    $usersToday = mysql_query("SELECT COUNT(*) FROM account WHERE joindate LIKE '%" . date("Y-m-d") . "%'");
    $usersMonth = mysql_query("SELECT COUNT(*) FROM account WHERE joindate LIKE '%" . date("Y-m") . "%'");
    $usersOnline = mysql_query("SELECT COUNT(*) FROM account WHERE online=1");
    $usersActive = mysql_query("SELECT COUNT(*) FROM account WHERE last_login LIKE '%" . date("Y-m") . "%'");
    $usersActiveToday = mysql_query("SELECT COUNT(*) FROM account WHERE last_login LIKE '%" . date("Y-m-d") . "%'");
    ?>
<div class="box_right_title">Users Overview</div>
<table style="width: 100%;">
<tr>
<td><span class='blue_text'>Total users</span></td><td><?php 
    echo round(mysql_result($usersTotal, 0));
    ?>
</td>
<td><span class='blue_text'>New users today</span></td><td><?php 
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:31,代码来源:users.php

示例10: Copyright

<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
$server = new server();
$account = new account();
$page = new page();
$page->validatePageAccess('Tools->Tickets');
?>
<div class="box_right_title">Tickets</div>
<?php 
if (!isset($_GET['guid'])) {
    ?>
<table class="center">
        <tr>
            <td><input type="checkbox" id="tickets_offline">View offline tickets</td>
            <td>
            <select id="tickets_realm">
           		 <?php 
    $server->selectDB('webdb');
    $result = mysql_query("SELECT char_db,name,description FROM realms");
    if (mysql_num_rows($result) == 0) {
        echo '<option value="NULL">No realms found.</option>';
    } else {
        echo '<option value="NULL">--Select a realm--</option>';
        while ($row = mysql_fetch_assoc($result)) {
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:31,代码来源:tools-tickets.php

示例11: Anthony

		-[ Created by ©Nomsoft
		  `-[ Original core by Anthony (Aka. CraftedDev)

				-CraftedWeb Generation II-                  
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
$server->selectDB('webdb');
$page = new page();
$page->validatePageAccess('News');
if ($page->validateSubPage() == TRUE) {
    $page->outputSubPage();
} else {
    ?>
<div class="box_right_title">News &raquo; Post news</div>                  
<div id="news_status"></div>
<input type="text" value="Title..." id="news_title"/> <br/>
<input type="text" value="Author..." id="news_author"/> <br/>
<input type="text" value="Image URL..." id="news_image"/> <br/>
<textarea cols="72" rows="7" id="wysiwyg">Content...</textarea>
<input type="submit" value="Post" onclick="postNews()"/>  <input type="submit" value="Preview" onclick="previewNews()" disabled="disabled"/>                                    
<?php 
}
?>
                                    
开发者ID:nero08,项目名称:CraftedWeb,代码行数:30,代码来源:news.php


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