Menu

[r47]: / html / adduser_field.php  Maximize  Restore  History

Download this file

82 lines (81 with data), 2.2 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
<?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[right]) { $_SESSION[var_right] = $_GET[right]; }
if ($_GET[field]) { $_SESSION[var_field] = $_GET[field]; }
$right=$_SESSION[var_right];
$field=$_SESSION[var_field];
?>
<?php
if ($_POST['field']!='') {
$field = $_POST['field'];
$right = $_POST['right'];
$user = $_POST['user'];
}
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>User field add</title>
</head>
<body class="top" onload="Insert.<?php
{echo 'field';}
?>.focus();">
<form name="Insert" action="postadduser_field.php" method="post">
<input type=hidden name="FOCUS" value="">
<table class=enter>
<tr id=title><th colspan=2>User field add</th></tr>
<input type=hidden name="field" value="<?php echo $field; ?>">
<tr><th></th>
<td>
<?php
$current=($_POST['field']!='');
$strdefault = $_POST['field'];
echo "<input type=text name=\"field\" size=5 value=\"$strdefault\">";
?>
</td></tr>
<input type=hidden name="right" value="<?php echo $right; ?>">
<tr><th></th>
<td>
<?php
$current=($_POST['right']!='');
$strdefault = $_POST['right'];
echo "<input type=text name=\"right\" size=5 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>User</th>
<td>
<?php
$current=($_POST['user']!='');
echo ("<select name=\"user\" style=\"width: 175px\" OnChange=\"Insert.action=''; Insert.FOCUS.value='505'; Insert.submit();\">");
$sql->QueryTry("select `username`, `user` from `user` where (type='group' or type='both')");
for ($i = 0; $i < $sql->rows; $i++) { $sql->Fetch($i);
$searchID = $sql->data[user];
$searchshow = $searchID;
echo "<option ";
if ($current && $searchID == $_POST['user']) {echo "selected ";};
echo "value=\"$searchID\">$searchshow";
echo "</option>\n";
}
echo ("</select>");
?>
</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.