Menu

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

Download this file

102 lines (101 with data), 2.6 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
<?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[screen]) { $_SESSION[var_screen] = $_GET[screen]; }
$project=$_SESSION[var_project];
$screen=$_SESSION[var_screen];
?>
<?php
if ($_POST['name']!='') {
$name = ($_POST['name']);
$stitle = ($_POST['stitle']);
$class = ($_POST['class']);
$parent = $_POST['parent'];
$helpfile = ($_POST['helpfile']);
}
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Screen add</title>
</head>
<body class="top" onload="Insert.<?php
if ($_POST[FOCUS]==732) {echo 'helpfile';}
else {echo 'name';}
?>.focus();">
<form name="Insert" action="postaddscreen.php" method="post">
<input type=hidden name="FOCUS" value="">
<table class=enter>
<tr id=title><th colspan=2>Screen add</th></tr>
<tr><th>Name</th>
<td>
<?php
$current=($_POST['name']!='');
$strdefault = $_POST['name'];
echo "<input type=text name=\"name\" size=30 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>Title</th>
<td>
<?php
$current=($_POST['stitle']!='');
$strdefault = $_POST['stitle'];
echo "<input type=text name=\"stitle\" size=30 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>Class</th>
<td>
<?php
$current=($_POST['class']!='');
$strdefault = $_POST['class'];
echo "<input type=text name=\"class\" size=0 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>Parent</th>
<td>
<?php
$current=($_POST['parent']!='');
echo ("<select name=\"parent\" style=\"width: 175px\" OnChange=\"Insert.action=''; Insert.FOCUS.value='732'; Insert.submit();\">");
$sql->Query("SELECT `title` as F0_1, `screen`.screen FROM `screen`
WHERE screen.project=$project
ORDER BY `title`");
for ($i = 0; $i < $sql->rows; $i++) { $sql->Fetch($i);
$searchID = $sql->data[screen];
$title_0=htmlspecialchars($sql->data[F0_1]);
$searchshow = "$title_0";
echo "<option ";
if ($current && $searchID == $_POST['parent']) {echo "selected ";};
echo "value=\"$searchID\">$searchshow";
echo "</option>\n";
}
echo ("</select>");
?>
</td></tr>
<tr><th>Help file</th>
<td>
<?php
$current=($_POST['helpfile']!='');
$strdefault = $_POST['helpfile'];
echo "<input type=text name=\"helpfile\" size=0 value=\"$strdefault\">";
?>
</td></tr>
</table>
<p id=buttons>
<input type=submit value=Add>
<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.