Repository navigation
Expand file tree
/
Copy pathgetinfo.php
More file actions
executable file
·58 lines (43 loc) · 1.77 KB
/
Copy pathgetinfo.php
File metadata and controls
executable file
·58 lines (43 loc) · 1.77 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
<?php
include "/home/weme-dev/public_html/connectdb.php";
include "weme-general.php";
if (isset($_GET['id'])) $myidlist = $_GET['id'];
elseif (isset($_POST['id'])) $myidlist = $_POST['id'];
else $myidlist = "e1" ;
$myidArray = split("_" ,$myidlist);
$finalHTMLToBeEchoed = "";
foreach($myidArray as $myid){
$thistype = substr($myid, 0, 1);
$thisid = substr($myid, 1);
$finalHTML = "testing_testing";
if ($thistype == 'e'){
$query = "
SELECT data_eventassertion.short_desc, data_eventtype.event_type FROM data_eventassertion,Eventtype,data_eventtype
WHERE ((data_eventassertion.id=$thisid)AND(data_eventassertion.id=Eventtype.eventassertion_id)AND(Eventtype.eventtype_id=data_eventtype.id))
ORDER BY Eventtype.id ASC
";
$resultevents = mysql_query($query);
$thisEventTypes = "";
while($rowItemsInDB = mysql_fetch_object($resultevents)){
$thisEventTypes .= ($thisEventTypes == "")? $rowItemsInDB->event_type : ", " . $rowItemsInDB->event_type;
$thisEventDesc = $rowItemsInDB->short_desc;
}
$finalHTML = "Event_<B>Event Type</B>: " . $thisEventTypes .
"<BR><B>Event Description</B>: " . $thisEventDesc;
}
elseif ($thistype == 'd'){
$query = "SELECT * FROM data_magicalbeing WHERE id=$thisid";
$resultevents = mysql_query($query);
$rowItemsInDB = mysql_fetch_object($resultevents);
$finalHTML = "Preternatural_<B>Name</B>: " . $rowItemsInDB->name;
}
elseif ($thistype == 'p'){
$query = "SELECT * FROM data_person WHERE id=$thisid";
$resultevents = mysql_query($query);
$rowItemsInDB = mysql_fetch_object($resultevents);
$finalHTML = "Person_<B>Name</B>: " . $rowItemsInDB->preferred_name;
}
$finalHTMLToBeEchoed .= $myid . "_" . $finalHTML . "__";
}
echo $finalHTMLToBeEchoed;
?>