本文整理汇总了PHP中is_get函数的典型用法代码示例。如果您正苦于以下问题:PHP is_get函数的具体用法?PHP is_get怎么用?PHP is_get使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_get函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
function get($id)
{
if (is_get($id)) {
return $_GET[$id];
} else {
return '';
}
}
示例2: wpi_get_current_author
function wpi_get_current_author()
{
global $author, $author_name;
if (is_get('author_name')) {
$user = get_userdatabylogin($author_name);
} else {
$user = get_userdata(intval($author));
}
return $user;
}
示例3: action_create
public function action_create($id = false)
{
if (is_get()) {
$obj = Controller::getVar('obj');
$obj = $obj ? $obj : array();
$obj['active'] = 1;
Controller::setVar('obj', $obj);
}
$result = parent::action_create();
return $result;
}
示例4: need_login
function need_login($force = false)
{
if (isset($_GET['abc'])) {
print_r($_SESSION);
die;
}
if (isset($_SESSION['user_id'])) {
if (is_post()) {
unset($_SESSION['loginpage']);
unset($_SESSION['loginpagepost']);
}
return $_SESSION['user_id'];
}
if (is_get()) {
Session::Set('loginpage', $_SERVER['REQUEST_URI']);
} else {
Session::Set('loginpage', $_SERVER['HTTP_REFERER']);
Session::Set('loginpagepost', json_encode($_POST));
}
return redirect(WEB_ROOT . '/login.php?' . $_SERVER['QUERY_STRING']);
}
示例5: require_once
<?php
require_once(dirname(dirname(dirname(__FILE__))) . '/app.php');
require_once(dirname(__FILE__) . '/current.php');
need_manager();
need_rbac_auth('team_create_edit');
$id = abs(intval($_GET['id']));
$team = $eteam = Table::Fetch('team', $id);
if ( is_get() && empty($team) ) {
$team = array();
$team['id'] = 0;
$team['user_id'] = $login_user_id;
$team['begin_time'] = strtotime('+1 days');
$team['end_time'] = strtotime('+2 days');
$team['expire_time'] = strtotime('+1 months +15 days');
$team['min_number'] = 10;
$team['per_number'] = 1;
$team['permin_number'] = 1;
$team['market_price'] = 1;
$team['team_price'] = 1;
$team['delivery'] = 'coupon';
$team['address'] = $profile['address'];
$team['mobile'] = $profile['mobile'];
$team['fare'] = 5;
$team['farefree'] = 0;
$team['bonus'] = abs(intval($INI['system']['invitecredit']));
$team['conduser'] = $INI['system']['conduser'] ? 'Y' : 'N';
$team['buyonce'] = 'Y';
$team['booking'] = empty($team['booking'])?0:1;
示例6: dirname
<?php
require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
import('backup');
need_manager(true);
function _go_reload()
{
redirect(WEB_ROOT . '/manage/misc/backup.php');
}
/* get tables */
$db_name = $INI['db']['name'];
$tables = DB::GetQueryResult("SHOW TABLE STATUS FROM `{$db_name}`", false);
/* end */
if (is_get()) {
$results = DB::GetQueryResult("SHOW TABLE STATUS FROM `{$db_name}`", false);
$option_table = Utility::OptionArray($results, 'name', 'name');
die(include template('manage_misc_backup'));
}
$bftype = $_POST['bfzl'];
if ($bftype == "quanbubiao") {
if (!$_POST['fenjuan']) {
//不是分卷
$sql = null;
foreach ($tables as $one) {
$table = $one['name'];
$sql .= backup_make_header($table);
$query = DB::Query("SELECT * FROM `{$table}`");
while ($r = DB::NextRecord($query)) {
$sql .= backup_make_record($table, $r);
}
}
示例7: need_login
function need_login($force = false)
{
if (isset($_SESSION['user_id'])) {
if (is_post()) {
unset($_SESSION['loginpage']);
unset($_SESSION['loginpagepost']);
}
return $_SESSION['user_id'];
}
if (is_get()) {
Session::Set('loginpage', $_SERVER['REQUEST_URI']);
} else {
Session::Set('loginpage', $_SERVER['HTTP_REFERER']);
Session::Set('loginpagepost', json_encode($_POST));
}
return redirect(WEB_ROOT . '/account/loginup.php');
}
示例8: template
<?php include template("header");?>
<?php if(is_get()){?>
<div class="sysmsgw" id="sysmsg-error"><div class="sysmsg"><p>此订单尚未完成付款,请重新付款</p><span class="close">关闭</span></div></div>
<?php }?>
<div class="layout">
<div class="team_main" style="overflow:hidden">
<div class="pay_main">
<div id="content">
<div id="deal-buy" class="box">
<div id="deal-buy" class="pay_header">
<div class="head">
<h2 style="_margin-top:20px; font-size:18px;">充值金额:<strong style=" font-size:22px;" class="total-money money2"><?php echo moneyit($total_money); ?></strong> 元</h2>
</div>
<div class="sect">
<div style="text-align:left;">
<?php echo $payhtml; ?>
<div style="float:left; margin-top:10px; width:680px;"><a href="/credit/charge.php?money=<?php echo $total_money; ?>">» 返回选择其他支付方式</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->
<?php include template("footer");?>
示例9: need_login
function need_login($force = false)
{
if (isset($_SESSION['user_id'])) {
return $_SESSION['user_id'];
}
if (is_get() || $force) {
Session::Set('loginpage', $_SERVER['REQUEST_URI']);
}
return redirect(WEB_ROOT . '/account/login.php');
}
示例10: upme_customizer
public function upme_customizer()
{
/**
* @submit settings page
*/
if (is_in_post('submit')) {
$this->upme_update_custom_field($_POST, 'normal');
//$this->update();
}
/* Create a new field */
if (is_in_post('upme-add')) {
$this->upme_add_custom_field($_POST, 'normal');
}
/* Trash field */
if (is_get()) {
if (isset($_GET['trash_field']) && !isset($_POST['submit']) && !isset($_POST['reset-options']) && !isset($_POST['reset-options-fields'])) {
$fields = get_option('upme_profile_fields');
$trash = $_GET['trash_field'];
if (isset($fields[$trash])) {
/* UPME Action for before deleteing custom field */
do_action('upme_before_delete_field', $fields[$trash]);
// End Action
if (isset($this->delete_error)) {
if ('' != $this->delete_error) {
echo '<div class="updated"><p><strong>' . $this->delete_error . '</strong></p></div>';
}
} else {
$trash_field = $fields[$trash];
unset($fields[$trash]);
update_option('upme_profile_fields', $fields);
/* UPME Action for after deleting custom field */
do_action('upme_after_delete_field', $trash_field);
// End Action
$update_cache_link = ' <a href="' . get_admin_url('', 'admin.php?page=upme-search-cache') . '">' . __('Update Now', 'upme') . '</a>';
echo '<div class="updated"><p><strong>' . __('Profile field was sent to Trash. It is recommended to update your user search cache.', 'upme') . $update_cache_link . '</strong></p></div>';
}
}
}
}
if (is_in_post('reset-options-fields')) {
$this->reset_all('normal');
}
include_once upme_path . 'admin/field-builder.php';
}
示例11: dirname
<?php
require_once dirname(dirname(__FILE__)) . '/app.php';
if (isset($_SESSION['user_id'])) {
unset($_SESSION['user_id']);
ZLogin::NoRemember();
$login_user = $login_user_id = $login_manager = $login_leader = null;
}
$code = strval($_GET['code']);
if ($code == 'ok' && is_get()) {
die(include template('account_reset_ok'));
}
$user = Table::Fetch('user', $code, 'recode');
if (!$user) {
Session::Set('error', '重设密码的链接无效');
redirect(WEB_ROOT . '/index.php');
}
if (is_post()) {
if ($_POST['password'] == $_POST['password2']) {
ZUser::Modify($user['id'], array('password' => $_POST['password'], 'recode' => ''));
redirect(WEB_ROOT . '/account/reset.php?code=ok');
}
Session::Set('error', '两次输入的密码不匹配,请重新设置');
}
$pagetitle = '重设密码';
include template('account_reset');
示例12: setThemeOptions
/**
* Wpi::setThemeOptions()
*
* @return
*/
public function setThemeOptions()
{
if (!class_exists('wpiAdmin')) {
self::getFile('admin', 'class');
$this->AdminUI = new wpiAdmin();
$req_page = basename(WPI_DIR . 'functions.php');
$token = wpiFilter::NONCE_THEME_OPTIONS;
if (is_get('page') && is_get('page') == $req_page) {
if (is_req('action') && 'save' == b64_safe_decode($_REQUEST['action'])) {
check_admin_referer($token);
$this->AdminUI->filterRequest($_REQUEST);
wp_redirect('themes.php?page=' . $req_page . '&saved=true');
die;
}
add_action('admin_head', array($this->AdminUI, 'printCSS'));
wp_enqueue_script(WPI_META . '_admin');
}
add_theme_page(__('WPI Theme Options', WPI_META), __('Theme Options', WPI_META), 'edit_themes', $req_page, array($this->AdminUI, 'themeOptions'));
}
}
示例13: is_ajax
function is_ajax()
{
if (isset($_SERVER["HTTP_X_REQUESTED_WITH"]) && !empty($_SERVER["HTTP_X_REQUESTED_WITH"]) && strtolower($_SERVER["HTTP_X_REQUESTED_WITH"]) == "xmlhttprequest") {
return true;
}
return false;
}
function is_get()
{
if ($_SERVER["REQUEST_METHOD"] == "GET") {
return true;
}
return false;
}
## Обработка запросов
if (is_get() && is_ajax()) {
$count = (int) $_GET["count"];
$count_next = (int) $_GET["count_next"];
$table = $_GET["table"];
$sort = $_GET["sort"];
$type_id = $_GET["type_id"];
$skip_id = $_GET["skip_id"];
if (empty($skip_id)) {
$skip_id = 0;
}
switch ($table) {
case 'artists':
$html = getArtistBlock($count, $count_next);
break;
case 'artists':
$html = getArtistBlock($count, $count_next);