-
Notifications
You must be signed in to change notification settings - Fork 1
/
edit.php
46 lines (43 loc) · 1.34 KB
/
edit.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
<?PHP
/*
| Edit content pages for Drorit accounting system
| Written by Ori Idan December 2009
*/
global $articlestbl;
global $dir;
print "<br><div dir=\"$dir\" class=\"form righthalf1\">\n";
$l = _("Manage content pages");
print "<h3>$l</h3>\n";
$query = "SELECT id,subject FROM $articlestbl WHERE ancestor='' ORDER BY subject ASC";
$result = DoQuery($query, __LINE__);
print "<div style=\"margin:5px;margin-right:20px;font-size:14px\">\n";
print "<ul>\n";
while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$id = $line['id'];
$subject = $line['subject'];
if($subject == '')
$subject = $id;
$url = "?module=text&&action=add&ancestor=$id";
print "<li><a href=\"?id=$id&action=edit\">$subject</a> ";
$l = _("Add page");
print "<a href=\"$url\">$l</a> ";
$q1 = "SELECT id,subject FROM $articlestbl WHERE ancestor='$id' ORDER BY subject ASC";
$r1 = DoQuery($q1, __LINE__);
if(mysql_num_rows($r1)) {
print "\n<ul>\n";
while($l1 = mysql_fetch_array($r1, MYSQL_ASSOC)) {
$subject = $l1['subject'];
$id = $l1['id'];
$url = "?id=$id&action=edit";
print "<li><a href=\"$url\">$subject</a></li>";
}
print "</ul>\n";
}
print "</li>\n";
}
print "</ul>";
$l = _("New page");
print "<a href=\"?module=text&action=add\">$l</a>\n";
print "</div>\n";
print "</div>\n";
?>