forked from Chicago/metalicious
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_element_info.php
105 lines (88 loc) · 2.56 KB
/
data_element_info.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
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
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
Proof of Concept - POC
<hr />
<form action="index.php" method="post">
Search: <input type="text" id="search_criteria" name="search_criteria" value="<?php echo $_POST['search_criteria']; ?>" />
<input type="submit" value="Submit" /><br />
<a href="index.php">Clear Search</a>
</form>
<hr />
<?php
//open db
include 'include/dbconnopen.php';
//get all element info
$data_element_info = mysqli_query($cnnCDD, "Call Get_Data_Element_Info('" . $_GET['data_element_id'] . "')");
//close DB
include 'include/dbconnclose.php';
//parent info
//open db
include 'include/dbconnopen.php';
//get all element info
$parent_data_element_info = mysqli_query($cnnCDD, "Call Get_Data_Element_Parent_Info('" . $_GET['data_element_id'] . "')");
//close DB
include 'include/dbconnclose.php';
//children info
//open db
include 'include/dbconnopen.php';
//get all element info
$children = mysqli_query($cnnCDD, "Call Get_Data_Element_Children('" . $_GET['data_element_id'] . "')");
//close DB
include 'include/dbconnclose.php';
?>
DATA ELEMENT INFO:
<hr />
<br />
Parent:
<?php
if ($parent_data_element_info->num_rows > 0) {
?>
<?php
//show children
while ($parent_info = mysqli_fetch_assoc($parent_data_element_info)) {
echo "<pre><a href=\"./data_element_info.php?data_element_id=" . $parent_info['Element_ID'] . "\">";
print_r($parent_info);
echo "</pre></a><br />";
}
} else {
echo "No Parent";
}
?>
<hr />
<br />
Element Info:
<?php
if ($data_element_info->num_rows > 0) {
?>
<?php
//show children
while ($element_info = mysqli_fetch_assoc($data_element_info)) {
echo "<pre>";
print_r($element_info);
echo "</pre><br />";
}
} else {
echo "No Element Found With Element_ID #" . $_GET['data_element_id'];
}
?>
<hr />
<br />
Children:
<?php
if ($children->num_rows > 0) {
?>
<a href="javascript:;" onclick="$('#children_<?php echo $db_info['Element_ID']; ?>').slideToggle('slow');">Children</a>
<?php
echo "<hr /><div id=\"children_" . $db_info['Element_ID'] . "\" style=\"display: none;\">";
//show children
while ($child_info = mysqli_fetch_assoc($children)) {
echo "<pre><a href=\"data_element_info.php?data_element_id=" . $child_info['Element_ID'] . "\">";
print_r($child_info);
echo "</pre></a><br />";
}
echo "</div>";
} else {
echo "No Children";
}
echo "<hr />";
?>
<a href="export_info.php?data_element_id=<?php echo $_GET['data_element_id']; ?>">Export Info</a>