Menu

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

Download this file

176 lines (175 with data), 5.5 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
<?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[sheet]) { $_SESSION[var_sheet] = $_GET[sheet]; }
if ($_GET[project]) { $_SESSION[var_project] = $_GET[project]; }
if ($_GET[ColumnID]) { $_SESSION[var_ColumnID] = $_GET[ColumnID]; }
$sheet=$_SESSION[var_sheet];
$project=$_SESSION[var_project];
$ColumnID=$_SESSION[var_ColumnID];
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Screen generator Scherm: Sheet</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, 4, '');
?>
<div id="content">
<?php
$sql->QueryItem("SELECT sheet.SheetTable as F576, sheet.Code as F577, sheet.Ordering as F578, sheet.Restrictions as F579, sheet.Link as F580 FROM `sheet`
LIMIT 1");
$Name = htmlspecialchars($sql->data['F448']);
$SheetTable = htmlspecialchars($sql->data['F576']);
$Code = htmlspecialchars($sql->data['F577']);
$Ordering = htmlspecialchars($sql->data['F578']);
$Restrictions = htmlspecialchars($sql->data['F579']);
$Link = htmlspecialchars($sql->data['F580']);
echo ('<table class=record>');
echo ("<tr><th>Name</th>
<td>$Name</td>");
echo ("</tr>");
echo ("<tr><th>SheetTable</th>
<td>$SheetTable</td>");
echo ("</tr>");
echo ("<tr><th>Code</th>
<td>$Code</td>");
echo ("</tr>");
echo ("<tr><th>Ordering</th>
<td>$Ordering</td>");
echo ("</tr>");
echo ("<tr><th>Restrictions</th>
<td>$Restrictions</td>");
echo ("</tr>");
echo ("<tr><th>Link</th>
<td>$Link</td>");
echo ("</tr>");
echo ('</table>');
?>
<p><input type=button value="Edit Sheet" onClick="javascript: window.open('editsheet.php','','width=700,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes'); return false;">
<br><br><br><table class=ruler><tr><td>Columns</td></tr></table>
<?php
if ($_GET[order66]<>'') {
$sql->QueryItem("DELETE FROM user_selection WHERE user=$user_ID and field='sort_66'");
$sql->QueryItem("INSERT INTO user_selection VALUES ('$user_ID', 'sort_66','$_GET[order66]'");
}
$lastid=$_SESSION[last_66];
$lastfilter66=$_SESSION[filter66];
$_SESSION[last_66]='';
if ($_GET[filter66]) { $filter66 =$_GET[filter66]; } else { $filter66=$_POST[filter66];}
if ($_GET[page66]) { $page=$_GET[page66]; } else { $page=$_POST[page66]; }
if ($filter66!=$lastfilter66) {
$_SESSION[filter66]=$filter66;
$page=0;
}
if ($_GET[full_66]=='Fullpage') {
$_SESSION[fullpage_66]='f';
}
if ($_GET[full_66]=='Pages') {
$_SESSION[fullpage_66]='';
}
if ($filter66!='')
{
$qfilter66 = quote('%'.$filter66.'%');
$query = ("
FROM `column`
WHERE (column.`Name` LIKE $qfilter66
OR column.`Sort` LIKE $qfilter66
) AND `column`.`sheet`='$sheet'
");
}
else
{
$query = ("
FROM `column`
WHERE 1 AND `column`.`sheet`='$sheet'
");
}
$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_66'");
if ($lastid=='') {$fromrec=20*$page;} else {
$fromrec=0;
$sql->Query("SELECT `column`.`ColumnID` 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 column.ColumnID as F575, column.sheet as F467, column.Name as F468, column.Sort as F581$query".
($_SESSION[fullpage_66]==''?"LIMIT $fromrec, 20":''));
if (($part_rights['23/nofilter']==0)) {
echo "<form action=\"\" method=get name=Filter66>";
echo "<p class=filter>";
echo "Records: $records ";
$maxpage=(int) (($records+19)/20);
if ($maxpage>1) {
if ($_SESSION[fullpage_66]=='') {
echo "Page: ";
echo "<select name=\"page66\" OnChange=\"Filter66.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_66 value=\"Fullpage\">";
} else {
echo "<input type=submit name=full_66 value=\"Pages\">";
}
}
echo "<input type=text name=\"filter66\" size=25 value=\"$filter66\">";
echo "<input type=submit value=\"Search\">";
echo "<input type=button value=\"Add Column\" onClick=\"javascript: window.open('addcolumn.php?ColumnID=$ColumnID&sheet=$sheet','','width=700,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes'); return false;\">";
echo "</p>";
echo "</form>";
}
?>
<table class=list>
<tr>
<th width=0px>Name</th>
<th width=0px>Sort</th>
</tr>
<?php
for ($i = 0; $i < $sql->rows; $i++)
{
$sql->Fetch($i);
$ColumnID = $sql->data['F575'];
$Name = htmlspecialchars($sql->data['F468']);
$Sort = htmlspecialchars($sql->data['F581']);
if ($lastrec==$i) {$color="style=\"background-color: #aaaaff;\"";} else {$color="";}
echo ("
<tr $color onMouseOver=\"ChangeColor(this)\" onMouseOut=\"ChangeColorBack(this)\" onClick=\"window.open('editcolumn.php?ColumnID=$ColumnID&sheet=$sheet','wijzigen','width=700,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes')\">
<td>$Name</td>
<td>$Sort</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.