當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Key::deleteKey方法代碼示例

本文整理匯總了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'] . '&amp;action=' . $_GET['action'] . '&amp;do=' . $_GET['do'] . "&amp;page-id={$next}'>&gt;</a> ";
             echo " ";
             echo " <a href='?page=" . $_GET['page'] . '&amp;action=' . $_GET['action'] . '&amp;do=' . $_GET['do'] . "&amp;page-id={$lastPage}'>&gt;&gt;</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;
開發者ID:robbederks,項目名稱:SiriKeys,代碼行數:31,代碼來源:admin.php


注:本文中的Key::deleteKey方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。