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


PHP CheckReferrer函数代码示例

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


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

示例1: HandlePage

 public function HandlePage()
 {
     $action = "";
     if ($GLOBALS['EnableSEOUrls'] == 1 and count($GLOBALS['PathInfo']) > 0) {
         if (isset($GLOBALS['PathInfo'][1])) {
             $_REQUEST['action'] = $GLOBALS['PathInfo'][1];
         } else {
             $_REQUEST['action'] = $GLOBALS['PathInfo'][0];
         }
     }
     if (isset($_REQUEST['action'])) {
         $action = isc_strtolower($_REQUEST['action']);
     }
     // Don't allow any access to this file if gift certificates aren't enabled
     if (GetConfig('EnableGiftCertificates') == 0) {
         ob_end_clean();
         header("Location: " . $GLOBALS['ShopPath']);
         die;
     }
     if (!gzte11(ISC_LARGEPRINT)) {
         ob_end_clean();
         header("Location: " . $GLOBALS['ShopPath']);
         die;
     }
     CheckReferrer();
     // checking and assigning the back to search link
     switch ($action) {
         case "do_purchase":
             if ($_SERVER['REQUEST_METHOD'] == "POST") {
                 $this->DoPurchaseGiftCertificate();
                 break;
             } else {
                 $this->PurchaseGiftCertificate();
             }
         case "balance":
             $this->CheckGiftCertificateBalance();
             break;
         case "preview":
             $this->PreviewGiftCertificate();
             break;
         case "redeem":
             $this->RedeemGiftCertificate();
             break;
         default:
             $this->PurchaseGiftCertificate();
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:47,代码来源:class.giftcertificates.php

示例2: getEventDetails

 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 | FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 | details.
 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include '../inc/inc_head_db.php';
include '../inc/inc_admin.php';
include '../inc/inc_head_html.php';
include '../inc/inc_commonqueries.php';
$db_prefix = DB_PREFIX;
$eventinfo = getEventDetails($_GET['EventID'], 0, 'admin.php');
$eventid = $eventinfo['evEventID'];
$key = CRYPT_KEY;
if ($_POST['btnSubmit'] != '' && CheckReferrer('admin_bunks.php')) {
    $sql_clearbunks = "UPDATE {$db_prefix}bookings SET bkBunkAllocated = 0 where bkEventID = {$eventid}";
    ba_db_query($link, $sql_clearbunks);
    foreach ($_POST as $key => $value) {
        if (substr($key, 0, 8) == "hBooking") {
            $bunk = (int) $_POST["chkPl{$value}"];
            if ($bunk > 0) {
                $bunk = 1;
            } else {
                $bunk = 0;
            }
            $iBookingID = (int) $value;
            if ($bunk) {
                $sql_update = "UPDATE {$db_prefix}bookings SET bkBunkAllocated = 1, bkBunkRequested = 1 WHERE bkID = " . $iBookingID;
                //echo $sql_update."<br />";
                ba_db_query($link, $sql_update);
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_bunks.php

示例3: getEventDetails

 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 | FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 | details.
 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include '../inc/inc_head_db.php';
include '../inc/inc_admin.php';
include '../inc/inc_head_html.php';
include '../inc/inc_commonqueries.php';
$db_prefix = DB_PREFIX;
$key = CRYPT_KEY;
$eventinfo = getEventDetails($_GET['EventID'], 0, 'admin.php');
$eventid = $eventinfo['evEventID'];
if ($_POST['btnSubmit'] != '' && CheckReferrer('admin_marshal.php')) {
    foreach ($_POST as $key => $value) {
        if (substr($key, 0, 7) == "hPlayer") {
            $iPlayerID = (int) $value;
            $refnumber = (int) $_POST["txtRefNumber{$value}"];
            $marshal = stripslashes($_POST["cboMarshal{$value}"]);
            $sql_update = "UPDATE {$db_prefix}players SET plRefNumber = {$refnumber}, plMarshal = '{$marshal}' WHERE plPlayerID = " . $iPlayerID;
            ba_db_query($link, $sql_update);
        }
    }
}
//Get list of players that have confirmed their booking
$sql = "SELECT bkPlayerID, " . "plFirstName, " . "plSurname, " . "bkBookAs, " . "plMarshal, " . "plRefNumber " . "FROM {$db_prefix}players, {$db_prefix}bookings " . "WHERE plPlayerID = bkPlayerID and bkEventID = {$eventid}";
$result = ba_db_query($link, $sql);
?>
<script src="../inc/sorttable.js" type="text/javascript"></script>
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_marshal.php

示例4: database

This page will update an existing Bitsand database (from Bitsand v7.x) to work with the latest version of Bitsand (version 8.0). It will report progress as it goes. Note that, in order for this to work, the user defined in the configuration file must have permission to CREATE, ALTER and DROP tables in the specified database. To use it, enter the value of CRYPT_KEY from the configuration file and click &quot;Update&quot;.
</p>
<p>
<strong>This should NOT be run if you are in the middle of an event, it will do strange things to existing bookings, and possibly break everything</strong>
</p>

<form action = "update_db.php" method = "post">
<p>
Value of CRYPT_KEY in configuration file: <input name = "txtKey" type = "password"><br>
<input type = "submit" value = "Update" name = "btnSubmit">
</p>
</form>

<p>
<?php 
if ($_POST['btnSubmit'] != '' && $_POST['txtKey'] == CRYPT_KEY && CheckReferrer('update_db.php')) {
    $db_prefix = DB_PREFIX;
    echo "Updating General Knowledge OSP (bug fix for issue 217)<br />\n";
    if (ba_db_query($link, "UPDATE {$dbprefix}osps SET ospAllowAdditionalText = 1 WHERE ospID = 76") === False) {
        echo "<span class = 'sans-warn'>Error updating General Knowledge OSP<br />\n";
    }
    echo "Adding new OSPs (see issue 234 for list)<br />\n";
    if (ba_db_query($link, "INSERT INTO {$dbprefix}osps (ospName, ospShortName) VALUES ('+1 Bonus PR', '+1 Bonus PR')") === False) {
        echo "<span class = 'sans-warn'>Error adding OSP<br />\n";
    }
    if (ba_db_query($link, "INSERT INTO {$dbprefix}osps (ospName, ospShortName) VALUES ('+1 Magical Armour', '+1 Mag Armr')") === False) {
        echo "<span class = 'sans-warn'>Error adding OSP<br />\n";
    }
    if (ba_db_query($link, "INSERT INTO {$dbprefix}osps (ospName, ospShortName) VALUES ('+1 Natural Armour', '+1 Nat Armr')") === False) {
        echo "<span class = 'sans-warn'>Error adding OSP<br />\n";
    }
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:update_db.php

示例5:

 | version.
 |
 | Bitsand is distributed in the hope that it will be useful, but WITHOUT ANY
 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 | FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 | details.
 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include '../inc/inc_head_db.php';
require '../inc/inc_admin.php';
require '../inc/inc_root.php';
include '../inc/inc_head_html.php';
$sWarn = '';
if ($_POST['btnDelete'] != '' && CheckReferrer('root_emptybookings.php')) {
    if ($_POST['txtConfirm'] == 'CONFIRM') {
        //Remove all records from bookings table
        $sql = "DELETE FROM " . DB_PREFIX . "bookings";
        ba_db_query($link, $sql);
        //Set "Bunk Requested" and "Bunk Assigned" to False
        $sql = "UPDATE " . DB_PREFIX . "players SET plBunkRequested = 0, plBunkAssigned = 0";
        ba_db_query($link, $sql);
        $sWarn = "All bookings deleted";
    } else {
        $sWarn = "CONFIRM was not entered correctly in the text box. It must be all upper case.";
    }
}
?>

<script type="text/javascript">
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:root_emptybookings.php

示例6: htmlentities

 |
 | Bitsand is distributed in the hope that it will be useful, but WITHOUT ANY
 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 | FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 | details.
 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include '../inc/inc_head_db.php';
include '../inc/inc_admin.php';
include '../inc/inc_head_html.php';
include '../inc/inc_forms.php';
include '../inc/inc_commonqueries.php';
$eventid = (int) htmlentities(stripslashes($_GET['EventID']));
if ($_POST['btnSubmit'] != '' && CheckReferrer('admin_editeventdetails.php')) {
    //print_r($_POST);
    echo "<br/>";
    if ($eventid > 0) {
        //Update
        $updatequery = "UPDATE {$db_prefix}events set ";
        $updatequery .= "evEventName = '" . ba_db_real_escape_string($link, $_POST['txtEventName']) . "', ";
        $updatequery .= "evEventDetails = '" . ba_db_real_escape_string($link, $_POST['txtEventDetails']) . "', ";
        $updatequery .= "evEventDescription = '" . ba_db_real_escape_string($link, $_POST['txtEventDescription']) . "', ";
        $updatequery .= "evPlayerSpaces = '" . (int) ba_db_real_escape_string($link, $_POST['txtPlayerSpaces']) . "', ";
        $updatequery .= "evMonsterSpaces = '" . (int) ba_db_real_escape_string($link, $_POST['txtMonsterSpaces']) . "', ";
        $updatequery .= "evStaffSpaces = '" . (int) ba_db_real_escape_string($link, $_POST['txtStaffSpaces']) . "', ";
        $updatequery .= "evTotalSpaces = '" . (int) ba_db_real_escape_string($link, $_POST['txtTotalSpaces']) . "', ";
        $updatequery .= "evPlayerBunks = '" . (int) ba_db_real_escape_string($link, $_POST['txtPlayerBunks']) . "', ";
        $updatequery .= "evMonsterBunks = '" . (int) ba_db_real_escape_string($link, $_POST['txtMonsterBunks']) . "', ";
        $updatequery .= "evStaffBunks = '" . (int) ba_db_real_escape_string($link, $_POST['txtStaffBunks']) . "', ";
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_editeventdetails.php

示例7: or

 | Foundation, either version 3 of the License, or (at your option) any later
 | version.
 |
 | Bitsand is distributed in the hope that it will be useful, but WITHOUT ANY
 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 | FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 | details.
 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include '../inc/inc_head_db.php';
include '../inc/inc_admin.php';
$sGreen = "";
$db_prefix = DB_PREFIX;
if ($_POST['btnSubmit'] != '' && CheckReferrer('admin_adduser.php')) {
    //Insert new user
    $sFirstName = ba_db_real_escape_string($link, $_POST['txtFirstName']);
    $sSurname = ba_db_real_escape_string($link, $_POST['txtSurname']);
    $sql = "INSERT INTO {$db_prefix}players (plFirstName, plSurname, plPassword) VALUES ('{$sFirstName}', '{$sSurname}', 'ACCOUNT DISABLED')";
    ba_db_query($link, $sql);
    $sGreen = htmlentities($_POST['txtFirstName']) . " " . htmlentities($_POST['txtSurname']) . " has been added.";
}
include '../inc/inc_head_html.php';
?>

<h1><?php 
echo TITLE;
?>
 - Create User</h1>
开发者ID:jfharden,项目名称:bitsand,代码行数:30,代码来源:admin_adduser.php

示例8: getEventDetails

}
$eventinfo = getEventDetails($bookinginfo['evEventID'], 0);
//Delete
if (($_POST['btnDelete'] != '' || $_POST['btnDeleteAndRebook'] != '') && CheckReferrer('admin_booking.php')) {
    if ($_POST['txtConfirm'] == 'CONFIRM') {
        deleteBooking($bookinginfo['bkID']);
        if ($_POST['btnDelete'] != '') {
            $sURL = fnSystemURL() . 'admin_manageevent.php?EventID=' . $bookinginfo['bkEventID'];
        } else {
            $sURL = fnSystemURL() . 'admin_booking.php?PlayerID=' . $bookinginfo['bkPlayerID'] . "&EventID=" . $bookinginfo['bkEventID'];
        }
        header("Location: {$sURL}");
    }
}
//Update
if ($_POST['btnSave'] != '' && CheckReferrer('admin_booking.php')) {
    $bookas = htmlentities(stripslashes($_POST['cboBookAs']));
    $overriddenvalue = htmlentities(stripslashes($_POST['txtOverriddenExpectedValue']));
    $overrideexpected = (int) $_POST['chkOverride'];
    $overriddenpaidvalue = htmlentities(stripslashes($_POST['txtOverriddenAmountPaid']));
    $overridepaid = (int) $_POST['chkOverridePaid'];
    $sql = "update {$db_prefix}bookings set bkID = {$bookingid}";
    if ($bookas != '') {
        $sql .= ",  bkBookAs = '{$bookas}'";
    }
    if ($overrideexpected == 1) {
        $sql .= ", bkAmountExpected = {$overriddenvalue} ";
    } else {
        $overrideexpected = 0;
    }
    if ($overridepaid == 1) {
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_booking.php

示例9: htmlentities

 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include '../inc/inc_head_db.php';
include '../inc/inc_admin.php';
include '../inc/inc_head_html.php';
include '../inc/inc_commonqueries.php';
$eventid = (int) htmlentities(stripslashes($_GET['EventID']));
if ($eventid > 0) {
    $eventinfo = getEventDetails($eventid, 0, 'admin.php');
}
$bid = (int) $_GET['bid'];
$db_prefix = DB_PREFIX;
//remove player from queue
if ($bid > 0 && CheckReferrer('admin_booking_queue.php')) {
    $sql = "UPDATE {$db_prefix}bookings SET bkInQueue = 0 WHERE bkID = " . $bid;
    ba_db_query($link, $sql);
    //Send e-mail to tell them.
    $result = ba_db_query($link, "SELECT plFirstName, plSurname, plEmail, plEmailRemovedFromQueue FROM {$db_prefix}players WHERE plPlayerID = {$bid}");
    $row = ba_db_fetch_assoc($result);
    $email = $row['plEmail'];
    //Set up e-mail body
    $sBody = "You have been removed from the booking queue at " . SYSTEM_NAME . ". " . "You can now finalise and pay for your booking.\n\n" . "Player ID: " . PID_PREFIX . sprintf('%03s', $bid) . "\n" . "OOC Name: " . $row['plFirstName'] . " " . $row['plSurname'] . "\n\n" . str_replace("admin/", "", fnSystemURL());
    //Send e-mail
    if ($row['plEmailRemovedFromQueue']) {
        mail($email, SYSTEM_NAME . ' - Ready to Finalise', $sBody, "From:" . SYSTEM_NAME . " <" . EVENT_CONTACT_MAIL . ">");
    }
}
//Get list of queued players
$sql = "SELECT bkID, plPlayerID, " . "plFirstName, " . "plSurname, " . "chName, " . "chFaction, " . "case when bkdateoocconfirmed > bkdateicconfirmed then bkdateoocconfirmed else bkdateicconfirmed end as bkDateConfirmed " . "FROM {$db_prefix}players, {$db_prefix}characters, {$db_prefix}bookings " . "WHERE plPlayerID = chPlayerID AND chPlayerID = bkPlayerID AND bkInQueue = 1" . " AND bkEventID = {$eventid}" . " ORDER BY bkDateConfirmed ASC";
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_booking_queue.php

示例10: HandlePage

 public function HandlePage()
 {
     $action = "";
     if (count($GLOBALS['PathInfo']) > 0) {
         if (isset($GLOBALS['PathInfo'][1])) {
             $_REQUEST['action'] = $GLOBALS['PathInfo'][1];
         } else {
             $_REQUEST['action'] = $GLOBALS['PathInfo'][0];
         }
     }
     if (isset($_REQUEST['action'])) {
         $action = isc_strtolower($_REQUEST['action']);
     }
     if (isset($_GET['from'])) {
         $_SESSION['LOGIN_REDIR'] = sprintf("%s/%s", $GLOBALS['ShopPath'], urldecode($_GET['from']));
     }
     /* Baskarn */
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         $GLOBALS['WishListAccountLink'] = "%%GLOBAL_ShopPathSSL%%/account";
         $GLOBALS['WishListLink'] = "%%GLOBAL_ShopPathSSL%%/wishlist";
     } else {
         $GLOBALS['WishListAccountLink'] = "%%GLOBAL_ShopPathSSL%%/account.php";
         $GLOBALS['WishListLink'] = "%%GLOBAL_ShopPathSSL%%/wishlist.php";
     }
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         if (count($GLOBALS['PathInfo']) == 3) {
             $_GET[$GLOBALS['PathInfo'][1]] = $GLOBALS['PathInfo'][2];
             if (isset($_GET['publicwishlist'])) {
                 $this->DisplayPublicWishList();
                 return true;
             }
         }
     } else {
         if (isset($_GET['publicwishlist'])) {
             $this->DisplayPublicWishList();
             return true;
         }
     }
     /**/
     // Are they signed in?
     if (CustomerIsSignedIn()) {
         CheckReferrer();
         // checking and assigning the back to search link
         switch ($action) {
             case "add":
                 $this->AddItemToWishList();
                 break;
             case "remove":
                 $this->RemoveItemFromWishList();
                 break;
             case "viewwishlistitems":
                 $this->DisplayWishListItems();
                 break;
             case "editwishlist":
                 $this->DisplayEditWishListForm();
                 break;
             case "deletewishlist":
                 $this->DeleteWishLists();
                 break;
             case "addwishlist":
                 $this->DisplayAddWishListForm();
                 break;
             case "sharewishlist":
                 $this->DisplayShareWishList();
                 break;
             default:
                 $this->MyWishLists();
         }
     } else {
         // Naughty naughty, you need to sign in to be here
         if (isset($_SERVER['QUERY_STRING'])) {
             $get_vars = $_SERVER['QUERY_STRING'];
         } else {
             $get_vars = "";
         }
         $this_page = urlencode(sprintf("wishlist.php?%s", $get_vars));
         ob_end_clean();
         if ($GLOBALS['EnableSEOUrls'] == 1) {
             header(sprintf("Location:%s/%s/%s", GetConfig('ShopPathNormal'), "login", "wishlist"));
         } else {
             header(sprintf("Location: %s/login.php?from=%s", $GLOBALS['ShopPath'], $this_page));
         }
         //header(sprintf("Location: %s/login.php?from=%s", $GLOBALS['ShopPath'], $this_page));
         die;
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:86,代码来源:class.wishlist.php

示例11: count

"></td></tr>
<tr><td colspan = "2" class = "mid"><input type = 'submit' value = 'Add' name = 'btnSubmit'>
<input type = 'reset' value = "Reset form"></td></tr>
</table>
</form>


<h2><a name = 'freetext'>Show free text ancestors</a></h2>

<form action = 'admin_ancestors.php' method = 'post'>
<input type = 'submit' value = 'Show free text' name = 'btnSubmit'>
<input type = 'submit' value = 'Hide' name = 'btnSubmitHide'>
</form>

<?php 
if (($_POST['btnSubmit'] == 'Show free text' || $_POST['btnSubmit'] == 'Assign To Selected') && CheckReferrer('admin_ancestors.php')) {
    $sql = "select chCharacterID, chAncestor, count(chAncestor) as Occurs from {$db_prefix}characters where chAncestor != '' and chAncestor not like 'Enter name%' group by chAncestor order by occurs desc, chAncestor asc";
    echo "<table>";
    echo "<tr><th>Ancestor Name</th><th>Occurences</th></tr>";
    $result = ba_db_query($link, $sql);
    while ($row = ba_db_fetch_assoc($result)) {
        echo "<tr><td>" . htmlentities(stripslashes($row['chAncestor'])) . "</td><td>" . htmlentities(stripslashes($row['Occurs'])) . "</td>";
        echo "<td><form action = 'admin_ancestors.php' method = 'post'><input type=hidden name='txtFreeValue' value='" . htmlentities(stripslashes($row['chAncestor'])) . "'><select name='cboAssign'>";
        foreach ($ancestornames as $i => $value) {
            echo "<option>{$value}</option>";
        }
        echo "</select></td><td><input type = 'submit' value = 'Assign To Selected' name = 'btnSubmit'></td></form>";
        echo "</tr>";
    }
    echo "</table>";
}
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_ancestors.php

示例12: LogError

    if (ba_db_query($link, $sql) === False) {
        $sWarn = "Error deleting location";
        LogError($sWarn);
    } else {
        $sGreen = "location deleted";
    }
} elseif ($_POST['btnEdit'] != '' && CheckReferrer('admin_locations.php')) {
    $sql = "UPDATE {$db_prefix}locations " . "SET lnName = '" . ba_db_real_escape_string($link, $_POST['txtName']) . "' " . "WHERE lnID = " . (int) $_POST['hID'];
    if (ba_db_query($link, $sql) === False) {
        $sWarn = "Error updating location.";
        LogError($sWarn);
    } else {
        $sGreen = "location updated";
    }
}
if ($_POST['btnSubmit'] == 'Add' && CheckReferrer('admin_locations.php')) {
    $sql = "INSERT INTO {$db_prefix}locations (lnName) " . "VALUES ('" . ba_db_real_escape_string($link, $_POST['txtAddName']) . "')";
    if (ba_db_query($link, $sql) === False) {
        $sWarn = "There was an error adding the location.";
        $sAddName = $_POST['txtAddName'];
    } else {
        $sGreen = "The location was added successfully.";
    }
}
include '../inc/inc_head_html.php';
?>

<h1><?php 
echo TITLE;
?>
 - Edit Locations</h1>
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_locations.php

示例13: ba_db_query

if ($_POST['btnConfirm'] != '' && CheckReferrer('change_password.php')) {
    //Get user's e-mail address
    $result = ba_db_query($link, "SELECT plNewMail, plNewMailCode FROM {$db_prefix}players WHERE plPlayerID = {$PLAYER_ID}");
    $row = ba_db_fetch_assoc($result);
    if ($row['plNewMailCode'] == $_POST['txtCode']) {
        //Run update query & set message
        $sql = "UPDATE {$db_prefix}players SET plEmail = '" . SafeEmail($row['plNewMail']) . "', plNewMail = '', plNewMailCode = '' " . "WHERE plPlayerID = {$PLAYER_ID}";
        $result = ba_db_query($link, $sql);
        if ($result === False) {
            $sWarn = "There was a problem updating your e-mail address";
        } else {
            $sGreen = "Your e-mail address has been updated";
        }
    }
}
if ($_POST['btnUpdateEmailPreferences'] != '' && CheckReferrer('change_password.php')) {
    if ($_POST['chkEmailOOCChange'] == 'on') {
        $bOOCChange = 1;
    } else {
        $bOOCChange = 0;
    }
    if ($_POST['chkEmailICChange'] == 'on') {
        $bICChange = 1;
    } else {
        $bICChange = 0;
    }
    if ($_POST['chkEmailPaymentReceived'] == 'on') {
        $bPaymentReceived = 1;
    } else {
        $bPaymentReceived = 0;
    }
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:change_password.php

示例14: than

<h3>Delete Old Logs</h3>

<form action = 'root_accesslog.php' method = 'post'>
<p>
Delete access logs older than (YYYY-MM-DD):
<input name = 'txtDeleteDate' value = <?php 
echo date("Y-m-d", strtotime("-3 months"));
?>
> (midnight)<br>
<input type = 'submit' name = 'btnDelete' value = 'Delete'>
</p>
</form>

<?php 
if ($_GET['btnQuery'] != '' && CheckReferrer('root_accesslog.php')) {
    echo "<p>Showing up to {$iRecNum} records. Click on a column header to sort by that column.</p>\n";
    echo "<table border = '1' class='sortable'>\n<thead>\n";
    echo "<tr><th>Date &amp; Time</th>\n";
    echo "<th>Player ID</th>\n";
    echo "<th>IP Address</th>\n";
    echo "<th>Page</th>\n";
    echo "<th>GET query</th>\n";
    echo "<th>POST request</th></tr>\n</thead>\n<tbody>\n";
    if ($_GET['rdoExportView'] == 'view') {
        $result = ba_db_query($link, $sLogSQL);
        while ($row = ba_db_fetch_assoc($result)) {
            echo "<tr><td>{$row['alDateTime']}</td>\n";
            echo "<td>{$row['alPlayerID']}</td>\n";
            echo "<td>{$row['alIP']}";
            if ($bDomain) {
开发者ID:jfharden,项目名称:bitsand,代码行数:30,代码来源:root_accesslog.php

示例15: or

 | Bitsand is free software; you can redistribute it and/or modify it under the
 | terms of the GNU General Public License as published by the Free Software
 | Foundation, either version 3 of the License, or (at your option) any later
 | version.
 |
 | Bitsand is distributed in the hope that it will be useful, but WITHOUT ANY
 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 | FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 | details.
 |
 | You should have received a copy of the GNU General Public License along with
 | Bitsand.  If not, see <http://www.gnu.org/licenses/>.
 +---------------------------------------------------------------------------*/
include 'inc/inc_head_db.php';
$db_prefix = DB_PREFIX;
if ($_POST['btnSubmit'] != '' && (CheckReferrer('booking.php') || CheckReferrer('eventbookingconfirm.php'))) {
    $bookingid = (int) $_POST['hBooking'];
    $email = htmlentities(stripslashes($_POST['txtEmail']));
    if ($bookingid > 0) {
        $sBody = "You have recieved a request to make a payment for an event at " . SYSTEM_NAME . ". " . "\n\nIf you have an account then please login to make this payment.\n" . "Otherwise you must create an account if you wish to make a payment, using this e-mail address.\n\n" . "If you have recieved this request in error, then please ignore it, or contact " . EVENT_CONTACT_NAME . " (" . EVENT_CONTACT_MAIL . ") if you have any questions.";
        "\n\n" . fnSystemURL();
        mail($email, SYSTEM_NAME . ' - Payment Request', $sBody, "From:" . SYSTEM_NAME . " <" . EVENT_CONTACT_MAIL . ">");
        $sql = "INSERT INTO {$db_prefix}paymentrequests (prEmail, prBookingID) VALUES ('{$email}', {$bookingid})";
        ba_db_query($link, $sql);
    }
}
if ($_GET['green'] != '') {
    $sGreen .= htmlentities($_GET['green']);
}
if ($_GET['warn'] != '') {
    $sWarn .= htmlentities($_GET['warn']);
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:start.php


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