words per minute
5
zukasa24
00:00
Speed
<?php
include("../config/database_config.php");
session_start();
if(!($_SESSION['user'])) {
header('location: login');
}
/* This Page will contain all the processing Functions of all pages*/
include_once("../libraries/db.php");
$db = new DB();
//Article inserting section ends
/* Deactivate Activate all users*/
if(isset($_POST['deactivateallusers'])) {
$check = $db->UPDATE("UPDATE users set active = 0 where user_level = 2");
if($check) {
echo "<script>alert('You have successfully disabled all users')</script>";
echo "<script>window.open('index.php?page=allusers','_self')</script>";
} else {
echo "<script>alert('Something went wrong! Query is not executed')</script>";
echo "<script>window.open('index.php?page=allusers','_self')</script>";
}
}
if(isset($_POST['activateallusers'])) {
$check = $db->UPDATE("UPDATE users set active = 1 where user_level = 2");
if($check) {
echo "<script>alert('You have successfully Activated all users')</script>";
echo "<script>window.open('index.php?page=allusers','_self')</script>";
} else {
echo "<script>alert('Something went wrong! Query is not executed')</script>";
echo "<script>window.open('index.php?page=allusers','_self')</script>";
}
}