Menu

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

Download this file

113 lines (112 with data), 3.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
 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
<?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[ColumnID]) { $_SESSION[var_ColumnID] = $_GET[ColumnID]; }
$sheet=$_SESSION[var_sheet];
$ColumnID=$_SESSION[var_ColumnID];
?>
<?php
if ($_POST['Name']!='') {
$Name = ($_POST['Name']);
$Size = $_POST['Size'];
$Type = $_POST['Type'];
$intern = ($_POST['intern']);
$Calculation = ($_POST['Calculation']);
$Sort = $_POST['Sort'];
}
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Column add</title>
</head>
<body class="top" onload="Insert.<?php
if ($_POST[FOCUS]==470) {echo 'intern';}
else {echo 'name';}
?>.focus();">
<form name="Insert" action="postaddcolumn.php" method="post">
<input type=hidden name="FOCUS" value="">
<table class=enter>
<tr id=title><th colspan=2>Column add</th></tr>
<tr><th>Name</th>
<td>
<?php
$current=($_POST['Name']!='');
$strdefault = $_POST['Name'];
echo "<input type=text name=\"Name\" size=0 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>Size</th>
<td>
<?php
$current=($_POST['Size']!='');
$strdefault = $_POST['Size'];
echo "<input type=text name=\"Size\" size=5 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>Type</th>
<td>
<?php
$current=($_POST['Type']!='');
echo ("<select name=\"Type\" OnChange=\"Insert.action=''; Insert.FOCUS.value='470'; Insert.submit();\">");
if ('date' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"date\"$sel>date</option>\n";
if ('datemin' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"datemin\"$sel>datemin</option>\n";
if ('datemax' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"datemax\"$sel>datemax</option>\n";
if ('number' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"number\"$sel>number</option>\n";
if ('select' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"select\"$sel>select</option>\n";
if ('char' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"char\"$sel>char</option>\n";
if ('text' == $_POST['Type']) {$sel='selected ';} else {$sel='';};
echo "<option value=\"text\"$sel>text</option>\n";
echo ("</select>");
?>
</td></tr>
<tr><th>SQL Table</th>
<td>
<?php
$current=($_POST['intern']!='');
$strdefault = $_POST['intern'];
echo "<input type=text name=\"intern\" size=0 value=\"$strdefault\">";
?>
</td></tr>
<tr><th>Calculation</th>
<td>
<?php
$current=($_POST['Calculation']!='');
$strdefault = $_POST['Calculation'];
echo "<textarea name=\"Calculation\" rows=5 cols=40>$strdefault</textarea>";
?>
</td></tr>
<tr><th>Sort</th>
<td>
<?php
$current=($_POST['Sort']!='');
$strdefault = $_POST['Sort'];
echo "<input type=text name=\"Sort\" size=5 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.