21 lines
512 B
PHP
21 lines
512 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");
|
||
|
|
|
||
|
|
error_reporting(E_ALL | E_STRICT);
|
||
|
|
ini_set('display_errors', 1);
|
||
|
|
|
||
|
|
$pdo = new MysqlPdo(hst, ndb, user, pass);
|
||
|
|
$sql = "SET NAMES 'utf8'";
|
||
|
|
$pdo->query($sql);
|
||
|
|
|
||
|
|
if ($_SESSION['id'] && $_POST["agency_id"] && $_POST["userId"]) {
|
||
|
|
$post = clearInputData($_POST);
|
||
|
|
|
||
|
|
$agency_id = (int)$post['agency_id'];
|
||
|
|
$user_id = (int)$post['userId'];
|
||
|
|
$wazzap = new Wazzap($agency_id, $pdo);
|
||
|
|
$res = $wazzap->deleteWazzapUser($user_id);
|
||
|
|
|
||
|
|
echo $res;
|
||
|
|
}
|