本文整理匯總了PHP中Key::updateFieldByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Key::updateFieldByID方法的具體用法?PHP Key::updateFieldByID怎麽用?PHP Key::updateFieldByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Key
的用法示例。
在下文中一共展示了Key::updateFieldByID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
<input style="margin-left: 185px;" type="submit" value="Add Key" />
</form>
<?php
}
} elseif ($_GET['do'] == 'edit-key') {
if (!empty($_GET['unban']) && is_numeric($_GET['unban'])) {
if ($key->checkValueExists("id", $_GET['unban'])) {
$status = $key->getFieldDataByID($_GET['unban'], "banned");
if ($status == "True") {
$status = "False";
} else {
$status = "True";
}
if ($key->updateFieldByID($_GET['unban'], "banned", $status)) {
echo '<p class="notification green">You have successfully (un)banned a key.</p>';
$log->addLog($_SESSION['loggedIn']['id'], "(Un)banned a key.");
}
} else {
echo '<p class="notification red">There was no such key found with this ID.</p>';
}
} elseif (!empty($_GET['edit']) && is_numeric($_GET['edit'])) {
$showTable = true;
if ($key->checkValueExists("id", $_GET['edit'])) {
$showTable = false;
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (!empty($_POST['key_sessionValidation']) && !empty($_POST['key_banned']) && !empty($_POST['key_expired'])) {
if ($key->updateFieldByID($_GET['edit'], "speechid", $_POST['key_speechid']) && $key->updateFieldByID($_GET['edit'], "assistantid", $_POST['key_assistantid']) && $key->updateFieldByID($_GET['edit'], "sessionValidation", $_POST['key_sessionValidation']) && $key->updateFieldByID($_GET['edit'], "banned", $_POST['key_banned']) && $key->updateFieldByID($_GET['edit'], "expired", $_POST['key_expired']) && $key->updateFieldByID($_GET['edit'], "keyload", $_POST['key_keyload'])) {
echo '<p class="notification green">You have successfully update a 4S key.</p>';
$log->addLog($_SESSION['loggedIn']['id'], "Updated a 4S key.");