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