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


PHP RuleAction::delete方法代码示例

本文整理汇总了PHP中RuleAction::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP RuleAction::delete方法的具体用法?PHP RuleAction::delete怎么用?PHP RuleAction::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RuleAction的用法示例。


在下文中一共展示了RuleAction::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

            $input = array();
            $input["id"] = $key;
            $rulecriteria->delete($input);
        }
    }
    // Can't do this in RuleCriteria, so do it here
    $rule->update(array('id' => $_POST['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
    Html::back();
} else {
    if (isset($_POST["delete_action"])) {
        $rulecollection->checkGlobal('w');
        if (count($_POST["item"])) {
            foreach ($_POST["item"] as $key => $val) {
                $input = array();
                $input["id"] = $key;
                $ruleaction->delete($input);
            }
        }
        // Can't do this in RuleAction, so do it here
        $rule->update(array('id' => $_POST['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
        Html::back();
    } else {
        if (isset($_POST["add_criteria"])) {
            $rulecollection->checkGlobal('w');
            $rulecriteria->add($_POST);
            // Can't do this in RuleCriteria, so do it here
            $rule->update(array('id' => $_POST['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
            Html::back();
        } else {
            if (isset($_POST["add_action"])) {
                $rulecollection->checkGlobal('w');
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:31,代码来源:rule.common.form.php

示例2: Rule

GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
* @since version 0.85
*/
include '../inc/includes.php';
$rule = new Rule();
$rule->getFromDB(intval($_POST['rules_id']));
$action = new RuleAction($rule->fields['sub_type']);
if (isset($_POST["add"])) {
    $action->check(-1, CREATE, $_POST);
    $action->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        $action->check($_POST['id'], UPDATE);
        $action->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["purge"])) {
            $action->check($_POST['id'], PURGE);
            $action->delete($_POST, 1);
            Html::back();
        }
    }
}
开发者ID:jose-martins,项目名称:glpi,代码行数:31,代码来源:ruleaction.form.php

示例3: RuleAction

but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
* @since version 0.85
*/
include '../inc/includes.php';
$criteria = new RuleAction();
if (isset($_POST["add"])) {
    $criteria->check(-1, CREATE, $_POST);
    $criteria->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        $criteria->check($_POST['id'], UPDATE);
        $criteria->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["purge"])) {
            $criteria->check($_POST['id'], PURGE);
            $criteria->delete($_POST, 1);
            Html::back();
        }
    }
}
开发者ID:remicollet,项目名称:glpi,代码行数:31,代码来源:ruleaction.form.php


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