-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdatedb.php
More file actions
44 lines (36 loc) · 894 Bytes
/
updatedb.php
File metadata and controls
44 lines (36 loc) · 894 Bytes
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
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of updatedb
*
* @author Yasha
*/
include '../countrylist.php';
include '../userinteraction/DBstatistics.php';
$db=new DbConnector();
$id=$_GET['id'];
$id1=$_POST['id'];
$writer=$_GET['writer'];
$buttons=$_GET['buttons'];
$body=$_POST['body'];
$country=$_GET['country'];
$title=$_GET['title'];
$country=country::GetCountryKey($country);
if($country!=null){
$db->query("update articles set eventlocation='$country' where id=$id");
}else if($body!=null)
{
$db->query("update articles set body='$body' where id=$id1");
}
else if($title!=null)
{
$db->query("update articles set title='$title' where id=$id");
}
else if($buttons!=null)
{
new DBstatistics($writer, $id, $buttons);
}
?>