Menu

[r50]: / html / editproject.php  Maximize  Restore  History

Download this file

114 lines (113 with data), 3.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
<?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]; }
$project=$_SESSION[var_project];
?>
<?php
$sql->QueryItem("SELECT project.name as F437, project.sql as F438, project.directory as F439, project.select as F574, project.rights as F808 FROM `project` WHERE project.project='$project'");
$name = htmlspecialchars($sql->data['F437']);
$intern = htmlspecialchars($sql->data['F438']);
$directory = htmlspecialchars($sql->data['F439']);
$select = htmlspecialchars($sql->data['F574']);
$rights = htmlspecialchars($sql->data['F808']);
if ($_POST['project']!='') {
$name = htmlspecialchars($_POST['name']);
$intern = htmlspecialchars($_POST['intern']);
$directory = htmlspecialchars($_POST['directory']);
$select = htmlspecialchars($_POST['select']);
$rights = htmlspecialchars($_POST['rights']);
}
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Edit Project</title>
<script>
function confirmDelete(delUrl) {
if (confirm("Remove Project?")) {
document.location = delUrl;
}
}
</script>
</head>
<body class="top" onload="document.Edit.<?php
if ($_POST[FOCUS]==574) {echo 'rights';}
else {echo 'name';}
?>.focus();">
<form name="Edit" action="posteditproject.php" method="post">
<input type=hidden name="FOCUS" value="">
<?php echo("<input type=hidden name=\"project\" size=5 value=\"$project\">\n");?>
<table class=enter>
<tr id=title><th colspan=2>Edit Project</th></tr>
<tr><th>Name</th>
<td>
<?php echo("<input type=text name=\"name\" size=0 value=\"$name\">");?>
</td></tr>
<tr><th>Database</th>
<td>
<?php echo("<input type=text name=\"intern\" size=0 value=\"$intern\">");?>
</td></tr>
<tr><th>Directory</th>
<td>
<?php echo("<input type=text name=\"directory\" size=0 value=\"$directory\">");?>
</td></tr>
<tr><th>Select</th>
<td>
<?php
echo ("<select name=\"select\" OnChange=\"Edit.action=''; Edit.FOCUS.value='574'; Edit.submit();\">");
if ($select=='true') {
echo "<option value=\"true\" selected>true</option>\n";
} else {
echo "<option value=\"true\">true</option>\n";
}
if ($select=='false') {
echo "<option value=\"false\" selected>false</option>\n";
} else {
echo "<option value=\"false\">false</option>\n";
}
echo "</select>";
?>
</td></tr>
<tr><th>Rights</th>
<td>
<?php
echo ("<select name=\"rights\" OnChange=\"Edit.action=''; Edit.FOCUS.value='808'; Edit.submit();\">");
if ($rights=='dynamic') {
echo "<option value=\"dynamic\" selected>dynamic</option>\n";
} else {
echo "<option value=\"dynamic\">dynamic</option>\n";
}
if ($rights=='fixed') {
echo "<option value=\"fixed\" selected>fixed</option>\n";
} else {
echo "<option value=\"fixed\">fixed</option>\n";
}
echo "</select>";
?>
</td></tr>
</table>
<p id=buttons>
<input type=submit value=Change>
<?php
$test=true;
if ($test) {
echo "<input type=button value=Delete onClick=\"confirmDelete('postdeleteproject.php?project=$project&project=$project')\">\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.