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


PHP Employee::delete方法代码示例

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


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

示例1: Employee

<?php

require_once "../initialise_files.php";
include_once "sessioninc.php";
$employee = new Employee();
$smarty->assign('employee_id', $_POST['employee_id']);
###################### DELETE ####################################
if (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == "delete") {
    $employee->id = (int) $_GET['id'];
    $employee->delete();
}
if (isset($_POST['delete_all']) && $_POST['employee_id'] != "" && sizeof($_POST['employee_id']) != 0) {
    //$employee->admin_comments = $_POST['reject_reason'];
    foreach ($_POST['employee_id'] as $key => $value) {
        if ($value != "") {
            $employee->id = (int) $value;
            if ($employee->delete()) {
                $success = true;
            }
        }
    }
    if ($success) {
        $session->message("<div class='success'>Employee(s) has been deleted </div>");
        redirect_to($_SERVER['PHP_SELF']);
        die;
    }
}
###################### activate ###################################
if (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == "activate") {
    $employee->id = $_GET['id'];
    if ($employee->active_user()) {
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:manage_employee_deactive.php

示例2: uninstallDB

    public function uninstallDB()
    {
        // Delete NetEven employee
        $employee = new Employee((int) Gateway::getConfig('ID_EMPLOYEE_NETEVEN'));
        $employee->delete();
        // Delete NetEven customer
        $customer = new Customer((int) Gateway::getConfig('ID_CUSTOMER_NETEVEN'));
        $customer->delete();
        // Removing tables from the database
        $result = Db::getInstance()->Execute('
			DROP TABLE IF EXISTS
				`' . _DB_PREFIX_ . 'orders_gateway`,
				`' . _DB_PREFIX_ . 'orders_gateway_order_state`,
				`' . _DB_PREFIX_ . 'orders_gateway_customer`,
				`' . _DB_PREFIX_ . 'orders_gateway_configuration`,
				`' . _DB_PREFIX_ . 'orders_gateway_feature_link`,
				`' . _DB_PREFIX_ . 'orders_gateway_feature`
		');
        if (!$result) {
            return false;
        }
        return true;
    }
开发者ID:ventsiwad,项目名称:presta_addons,代码行数:23,代码来源:nqgatewayneteven.php

示例3: Employee

<?php

//Imports
require_once 'db.php';
require_once 'Employee.php';
if (!isset($_POST['id']) || !is_numeric($_POST['id'])) {
    http_response_code(422);
    echo 'Invalid user ID';
    exit;
}
$con = connect_db();
$employee = new Employee();
$employee->id = intval($_POST['id']);
$employee->delete($con);
$con->close();
header('Location: ../employees');
开发者ID:neilsimp1,项目名称:vehiclechecklist,代码行数:16,代码来源:employeeDelete.php


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