本文整理汇总了PHP中get_page_advanced函数的典型用法代码示例。如果您正苦于以下问题:PHP get_page_advanced函数的具体用法?PHP get_page_advanced怎么用?PHP get_page_advanced使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_page_advanced函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: mysql_query
mysql_query("INSERT INTO clubs (name, description, view_time, open_time, close_time, money) VALUES ('{$name}', '{$description}', '0', '0', '0', '{$money}')");
$success = "Club added successfully!";
}
} else {
if ($action == 'delete') {
$club_id = escape($_REQUEST['id']);
mysql_query("DELETE FROM clubs WHERE id='{$club_id}'");
$success = "Club deleted successfully!";
} else {
if ($action == 'update') {
$club_id = escape($_REQUEST['id']);
$description = escape($_REQUEST['description']);
mysql_query("UPDATE clubs SET description='{$description}' WHERE id='{$club_id}'");
$success = "Club updated successfully!";
}
}
}
}
$result = mysql_query("SELECT id,name,description,money FROM clubs");
if (isset($error)) {
get_page_advanced("man_clubs", "root", array('error' => $error, 'clubsResult' => $result));
} else {
if (isset($success)) {
get_page_advanced("man_clubs", "root", array('success' => $success, 'clubsResult' => $result));
} else {
get_page_advanced("man_clubs", "root", array('clubsResult' => $result));
}
}
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:man_clubs.php
示例2: checkMismatchedApplications
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/chk.php";
include "../include/apply_submit.php";
if (isset($_SESSION['root'])) {
$mismatches = false;
if (isset($_REQUEST['club_id'])) {
if (isset($_REQUEST['act'])) {
checkMismatchedApplications($_REQUEST['club_id'], true);
$mismatches = array("Errors should be fixed. Click <a href=\"check_mismatch.php?club_id=" . $_REQUEST['club_id'] . "\">here</a> to refresh.");
} else {
$mismatches = checkMismatchedApplications($_REQUEST['club_id']);
}
}
$clubInfo = listClubs();
get_page_advanced("check_mismatch", "root", array('mismatches' => $mismatches, 'clubInfo' => $clubInfo));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:23,代码来源:check_mismatch.php
示例3: escape
$action = $_REQUEST['action'];
$user_id = escape($_REQUEST['id']);
if ($action == 'Reset') {
//clear all application data of the user
mysql_query("DELETE FROM answers USING applications INNER JOIN answers WHERE applications.user_id = '{$user_id}' AND applications.id = answers.application_id");
mysql_query("DELETE FROM applications WHERE user_id = '{$user_id}'");
$success = "Application reset!";
} else {
if ($action == 'Delete') {
//keep application data in case it's useful later
mysql_query("DELETE FROM users WHERE id = '{$user_id}'");
$success = "User deleted!";
}
}
}
$result = mysql_query("SELECT id, accessed, username, email, name FROM users");
$users = array();
// array of (last_login_time, (username, email, name))
while ($row = mysql_fetch_array($result)) {
$infoUser = array($row[2], $row[3], $row[4]);
//array of (username, email, name)
$users[$row[0]] = array($row[1], $infoUser);
}
if (isset($success)) {
get_page_advanced("userlist", "root", array('success' => $success, 'userList' => $users));
} else {
get_page_advanced("userlist", "root", array('userList' => $users));
}
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:userlist.php
示例4: mysql_query
if ($_REQUEST['action'] == "add") {
$result = mysql_query("SELECT name FROM club_notes_categories WHERE club_id = '{$club_id}' AND name = '{$catName}'");
if ($row = mysql_fetch_array($result)) {
$error = "Category already exists!";
} else {
mysql_query("INSERT INTO club_notes_categories (name, club_id) VALUES ('{$catName}', '{$club_id}')");
$success = "Category added!";
}
}
}
}
$result = mysql_query("SELECT name FROM club_notes_categories WHERE club_id = '{$club_id}'");
$categories = array();
while ($row = mysql_fetch_array($result)) {
array_push($categories, $row[0]);
}
if (isset($error)) {
get_page_advanced("man_notes", "admin", array('box_enabled' => $box_enabled, 'cat_enabled' => $cat_enabled, 'comment_enabled' => $comment_enabled, 'categories' => $categories, 'error' => $error));
} else {
if (isset($success)) {
get_page_advanced("man_notes", "admin", array('box_enabled' => $box_enabled, 'cat_enabled' => $cat_enabled, 'comment_enabled' => $comment_enabled, 'categories' => $categories, 'success' => $success));
} else {
get_page_advanced("man_notes", "admin", array('box_enabled' => $box_enabled, 'cat_enabled' => $cat_enabled, 'comment_enabled' => $comment_enabled, 'categories' => $categories));
}
}
} else {
get_page_advanced("message", "admin", array('message' => "General application cannot view submissions, so note functions are not available.", 'title' => "Manage Club"));
}
} else {
header('Location: index.php?error=' . urlencode("You are not logged in!"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:man_notes.php
示例5: get_page_advanced
<?php
include "../include/common.php";
include "../config.php";
include "../include/db_connect.php";
include "../include/session.php";
if (isset($_SESSION['user_id'])) {
get_page_advanced("index", "apply");
} else {
get_page_advanced("message", "apply", array("title" => "Not Logged In", "message" => "You cannot access the application because you are not logged in. Please <a href=\"../login.php\">login first</a>.", "redirect" => "../login.php"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:11,代码来源:index.php
示例6: substr
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
if (isset($_SESSION['root']) && isset($_REQUEST['cat'])) {
$cat = $_REQUEST['cat'];
if (substr($cat, -4) == '.php') {
$cat = substr($cat, 0, -4);
}
get_page_advanced("root_cat", "root", array('cat' => $cat));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:15,代码来源:root_cat.php
示例7: getUserClubsApplied
<?php
include "../include/common.php";
include "../config.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/apply_submit.php";
if (isset($_SESSION['user_id'])) {
$clubsApplied = getUserClubsApplied($_SESSION['user_id']);
get_page_advanced("supplement", "apply", array("clubsApplied" => $clubsApplied));
} else {
get_page_advanced("index", "apply", array());
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:13,代码来源:supplement.php
示例8: array
$options = array();
//try to find the options from the current configuration file
while ($line = fgets($fin)) {
$index = strpos($line, ' = ');
if ($index !== FALSE) {
$key = substr($line, 9, $index - 11);
$val_start = $index + 3;
$val_end = strrpos($line, ";");
//before the line's ending semicolon
$val = substr($line, $val_start, $val_end - $val_start);
if (in_array($key, $option_list) && !in_array($key, $hide_options)) {
if (in_array($key, $array_options)) {
$options[$key] = fromPHPArray($val);
} else {
$options[$key] = stripFromPHP($val);
}
}
}
}
//now let the user edit other options not in config
$counter = 0;
foreach ($option_list as $option_name) {
if (!array_key_exists($option_name, $options)) {
$options[$option_name] = FALSE;
//value of false denotes hidden type, show as password box
}
}
get_page_advanced("man_config", "root", array('optionsMap' => $options, 'tabs' => $option_tabs, 'tab_list' => $display_tabs));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:man_config.php
示例9: mysql_query
}
$result = mysql_query("SELECT id,name FROM purchase_confirm ORDER BY orderId");
$purchaseList = array();
while ($row = mysql_fetch_array($result)) {
array_push($purchaseList, array($row[0], $row[1]));
}
$result = mysql_query("SELECT users.username FROM users, user_groups WHERE user_groups.user_id=users.id AND user_groups.group=-1");
while ($row = mysql_fetch_array($result)) {
$userList[] = array($row[0]);
}
$result = mysql_query("SELECT orderID FROM purchase_confirm WHERE id='" . $_SESSION['user_id'] . "'");
if ($val = mysql_fetch_array($result)) {
$status_desired = $val[0];
} else {
$status_desired = 1;
$warning = "You have not added any users to the purchase order list";
}
$result = mysql_query("SELECT id, club_id, submit_time, status, amount, filename FROM purchase_order WHERE status={$status_desired} ORDER BY status");
$result_two = mysql_query("SELECT club_id, submit_time, status_time, amount, status FROM purchase_order WHERE status!={$status_desired}");
if (isset($success)) {
get_page_advanced("man_funds", "root", array('success' => $success, 'pending' => $result, 'completed' => $result_two, 'purchaseList' => $purchaseList, 'userList' => $userList));
} else {
if (isset($error)) {
get_page_advanced("man_funds", "root", array('error' => $error, 'pending' => $result, 'completed' => $result_two, 'purchaseList' => $purchaseList, 'userList' => $userList));
} else {
get_page_advanced("man_funds", "root", array('pending' => $result, 'completed' => $result_two, 'purchaseList' => $purchaseList, 'userList' => $userList));
}
}
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:man_funds.php
示例10: backupDatabase
$backupLink = FALSE;
if (isset($_REQUEST['backup'])) {
$dbResult = backupDatabase();
$fileResult = backupFiles();
if ($fileResult !== false) {
$backupLink = array($dbResult, $fileResult[0], $fileResult[1]);
$success = "Backup created!";
} else {
$error = "Something went wrong! If this continues, contact us!";
}
}
if (isset($success)) {
get_page_advanced("backup", "root", array('backupLink' => $backupLink, 'success' => $success));
} else {
if (isset($error)) {
get_page_advanced("backup", "root", array('backupLink' => $backupLink, 'error' => $error));
} else {
if (isset($warning)) {
get_page_advanced("backup", "root", array('backupLink' => $backupLink, 'warning' => $warning));
} else {
if (isset($info)) {
get_page_advanced("backup", "root", array('backupLink' => $backupLink, 'info' => $info));
} else {
get_page_advanced("backup", "root", array('backupLink' => $backupLink));
}
}
}
}
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:backup.php
示例11: get_page_advanced
} else {
$max_list = 1;
}
if (isset($_REQUEST['option'])) {
if ($_REQUEST['description'] == "" || $_REQUEST['amount'] <= 0) {
get_page_advanced("purchase", "admin", array('deposit' => $deposit, 'incomplete' => $incomplete, 'pending' => $pending, 'accept' => $accept, 'reject' => $reject, 'balance' => $money, 'max_list' => $max_list, 'error' => "New orders require a description and amount!"));
} else {
if ($_REQUEST['transfer_type'] == -1) {
$id = createPurchase($club_id, $_REQUEST['description'], $_REQUEST['amount'] * $_REQUEST['transfer_type']);
get_page_advanced("purchase_create", "admin", array('club_id' => $club_id, 'id' => $id));
} else {
if ($_REQUEST['transfer_type'] == 0) {
$amount = $_REQUEST['amount'];
createDeposit($club_id, $_REQUEST['description'], $_REQUEST['amount']);
get_page_advanced("purchase", "admin", array('deposit' => $deposit, 'incomplete' => $incomplete, 'pending' => $pending, 'accept' => $accept, 'reject' => $reject, 'balance' => $money, 'max_list' => $max_list, 'success' => "\${$amount} added to your account!"));
}
}
}
} else {
if (isset($_REQUEST['edit'])) {
get_page_advanced("purchase_create", "admin", array('club_id' => $club_id, 'id' => $_REQUEST['edit']));
} else {
get_page_advanced("purchase", "admin", array('deposit' => $deposit, 'incomplete' => $incomplete, 'pending' => $pending, 'accept' => $accept, 'reject' => $reject, 'balance' => $money, 'max_list' => $max_list));
}
}
} else {
get_page_advanced("message", "admin", array('message' => "General application admin cannot make purchase orders.", 'title' => "Purchase Orders"));
}
} else {
header('Location: index.php?error=' . urlencode("You are not logged in!"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:purchase.php
示例12: clubInfo
$whereString = "id = '" . $club_id . "'";
$clubInfo = clubInfo($club_id);
//array (club name, club description, open_time, close_time, num_recommendations)
$sectionheader = "Supplement: " . $clubInfo[0];
} else {
$sectionheader = "General Application";
}
$createResult = generatePDFByResult($result, "../pdf/", $sectionheader);
if (!$createResult[0]) {
$error = "Error during PDF generation: " . $createResult[1];
} else {
$basePath = basePath();
$style = getStyle();
$stylePath = $basePath . "/astyle/{$style}";
$message = "<a href=\"../pdf/" . $createResult[1] . ".pdf\"><div class=\"nav-button-vertical small right\"><div class=\"pdf\" ></div></div></a>";
$success = "PDF made!";
}
}
//categories list comes from the category manager
if (isset($error)) {
get_page_advanced("preview", "admin", array('questionList' => $questionList, 'categories' => $categories, 'error' => $error, 'message' => $message, 'categories' => $categories));
} else {
if (isset($success)) {
get_page_advanced("preview", "admin", array('questionList' => $questionList, 'categories' => $categories, 'success' => $success, 'message' => $message, 'categories' => $categories));
} else {
get_page_advanced("preview", "admin", array('questionList' => $questionList, 'categories' => $categories, 'message' => $message, 'categories' => $categories));
}
}
} else {
header('Location: index.php?error=' . urlencode("You are not logged in!"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:preview.php
示例13: checkExtraPDFs
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/chk.php";
if (isset($_SESSION['root'])) {
$pdfArray = false;
if (isset($_REQUEST['delete'])) {
checkExtraPDFs(true);
} else {
$pdfArray = checkExtraPDFs();
}
get_page_advanced("check_pdf", "root", array('pdfArray' => $pdfArray));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:18,代码来源:check_pdf.php
示例14: fullClean
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/chk.php";
if (isset($_SESSION['root'])) {
if (isset($_REQUEST['clean'])) {
fullClean();
$success = "Database cleansed to unecessary evils.";
}
if (isset($success)) {
get_page_advanced("full_clean", "root", array('success' => $success));
} else {
get_page_advanced("full_clean", "root");
}
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:20,代码来源:full_clean.php
示例15: escape
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
if (isset($_SESSION['admin']) && isset($_REQUEST['id'])) {
//todo: admins currently can get information of users that didn't apply to their club
$user_id = escape($_REQUEST['id']);
$userinfo = getUserInformation($user_id);
//userinfo is array(username, email)
$profile = getProfile($user_id);
get_page_advanced("user_detail", "admin", array('username' => $userinfo[0], 'email' => $userinfo[1], 'name' => $userinfo[2], 'profile' => $profile));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:16,代码来源:user_detail.php
示例16: adminStatistics
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/apply_gen.php";
include "../include/statistics.php";
if (isset($_SESSION['admin'])) {
$club_id = $_SESSION['admin_club_id'];
$adminStat = adminStatistics($club_id);
$responseStat = responseStatistics($club_id, true, 8);
get_page_advanced("statistics", "admin", array('adminStat' => $adminStat, 'responseStat' => $responseStat));
} else {
header('Location: index.php?error=' . urlencode("You are not logged in!"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:16,代码来源:statistics.php
示例17: escape
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/recommend.php";
include "../include/custom.php";
if (isset($_SESSION['root'])) {
$recommendationResult = FALSE;
$user_id = -1;
if (isset($_REQUEST['user_id'])) {
$user_id = escape($_REQUEST['user_id']);
if (isset($_REQUEST['remove_id'])) {
$recommend_id = escape($_REQUEST['remove_id']);
//get instance id
$result = mysql_query("SELECT instance_id from recommendations WHERE id = '{$recommend_id}'");
if ($row = mysql_fetch_row($result)) {
$instance_id = $row[0];
mysql_query("DELETE FROM recommendations WHERE id = '{$recommend_id}'");
customDestroy($instance_id);
}
}
$recommendationResult = mysql_query("SELECT * FROM recommendations WHERE user_id = '{$user_id}'");
}
$result = mysql_query("SELECT id,username FROM users ORDER BY id");
get_page_advanced("rm_peer", "root", array('user_id' => $user_id, 'recommendationResult' => $recommendationResult, 'userdata' => $result));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:30,代码来源:rm_peer.php
示例18: clubInfo
if ($club_id != 0) {
$whereString = "id = '" . $club_id . "'";
$clubInfo = clubInfo($club_id);
//array (club name, club description, open_time, close_time, num_recommendations)
$sectionheader = "Supplement: " . $clubInfo[0];
} else {
$sectionheader = "General Application";
}
$createResult = generatePDFByResult($result, "../pdf/", $sectionheader);
if (!$createResult[0]) {
$error = "Error during PDF generation: " . $createResult[1];
} else {
$basePath = basePath();
$style = getStyle();
$stylePath = $basePath . "/astyle/{$style}";
$message = "<a href=\"../pdf/" . $createResult[1] . ".pdf\"><img src=\"" . $stylePath . "/images/application_word.png\" width=\"64\"></a>";
$success = "PDF made!";
}
}
if (isset($error)) {
get_page_advanced("gen_pdf", "admin", array('error' => $error, 'message' => $message, 'categories' => $categories));
} else {
if (isset($success)) {
get_page_advanced("gen_pdf", "admin", array('success' => $success, 'message' => $message, 'categories' => $categories));
} else {
get_page_advanced("gen_pdf", "admin", array('message' => $message, 'categories' => $categories));
}
}
} else {
header('Location: index.php?error=' . urlencode("You are not logged in!"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:31,代码来源:gen_pdf.php
示例19: calculateStatistics
<?php
include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/statistics.php";
if (isset($_SESSION['root'])) {
$stat_array = calculateStatistics();
get_page_advanced("statistics", "root", array('stat_array' => $stat_array));
} else {
header('Location: index.php');
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:13,代码来源:statistics.php
示例20: session_unset
<?php
include "../include/common.php";
include "../config.php";
include "../include/db_connect.php";
include "../include/session.php";
if (isset($_SESSION['user_id'])) {
session_unset();
get_page_advanced("message", "apply", array("title" => "Logged out", "message" => "You have been logged out. Click <a href=\"../\">here</a> to continue.", "redirect" => "../"));
} else {
get_page_advanced("message", "apply", array("title" => "Not Logged In", "message" => "You are not logged in, so there is no reason to log out. Click <a href=\"../\">here</a> to continue.", "redirect" => "../login.php"));
}
开发者ID:uakfdotb,项目名称:oneapp,代码行数:12,代码来源:logout.php
注:本文中的get_page_advanced函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论