本文整理匯總了PHP中Key::deleteKey方法的典型用法代碼示例。如果您正苦於以下問題:PHP Key::deleteKey方法的具體用法?PHP Key::deleteKey怎麽用?PHP Key::deleteKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Key
的用法示例。
在下文中一共展示了Key::deleteKey方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
$i++;
}
//This does the same as above, only checking if we are on the last page, and then generating the Next and Last links
if ($pid < $lastPage) {
$next = $pid + 1;
echo " <a href='?page=" . $_GET['page'] . '&action=' . $_GET['action'] . '&do=' . $_GET['do'] . "&page-id={$next}'>></a> ";
echo " ";
echo " <a href='?page=" . $_GET['page'] . '&action=' . $_GET['action'] . '&do=' . $_GET['do'] . "&page-id={$lastPage}'>>></a>";
}
echo ' </div>';
}
} elseif ($_GET['do'] == 'delete-key') {
echo '<p>Here you can delete existing keys.</p>';
if (!empty($_GET['delete'])) {
if (is_numeric($_GET['delete'])) {
if ($key->deleteKey($_GET['delete'])) {
echo '<p class="notification green">You have successfully deleted a 4S key.</p>';
$log->addLog($_SESSION['loggedIn']['id'], "Deleted a 4S key.");
}
}
}
$websiteProperty = new WebsiteProperty();
$pid = $_GET['page-id'];
if (empty($pid)) {
$pid = 1;
}
$lastPage = ceil($key->getTotalRecordCount() / $websiteProperty->getProperty('max_key_entries_per_page'));
if ($pid < 1) {
$pid = 1;
} elseif ($pid > $lastPage) {
$pid = $lastPage;