• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getPostValue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getPostValue函数的典型用法代码示例。如果您正苦于以下问题:PHP getPostValue函数的具体用法?PHP getPostValue怎么用?PHP getPostValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: invoke

 /**
  * Invokes the whole application.
  */
 public function invoke()
 {
     $this->_pageKey = getGetValue('page', 'accounts');
     $this->_subKey = getGetValue('sub');
     $sessionLang = jpWotSession::get('active_language');
     if (empty($sessionLang)) {
         jpWotSession::set('active_language', strtolower(trim(jpWotConfig::$lang)));
     }
     $changeLang = getPostValue('lang');
     if (isset($changeLang['current'], $changeLang['new']) && $changeLang['current'] != $changeLang['new']) {
         jpWotSession::set('active_language', $changeLang['new']);
         $langKey = $changeLang['new'];
     } else {
         $langKey = jpWotSession::get('active_language');
     }
     $langKey = $this->getIniLanguageKey($langKey);
     $language = jpWotLanguage::getInstance();
     $language->load('main', BPATH, $langKey);
     $language->load('filter', BPATH, $langKey);
     $language->load($this->_pageKey, BPATH, $langKey);
     $controller = $this->getControllerInstance();
     $page = getPostValue('request');
     if (!empty($page)) {
         $controller->setRequestData($page);
     }
     $controller->index();
 }
开发者ID:KANU82,项目名称:wot-stats-search-engine,代码行数:30,代码来源:app.php


示例2: initialize_page

function initialize_page()
{
    $category_id = requestIdParam();
    $category = Categories::FindById($category_id);
    $post_action = "";
    if (isset($_POST['submit'])) {
        $post_action = $_POST['submit'];
    }
    if (isset($_POST['delete'])) {
        $category->delete(true);
        setFlash("<h3>Category Deleted</h3>");
        redirect("/admin/list_categories/");
    } else {
        if ($post_action == "Edit Category" || $post_action == "Edit and Return to List") {
            $category->display_name = getPostValue('display_name');
            $category->name = slug(getPostValue('display_name'));
            $category->content = getPostValue('category_content');
            $category->save();
            setFlash("<h3>Category Edited</h3>");
            if ($post_action == "Edit and Return to List") {
                redirect("admin/list_categories/");
            }
        }
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:25,代码来源:edit_category.php


示例3: getValue

function getValue($name, $format = '', $fatal = false)
{
    global $settings;
    $val = getPostValue($name);
    if (!isset($val)) {
        $val = getGetValue($name);
    }
    // for older PHP versions...
    if (!isset($val) && get_magic_quotes_gpc() == 1 && !empty($GLOBALS[$name])) {
        $val = $GLOBALS[$name];
    }
    if (!isset($val)) {
        return '';
    }
    if (!empty($format) && !preg_match('/^' . $format . '$/', $val)) {
        // does not match
        if ($fatal) {
            if ($settings['mode'] == 'dev') {
                $error_str = ' "' . $val . '"';
            } else {
                $error_str = '';
            }
            die_miserable_death(translate('Fatal Error') . ': ' . translate('Invalid data format for') . ' ' . $name . $error_str);
        }
        // ignore value
        return '';
    }
    return $val;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:29,代码来源:formvars.php


示例4: initialize_page

function initialize_page()
{
    $post_action = "";
    if (isset($_POST['submit'])) {
        $post_action = $_POST['submit'];
    }
    if ($post_action == "Add Category" || $post_action == "Add and Return to List") {
        $category = MyActiveRecord::Create('Categories');
        $category->display_name = getPostValue('display_name');
        $category->name = slug(getPostValue('display_name'));
        $category->content = getPostValue('category_content');
        $category->save();
        setFlash("<h3>Category Added</h3>");
        if ($post_action == "Add and Return to List") {
            redirect("admin/list_categories/");
        }
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:18,代码来源:add_category.php


示例5: getLoginJSONP

function getLoginJSONP($type)
{
    require_once "../leader/jsupport.php";
    $success = false;
    $username = "";
    $key = "";
    //Ignore any messages from the login system that may corrupt our JSON
    ob_start();
    if (array_key_exists("username", $_COOKIE) && array_key_exists("key", $_COOKIE)) {
        //We may have saved these via javascript. Try loading them
        $username = strtolower($_COOKIE["username"]);
        $key = $_COOKIE["key"];
        $success = true;
    } else {
        if (checkPostLogin() == 7) {
            //Can we log in with leaderboards?
            $username = strtolower(getPostValue("username"));
            $key = getKey($username);
            $success = true;
        } else {
            //Nope
            $success = false;
        }
    }
    ob_end_clean();
    //Return their key formatted as specified
    if ($success) {
        if ($type === "JS") {
            return "webchat.setUser(\"{$username}\", \"{$key}\", \"true\"); webchat.connect();";
        } else {
            if ($type === "JSON") {
                return json_encode(array("success" => true, "username" => $username, "key" => $key));
            }
        }
    } else {
        if ($type === "JS") {
            return "webchat.enableLogin(true); webchat.setLoginStatus(\"No Saved Login Found\");";
        } else {
            if ($type === "JSON") {
                return json_encode(array("success" => false));
            }
        }
    }
}
开发者ID:PlatinumTeam,项目名称:MBWebchat-Client,代码行数:44,代码来源:user.php


示例6: header

    header('Cache-Control: no-cache');
}
//end function
/*******************************************/
/*** Let's go ***/
/*******************************************/
$id = getIntValue('id', true);
$format = getValue('format');
if ($format != 'ical' && $format != 'vcal' && $format != 'pilot-csv' && $format != 'pilot-text') {
    die_miserable_death("Invalid format '" . $format . "'");
}
$use_all_dates = getPostValue('use_all_dates');
if ($use_all_dates != 'y') {
    $use_all_dates = '';
}
$include_layers = getPostValue('include_layers');
if ($include_layers != 'y') {
    $include_layers = '';
}
$fromyear = getIntValue('fromyear', true);
$frommonth = getIntValue('frommonth', true);
$fromday = getIntValue('fromday', true);
$endyear = getIntValue('endyear', true);
$endmonth = getIntValue('endmonth', true);
$endday = getIntValue('endday', true);
$modyear = getIntValue('modyear', true);
$modmonth = getIntValue('modmonth', true);
$modday = getIntValue('modday', true);
mt_srand((double) microtime() * 1000000);
if (empty($id)) {
    $id = "all";
开发者ID:rohcehlam,项目名称:rflow,代码行数:31,代码来源:export_handler.php


示例7: require_valide_referring_url

// file in ways they shouldn't. Users may try to type in a URL to get around
// functions that are not being displayed on the web page to them.
include_once 'includes/init.php';
require_valide_referring_url();
load_user_layers();
$delete = getPostValue('delete');
$formtype = getPostValue('formtype');
$add = getPostValue('add');
$user = getPostValue('user');
$ufirstname = getPostValue('ufirstname');
$ulastname = getPostValue('ulastname');
$uemail = getPostValue('uemail');
$upassword1 = getPostValue('upassword1');
$upassword2 = getPostValue('upassword2');
$uis_admin = getPostValue('uis_admin');
$uenabled = getPostValue('uenabled');
$error = '';
if (!$is_admin) {
    $user = $login;
}
$deleteStr = translate('Deleting users not supported.');
$notIdenticalStr = translate('The passwords were not identical.');
$noPasswordStr = translate('You have not entered a password.');
$blankUserStr = translate('Username cannot be blank.');
// Don't let them edit users if they'e not authorized.
if (empty($user)) {
    // Asking to create a new user. Must be admin...
    if (!$is_admin && !access_can_access_function(ACCESS_USER_MANAGEMENT)) {
        send_to_preferred_view();
    }
    if (!$admin_can_add_user) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:edit_user_handler.php


示例8: set_env

$GLOBALS['CELLBG'] = $prefarray['CELLBG'];
$GLOBALS['WEEKENDBG'] = $prefarray['WEEKENDBG'];
$GLOBALS['OTHERMONTHBG'] = $prefarray['OTHERMONTHBG'];
$GLOBALS['FONTS'] = $prefarray['FONTS'];
$GLOBALS['MYEVENTS'] = $prefarray['MYEVENTS'];
//determine if we can set timezones, if not don't display any options
$can_set_timezone = set_env('TZ', $prefarray['TIMEZONE']);
$dateYmd = date('Ymd');
$selected = ' selected="selected" ';
$minutesStr = translate('minutes');
//allow css_cache to display public or NUC values
@session_start();
$_SESSION['webcal_tmp_login'] = $prefuser;
//Prh ... add user to edit_template to get/set correct template
$openStr = "\"window.open( 'edit_template.php?type=%s&user=%s','cal_template','dependent,menubar,scrollbars,height=500,width=500,outerHeight=520,outerWidth=520' );\"";
$currenttab = getPostValue('currenttab', 'settings');
$currenttab = !empty($currenttab) ? $currenttab : 'settings';
$BodyX = 'onload="altrows(); showTab( \'' . $currenttab . '\' );"';
$INC = array('js/visible.php', 'js/pref.php');
print_header($INC, '', $BodyX);
?>

<h2><?php 
if ($updating_public) {
    echo translate($PUBLIC_ACCESS_FULLNAME) . '&nbsp;';
}
etranslate('Preferences');
if ($is_nonuser_admin || $is_admin && substr($prefuser, 0, 5) == '_NUC_') {
    nonuser_load_variables($user, 'nonuser');
    echo '<br /><strong>-- ' . translate('Admin mode') . ': ' . $nonuserfullname . " --</strong>\n";
}
开发者ID:GetInTheGo,项目名称:JohnsonFinancialService,代码行数:31,代码来源:pref.php


示例9: initialize_page

function initialize_page()
{
    $event_types = EventTypes::FindAll();
    $event_periods = EventPeriods::FindAll();
    $post_action = "";
    if (isset($_POST['submit'])) {
        $post_action = $_POST['submit'];
        if ($post_action == "Add Event and add another" || $post_action == "Add and Return to List") {
            $event = MyActiveRecord::Create('Events', $_POST);
            if (!getPostValue('time_start')) {
                $event->setDateStart(getPostValue('date_start'), "04:00:00");
            } else {
                $event->time_start = date("H:i:s", strtotime(getPostValue('time_start')));
            }
            if (!getPostValue('date_end') && !getPostValue('time_end')) {
                $event->setDateEnd(getPostValue('date_start'), "04:00:00");
            } else {
                if (!getPostValue('date_end') && getPostValue('time_end')) {
                    $event->setDateEnd(getPostValue('date_start'), date("H:i:s", strtotime(getPostValue('time_end'))));
                } else {
                    $event->setDateEnd(getPostValue('date_end'), date("H:i:s", strtotime(getPostValue('time_end'))));
                }
            }
            $event->eventtype_id = isset($_POST['eventtype_id']) ? $_POST['eventtype_id'] : 1;
            $event->eventperiod_id = $_POST['eventperiod_id'];
            $event->save();
            $notdates = getPostValue('notdates');
            if (is_array($notdates)) {
                foreach ($notdates as $date) {
                    if (strlen($date) > 4) {
                        $query = "INSERT INTO events_notdate VALUES('{$event->id}','" . formatDateView($date, "Y-m-d") . "')";
                        mysql_query($query, MyActiveRecord::Connection()) or die($query);
                    }
                }
            }
            add_eventUpdateRecurrences($event);
            $thisnewevent = Events::FindById($event->id);
            if ($thisnewevent->date_end < $thisnewevent->date_start) {
                setFlash("<h3>Whoops! Event Starts after it Ends! Please correct dates...</h3>");
                $eventyear = parseDate($thisnewevent->date_start, "Y");
                $eventmonth = parseDate($thisnewevent->date_start, "n");
                redirect("/admin/edit_event/{$eventyear}/{$eventmonth}/{$thisnewevent->id}");
            } else {
                setFlash("<h3>Event added</h3>");
                if ($post_action == "Add and Return to List") {
                    // Redirect user to the Main Event List
                    $datestart = explode("/", getPostValue('date_start'));
                    setFlash("<h3>Event added</h3>");
                    redirect("/admin/list_events/{$datestart['2']}/{$datestart['0']}");
                }
            }
        }
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:54,代码来源:add_event.php


示例10: Category

<?php

// Include common functions and declarations
require_once "../../include/common.php";
// Get category id
$category = new Category(getGetValue("categoryId"));
// Check if user has edit permission
if (!$category->hasEditPermission()) {
    $login->printLoginForm();
    exit;
}
// Delete entries
$deleteReferences = getPostValue("deleteReferences");
if (!empty($deleteReferences)) {
    $references = getPostValue("references");
    for ($i = 0; $i < sizeof($references); $i++) {
        $dbi->query("DELETE FROM `" . categoryContentRefTableName . "` WHERE id=" . $dbi->quote($references[$i]));
    }
    // Redirect to category index
    redirect(!empty($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : scriptUrl . "/" . folderCategory . "/" . fileCategoryIndex);
}
// Validate page
$page = !empty($_GET["page"]) ? $_GET["page"] - 1 : 0;
// Generate navigation
$site->addNavigationLink(scriptUrl . "/" . folderAdmin, $lAdminIndex["Header"]);
$site->addNavigationLink(scriptUrl . "/" . folderCategory, $lAdminIndex["Categories"]);
$site->addNavigationLink(scriptUrl . "/" . folderCategory . "/" . fileCategory . "?categoryId=" . $category->id, $category->title);
// Print common header
$site->printHeader();
// Print section header
printf("<p>" . $lCategory["HeaderText"] . "</p>", $category->title);
开发者ID:gkathir15,项目名称:catmis,代码行数:31,代码来源:category.php


示例11: getValue

function getValue($name, $format = "", $fatal = false)
{
    $val = getPostValue($name);
    if (!isset($val)) {
        $val = getGetValue($name);
    }
    // for older PHP versions...
    if (!isset($val) && get_magic_quotes_gpc() == 1 && !empty($GLOBALS[$name])) {
        $val = $GLOBALS[$name];
    }
    if (!isset($val)) {
        return "";
    }
    if (!empty($format) && !preg_match("/^" . $format . "\$/", $val)) {
        // does not match
        if ($fatal) {
            echo "Fatal Error: Invalid data format for {$name}\n";
            exit;
        }
        // ignore value
        return "";
    }
    return $val;
}
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:24,代码来源:functions.php


示例12: redirect

            $comment->deleteComment($commentType > 0 ? true : false);
        }
    }
    // Redirect
    redirect(!empty($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : scriptUrl . "/" . folderComment . "/" . folderCommentIndex);
}
// Delete spam comments
$deleteSpamComments = getPostValue("deleteSpamComments");
if (!empty($deleteSpamComments)) {
    $comment = new Comment();
    $comment->deleteSpamComments();
    // Redirect
    redirect(!empty($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : scriptUrl . "/" . folderComment . "/" . folderCommentIndex);
}
// Delete trash comments
$deleteTrashComments = getPostValue("deleteTrashComments");
if (!empty($deleteTrashComments)) {
    $comment = new Comment();
    $comment->deleteTrashComments();
    // Redirect
    redirect(!empty($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : scriptUrl . "/" . folderComment . "/" . folderCommentIndex);
}
// Mark comments as spam or not spam
$spam = getValue("spam");
$notSpam = getValue("notSpam");
if (!empty($spam) || !empty($notSpam)) {
    $comments = getValue("comments");
    if (!empty($comments)) {
        for ($i = 0; $i < sizeof($comments); $i++) {
            $comment = new Comment($comments[$i]);
            $comment->setSpamStatus(!empty($spam) ? 1 : 0);
开发者ID:gkathir15,项目名称:catmis,代码行数:31,代码来源:index.php


示例13: validate

 /**
  * Examines the posted fields, defines $this->_ValidationFields, and enforces the $this->Rules collection on them.
  *
  * @param array $PostedFields An associative array of posted fields to be validated.
  * @param boolean $Insert A boolean value indicating if the posted fields are to be inserted or
  *  updated. If being inserted, the schema's required field rules will be enforced.
  * @return boolean Whether or not the validation was successful.
  */
 public function validate($PostedFields, $Insert = false)
 {
     // Create an array to hold validation result messages
     if (!is_array($this->_ValidationResults) || $this->resetOnValidate()) {
         $this->_ValidationResults = array();
     }
     // Check for a honeypot (anti-spam input)
     $HoneypotName = C('Garden.Forms.HoneypotName', '');
     $HoneypotContents = getPostValue($HoneypotName, '');
     if ($HoneypotContents != '') {
         $this->addValidationResult($HoneypotName, "You've filled our honeypot! We use honeypots to help prevent spam. If you're not a spammer or a bot, you should contact the application administrator for help.");
     }
     $FieldRules = $this->defineValidationRules($PostedFields, $Insert);
     $Fields = $this->defineValidationFields($PostedFields, $Insert);
     // Loop through the fields that should be validated
     foreach ($Fields as $FieldName => $FieldValue) {
         // If this field has rules to be enforced...
         if (array_key_exists($FieldName, $FieldRules) && is_array($FieldRules[$FieldName])) {
             // Enforce them.
             $Rules = $FieldRules[$FieldName];
             // Get the field info for the field.
             $FieldInfo = array('Name' => $FieldName);
             if (is_array($this->_Schema) && array_key_exists($FieldName, $this->_Schema)) {
                 $FieldInfo = array_merge($FieldInfo, (array) $this->_Schema[$FieldName]);
             }
             $FieldInfo = (object) $FieldInfo;
             foreach ($Rules as $RuleName) {
                 if (array_key_exists($RuleName, $this->_Rules)) {
                     $Rule = $this->_Rules[$RuleName];
                     // echo '<div>FieldName: '.$FieldName.'; Rule: '.$Rule.'</div>';
                     if (substr($Rule, 0, 9) == 'function:') {
                         $Function = substr($Rule, 9);
                         if (!function_exists($Function)) {
                             trigger_error(errorMessage('Specified validation function could not be found.', 'Validation', 'Validate', $Function), E_USER_ERROR);
                         }
                         $ValidationResult = $Function($FieldValue, $FieldInfo, $PostedFields);
                         if ($ValidationResult !== true) {
                             // If $ValidationResult is not FALSE, assume it is an error message
                             $ErrorCode = $ValidationResult === false ? $Function : $ValidationResult;
                             // If there is a custom error, use it above all else
                             $ErrorCode = val($FieldName . '.' . $RuleName, $this->_CustomErrors, $ErrorCode);
                             // Add the result
                             $this->addValidationResult($FieldName, $ErrorCode);
                             // Only add one error per field
                         }
                     } elseif (substr($Rule, 0, 6) == 'regex:') {
                         $Regex = substr($Rule, 6);
                         if (ValidateRegex($FieldValue, $Regex) !== true) {
                             $ErrorCode = 'Regex';
                             // If there is a custom error, use it above all else
                             $ErrorCode = val($FieldName . '.' . $RuleName, $this->_CustomErrors, $ErrorCode);
                             // Add the result
                             $this->addValidationResult($FieldName, $ErrorCode);
                         }
                     }
                 }
             }
         }
     }
     $this->_ValidationFields = $Fields;
     return count($this->_ValidationResults) === 0;
 }
开发者ID:battaglia01,项目名称:vanilla,代码行数:70,代码来源:class.validation.php


示例14: initialize_page

function initialize_page()
{
    $post_action = $success = "";
    $gallery = Galleries::FindById(requestIdParam());
    if (isset($_POST['submit'])) {
        $post_action = $_POST['submit'];
    }
    if ($post_action == "Edit Gallery" || $post_action == "Edit and Return to List" || $post_action == "Add Image to Gallery") {
        if (isset($_POST['delete'])) {
            $photos = $gallery->get_photos();
            if (count($photos) > 0) {
                $success .= "Photos deleted / ";
            }
            foreach ($photos as $thephoto) {
                $thephoto->delete(true);
            }
            $gallery->delete(true);
            $success .= "Gallery deleted / ";
            setFlash("<h3>" . substr($success, 0, -3) . "</h3>");
            redirect("/admin/list_galleries");
        } else {
            // Name has changed.
            if ($gallery->name != $_POST['name']) {
                $gallery->name = $_POST['name'];
                $gallery->slug = slug($_POST['name']);
                $gallery->save();
                $success .= "Gallery name saved / ";
            }
            // Update captions if they are different.
            if (isset($_POST['captions'])) {
                $captions = $_POST['captions'];
                foreach ($captions as $key => $thecaption) {
                    $photo = Photos::FindById($key);
                    if ($photo->caption != $thecaption) {
                        $photo->caption = $thecaption;
                        $photo->save();
                    }
                }
                //$success .= "Captions edited / ";
            }
            // Reset the display order if the photos have been moved.
            if (isset($_POST['photos_display_order'])) {
                $display_orders = $_POST['photos_display_order'];
                foreach ($display_orders as $key => $display_order) {
                    $photo = Photos::FindById($key);
                    if ($photo->display_order != $display_order) {
                        $photo->display_order = $display_order;
                        $photo->save();
                    }
                }
                //$success .= "Photo order saved / ";
            }
            // Upload and save a new file.
            if (isset($_FILES['new_photo']) && $_FILES['new_photo']['error'] == 0) {
                // Updating the record to include the filename stopped working in photos > save_uploaded_file Jan 2013
                $photo = MyActiveRecord::Create('Photos', array('caption' => getPostValue("new_photo_caption"), 'gallery_id' => $gallery->id, 'display_order' => 1));
                $photo->save();
                $photo->save_uploaded_file($_FILES['new_photo']['tmp_name'], $_FILES['new_photo']['name']);
                $photo->setDisplayOrder();
                $success .= "New photo added / ";
            } else {
                // from http://php.net/manual/en/features.file-upload.errors.php
                $upload_errors = array("0. UPLOAD_ERR_OK: No errors.", "1. UPLOAD_ERR_INI_SIZE: Larger than upload_max_filesize.", "2. UPLOAD_ERR_FORM_SIZE: Larger than form MAX_FILE_SIZE.", "3. UPLOAD_ERR_PARTIAL: Partial upload.", "4. UPLOAD_ERR_NO_FILE: No file.", "6. UPLOAD_ERR_NO_TMP_DIR: No temporary directory.", "7. UPLOAD_ERR_CANT_WRITE: Can't write to disk.", "8. UPLOAD_ERR_EXTENSION: File upload stopped by extension.", "UPLOAD_ERR_EMPTY: File is empty.");
                $err_num = $_FILES['new_photo']['error'];
                if ($err_num != 4) {
                    echo "Upload Error! " . $upload_errors[$err_num];
                }
            }
            // Delete photos that were checked off to be removed
            if (isset($_POST['deleted_photos'])) {
                $deleted_ids = $_POST['deleted_photos'];
                foreach ($deleted_ids as $status => $photo_id) {
                    $photo = Photos::FindById($photo_id);
                    $photo->delete(true);
                }
                $success .= "Photo deleted / ";
            }
            setFlash("<h3>" . substr($success, 0, -3) . "</h3>");
            if ($post_action == "Edit and Return to List") {
                redirect("admin/list_galleries");
            }
        }
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:84,代码来源:edit_gallery.php


示例15: getGetValue

<?php

// Include common functions and declarations
require_once "include/common.php";
// Add navigation link
$site->addNavigationLink(scriptUrl . "/" . fileProfileForgotPassword, $lForgotPassword["Header"]);
// Print header
$site->printHeader();
echo '<p>' . $lForgotPassword["HeaderText"] . '</p>';
// Get values
$send = getGetValue("send");
$username = getPostValue("username");
$email = getPostValue("email");
$id = getGetValue("id");
$key = getGetValue("key");
$success = getGetValue("success");
if (!empty($id) && !empty($key)) {
    $user = new User($id);
    if (!empty($user->id)) {
        // Check if key matches key in database
        $result = $dbi->query("SELECT username,activationKey FROM " . userTableName . " WHERE id=" . $dbi->quote($user->id));
        if ($result->rows()) {
            list($username, $activationKey) = $result->fetchrow_array();
            if ($key == $activationKey) {
                // Include password form
                $forgotPassword = 1;
                include scriptPath . '/' . folderUsers . '/include/form/userPasswordForm.php';
            } else {
                echo '<p>' . $lForgotPassword["InvalidKey"] . '</p>';
            }
        }
开发者ID:gkathir15,项目名称:catmis,代码行数:31,代码来源:forgotPassword.php


示例16: saveFolder

 /** Save folder. */
 function saveFolder()
 {
     if (!empty($this->id)) {
         global $errors;
         global $lFileEditFolder;
         // Check if data is submitted from the form
         checkSubmitter();
         // Get values
         $this->name = getPostValue("folderName");
         $this->parent = new Folder(getPostValue("folderId"));
         // Validate
         if (empty($this->name)) {
             $errors->addError("folderName", $lFileEditFolder["MissingFoldername"]);
         }
         if (!$errors->hasErrors()) {
             // Rename folder
             $this->renameFolder($this->name);
         }
         return $errors;
     }
 }
开发者ID:gkathir15,项目名称:catmis,代码行数:22,代码来源:Folder.class.php


示例17: get_pref_setting

                     $msg .= "\n\n" . $url;
                 }
                 $wantsAttach = get_pref_setting($participants[$i], 'EMAIL_ATTACH_ICS', 'N');
                 $attachId = $wantsAttach == 'Y' ? $id : '';
                 // Use WebCalMailer class.
                 $mail->WC_Send($login_fullname, $tempemail, $tempfullname, $name, $msg, $htmlmail, $from, $attachId);
                 activity_log($id, $login, $participants[$i], LOG_NOTIFICATION, '');
             }
         }
     }
 }
 //end for loop participants
 // Add external participants.
 $ext_emails = $ext_names = $matches = array();
 $ext_count = 0;
 $externalparticipants = getPostValue('externalparticipants');
 if ($single_user == 'N' && !empty($ALLOW_EXTERNAL_USERS) && $ALLOW_EXTERNAL_USERS == 'Y' && !empty($externalparticipants)) {
     $lines = explode("\n", $externalparticipants);
     if (!is_array($lines)) {
         $lines = array($externalparticipants);
     }
     if (is_array($lines)) {
         $linecnt = count($lines);
         for ($i = 0; $i < $linecnt; $i++) {
             $ext_words = explode(' ', $lines[$i]);
             if (!is_array($ext_words)) {
                 $ext_words = array($lines[$i]);
             }
             if (is_array($ext_words)) {
                 $ext_wordscnt = count($ext_words);
                 $ext_emails[$ext_count] = $ext_names[$ext_count] = '';
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:edit_entry_handler.php


示例18: languageToAbbrev

if (!empty($return_path)) {
    $url = $return_path;
} else {
    //$url=empty ( $STARTVIEW ) ? "month.php" : "$STARTVIEW.php";
    $url = "month.php";
    //  $url = "index.php";
}
$lang = '';
if (!empty($LANGUAGE)) {
    $lang = languageToAbbrev($LANGUAGE);
}
if (empty($lang)) {
    $lang = 'fr';
}
$login = getPostValue('login');
$password = getPostValue('password');
// calculate path for cookie
if (empty($PHP_SELF)) {
    $PHP_SELF = $_SERVER["PHP_SELF"];
}
$cookie_path = str_replace("login.php", "", $PHP_SELF);
//echo "Cookie path: $cookie_path\n";
if ($single_user == "Y") {
    // No login for single-user mode
    do_redirect("index.php");
} else {
    if ($use_http_auth) {
        // There is no login page when using HTTP authorization
        do_redirect("index.php");
    } else {
        if (!empty($login) && !empty($password)) {
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:login_new.php


示例19: initialize_page

function initialize_page()
{
    $event_id = getRequestVarAtIndex(4);
    $event = Events::FindById($event_id);
    $event_types = EventTypes::FindAll();
    $event_periods = EventPeriods::FindAll();
    $year = getRequestVarAtIndex(2);
    $month = getRequestVarAtIndex(3);
    $post_action = "";
    if (isset($_POST['submit'])) {
        $post_action = $_POST['submit'];
    }
    if ($post_action == "Edit Event" || $post_action == "Edit and Return to List") {
        if (isset($_POST['delete'])) {
            $event->delete(true);
            setFlash("<h3>Event Deleted</h3>");
            redirect("/admin/list_events");
        }
        $event->title = $_POST['title'];
        $event->description = $_POST['description'];
        if (!getPostValue('time_start')) {
            $event->setDateStart(getPostValue('date_start'), "04:00:00");
        } else {
            $event->setDateStart(getPostValue('date_start'), getPostValue('time_start'));
        }
        if (!getPostValue('date_end') && !getPostValue('time_end')) {
            $event->setDateEnd(getPostValue('date_start'), "04:00:00");
        } else {
            if (!getPostValue('date_end') && getPostValue('time_end')) {
                $event->setDateEnd(getPostValue('date_start'), getPostValue('time_end'));
            } else {
                $event->setDateEnd(getPostValue('date_end'), getPostValue('time_end'));
            }
        }
        $notdates = getPostValue('notdates');
        $del_query = "DELETE FROM events_notdate WHERE event_id = {$event->id};";
        mysql_query($del_query, MyActiveRecord::Connection());
        if (is_array($notdates)) {
            foreach ($notdates as $date) {
                if (strlen($date) > 4) {
                    $query = "INSERT INTO events_notdate VALUES('{$event->id}','" . formatDateView($date, "Y-m-d") . "')";
                    mysql_query($query, MyActiveRecord::Connection()) or die($query);
                }
            }
        }
        $event->eventtype_id = isset($_POST['eventtype_id']) ? $_POST['eventtype_id'] : 1;
        $event->eventperiod_id = $_POST['eventperiod_id'];
        $event->save();
        edit_eventUpdateRecurrences();
        setFlash("<h3>Event changes saved</h3>");
        if ($post_action == "Edit and Return to List") {
            redirect("/admin/list_events/{$year}/{$month}");
        } else {
            redirect("/admin/edit_event/{$year}/{$month}/{$event_id}");
        }
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:57,代码来源:edit_event.php


示例20: getPostValue

 $settings['db_persistent'] = getPostValue('form_db_persistent');
 $settings['single_user_login'] = getPostValue('form_single_user_login');
 $settings['readonly'] = getPostValue('form_readonly');
 if (getPostValue("form_user_inc") == "http") {
     $settings['use_http_auth'] = 'true';
     $settings['single_user'] = 'false';
     $settings['user_inc'] = 'user.php';
 } else {
     if (getPostValue("form_user_inc") == "none") {
         $settings['use_http_auth'] = 'false';
         $settings['single_user'] = 'true';
         $settings['user_inc'] = 'user.php';
     } else {
         $settings['use_http_auth'] = 'false';
         $settings['single_user'] = 'false';
         $settings['user_inc'] = getPostValue('form_user_inc');
     }
 }
 // Save settings to file now.
 if (empty($password)) {
     $onload = "alert('Your settings have been saved.\\n\\n" . "Please be sure to set a password.\\n');";
     $forcePassword = true;
 } else {
     $onload .= "alert('Your settings have been saved.\\n\\n');";
 }
 $fd = @fopen($file, "w+b", false);
 if (empty($fd)) {
     if (file_exists($file)) {
         $onload = "alert('Error: unable to write to file {$file}\\nPlease change the file permissions of this file.');";
     } else {
         $onload = "alert('Error: unable to write to file {$file}\\nPlease change the file permissions of your includes directory\\nto allow writing by other users.');";
开发者ID:rohcehlam,项目名称:rflow,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPostViews函数代码示例发布时间:2022-05-15
下一篇:
PHP getPostToForm函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap