当前位置: 首页>>代码示例>>PHP>>正文


PHP Access::delete方法代码示例

本文整理汇总了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);
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:7,代码来源:AccessController.php

示例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);
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:22,代码来源:AccessTest.php

示例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;
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:access.php

示例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>
开发者ID:nathanashton,项目名称:GuestBook,代码行数:30,代码来源:editguestaccess.php


注:本文中的Access::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。