Menu

[r40]: / html / editsheet.php  Maximize  Restore  History

Download this file

95 lines (94 with data), 2.9 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
<?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[project]) { $_SESSION[var_project] = $_GET[project]; }
if ($_GET[sheet]) { $_SESSION[var_sheet] = $_GET[sheet]; }
$project=$_SESSION[var_project];
$sheet=$_SESSION[var_sheet];
?>
<?php
$sql->QueryItem("SELECT sheet.name as F448, sheet.sql as F576, sheet.code as F577, sheet.order as F578, sheet.restrictions as F579, sheet.link as F580 FROM `sheet` WHERE sheet.project='$project' AND sheet.sheet='$sheet'");
$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']);
if ($_POST['SheetID']!='') {
$Name = htmlspecialchars($_POST['Name']);
$SheetTable = htmlspecialchars($_POST['SheetTable']);
$Code = htmlspecialchars($_POST['Code']);
$Ordering = htmlspecialchars($_POST['Ordering']);
$Restrictions = htmlspecialchars($_POST['Restrictions']);
$Link = htmlspecialchars($_POST['Link']);
}
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Edit Sheet</title>
<script>
function confirmDelete(delUrl) {
if (confirm("Remove Sheet?")) {
document.location = delUrl;
}
}
</script>
</head>
<body class="top" onload="document.Edit.<?php
{echo 'Name';}
?>.focus();">
<form name="Edit" action="posteditsheet.php" method="post">
<input type=hidden name="FOCUS" value="">
<?php echo("<input type=hidden name=\"SheetID\" size=5 value=\"$SheetID\">\n");?>
<table class=enter>
<tr id=title><th colspan=2>Edit Sheet</th></tr>
<tr><th>Name</th>
<td>
<?php echo("<input type=text name=\"Name\" size=30 value=\"$Name\">");?>
</td></tr>
<tr><th>SheetTable</th>
<td>
<?php echo("<input type=text name=\"SheetTable\" size=0 value=\"$SheetTable\">");?>
</td></tr>
<tr><th>Code</th>
<td>
<?php echo("<textarea name=\"Code\" rows=5 cols=40>$Code</textarea>");?>
</td></tr>
<tr><th>Ordering</th>
<td>
<?php echo("<textarea name=\"Ordering\" rows=3 cols=40>$Ordering</textarea>");?>
</td></tr>
<tr><th>Restrictions</th>
<td>
<?php echo("<textarea name=\"Restrictions\" rows=3 cols=40>$Restrictions</textarea>");?>
</td></tr>
<tr><th>Link</th>
<td>
<?php echo("<textarea name=\"Link\" rows=3 cols=40>$Link</textarea>");?>
</td></tr>
</table>
<p id=buttons>
<input type=submit value=Change>
<?php
$test=true;
if ($test) {
echo "<input type=button value=Delete onClick=\"confirmDelete('postdeletesheet.php?SheetID=$SheetID&project=$project&sheet=$sheet')\">\n";
}
?>
<input type=button value="Cancel" onClick="window.close()">
</p>
</form>
</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.