Joywork/admin/ajax/switchAgencyWazzap.php

22 lines
454 B
PHP
Raw Permalink Normal View History

2026-05-22 20:21:54 +02:00
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");
if ($_SESSION['id'] && isset($_SESSION['superadmin']) && $_POST['id']) {
$post = clearInputData($_POST);
$user = new User;
$user->get($post['id']);
$access = 0;
if ($user->enable_wazzap) {
$access = 0;
} else {
$access = 1;
}
$sql = "UPDATE users SET enable_wazzap = '$access' WHERE id = '" . $post['id'] . "'";
mysql_query($sql);
}