-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathajax.php
69 lines (51 loc) · 1.47 KB
/
ajax.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
$method = $_REQUEST["method"];
$status_id = $_REQUEST["status_id"];
switch($method)
{
case 'DeleteStatus':
DeleteStatus($status_id);
break;
case 'PostStatus':
PostStatus($status_id);
break;
case 'DisableStatus':
DisableStatus($status_id);
break;
case 'EnableStatus':
EnableStatus($status_id);
break;
}
function PostStatus($status_id)
{
$connection = mysqli_connect("localhost","tronixs_social", "?(Ia5,mt~lwJ", "tronixs_socialmedia" );
$query = "SELECT * FROM campagains WHERE facebook_user_id = '10'";
echo $query;
}
function DeleteStatus($status_id)
{
$connection = mysqli_connect("localhost","tronixs_social", "?(Ia5,mt~lwJ", "tronixs_socialmedia" );
$query = "DELETE FROM status_text WHERE id =".$status_id;
echo $query;
$result=mysqli_query($connection,$query);
die("Success");
}
function EnableStatus($status_id)
{
$connection = mysqli_connect("localhost","tronixs_social", "?(Ia5,mt~lwJ", "tronixs_socialmedia" );
$query = "UPDATE status_text SET enabled = 'yes' WHERE id =".$status_id.";";
//echo $query;
$result=mysqli_query($connection,$query);
//if ($result)
die("Success");
}
function DisableStatus($status_id)
{
$connection = mysqli_connect("localhost","tronixs_social", "?(Ia5,mt~lwJ", "tronixs_socialmedia" );
$query = "UPDATE status_text SET enabled = 'no' WHERE id =".$status_id.";";
//echo $query;
$result=mysqli_query($connection,$query);
//if ($result)
die("Sucess");
}
?>