本文整理汇总了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.");