-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRefreshBanStat.php
More file actions
38 lines (35 loc) · 1.1 KB
/
RefreshBanStat.php
File metadata and controls
38 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
error_reporting(1);
ini_set('display_errors','1');
include("smartyConfig.php");
include("appWideConfig.php");
include("dbConfig.php");
include("includes/configs/configs.php");
include("builder_function.php");
AdminAuthentication();
if($_REQUEST['part']=='userstatus')
{
$userID = $_REQUEST['userId'];
if($userID!=''){
$qry = "UPDATE ".ADMIN." SET STATUS = CASE WHEN STATUS = 'Y' THEN 'N' ELSE 'Y' END WHERE ADMINID = '".$userID."'";
$res = mysql_query($qry);
if($res)
{
$qry = "SELECT STATUS FROM ".ADMIN." WHERE ADMINID = '".$userID."'";
$res = mysql_query($qry);
$data = mysql_fetch_array($res);
?>
<span id="statusRefresh"<?php echo $userID; ?> >
<a href = "javascript:void(0); onclick= statuschange(<?php echo $userID; ?>)">
<?php
if ($data['STATUS'] == 'Y')
echo "Active";
else
echo "Deactive";
?></a>
</span>
<?php
}
}
}
?>