本文整理汇总了PHP中Access::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Access::delete方法的具体用法?PHP Access::delete怎么用?PHP Access::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Access
的用法示例。
在下文中一共展示了Access::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
$Access = new Access($this->data->id);
$Access->delete();
$go = '>auth/Access/formFind';
$this->renderPrompt('information', "Access [{$this->data->idAccess}] removido.", $go);
}
示例2: testCacheRead
/**
* @covers Xoops\Core\Cache\Access::cacheRead
* @covers Xoops\Core\Cache\Access::read
* @covers Xoops\Core\Cache\Access::delete
*/
public function testCacheRead()
{
$regenFunction = function ($args) {
$vars = func_get_args();
return $vars[0];
};
$key = 'testCacheRead';
$value = 'fred';
$ret = $this->object->delete($key);
$ret = $this->object->cacheRead($key, $regenFunction, 60, $value);
$this->assertEquals($ret, $value);
// this should return cached value, not current regenFunction result
$ret = $this->object->cacheRead($key, $regenFunction, 60, 'not' . $value);
$this->assertEquals($ret, $value);
$ret = $this->object->read($key);
$this->assertEquals($ret, $value);
}
示例3: switch
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
require_once '../lib/init.php';
if (!Access::check('interface', '100')) {
UI::access_denied();
exit;
}
UI::show_header();
switch ($_REQUEST['action']) {
case 'delete_record':
if (!Core::form_verify('delete_access')) {
UI::access_denied();
exit;
}
Access::delete($_REQUEST['access_id']);
$url = AmpConfig::get('web_path') . '/admin/access.php';
show_confirmation(T_('Deleted'), T_('Your Access List Entry has been removed'), $url);
break;
case 'show_delete_record':
if (AmpConfig::get('demo_mode')) {
break;
}
$access = new Access($_GET['access_id']);
show_confirmation(T_('Deletion Request'), T_('Are you sure you want to permanently delete') . ' ' . $access->name, 'admin/access.php?action=delete_record&access_id=' . $access->id, 1, 'delete_access');
break;
case 'add_host':
// Make sure we've got a valid form submission
if (!Core::form_verify('add_acl', 'post')) {
UI::access_denied();
exit;
示例4: Access
$updatedOption = new Access($db);
$updatedOption->Id = $_POST['id'];
$updatedOption->Code = $_POST['code'];
$updatedOption->Staff_Id = null;
$updatedOption->Staff = '';
$updatedOption->Guest_Id = $_POST['guestid'];
if ($updatedOption->update() == true) {
header("location:access.php");
} else {
echo "<script>alert('There was an error updating this item');window.location = 'access.php' </script>";
}
}
if (isset($_POST['delete'])) {
$updatedOption = new Access($db);
$updatedOption->Id = $_POST['id'];
if ($updatedOption->delete() == true) {
header("location:access.php");
} else {
echo "<script>alert('There was an error deleting this item');window.location = 'access.php' </script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>