This repository was archived by the owner on May 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreaddata.php
More file actions
124 lines (103 loc) · 3.28 KB
/
readdata.php
File metadata and controls
124 lines (103 loc) · 3.28 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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<html>
<head>
<style>
span {
color: #676767;
}
</style>
</head>
<body>
<a href="./listdata.php"/>List of submissions</a>
<?php
require_once("./mysqli_connection.php");
$propertyType = "";
$houseNo = "";
$streetName = "";
$townName = "";
$county = "";
$eircode = "";
$geoLocateText = "";
$vacantTime = "";
$saleRentSign = "";
$grassOvergrown = "";
$roofDamaged = "";
$windowsBoarded = "";
$paintPeeling = "";
$propertyActivity = "";
$wasteBins = "";
$accessToProperty = "";
$aboutYou = "";
$message = "";
$canContact = "";
$editName = "";
$editEmail = "";
$editPhone = "";
$tandc = "";
$json = file_get_contents('php://input');
$obj = json_decode($json);
$sqlFields = "property_type,
house_no,
street_name,
town_name,
county,
eircode,
geo_locate_text,
vacant_time,
sale_rent_sign,
grass_overgrown,
roof_damaged,
windows_boarded,
paint_peeling,
property_activity,
waste_bins,
access_to_property,
about_you,
message,
can_contact,
edit_name,
edit_email,
edit_phone,
tandc,
picture,
ip_address";
$sqlValues = "";
$picture = "";
$sql = "select * from properties where id = ".intval($_GET['id']);
$result = connectQueryClose($sql);
echo '<br/><span>property_type: </span>'.$result[0]['property_type'];
echo '<br/><span>house_no: </span>'.$result[0]['house_no'];
echo '<br/><span>street_name: </span>'.$result[0]['street_name'];
echo '<br/><span>town_name: </span>'.$result[0]['town_name'];
echo '<br/><span>county: </span>'.$result[0]['county'];
echo '<br/><span>eircode: </span>'.$result[0]['eircode'];
echo '<br/><span>geo_locate_text: </span>'.$result[0]['geo_locate_text'];
echo '<br/><span>vacant_time: </span>'.$result[0]['vacant_time'];
$x = (intval($result[0]['sale_rent_sign']) == 1) ? 'Yes' : 'No';
echo '<br/><span>sale_rent_sign: </span>'.$x;
$x = (intval($result[0]['grass_overgrown']) == 1) ? 'Yes' : 'No';
echo '<br/><span>grass_overgrown: </span>'.$x;
$x = (intval($result[0]['roof_damaged']) == 1) ? 'Yes' : 'No';
echo '<br/><span>roof_damaged: </span>'.$x;
$x = (intval($result[0]['windows_boarded']) == 1) ? 'Yes' : 'No';
echo '<br/><span>windows_boarded: </span>'.$x;
$x = (intval($result[0]['paint_peeling']) == 1) ? 'Yes' : 'No';
echo '<br/><span>paint_peeling: </span>'.$x;
$x = (intval($result[0]['property_activity']) == 1) ? 'Yes' : 'No';
echo '<br/><span>property_activity: </span>'.$x;
$x = (intval($result[0]['waste_bins']) == 1) ? 'Yes' : 'No';
echo '<br/><span>waste_bins: </span>'.$x;
$x = (intval($result[0]['access_to_property']) == 1) ? 'Yes' : 'No';
echo '<br/><span>access_to_property: </span>'.$x;
echo '<br/><span>about_you: </span>'.$result[0]['about_you'];
echo '<br/><span>message: </span>'.$result[0]['message'];
$x = (intval($result[0]['can_contact']) == 1) ? 'Yes' : 'No';
echo '<br/><span>can_contact: </span>'.$x;
echo '<br/><span>edit_name: </span>'.$result[0]['edit_name'];
echo '<br/><span>edit_email: </span>'.$result[0]['edit_email'];
echo '<br/><span>edit_phone: </span>'.$result[0]['edit_phone'];
$x = (intval($result[0]['tandc']) == 1) ? 'Yes' : 'No';
echo '<br/><span>tandc: </span>'.$x;
echo '<br/><span><img alt="Embedded Image" src="data:image/png;base64,'.$result[0]['picture'].'"/>';
echo '<br/><span>ip_address: </span>'.$result[0]['ip_address'];
?></body>
</html>