Menu

[r29]: / html / screen.php  Maximize  Restore  History

Download this file

195 lines (194 with data), 6.3 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
session_start();
$user_ID=$_SESSION[user_ID];
if (!$user_ID || $user_ID=='0')
{
header('location: index.php');
die('Login failed');
}
require("util.php");
$sql = new MySQL_class;
$sql->Create("generator");
$esql = new MySQL_class;
$esql->Create("generator");
if ($_GET[screen]) { $_SESSION[var_screen] = $_GET[screen]; }
if ($_GET[project]) { $_SESSION[var_project] = $_GET[project]; }
if ($_GET[part]) { $_SESSION[var_part] = $_GET[part]; }
$screen=$_SESSION[var_screen];
$project=$_SESSION[var_project];
$part=$_SESSION[var_part];
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Screen generator Scherm: Screen</title>
</head>
<script type="text/javascript" src="handlers.js" language="JavaScript">
alert ("no code");
</script>
<body>
<?php
include 'menu.php';
include 'makemenu.php';
makeMenu(0, 2, '');
?>
<div id="content">
<?php
$sql->QueryItem("SELECT screen.name as F446, screen.title as F447, screen.class as F511, `T732`.`title` as F732_1, screen.helpfile as F769 FROM `screen`
LEFT JOIN `screen` AS T732 ON screen.parent=T732.screen
WHERE `screen`.`screen` = '$screen'
LIMIT 1");
$name = htmlspecialchars($sql->data['F446']);
$stitle = htmlspecialchars($sql->data['F447']);
$class = htmlspecialchars($sql->data['F511']);
$title_732=htmlspecialchars($sql->data[F732_1]);
$parent = "$title_732";
$helpfile = htmlspecialchars($sql->data['F769']);
echo ('<table class=record>');
echo ("<tr><th>Name</th>
<td>$name</td>");
echo ("</tr>");
echo ("<tr><th>Title</th>
<td>$stitle</td>");
echo ("</tr>");
echo ("<tr><th>Class</th>
<td>$class</td>");
echo ("</tr>");
echo ("<tr><th>Parent</th>
<td>$parent</td>");
echo ("</tr>");
echo ("<tr><th>Help file</th>
<td>$helpfile</td>");
echo ("</tr>");
echo ('</table>');
?>
<p><input type=button value="Edit Screen" onClick="javascript: window.open('editscreen.php?screen=<?php echo $screen; ?>','','width=500,height=270,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes'); return false;">
<?php
if ($_GET[order62]<>'') {
$sql->QueryItem("DELETE FROM user_selection WHERE user=$user_ID and field='sort_62'");
$sql->QueryItem("INSERT INTO user_selection VALUES ('$user_ID', 'sort_62','$_GET[order62]'");
}
$lastid=$_SESSION[last_62];
$lastfilter62=$_SESSION[filter62];
$_SESSION[last_62]='';
if ($_GET[filter62]) { $filter62 =$_GET[filter62]; } else { $filter62=$_POST[filter62];}
if ($_GET[page62]) { $page=$_GET[page62]; } else { $page=$_POST[page62]; }
if ($filter62!=$lastfilter62) {
$_SESSION[filter62]=$filter62;
$page=0;
}
if ($_GET[full_62]=='Fullpage') {
$_SESSION[fullpage_62]='f';
}
if ($_GET[full_62]=='Pages') {
$_SESSION[fullpage_62]='';
}
if ($filter62!='')
{
$qfilter62 = quote('%'.$filter62.'%');
$query = ("
FROM `part`
LEFT JOIN `table` AS T453 ON part.table=T453.table
LEFT JOIN `screen` AS T454 ON part.link=T454.screen
WHERE (T453.name LIKE $qfilter62
OR T454.name LIKE $qfilter62
OR part.`title` LIKE $qfilter62
) AND `part`.`screen`='$screen'
");
}
else
{
$query = ("
FROM `part`
LEFT JOIN `table` AS T453 ON part.table=T453.table
LEFT JOIN `screen` AS T454 ON part.link=T454.screen
WHERE 1 AND `part`.`screen`='$screen'
");
}
$lastrec=-1;
$sql->QueryItem("SELECT COUNT(*) AS records$query");
$records=$sql->data[records];
$sortorder=$sql->QueryItem("SELECT value FROM user_selection WHERE user=$user_ID and field='sort_62'");
if ($lastid=='') {$fromrec=20*$page;} else {
$fromrec=0;
$sql->Query("SELECT `part`.`part` AS id $query");
for ($r=0; $r<$sql->rows; $r++) {
$sql->Fetch($r);
if ($sql->data[id]==$lastid) {
$fromrec=$r-10;
if($fromrec<0) $fromrec=0;
$lastrec=$r-$fromrec;
break;
}
}
}
$sql->Query("SELECT part.part as F495, part.screen as F450, part.type as F452, `T453`.`name` as F453_1, `T454`.`name` as F454_1, part.title as F456, part.code as F457, part.order as F515$query".
($_SESSION[fullpage_62]==''?"LIMIT $fromrec, 20":''));
if (($part_rights['18/nofilter']==0)) {
echo "<form action=\"\" method=get name=Filter62>";
echo "<p class=filter>";
echo "Records: $records ";
$maxpage=(int) (($records+19)/20);
if ($maxpage>1) {
if ($_SESSION[fullpage_62]=='') {
echo "Page: ";
echo "<select name=\"page62\" OnChange=\"Filter62.submit();\">\n";
for ($i = 0; $i < $maxpage; $i++)
{
$nr=$i+1;
if ($i==$page) {$sel=" selected";} else {$sel="";}
echo "<option value=$i$sel>$nr van $maxpage</option>\n";
}
echo "</select>\n";
echo "<input type=submit name=full_62 value=\"Fullpage\">";
} else {
echo "<input type=submit name=full_62 value=\"Pages\">";
}
}
echo "<input type=text name=\"filter62\" size=25 value=\"$filter62\">";
echo "<input type=submit value=\"Search\">";
echo "<input type=button value=\"Add Part\" onClick=\"javascript: window.open('addpart.php?part=$part&screen=$screen','','width=500,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes'); return false;\">";
echo "</p>";
echo "</form>";
}
?>
<table class=list>
<tr>
<th></th>
<th width=70px>Type</th>
<th width=175px>Table</th>
<th width=175px>Link</th>
<th width=175px>Title</th>
<th width=245px>Code</th>
<th width=0px>Order</th>
</tr>
<?php
for ($i = 0; $i < $sql->rows; $i++)
{
$sql->Fetch($i);
$part = $sql->data['F495'];
$type = htmlspecialchars($sql->data['F452']);
$name_453=htmlspecialchars($sql->data[F453_1]);
$table_lup = "$name_453";
$name_454=htmlspecialchars($sql->data[F454_1]);
$link_lup = "$name_454";
$title = htmlspecialchars($sql->data['F456']);
$code = htmlspecialchars($sql->data['F457']);
$order = htmlspecialchars($sql->data['F515']);
if ($lastrec==$i) {$color="style=\"background-color: #aaaaff;\"";} else {$color="";}
echo ("
<tr $color onMouseOver=\"ChangeColor(this)\" onMouseOut=\"ChangeColorBack(this)\" onClick=\"window.open('editpart.php?part=$part&screen=$screen','wijzigen','width=500,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes')\">
<td onClick=\"window.open('addpart.php?order=$order','add','width=500,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes'); no_bubble(event);\"><b>Add</b></td>
<td>$type</td>
<td>$table_lup</td>
<td>$link_lup</td>
<td>$title</td>
<td>$code</td>
<td>$order</td>
</tr>");
}
?>
</table>
</div></body>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.