parent
f7ace44508
commit
9cd514bfbf
77 changed files with 5252 additions and 2 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
<?php |
||||
# FileName="Connection_php_mysql.htm" |
||||
# Type="MYSQL" |
||||
# HTTP="true" |
||||
$hostname_jc = "localhost"; |
||||
$database_jc = "jc"; |
||||
$username_jc = "root"; |
||||
$password_jc = "1111"; |
||||
$jc = mysql_pconnect($hostname_jc, $username_jc, $password_jc) or trigger_error(mysql_error(),E_USER_ERROR); |
||||
?> |
@ -0,0 +1,109 @@ |
||||
<?php // <ERRORS><ERROR><DESCRIPTION>Your testing server do not has support for PHP pages</DESCRIPTION></ERROR>\n</ERRORS>
|
||||
|
||||
$debug_to_file = false; |
||||
|
||||
function log_messages($error_message){ |
||||
global $f, $debug_to_file; |
||||
if ($debug_to_file === true){ |
||||
if (!is_resource($f)){ |
||||
@ini_set('display_errors', 1); |
||||
@error_reporting(E_ALL); |
||||
$f = @fopen('log.txt', 'a'); |
||||
} |
||||
if (is_resource($f)){ |
||||
return @fwrite($f, $error_message."\n"); |
||||
} |
||||
} |
||||
return false; |
||||
} |
||||
function create_error($error_msg = '', $line = -1){ |
||||
if ($error_msg != ''){ |
||||
return '<ERRORS><ERROR><DESCRIPTION>'.$error_msg.'</DESCRIPTION></ERROR></ERRORS>\n'; |
||||
}else{ |
||||
return '<ERRORS><ERROR><DESCRIPTION> Unidentified Connection Error at Line '.$line.'</DESCRIPTION></ERROR></ERRORS>\n'; |
||||
} |
||||
} |
||||
|
||||
log_messages("\n--------------------------------"); |
||||
// what parameters were sent ?! |
||||
foreach($_POST as $key=>$value) { |
||||
if (strtoupper($key) != 'PASSWORD'){ |
||||
log_messages('$_POST["'.$key.'"] = \''.$value."';"); |
||||
} |
||||
} |
||||
// We need these information only once when the test button is hit |
||||
if (isset($_POST['opCode']) && $_POST['opCode'] == 'IsOpen' ){ |
||||
// What PHP version |
||||
log_messages("\nPHP-Version: ".phpversion()); |
||||
// What OS System is running on |
||||
log_messages('PHP-OS: '.PHP_OS); |
||||
// How PHP is installed (CGI, ISAPI, FastCGI) |
||||
// !!!! Major difference exists on these servers for $_ENV, $_SERVER |
||||
log_messages('PHP-SAPI-NAME: '.php_sapi_name()); |
||||
// MySQL, mbstring modules are installed ?! |
||||
log_messages('PHP-Extensions: '.var_export(get_loaded_extensions(),true)); |
||||
} |
||||
|
||||
if(extension_loaded('mbstring')) |
||||
{ |
||||
$acceptCharsetHeader = 'Accept-Charset: ' . mb_internal_encoding(); |
||||
header( $acceptCharsetHeader ); |
||||
$head = '<html><head><meta http-equiv=\'Content-Type\' content=\'text/html; charset=' . mb_http_output() . '\'></head>'; |
||||
echo $head; |
||||
}else{ |
||||
echo '<html><head></head>'; |
||||
} |
||||
|
||||
// Build connection object |
||||
if (isset($_POST['Type']) && $_POST['Type'] == 'MYSQL') |
||||
{ |
||||
require("./mysql.php"); |
||||
$oConn = new MySqlConnection(@$_POST['ConnectionString'], @$_POST['Timeout'], @$_POST['Host'], @$_POST['Database'], @$_POST['UserName'], @$_POST['Password']); |
||||
if (!isset($oConn) || $oConn == false){ |
||||
log_messages("\n".'MySQL Connection Object initialisation failed'."\n\n".@$error); |
||||
}else{ |
||||
log_messages("\n".'MySQL Connection Object Created'."\n\n"); |
||||
} |
||||
}else{ |
||||
$error=create_error('The files from the _mmServerScripts folder are for the server model PHP-MySQL. You try to connect to a database using a different server model '.@$_POST['Type'].".\n\nPlease remove this folder outside the Dreamweaver environment on both local and testing machines and try again.",__LINE__); |
||||
log_messages("\nError Sent:\n\n\t".@$error."\n\n\n"); |
||||
echo $error.'</HTML>'; |
||||
return; |
||||
} |
||||
|
||||
// Process opCode |
||||
if (isset($oConn) && $oConn) |
||||
{ |
||||
$oConn->Open(); |
||||
|
||||
if ($_POST['opCode'] == 'IsOpen'){ |
||||
$answer = $oConn->TestOpen(); |
||||
}elseif (is_resource($oConn->connectionId) && $oConn->isOpen){ |
||||
|
||||
switch ($_POST['opCode']){ |
||||
case 'GetTables': $answer = $oConn->GetTables(@$_POST['Database']); break; |
||||
case 'GetColsOfTable': $answer = $oConn->GetColumnsOfTable(@$_POST['TableName']); break; |
||||
case 'ExecuteSQL': $answer = $oConn->ExecuteSQL(@$_POST['SQL'], @$_POST['MaxRows']); break; |
||||
case 'GetODBCDSNs': $answer = $oConn->GetDatabaseList(); break; |
||||
case 'SupportsProcedure': $answer = $oConn->SupportsProcedure(); break; |
||||
case 'GetProviderTypes': $answer = $oConn->GetProviderTypes(); break; |
||||
case 'GetViews': $answer = $oConn->GetViews(); break; |
||||
case 'GetProcedures': $answer = $oConn->GetProcedures(); break; |
||||
case 'GetParametersOfProcedure': $answer = $oConn->GetParametersOfProcedure(@$_POST['ProcName']); break; |
||||
case 'ReturnsResultset': $answer = $oConn->ReturnsResultSet($_POST['RRProcName']); break; |
||||
case 'ExecuteSP': $answer = $oConn->ExecuteSP(@$_POST['ExecProcName'], 0, @$_POST['ExecProcParameters']); break; |
||||
case 'GetKeysOfTable': $answer = $oConn->GetPrimaryKeysOfTable(@$_POST['TableName']); break; |
||||
default: $answer = create_error('The \''.$_POST['opCode'].'\' command is not supported.'); break; |
||||
} |
||||
} |
||||
|
||||
$oConn->Close(); |
||||
}else{ |
||||
$answer = create_error('The Connection Module was not initialized properly for an unknown reason.'); |
||||
} |
||||
|
||||
log_messages("\nAnswer From Database:\n\n\t".@$answer."\n\n\n"); |
||||
echo $answer; |
||||
|
||||
echo '</html>'; |
||||
?> |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<dwsync> |
||||
<file name="MMHTTPDB.php" local="128531112327255593" remote="0" testing="128531112320000000" /> |
||||
<file name="mysql.php" local="128531112327255593" remote="0" testing="128531112320000000" /> |
||||
</dwsync> |
@ -0,0 +1,412 @@ |
||||
<?php |
||||
// If this file is not included from the MMHTTPDB possible hacking problem. |
||||
if (!function_exists('create_error')){ |
||||
die(); |
||||
} |
||||
|
||||
define('MYSQL_NOT_EXISTS', create_error("Your PHP server doesn't have the MySQL module loaded or you can't use the mysql_(p)connect functions.")); |
||||
define('CONN_NOT_OPEN_GET_TABLES', create_error('The Connection is not opened when trying to retrieve the tables. Please refer to www.interaktonline.com for more information.')); |
||||
define('CONN_NOT_OPEN_GET_DB_LIST', create_error('The Connection is not opened when trying to retrieve the database list. Please refer to www.interaktonline.com for more information.')); |
||||
|
||||
if (!function_exists('mysql_connect') || !function_exists('mysql_pconnect') || !extension_loaded('mysql')){ |
||||
echo MYSQL_NOT_EXISTS; |
||||
die(); |
||||
} |
||||
|
||||
// Now let's handle the crashes or any other PHP errors that we can catch |
||||
function KT_ErrorHandler($errno, $errstr, $errfile, $errline) { |
||||
global $f, $already_sent; |
||||
$errortype = array ( |
||||
1 => "Error", |
||||
2 => "Warning", |
||||
4 => "Parsing Error", |
||||
8 => "Notice", |
||||
16 => "Core Error", |
||||
32 => "Core Warning", |
||||
64 => "Compile Error", |
||||
128 => "Compile Warning", |
||||
256 => "User Error", |
||||
512 => "User Warning", |
||||
1024=> "User Notice", |
||||
2048=> "E_ALL", |
||||
2049=> "PHP5 E_STRICT" |
||||
|
||||
); |
||||
$str = sprintf("[%s]\n%s:\t%s\nFile:\t\t'%s'\nLine:\t\t%s\n\n", date('d-m-Y H:i:s'),(isset($errortype[@$errno])?$errortype[@$errno]:('Unknown '.$errno)),@$errstr,@$errfile,@$errline); |
||||
if (error_reporting() != 0) { |
||||
@fwrite($f, $str); |
||||
if (@$errno == 2 && isset($already_sent) && !$already_sent==true){ |
||||
$error = '<ERRORS>'."\n"; |
||||
$error .= '<ERROR><DESCRIPTION>An Warning Type error appeared. The error is logged into the log file.</DESCRIPTION></ERROR>'."\n"; |
||||
$error .= '</ERRORS>'."\n"; |
||||
$already_sent = true; |
||||
echo $error; |
||||
} |
||||
} |
||||
} |
||||
if ($debug_to_file){ |
||||
$old_error_handler = set_error_handler("KT_ErrorHandler"); |
||||
} |
||||
|
||||
class MySqlConnection |
||||
{ |
||||
/* |
||||
// The 'var' keyword is deprecated in PHP5 ... we will define these variables at runtime. |
||||
var $isOpen; |
||||
var $hostname; |
||||
var $database; |
||||
var $username; |
||||
var $password; |
||||
var $timeout; |
||||
var $connectionId; |
||||
var $error; |
||||
*/ |
||||
function MySqlConnection($ConnectionString, $Timeout, $Host, $DB, $UID, $Pwd) |
||||
{ |
||||
$this->isOpen = false; |
||||
$this->timeout = $Timeout; |
||||
$this->error = ''; |
||||
|
||||
if( $Host ) { |
||||
$this->hostname = $Host; |
||||
} |
||||
elseif( ereg("host=([^;]+);", $ConnectionString, $ret) ) { |
||||
$this->hostname = $ret[1]; |
||||
} |
||||
|
||||
if( $DB ) { |
||||
$this->database = $DB; |
||||
} |
||||
elseif( ereg("db=([^;]+);", $ConnectionString, $ret) ) { |
||||
$this->database = $ret[1]; |
||||
} |
||||
|
||||
if( $UID ) { |
||||
$this->username = $UID; |
||||
} |
||||
elseif( ereg("uid=([^;]+);", $ConnectionString, $ret) ) { |
||||
$this->username = $ret[1]; |
||||
} |
||||
|
||||
if( $Pwd ) { |
||||
$this->password = $Pwd; |
||||
} |
||||
elseif( ereg("pwd=([^;]+);", $ConnectionString, $ret) ) { |
||||
$this->password = $ret[1]; |
||||
} |
||||
} |
||||
|
||||
function Open() |
||||
{ |
||||
$this->connectionId = mysql_connect($this->hostname, $this->username, $this->password); |
||||
if (isset($this->connectionId) && $this->connectionId && is_resource($this->connectionId)) |
||||
{ |
||||
$this->isOpen = ($this->database == "") ? true : mysql_select_db($this->database, $this->connectionId); |
||||
} |
||||
else |
||||
{ |
||||
$this->isOpen = false; |
||||
} |
||||
} |
||||
|
||||
function TestOpen() |
||||
{ |
||||
return ($this->isOpen) ? '<TEST status=true></TEST>' : $this->HandleException(); |
||||
} |
||||
|
||||
function Close() |
||||
{ |
||||
if (is_resource($this->connectionId) && $this->isOpen) |
||||
{ |
||||
if (mysql_close($this->connectionId)) |
||||
{ |
||||
$this->isOpen = false; |
||||
unset($this->connectionId); |
||||
} |
||||
} |
||||
} |
||||
|
||||
function GetTables($table_name = '') |
||||
{ |
||||
$xmlOutput = ""; |
||||
if ($this->isOpen && isset($this->connectionId) && is_resource($this->connectionId)){ |
||||
// 1. mysql_list_tables and mysql_tablename are deprecated in PHP5 |
||||
// 2. For backward compatibility GetTables don't have any parameters |
||||
if ($table_name === ''){ |
||||
$table_name = @$_POST['Database']; |
||||
} |
||||
$sql = ' SHOW TABLES FROM ' . $table_name; |
||||
$results = mysql_query($sql, $this->connectionId) or $this->HandleException(); |
||||
|
||||
$xmlOutput = "<RESULTSET><FIELDS>"; |
||||
|
||||
// Columns are referenced by index, so Schema and |
||||
// Catalog must be specified even though they are not supported |
||||
|
||||
$xmlOutput .= '<FIELD><NAME>TABLE_CATALOG</NAME></FIELD>'; // column 0 (zero-based) |
||||
$xmlOutput .= '<FIELD><NAME>TABLE_SCHEMA</NAME></FIELD>'; // column 1 |
||||
$xmlOutput .= '<FIELD><NAME>TABLE_NAME</NAME></FIELD>'; // column 2 |
||||
|
||||
$xmlOutput .= "</FIELDS><ROWS>"; |
||||
|
||||
if (is_resource($results) && mysql_num_rows($results) > 0){ |
||||
while ($row = mysql_fetch_array($results)){ |
||||
$xmlOutput .= '<ROW><VALUE/><VALUE/><VALUE>' . $row[0]. '</VALUE></ROW>'; |
||||
} |
||||
} |
||||
$xmlOutput .= "</ROWS></RESULTSET>"; |
||||
|
||||
} |
||||
return $xmlOutput; |
||||
} |
||||
|
||||
function GetViews() |
||||
{ |
||||
// not supported |
||||
return "<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>"; |
||||
} |
||||
|
||||
function GetProcedures() |
||||
{ |
||||
// not supported |
||||
return "<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>"; |
||||
} |
||||
|
||||
function GetColumnsOfTable($TableName) |
||||
{ |
||||
$xmlOutput = ""; |
||||
$query = "DESCRIBE $TableName"; |
||||
$result = mysql_query($query) or $this->HandleException(); |
||||
|
||||
if ($result) |
||||
{ |
||||
$xmlOutput = "<RESULTSET><FIELDS>"; |
||||
|
||||
// Columns are referenced by index, so Schema and |
||||
// Catalog must be specified even though they are not supported |
||||
$xmlOutput .= "<FIELD><NAME>TABLE_CATALOG</NAME></FIELD>"; // column 0 (zero-based) |
||||
$xmlOutput .= "<FIELD><NAME>TABLE_SCHEMA</NAME></FIELD>"; // column 1 |
||||
$xmlOutput .= "<FIELD><NAME>TABLE_NAME</NAME></FIELD>"; // column 2 |
||||
$xmlOutput .= "<FIELD><NAME>COLUMN_NAME</NAME></FIELD>"; |
||||
$xmlOutput .= "<FIELD><NAME>DATA_TYPE</NAME></FIELD>"; |
||||
$xmlOutput .= "<FIELD><NAME>IS_NULLABLE</NAME></FIELD>"; |
||||
$xmlOutput .= "<FIELD><NAME>COLUMN_SIZE</NAME></FIELD>"; |
||||
|
||||
$xmlOutput .= "</FIELDS><ROWS>"; |
||||
|
||||
// The fields returned from DESCRIBE are: Field, Type, Null, Key, Default, Extra |
||||
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) |
||||
{ |
||||
$xmlOutput .= "<ROW><VALUE/><VALUE/><VALUE/>"; |
||||
|
||||
// Separate type from size. Format is: type(size) |
||||
if (ereg("(.*)\\((.*)\\)", $row["Type"], $ret)) |
||||
{ |
||||
$type = $ret[1]; |
||||
$size = $ret[2]; |
||||
} |
||||
else |
||||
{ |
||||
$type = $row["Type"]; |
||||
$size = ""; |
||||
} |
||||
|
||||
// MySQL sets nullable to "YES" or "", so we need to set "NO" |
||||
$null = $row["Null"]; |
||||
if ($null == "") |
||||
$null = "NO"; |
||||
|
||||
$xmlOutput .= "<VALUE>" . $row["Field"] . "</VALUE>"; |
||||
$xmlOutput .= "<VALUE>" . $type . "</VALUE>"; |
||||
$xmlOutput .= "<VALUE>" . $null . "</VALUE>"; |
||||
$xmlOutput .= "<VALUE>" . $size . "</VALUE></ROW>"; |
||||
} |
||||
mysql_free_result($result); |
||||
|
||||
$xmlOutput .= "</ROWS></RESULTSET>"; |
||||
} |
||||
|
||||
return $xmlOutput; |
||||
} |
||||
|
||||
function GetParametersOfProcedure($ProcedureName, $SchemaName, $CatalogName) |
||||
{ |
||||
// not supported on MySQL |
||||
return '<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>'; |
||||
} |
||||
|
||||
function ExecuteSQL($aStatement, $MaxRows) |
||||
{ |
||||
if ( get_magic_quotes_gpc() ) |
||||
{ |
||||
$aStatement = stripslashes( $aStatement ) ; |
||||
} |
||||
|
||||
$xmlOutput = ""; |
||||
|
||||
$result = mysql_query($aStatement) or $this->HandleException(); |
||||
|
||||
if (isset($result) && is_resource($result)) |
||||
{ |
||||
$xmlOutput = "<RESULTSET><FIELDS>"; |
||||
|
||||
$fieldCount = mysql_num_fields($result); |
||||
for ($i=0; $i < $fieldCount; $i++) |
||||
{ |
||||
$meta = mysql_fetch_field($result); |
||||
if ($meta) |
||||
{ |
||||
$xmlOutput .= '<FIELD'; |
||||
$xmlOutput .= ' type="' . $meta->type; |
||||
$xmlOutput .= '" max_length="' . $meta->max_length; |
||||
$xmlOutput .= '" table="' . $meta->table; |
||||
$xmlOutput .= '" not_null="' . $meta->not_null; |
||||
$xmlOutput .= '" numeric="' . $meta->numeric; |
||||
$xmlOutput .= '" unsigned="' . $meta->unsigned; |
||||
$xmlOutput .= '" zerofill="' . $meta->zerofill; |
||||
$xmlOutput .= '" primary_key="' . $meta->primary_key; |
||||
$xmlOutput .= '" multiple_key="'. $meta->multiple_key; |
||||
$xmlOutput .= '" unique_key="' . $meta->unique_key; |
||||
$xmlOutput .= '"><NAME>' . $meta->name; |
||||
$xmlOutput .= '</NAME></FIELD>'; |
||||
} |
||||
} |
||||
|
||||
$xmlOutput .= "</FIELDS><ROWS>"; |
||||
$row = mysql_fetch_assoc($result); |
||||
|
||||
for ($i=0; $row && ($i < $MaxRows); $i++) |
||||
{ |
||||
$xmlOutput .= "<ROW>"; |
||||
|
||||
foreach ($row as $key => $value) |
||||
{ |
||||
$xmlOutput .= "<VALUE>"; |
||||
$xmlOutput .= htmlspecialchars($value); |
||||
$xmlOutput .= "</VALUE>"; |
||||
} |
||||
|
||||
$xmlOutput .= "</ROW>"; |
||||
$row = mysql_fetch_assoc($result); |
||||
} |
||||
|
||||
mysql_free_result($result); |
||||
|
||||
$xmlOutput .= "</ROWS></RESULTSET>"; |
||||
} |
||||
|
||||
return $xmlOutput; |
||||
} |
||||
|
||||
function GetProviderTypes() |
||||
{ |
||||
return '<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>'; |
||||
} |
||||
|
||||
function ExecuteSP($aProcStatement, $TimeOut, $Parameters) |
||||
{ |
||||
return '<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>'; |
||||
} |
||||
|
||||
function ReturnsResultSet($ProcedureName) |
||||
{ |
||||
return '<RETURNSRESULTSET status=false></RETURNSRESULTSET>'; |
||||
} |
||||
|
||||
function SupportsProcedure() |
||||
{ |
||||
return '<SUPPORTSPROCEDURE status=false></SUPPORTSPROCEDURE>'; |
||||
} |
||||
|
||||
/* |
||||
* HandleException added by InterAKT for ease in database translation answer |
||||
*/ |
||||
function HandleException() |
||||
{ |
||||
global $debug_to_file, $f; |
||||
$this->error = create_error(' MySQL Error#: '. ((int)mysql_errno()) . "\n\n".mysql_error()); |
||||
log_messages($this->error); |
||||
die($this->error.'</HTML>'); |
||||
} |
||||
|
||||
function GetDatabaseList() |
||||
{ |
||||
$xmlOutput = '<RESULTSET><FIELDS><FIELD><NAME>NAME</NAME></FIELD></FIELDS><ROWS>'; |
||||
|
||||
if (isset($this->connectionId) && is_resource($this->connectionId)){ |
||||
$dbList = mysql_list_dbs($this->connectionId); |
||||
|
||||
while ($row = mysql_fetch_object($dbList)) |
||||
{ |
||||
$xmlOutput .= '<ROW><VALUE>' . $row->Database . '</VALUE></ROW>'; |
||||
} |
||||
}else{ |
||||
$this->error = CONN_NOT_OPEN_GET_DB_LIST; |
||||
return $this->error; |
||||
} |
||||
$xmlOutput .= '</ROWS></RESULTSET>'; |
||||
|
||||
return $xmlOutput; |
||||
} |
||||
|
||||
function GetPrimaryKeysOfTable($TableName) |
||||
{ |
||||
$xmlOutput = ''; |
||||
$query = "DESCRIBE $TableName"; |
||||
$result = mysql_query($query) or $this->HandleException(); |
||||
|
||||
|
||||
if ($result) |
||||
{ |
||||
$xmlOutput = '<RESULTSET><FIELDS>'; |
||||
|
||||
// Columns are referenced by index, so Schema and |
||||
// Catalog must be specified even though they are not supported |
||||
$xmlOutput .= '<FIELD><NAME>TABLE_CATALOG</NAME></FIELD>'; // column 0 (zero-based) |
||||
$xmlOutput .= '<FIELD><NAME>TABLE_SCHEMA</NAME></FIELD>'; // column 1 |
||||
$xmlOutput .= '<FIELD><NAME>TABLE_NAME</NAME></FIELD>'; // column 2 |
||||
$xmlOutput .= '<FIELD><NAME>COLUMN_NAME</NAME></FIELD>'; |
||||
$xmlOutput .= '<FIELD><NAME>DATA_TYPE</NAME></FIELD>'; |
||||
$xmlOutput .= '<FIELD><NAME>IS_NULLABLE</NAME></FIELD>'; |
||||
$xmlOutput .= '<FIELD><NAME>COLUMN_SIZE</NAME></FIELD>'; |
||||
|
||||
$xmlOutput .= '</FIELDS><ROWS>'; |
||||
|
||||
// The fields returned from DESCRIBE are: Field, Type, Null, Key, Default, Extra |
||||
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) |
||||
{ |
||||
if (strtoupper($row['Key']) == 'PRI'){ |
||||
$xmlOutput .= '<ROW><VALUE/><VALUE/><VALUE/>'; |
||||
|
||||
// Separate type from size. Format is: type(size) |
||||
if (ereg("(.*)\\((.*)\\)", $row['Type'], $ret)) |
||||
{ |
||||
$type = $ret[1]; |
||||
$size = $ret[2]; |
||||
} |
||||
else |
||||
{ |
||||
$type = $row['Type']; |
||||
$size = ''; |
||||
} |
||||
|
||||
// MySQL sets nullable to "YES" or "", so we need to set "NO" |
||||
$null = $row['Null']; |
||||
if ($null == '') |
||||
$null = 'NO'; |
||||
|
||||
$xmlOutput .= '<VALUE>' . $row['Field'] . '</VALUE>'; |
||||
$xmlOutput .= '<VALUE>' . $type . '</VALUE>'; |
||||
$xmlOutput .= '<VALUE>' . $null . '</VALUE>'; |
||||
$xmlOutput .= '<VALUE>' . $size . '</VALUE></ROW>'; |
||||
} |
||||
} |
||||
mysql_free_result($result); |
||||
|
||||
$xmlOutput .= '</ROWS></RESULTSET>'; |
||||
} |
||||
return $xmlOutput; |
||||
} |
||||
|
||||
} // class MySqlConnection |
||||
?> |
@ -0,0 +1,12 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>PHP教材管理系统</title> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
@ -0,0 +1,51 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
if ((isset($_GET['jcbianhao'])) && ($_GET['jcbianhao'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM jiaocai WHERE jcbianhao=%s", |
||||
GetSQLValueString($_GET['jcbianhao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg5.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="user.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="xxgl.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="jsgl.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="xgl.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="jcguanli.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="jczhengding.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="jcruku.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center" class="txt">操作成功!<a href="jcfafang.php">点击返回</a></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -0,0 +1,119 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { |
||||
$updateSQL = sprintf("UPDATE jiaocai SET jcming=%s, zuozhe=%s, cbshe=%s, banben=%s WHERE jcbianhao=%s", |
||||
GetSQLValueString($_POST['jcming'], "text"), |
||||
GetSQLValueString($_POST['zuozhe'], "text"), |
||||
GetSQLValueString($_POST['cbshe'], "text"), |
||||
GetSQLValueString($_POST['banben'], "text"), |
||||
GetSQLValueString($_POST['jcbianhao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error()); |
||||
|
||||
$updateGoTo = "cg5.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; |
||||
$updateGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $updateGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['jcbianhao'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM jiaocai WHERE jcbianhao = '%s'", $colname_Recordset1); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">添加教材</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教材编号:</td> |
||||
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">教材名:</td> |
||||
<td><input name="jcming" type="text" id="jcming" value="<?php echo $row_Recordset1['jcming']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">作者:</td> |
||||
<td><input name="zuozhe" type="text" id="zuozhe" value="<?php echo $row_Recordset1['zuozhe']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">出版社:</td> |
||||
<td><input name="cbshe" type="text" id="cbshe" value="<?php echo $row_Recordset1['cbshe']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">版本号:</td> |
||||
<td><input name="banben" type="text" id="banben" value="<?php echo $row_Recordset1['banben']; ?>" /></td>
|
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="修改" /> |
||||
</label> |
||||
<input type="hidden" name="MM_update" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,26 @@ |
||||
<link href="x.css" rel="stylesheet" type="text/css" /> |
||||
<link href="txt.css" rel="stylesheet" type="text/css" /> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.STYLE1 {color: #FFFFFF} |
||||
--> |
||||
</style> |
||||
<table width="760" height="5" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td></td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="1" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="x"> |
||||
<tr> |
||||
<td bgcolor="#FFFFFF"></td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" align="center"> |
||||
<tbody> |
||||
<tr> |
||||
<td height="50" align="center" valign="middle"><p align="center"><span class="txt STYLE1">PHP½Ì²Ä¹ÜÀíϵͳ</span><br /> |
||||
<br /> |
||||
</p></td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
@ -0,0 +1,36 @@ |
||||
<style type="text/css"> |
||||
<!-- |
||||
body { |
||||
background-image: url(img/bj.gif); |
||||
} |
||||
--> |
||||
</style> |
||||
<link href="txt.css" rel="stylesheet" type="text/css" /> |
||||
</head> |
||||
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td background="img/b.jpg"> </td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt"> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom"><a href="xxgl.php">学生管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jsgl.php">教师管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="xgl.php">系级管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcguanli.php">教材管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcruku.php">教材入库</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcfafang.php"> |
||||
教材发放</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="user.php">用户管理</a></td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><marquee> |
||||
公告:欢迎登陆管理后台 |
||||
学生领书! |
||||
</marquee></td> |
||||
</tr> |
||||
</table> |
@ -0,0 +1,51 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
if ((isset($_GET['user_name'])) && ($_GET['user_name'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM xi WHERE user_name=%s", |
||||
GetSQLValueString($_GET['user_name'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg4.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,115 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { |
||||
$updateSQL = sprintf("UPDATE xi SET xingming=%s, xi=%s, password=%s WHERE user_name=%s", |
||||
GetSQLValueString($_POST['xingming'], "text"), |
||||
GetSQLValueString($_POST['xi'], "text"), |
||||
GetSQLValueString($_POST['password'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error()); |
||||
|
||||
$updateGoTo = "cg4.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; |
||||
$updateGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $updateGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['user_name'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['user_name'] : addslashes($_GET['user_name']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM xi WHERE user_name = '%s'", $colname_Recordset1); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="22" colspan="2" align="center">修改系级人员</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">姓 名:</td> |
||||
<td width="198"><input name="xingming" type="text" id="xingming" value="<?php echo $row_Recordset1['xingming']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">系:</td> |
||||
<td><input name="xi" type="text" id="xi" value="<?php echo $row_Recordset1['xi']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">账 号:</td> |
||||
<td><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
|
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="修改" /> |
||||
</label> |
||||
<input type="hidden" name="MM_update" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
|
||||
mysql_free_result($Recordset1); |
||||
?> |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 321 B |
@ -0,0 +1,103 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
if (!function_exists("GetSQLValueString")) { |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; |
||||
|
||||
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM ruku"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST"> |
||||
<label></label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教材发放</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">教材编号</td> |
||||
<td width="12%" align="center" valign="bottom">教材名</td> |
||||
<td width="12%" align="center" valign="bottom">作者</td> |
||||
<td width="12%" align="center" valign="bottom">数量</td> |
||||
<td width="12%" align="center" valign="bottom">入库时间</td> |
||||
<td width="12%" align="center" valign="bottom">教材发放</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcbianhao']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['suliang']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['rukushijian']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="jcfafang1.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">教材发放</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
|
||||
|
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,159 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
if (!function_exists("GetSQLValueString")) { |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; |
||||
|
||||
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO fafang (shijian, lsren, ssbanji, suliang, jcbianhao) VALUES (%s, %s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['ff'], "text"), |
||||
GetSQLValueString($_POST['ls'], "text"), |
||||
GetSQLValueString($_POST['ssbj'], "text"), |
||||
GetSQLValueString($_POST['sl'], "double"), |
||||
GetSQLValueString($_POST['jc'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg8.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { |
||||
$updateSQL = sprintf("UPDATE fafang SET suliang=%s WHERE jcbianhao=%s", |
||||
GetSQLValueString($_POST['hiddenField'], "double"), |
||||
GetSQLValueString($_POST['jc'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error()); |
||||
|
||||
$updateGoTo = "cg8.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; |
||||
$updateGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $updateGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['jcbianhao'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM ruku WHERE jcbianhao = %s", GetSQLValueString($colname_Recordset1, "text")); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
|
||||
$colname_Recordset2 = "-1"; |
||||
if (isset($_GET['jcbianhao'])) { |
||||
$colname_Recordset2 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset2 = sprintf("SELECT (fafang.suliang-1) as fa FROM fafang WHERE jcbianhao = %s", GetSQLValueString($colname_Recordset2, "text")); |
||||
$Recordset2 = mysql_query($query_Recordset2, $jc) or die(mysql_error()); |
||||
$row_Recordset2 = mysql_fetch_assoc($Recordset2); |
||||
$totalRows_Recordset2 = mysql_num_rows($Recordset2); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">教材发放</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教材编号:</td> |
||||
<td width="198"><input name="jc" type="text" id="jc" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">发放时间:</td> |
||||
<td width="198"><input name="ff" type="text" id="ff" value="<? print(time());?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">领书人:</td> |
||||
<td><input name="ls" type="text" id="ls" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">所属班级:</td> |
||||
<td><input name="ssbj" type="text" id="ssbj" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">数量:</td> |
||||
<td><input name="sl" type="text" id="sl" value="1" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="教材发放" /> |
||||
</label> |
||||
<label> |
||||
<input name="hiddenField" type="hidden" value="<?php echo $row_Recordset2['fa']; ?>" />
|
||||
</label> |
||||
<p> </p> |
||||
|
||||
|
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
<input type="hidden" name="MM_update" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
|
||||
mysql_free_result($Recordset2); |
||||
?> |
@ -0,0 +1,149 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO jiaocai (jcbianhao, jcming, zuozhe, cbshe, banben) VALUES (%s, %s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['jcbianhao'], "text"), |
||||
GetSQLValueString($_POST['jcming'], "text"), |
||||
GetSQLValueString($_POST['zuozhe'], "text"), |
||||
GetSQLValueString($_POST['cbshe'], "text"), |
||||
GetSQLValueString($_POST['banben'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg5.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM jiaocai"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">添加教材</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教材编号:</td> |
||||
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">教材名:</td> |
||||
<td><input name="jcming" type="text" id="jcming" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">作者:</td> |
||||
<td><input name="zuozhe" type="text" id="zuozhe" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">出版社:</td> |
||||
<td><input name="cbshe" type="text" id="cbshe" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">版本号:</td> |
||||
<td><input name="banben" type="text" id="banben" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="提交" /> |
||||
</label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教材管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">教材编号</td> |
||||
<td width="12%" align="center" valign="bottom">教材名</td> |
||||
<td width="12%" align="center" valign="bottom">作者</td> |
||||
<td width="12%" align="center" valign="bottom">出版社</td> |
||||
<td width="12%" align="center" valign="bottom">修改</td> |
||||
<td width="12%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcbianhao']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['cbshe']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="cgai.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">修改</a></td>
|
||||
<td align="center" valign="bottom"><a href="cdel.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,144 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
if (!function_exists("GetSQLValueString")) { |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; |
||||
|
||||
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM zhengding"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset2 = "SELECT * FROM ruku"; |
||||
$Recordset2 = mysql_query($query_Recordset2, $jc) or die(mysql_error()); |
||||
$row_Recordset2 = mysql_fetch_assoc($Recordset2); |
||||
$totalRows_Recordset2 = mysql_num_rows($Recordset2); |
||||
?> |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="post"> |
||||
<label></label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">已征订教材入库</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">征订编号</td> |
||||
<td width="12%" align="center" valign="bottom">教材名</td> |
||||
<td width="12%" align="center" valign="bottom">作者</td> |
||||
<td width="12%" align="center" valign="bottom">征订人</td> |
||||
<td width="12%" align="center" valign="bottom">征订数量</td> |
||||
<td width="12%" align="center" valign="bottom">教材入库</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['dingdan']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['zdren']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['zdshuliang']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="jcruku1.php?dingdan=<?php echo $row_Recordset1['dingdan']; ?>">教材入库</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教材已入库管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">教材编号</td> |
||||
<td width="12%" align="center" valign="bottom">教材名</td> |
||||
<td width="12%" align="center" valign="bottom">作者</td> |
||||
<td width="12%" align="center" valign="bottom">数量</td> |
||||
<td width="12%" align="center" valign="bottom">入库时间</td> |
||||
<td width="12%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['jcbianhao']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['jcming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['zuozhe']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset2['suliang']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['rukushijian']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="rkdel.php?jcbianhao=<?php echo $row_Recordset2['jcbianhao']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset2 = mysql_fetch_assoc($Recordset2)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
</form></td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
|
||||
mysql_free_result($Recordset2); |
||||
|
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,149 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
if (!function_exists("GetSQLValueString")) { |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; |
||||
|
||||
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO ruku (jcbianhao, jcming, zuozhe, cbshe, banben, scjia, sgjia, suliang, rukushijian) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['jcbianhao'], "text"), |
||||
GetSQLValueString($_POST['jcming'], "text"), |
||||
GetSQLValueString($_POST['zuozhe'], "text"), |
||||
GetSQLValueString($_POST['cbshe'], "text"), |
||||
GetSQLValueString($_POST['banben'], "text"), |
||||
GetSQLValueString($_POST['shicangjia'], "double"), |
||||
GetSQLValueString($_POST['sgj'], "double"), |
||||
GetSQLValueString($_POST['sl'], "int"), |
||||
GetSQLValueString($_POST['rksj'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg7.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['dingdan'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['dingdan'] : addslashes($_GET['dingdan']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM zhengding WHERE dingdan = %s", GetSQLValueString($colname_Recordset1, "text")); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">教材入库</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教材编号:</td> |
||||
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">教材名:</td> |
||||
<td><input name="jcming" type="text" id="jcming" value="<?php echo $row_Recordset1['jcming']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">作者:</td> |
||||
<td><input name="zuozhe" type="text" id="zuozhe" value="<?php echo $row_Recordset1['zuozhe']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">出版社:</td> |
||||
<td><input name="cbshe" type="text" id="cbshe" value="<?php echo $row_Recordset1['cbshe']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">版本号:</td> |
||||
<td><input name="banben" type="text" id="banben" value="<?php echo $row_Recordset1['banben']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">市场价</td> |
||||
<td><label> |
||||
<input name="shicangjia" type="text" id="shicangjia" /> |
||||
</label></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">实购价</td> |
||||
<td><input name="sgj" type="text" id="sgj" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">数量</td> |
||||
<td><input name="sl" type="text" id="sl" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">入库时间</td> |
||||
<td><input name="rksj" type="text" id="rksj" value="<? print(time());?>" /></td>
|
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="教材入库" /> |
||||
</label> |
||||
<label></label> |
||||
<p> </p> |
||||
|
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,114 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM jiaocai"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset2 = "SELECT * FROM zhengding"; |
||||
$Recordset2 = mysql_query($query_Recordset2, $jc) or die(mysql_error()); |
||||
$row_Recordset2 = mysql_fetch_assoc($Recordset2); |
||||
$totalRows_Recordset2 = mysql_num_rows($Recordset2); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST"> |
||||
<label></label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教材征订</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">教材编号</td> |
||||
<td width="12%" align="center" valign="bottom">教材名</td> |
||||
<td width="12%" align="center" valign="bottom">作者</td> |
||||
<td width="12%" align="center" valign="bottom">出版社</td> |
||||
<td width="12%" align="center" valign="bottom">版本号</td> |
||||
<td width="12%" align="center" valign="bottom">教材征订</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcbianhao']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['cbshe']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['banben']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="zding.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">教材征订</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教材已征订管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">征订编号</td> |
||||
<td width="12%" align="center" valign="bottom">教材名</td> |
||||
<td width="12%" align="center" valign="bottom">作者</td> |
||||
<td width="12%" align="center" valign="bottom">征订人</td> |
||||
<td width="12%" align="center" valign="bottom">征订数量</td> |
||||
<td width="12%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['dingdan']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['jcming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['zuozhe']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset2['zdren']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset2['zdshuliang']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="zzdel.php?dingdan=<?php echo $row_Recordset2['dingdan']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
|
||||
|
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
|
||||
mysql_free_result($Recordset2); |
||||
?> |
@ -0,0 +1,51 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
if ((isset($_GET['jiaoshihao'])) && ($_GET['jiaoshihao'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM laoshi WHERE jiaoshihao=%s", |
||||
GetSQLValueString($_GET['jiaoshihao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg3.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,119 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { |
||||
$updateSQL = sprintf("UPDATE laoshi SET xingming=%s, xi=%s, user_name=%s, password=%s WHERE jiaoshihao=%s", |
||||
GetSQLValueString($_POST['xingming'], "text"), |
||||
GetSQLValueString($_POST['xi'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text"), |
||||
GetSQLValueString($_POST['jshao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error()); |
||||
|
||||
$updateGoTo = "cg3.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; |
||||
$updateGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $updateGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['jiaoshihao'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jiaoshihao'] : addslashes($_GET['jiaoshihao']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM laoshi WHERE jiaoshihao = '%s'", $colname_Recordset1); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">修改教师资料</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教师号:</td> |
||||
<td width="198"><input name="jshao" type="text" id="jshao" value="<?php echo $row_Recordset1['jiaoshihao']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">姓 名:</td> |
||||
<td><input name="xingming" type="text" id="xingming" value="<?php echo $row_Recordset1['xingming']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">系:</td> |
||||
<td><input name="xi" type="text" id="xi" value="<?php echo $row_Recordset1['xi']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">账 号:</td> |
||||
<td><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
|
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="修改" /> |
||||
</label> |
||||
<input type="hidden" name="MM_update" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,149 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO laoshi (jiaoshihao, xingming, xi, user_name, password) VALUES (%s, %s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['jshao'], "text"), |
||||
GetSQLValueString($_POST['xingming'], "text"), |
||||
GetSQLValueString($_POST['xi'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg3.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM laoshi"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">添加教师</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教师号:</td> |
||||
<td width="198"><input name="jshao" type="text" id="jshao" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">姓 名:</td> |
||||
<td><input name="xingming" type="text" id="xingming" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">系:</td> |
||||
<td><input name="xi" type="text" id="xi" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">账 号:</td> |
||||
<td><input name="user_name" type="text" id="user_name" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="password" id="password" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="提交" /> |
||||
</label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教师管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">教师号</td> |
||||
<td width="12%" align="center" valign="bottom">姓 名</td> |
||||
<td width="12%" align="center" valign="bottom">账 号</td> |
||||
<td width="12%" align="center" valign="bottom">密 码</td> |
||||
<td width="12%" align="center" valign="bottom">修改</td> |
||||
<td width="12%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['jiaoshihao']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['xingming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['password']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="jgai.php?jiaoshihao=<?php echo $row_Recordset1['jiaoshihao']; ?>">修改</a></td>
|
||||
<td align="center" valign="bottom"><a href="jdel.php?jiaoshihao=<?php echo $row_Recordset1['jiaoshihao']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,46 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>PHP教材管理系统</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
@import url("txt.css"); |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<style type="text/css"> |
||||
<!-- |
||||
body { |
||||
background-image: url(img/bj.gif); |
||||
} |
||||
--> |
||||
</style> |
||||
<link href="txt.css" rel="stylesheet" type="text/css" /> |
||||
</head> |
||||
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td background="img/b.jpg"> </td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt"> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom"><a href="xxgl.php">学生管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jsgl.php">教师管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcguanli.php">教材管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcruku.php">教材入库</a><a href="user.php"></a></td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><marquee> |
||||
公告:欢迎登陆教师管理后台 |
||||
</marquee></td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
@ -0,0 +1,10 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,55 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
if (!function_exists("GetSQLValueString")) { |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; |
||||
|
||||
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
} |
||||
|
||||
if ((isset($_GET['jcbianhao'])) && ($_GET['jcbianhao'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM ruku WHERE jcbianhao=%s", |
||||
GetSQLValueString($_GET['jcbianhao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg7.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,9 @@ |
||||
.txt { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
a:link { |
||||
font-size: 12px; |
||||
color: #000000; |
||||
text-decoration: none; |
||||
} |
@ -0,0 +1,59 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
if ((isset($_GET['user_name'])) && ($_GET['user_name'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM admin WHERE user_name=%s", |
||||
GetSQLValueString($_GET['user_name'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg1.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
</body> |
||||
</html> |
@ -0,0 +1,111 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { |
||||
$updateSQL = sprintf("UPDATE admin SET name=%s, password=%s WHERE user_name=%s", |
||||
GetSQLValueString($_POST['name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error()); |
||||
|
||||
$updateGoTo = "cg1.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; |
||||
$updateGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $updateGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['user_name'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['user_name'] : addslashes($_GET['user_name']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM `admin` WHERE user_name = '%s'", $colname_Recordset1); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">修改账号</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">用户名:</td> |
||||
<td width="198"><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">姓 名:</td> |
||||
<td><input name="name" type="text" id="name" value="<?php echo $row_Recordset1['name']; ?>" /></td>
|
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="修改" /> |
||||
</label> |
||||
<input type="hidden" name="MM_update" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
|
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,136 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO admin (name, user_name, password) VALUES (%s, %s, %s)", |
||||
GetSQLValueString($_POST['name'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg1.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM `admin`"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">添加账号</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">用户名:</td> |
||||
<td width="198"><input name="user_name" type="text" id="user_name" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="password" id="password" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">姓 名:</td> |
||||
<td><input name="name" type="text" id="name" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="提交" /> |
||||
</label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="5" align="center" valign="bottom">用户管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="20%" align="center" valign="bottom">用户名</td> |
||||
<td width="20%" align="center" valign="bottom">密码</td> |
||||
<td width="20%" align="center" valign="bottom">姓名</td> |
||||
<td width="20%" align="center" valign="bottom">修改</td> |
||||
<td width="20%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['password']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['name']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="ugai.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">修改</a></td>
|
||||
<td align="center" valign="bottom"><a href="udel.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,3 @@ |
||||
.x { |
||||
border: 0.1px solid #FFFFFF; |
||||
} |
@ -0,0 +1,51 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
if ((isset($_GET['xuehao'])) && ($_GET['xuehao'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM xushen WHERE xuehao=%s", |
||||
GetSQLValueString($_GET['xuehao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg2.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,124 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { |
||||
$updateSQL = sprintf("UPDATE xushen SET xingming=%s, banji=%s, xi=%s, user_name=%s, password=%s WHERE xuehao=%s", |
||||
GetSQLValueString($_POST['xingming'], "text"), |
||||
GetSQLValueString($_POST['banji'], "text"), |
||||
GetSQLValueString($_POST['xi'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text"), |
||||
GetSQLValueString($_POST['xuehao'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error()); |
||||
|
||||
$updateGoTo = "cg2.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; |
||||
$updateGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $updateGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['xuehao'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['xuehao'] : addslashes($_GET['xuehao']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM xushen WHERE xuehao = '%s'", $colname_Recordset1); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">修改学生资料</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">学 号:</td> |
||||
<td width="198"><input name="xuehao" type="text" id="xuehao" value="<?php echo $row_Recordset1['xuehao']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">姓 名:</td> |
||||
<td><input name="xingming" type="text" id="xingming" value="<?php echo $row_Recordset1['xingming']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">班 级:</td> |
||||
<td><input name="banji" type="text" id="banji" value="<?php echo $row_Recordset1['banji']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">系:</td> |
||||
<td><input name="xi" type="text" id="xi" value="<?php echo $row_Recordset1['xi']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">账 号:</td> |
||||
<td><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
|
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="修改" /> |
||||
</label> |
||||
<input type="hidden" name="MM_update" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,144 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO xi (xingming, xi, user_name, password) VALUES (%s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['xingming'], "text"), |
||||
GetSQLValueString($_POST['xi'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg4.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM xi"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="22" colspan="2" align="center">添加系级人员</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">姓 名:</td> |
||||
<td width="198"><input name="xingming" type="text" id="xingming" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">系:</td> |
||||
<td><input name="xi" type="text" id="xi" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">账 号:</td> |
||||
<td><input name="user_name" type="text" id="user_name" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="password" id="password" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="提交" /> |
||||
</label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">教师管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">系</td> |
||||
<td width="12%" align="center" valign="bottom">姓 名</td> |
||||
<td width="12%" align="center" valign="bottom">账 号</td> |
||||
<td width="12%" align="center" valign="bottom">密 码</td> |
||||
<td width="12%" align="center" valign="bottom">修改</td> |
||||
<td width="12%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['xi']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['xingming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['password']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="jgai.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">修改</a></td>
|
||||
<td align="center" valign="bottom"><a href="jdel.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,43 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>PHP教材管理系统</title> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<style type="text/css"> |
||||
<!-- |
||||
body { |
||||
background-image: url(img/bj.gif); |
||||
} |
||||
--> |
||||
</style> |
||||
<link href="txt.css" rel="stylesheet" type="text/css" /> |
||||
</head> |
||||
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td background="img/b.jpg"> </td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt"> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom"><a href="xxgl.php">学生管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jsgl.php">教师管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcguanli.php">教材管理</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcruku.php">教材入库</a></td> |
||||
<td width="12%" align="center" valign="bottom"><a href="jcfafang.php"> |
||||
教材发放</a></td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><marquee> |
||||
公告:欢迎登陆系级人员管理后台 |
||||
</marquee></td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
@ -0,0 +1,42 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>PHP教材管理系统</title> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<style type="text/css"> |
||||
<!-- |
||||
body { |
||||
background-image: url(img/bj.gif); |
||||
} |
||||
--> |
||||
</style> |
||||
<link href="txt.css" rel="stylesheet" type="text/css" /> |
||||
</head> |
||||
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td background="img/b.jpg"> </td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt"> |
||||
<tr> |
||||
<td align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><marquee> |
||||
公告:欢迎登陆学生管理后台 |
||||
</marquee></td> |
||||
</tr> |
||||
</table> |
||||
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center">欢迎登陆学生管理后台</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
@ -0,0 +1,154 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO xushen (xuehao, xingming, banji, xi, user_name, password) VALUES (%s, %s, %s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['xuehao'], "text"), |
||||
GetSQLValueString($_POST['xingming'], "text"), |
||||
GetSQLValueString($_POST['banji'], "text"), |
||||
GetSQLValueString($_POST['xi'], "text"), |
||||
GetSQLValueString($_POST['user_name'], "text"), |
||||
GetSQLValueString($_POST['password'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg2.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = "SELECT * FROM xushen"; |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">添加学生</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">学 号:</td> |
||||
<td width="198"><input name="xuehao" type="text" id="xuehao" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">姓 名:</td> |
||||
<td><input name="xingming" type="text" id="xingming" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">班 级:</td> |
||||
<td><input name="banji" type="text" id="banji" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">系:</td> |
||||
<td><input name="xi" type="text" id="xi" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">账 号:</td> |
||||
<td><input name="user_name" type="text" id="user_name" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">密 码:</td> |
||||
<td><input name="password" type="password" id="password" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="提交" /> |
||||
</label> |
||||
<label></label> |
||||
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td colspan="6" align="center" valign="bottom">学生管理</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" align="center" valign="bottom">学 号</td> |
||||
<td width="12%" align="center" valign="bottom">姓 名</td> |
||||
<td width="12%" align="center" valign="bottom">账 号</td> |
||||
<td width="12%" align="center" valign="bottom">密 码</td> |
||||
<td width="12%" align="center" valign="bottom">修改</td> |
||||
<td width="12%" align="center" valign="bottom">删除</td> |
||||
</tr> |
||||
<% |
||||
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) |
||||
%> |
||||
<?php do { ?> |
||||
<tr> |
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['xuehao']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['xingming']; ?></td>
|
||||
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
|
||||
<td align="center"><?php echo $row_Recordset1['password']; ?></td>
|
||||
<td align="center" valign="bottom"><a href="xgai.php?xuehao=<?php echo $row_Recordset1['xuehao']; ?>">修改</a></td>
|
||||
<td align="center" valign="bottom"><a href="xdel.php?xuehao=<?php echo $row_Recordset1['xuehao']; ?>">删除</a></td>
|
||||
</tr> |
||||
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> |
||||
<% |
||||
Repeat1__index=Repeat1__index+1 |
||||
Repeat1__numRows=Repeat1__numRows-1 |
||||
Recordset2.MoveNext() |
||||
Wend |
||||
%> |
||||
</table> |
||||
<p> </p> |
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,152 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
$editFormAction = $_SERVER['PHP_SELF']; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); |
||||
} |
||||
|
||||
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { |
||||
$insertSQL = sprintf("INSERT INTO zhengding (dingdan, jcbianhao, jcming, zuozhe, cbshe, banben, shijian, zdren, szbanji, zdshuliang) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", |
||||
GetSQLValueString($_POST['dindan'], "text"), |
||||
GetSQLValueString($_POST['jcbianhao'], "text"), |
||||
GetSQLValueString($_POST['jcming'], "text"), |
||||
GetSQLValueString($_POST['zuozhe'], "text"), |
||||
GetSQLValueString($_POST['cbshe'], "text"), |
||||
GetSQLValueString($_POST['banben'], "text"), |
||||
GetSQLValueString($_POST['shijian'], "text"), |
||||
GetSQLValueString($_POST['zjren'], "text"), |
||||
GetSQLValueString($_POST['szbanji'], "text"), |
||||
GetSQLValueString($_POST['zdsliang'], "int")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error()); |
||||
|
||||
$insertGoTo = "cg6.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; |
||||
$insertGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $insertGoTo)); |
||||
} |
||||
|
||||
$colname_Recordset1 = "-1"; |
||||
if (isset($_GET['jcbianhao'])) { |
||||
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']); |
||||
} |
||||
mysql_select_db($database_jc, $jc); |
||||
$query_Recordset1 = sprintf("SELECT * FROM jiaocai WHERE jcbianhao = '%s'", $colname_Recordset1); |
||||
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error()); |
||||
$row_Recordset1 = mysql_fetch_assoc($Recordset1); |
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1); |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>无标题文档</title> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.txt {font-size: 12px; |
||||
color: #000000; |
||||
} |
||||
--> |
||||
</style> |
||||
</head> |
||||
|
||||
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
||||
<?php include("head.php");?> |
||||
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt"> |
||||
<tr> |
||||
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
|
||||
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt"> |
||||
<tr> |
||||
<td height="20" colspan="2" align="center">教材征订</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="102" align="right">教材编号:</td> |
||||
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">教材名:</td> |
||||
<td><input name="jcming" type="text" id="jcming" value="<?php echo $row_Recordset1['jcming']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">作者:</td> |
||||
<td><input name="zuozhe" type="text" id="zuozhe" value="<?php echo $row_Recordset1['zuozhe']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">出版社:</td> |
||||
<td><input name="cbshe" type="text" id="cbshe" value="<?php echo $row_Recordset1['cbshe']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">版本号:</td> |
||||
<td><input name="banben" type="text" id="banben" value="<?php echo $row_Recordset1['banben']; ?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">订单号</td> |
||||
<td><label> |
||||
<input name="dindan" type="text" id="dindan" /> |
||||
</label></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">征订时间</td> |
||||
<td><input name="shijian" type="text" id="shijian" value="<? print(time());?>" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td align="right">征订人</td> |
||||
<td><input name="zjren" type="text" id="zjren" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">所订班级</td> |
||||
<td><input name="szbanji" type="text" id="szbanji" /></td> |
||||
</tr> |
||||
<tr> |
||||
<td align="right">征订数量</td> |
||||
<td><input name="zdsliang" type="text" id="zdsliang" /></td> |
||||
</tr> |
||||
</table> |
||||
<label> |
||||
<input type="submit" name="Submit" value="教材征订" /> |
||||
</label> |
||||
<label></label> |
||||
<p> </p> |
||||
|
||||
|
||||
<input type="hidden" name="MM_insert" value="form1"> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php include("foot.php");?> |
||||
</body> |
||||
</html> |
||||
<?php |
||||
mysql_free_result($Recordset1); |
||||
|
||||
mysql_free_result($Recordset1); |
||||
?> |
@ -0,0 +1,51 @@ |
||||
<?php require_once('Connections/jc.php'); ?> |
||||
<?php |
||||
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") |
||||
{ |
||||
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; |
||||
|
||||
switch ($theType) { |
||||
case "text": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "long": |
||||
case "int": |
||||
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; |
||||
break; |
||||
case "double": |
||||
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; |
||||
break; |
||||
case "date": |
||||
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; |
||||
break; |
||||
case "defined": |
||||
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; |
||||
break; |
||||
} |
||||
return $theValue; |
||||
} |
||||
|
||||
if ((isset($_GET['dingdan'])) && ($_GET['dingdan'] != "")) { |
||||
$deleteSQL = sprintf("DELETE FROM zhengding WHERE dingdan=%s", |
||||
GetSQLValueString($_GET['dingdan'], "text")); |
||||
|
||||
mysql_select_db($database_jc, $jc); |
||||
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error()); |
||||
|
||||
$deleteGoTo = "cg6.htm"; |
||||
if (isset($_SERVER['QUERY_STRING'])) { |
||||
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; |
||||
$deleteGoTo .= $_SERVER['QUERY_STRING']; |
||||
} |
||||
header(sprintf("Location: %s", $deleteGoTo)); |
||||
} |
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> |
||||
<title>ÎÞ±êÌâÎĵµ</title> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -0,0 +1,83 @@ |
||||
|
||||
|
||||
-- |
||||
-- 数据库: `jck` |
||||
-- |
||||
|
||||
|
||||
|
||||
CREATE TABLE `admin` ( |
||||
`name` varchar(20) NOT NULL COMMENT '管理员姓名', |
||||
`user_name` varchar(50) NOT NULL COMMENT '登录名', |
||||
`password` varchar(20) NOT NULL COMMENT '密码' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
||||
|
||||
|
||||
CREATE TABLE `fafang` ( |
||||
`shijian` date NOT NULL COMMENT '时间', |
||||
`lsren` varchar(30) NOT NULL COMMENT '领书人', |
||||
`ssbanji` varchar(30) NOT NULL COMMENT '所属班级', |
||||
`suliang` varchar(10) NOT NULL COMMENT '数量' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
||||
|
||||
|
||||
CREATE TABLE `laoshi` ( |
||||
`jiaoshihao` varchar(20) NOT NULL COMMENT '教师号', |
||||
`xingming` varchar(20) NOT NULL COMMENT '姓名', |
||||
`xi` varchar(20) NOT NULL COMMENT '系号', |
||||
`user_name` varchar(50) NOT NULL COMMENT '登录名', |
||||
`password` varchar(20) NOT NULL COMMENT '密码' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
||||
|
||||
|
||||
CREATE TABLE `ruku` ( |
||||
`jcbianhao` varchar(50) NOT NULL COMMENT '教材编号', |
||||
`jcming` varchar(50) NOT NULL COMMENT '教材名', |
||||
`zuozhe` varchar(30) NOT NULL COMMENT '作者', |
||||
`cbshe` varchar(50) NOT NULL COMMENT '出版社', |
||||
`banben` varchar(20) NOT NULL COMMENT '版本号', |
||||
`scjia` float NOT NULL COMMENT '市场价', |
||||
`sgjia` float NOT NULL COMMENT '实购价', |
||||
`suliang` int(10) NOT NULL COMMENT '数量', |
||||
`rukushijian` date NOT NULL COMMENT '入库时间' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
||||
|
||||
|
||||
CREATE TABLE `xi` ( |
||||
`xingming` varchar(20) NOT NULL COMMENT '系管理人姓名', |
||||
`xi` varchar(20) NOT NULL COMMENT '系号', |
||||
`user_name` varchar(50) NOT NULL COMMENT '登录名', |
||||
`password` varchar(20) NOT NULL COMMENT '密码' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
||||
|
||||
|
||||
CREATE TABLE `xushen` ( |
||||
`xuehao` varchar(20) NOT NULL COMMENT '学号', |
||||
`xingming` varchar(20) NOT NULL COMMENT '姓名', |
||||
`banji` varchar(20) NOT NULL COMMENT '班级', |
||||
`xi` varchar(20) NOT NULL COMMENT '系号', |
||||
`user_name` varchar(50) NOT NULL COMMENT '登录名', |
||||
`password` varchar(20) NOT NULL COMMENT '密码' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
||||
|
||||
|
||||
CREATE TABLE `zhengding` ( |
||||
`dingdan` varchar(30) NOT NULL COMMENT '订单号', |
||||
`jcbianhao` varchar(30) NOT NULL COMMENT '教材编号', |
||||
`jcming` varchar(50) NOT NULL COMMENT '教材名', |
||||
`jcleixin` varchar(30) NOT NULL COMMENT '教材类型', |
||||
`zuozhe` varchar(50) NOT NULL COMMENT '作者', |
||||
`cbshe` varchar(50) NOT NULL COMMENT '出版社', |
||||
`banben` varchar(20) NOT NULL COMMENT '版本号', |
||||
`shijian` date NOT NULL COMMENT '征订时间', |
||||
`zdren` varchar(30) NOT NULL COMMENT '征订人', |
||||
`szbanji` varchar(30) NOT NULL COMMENT '所订班级', |
||||
`zdshuliang` int(10) NOT NULL COMMENT '征订数量' |
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
||||
|
Loading…
Reference in new issue