本文整理匯總了PHP中Institution::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Institution::delete方法的具體用法?PHP Institution::delete怎麽用?PHP Institution::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Institution
的用法示例。
在下文中一共展示了Institution::delete方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Institution
// login if not autheticated
require $ACCOUNTS_PATH . 'include/auth_login_redirect.php';
// Make sure user is authorized
$allowed = false;
// assume user is NOT allowed unless otherwise shown
if (!$User->checkPerm("admin_accounts")) {
$allowed = false;
$Message = "Only admins with <b>admin_accounts</b> or <b>admin_insts</b> may view this page.<br/>" . "Try out this one instead: <a href='{$TOOL_PATH}/'>{$TOOL_NAME}</a>";
} else {
$allowed = true;
}
// delete an item
if ($_REQUEST["itemdel"] && $allowed) {
$itemPK = $_REQUEST["itemdel"];
$delItem = new Institution($itemPK);
if (!$delItem->delete()) {
$Message = "Error: Could not remove item: " . $delItem->Message;
}
}
// create an empty institution object for searching
$opInst = new Institution();
// get the search
$searchtext = "";
if ($_REQUEST["searchtext"]) {
$searchtext = $_REQUEST["searchtext"];
}
// sorting
$sortorder = "name";
if ($_REQUEST["sortorder"]) {
$sortorder = $_REQUEST["sortorder"];
}