-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpobjlist.php
69 lines (56 loc) · 1.49 KB
/
dpobjlist.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
require_once 'mmheader.php';
require_once 'DP_settings.php';
require_once 'drupalTableObj.php';
if (!isset($_GET['obj']))
die("Missing parameter.");
$objName = $_GET['obj'];
$obj = new drupalTableObj($objName);
$colDets = $obj->getColumnProperties();
$objs = $obj->listAll(NULL, 1000, NULL);
echo <<<_END
<!-- The HTML section -->
<form method='post' action='dpobjedit.php?obj=$objName&mmaction=Add'>
<table>
<td>$objName</td>
<td><input type='submit' value='Add record' /></td>
</table>
</form>
<style>.signup { border: 1px solid #999999;
font: normal 10px verdana; color:#444444; }</style>
<style>.vertical
{
/* IE-only DX filter */
writing-mode: tb-rl;
filter: flipv fliph;
/* Safari/Chrome function */
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
}
</style>
</head><body>
<table class="signup" border="1" cellpadding="2"
cellspacing="0" bgcolor="#eeeeee">
_END;
echo "<tr><td />";
foreach ($colDets as $c => $d) {
if (strlen($c) > 20)
$colName = substr($c, 0, 18) . '..';
else
$colName = $c;
// echo "<td class='vertical'>$colName</td>";
echo "<td><img src='/lab03/sites/default/files/textimage/verthead/$c.png' alt='$c'/></td>";
}
echo "</tr>";
$j = 1;
foreach ($objs as $a => $b) {
$enc = base64_encode($b->primaryKeyString);
echo "<tr><td><b><a href='dpobjedit.php?obj=$objName&mmaction=Update&view=$enc'>$j</a></b></td>";
foreach ($colDets as $c => $d) {
$tmp = $b->$c;
echo "<td>$tmp</td>";
}
echo "</tr>";
$j++;
}
?>