├── PHPnow-1.5.6.zip ├── README.md ├── selectcoursesystem ├── Connections │ ├── _notes │ │ └── dwsync.xml │ └── selectcoursesystem.php ├── _mmServerScripts │ ├── MMHTTPDB.php │ ├── _notes │ │ └── dwsync.xml │ └── mysql.php ├── _notes │ ├── .mno │ ├── add-class.php.mno │ ├── changed-admin.php.mno │ ├── course-del.php.mno │ ├── course-stu.php.mno │ ├── course-stu2.php.mno │ ├── course-stu3.php.mno │ ├── course-tea.php.mno │ ├── delect.php.mno │ ├── delete-stu.php.mno │ ├── dwsync.xml │ ├── manage-stu.php.mno │ ├── manage-tea.php.mno │ ├── modify-stu.php.mno │ ├── modify-tea.php.mno │ ├── search-tea.php.mno │ ├── welcome-admin.php.mno │ └── welcome-stu.php.mno ├── add-class.php ├── changed-admin.php ├── changed-stu.php ├── changed-tea.php ├── course-del.php ├── course-stu.php ├── course-stu2.php ├── course-stu3.php ├── course-tea.php ├── delect.php ├── delete-stu.php ├── index.php ├── login-admin.php ├── login-stu.php ├── login-tea.php ├── loginfailed.php ├── manage-stu.php ├── manage-tea.php ├── modify-stu.php ├── modify-tea.php ├── password-stu.php ├── password-tea.php ├── search-tea.php ├── style.css ├── welcome-admin.php ├── welcome-stu.php └── welcome-tea.php ├── student.sql ├── 设计基于PHP的网上选课系统说明-kidaze.docx └── 选课系统使用指南(包含测试账号).docx /PHPnow-1.5.6.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kidaze/CourseSelectionSystem/42cd892b40a18d50bd4ed1905fa89f939173a464/PHPnow-1.5.6.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CourseSelectionSystem 2 | 基于PHP的网上选课系统 3 | 针对选课系统,我主要使用了phpmyadmin + Dreamweaver完成了大部分工作 4 |   5 | 这是php老师发布的要求: 6 |   7 | “ 8 |   9 | 设计一个《基于PHP的网上选课系统》 10 | 采用PHP,MYSQL,HTML设计一个基于B/S模式的选课系统,该系统的主要功能如下: 11 | 12 | 1、系统针对不同的用户角色进行管理,至少有以下三种角色:学生、教师、管理员。并提供以下主要功能:学生信息管理、课程管理、教师管理、学生选课管理等。 13 | 2、数据库采用MYSQL,至少包括以下五张表: 14 | 学生信息表(学号、姓名、所在院系ID、专业、性别、班级、密码); 15 | 课程信息(课程代码、课程名称、教师编号、已选人数、总人数、上课时间、地点、学分、讲授学时、实验学时); 16 | 教师信息表(教师编号、姓名、性别、所属学院、个人简介、密码); 17 | 学生选课管理(学号、姓名、所在学院、所在专业、班级、课程编码), 18 | 院系信息表(院系ID、院系名称、所在校区)。 19 | 3、教师登录后提供以下功能操作:发布课程,查询已发布课程,查询选课学生信息,修改密码。 20 | 4、学生登录后提供以下功能操作:查看可选课程,选择课程,查询已选课程,退选课程,修改密码。 21 | 5、管理员登录后提供以下功能操作:管理学生信息,管理教师信息,修改密码。 22 |   23 | ” 24 | 25 | 使用前先阅读使用指南会更方便您的使用,谢谢! 26 | -------------------------------------------------------------------------------- /selectcoursesystem/Connections/_notes/dwsync.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /selectcoursesystem/Connections/selectcoursesystem.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /selectcoursesystem/_mmServerScripts/MMHTTPDB.php: -------------------------------------------------------------------------------- 1 | Your testing server do not has support for PHP pages\n 2 | 3 | $debug_to_file = false; 4 | 5 | function log_messages($error_message){ 6 | global $f, $debug_to_file; 7 | if ($debug_to_file === true){ 8 | if (!is_resource($f)){ 9 | @ini_set('display_errors', 1); 10 | @error_reporting(E_ALL); 11 | $f = @fopen('log.txt', 'a'); 12 | } 13 | if (is_resource($f)){ 14 | return @fwrite($f, $error_message."\n"); 15 | } 16 | } 17 | return false; 18 | } 19 | function create_error($error_msg = '', $line = -1){ 20 | if ($error_msg != ''){ 21 | return ''.$error_msg.'\n'; 22 | }else{ 23 | return ' Unidentified Connection Error at Line '.$line.'\n'; 24 | } 25 | } 26 | 27 | log_messages("\n--------------------------------"); 28 | // what parameters were sent ?! 29 | foreach($_POST as $key=>$value) { 30 | if (strtoupper($key) != 'PASSWORD'){ 31 | log_messages('$_POST["'.$key.'"] = \''.$value."';"); 32 | } 33 | } 34 | // We need these information only once when the test button is hit 35 | if (isset($_POST['opCode']) && $_POST['opCode'] == 'IsOpen' ){ 36 | // What PHP version 37 | log_messages("\nPHP-Version: ".phpversion()); 38 | // What OS System is running on 39 | log_messages('PHP-OS: '.PHP_OS); 40 | // How PHP is installed (CGI, ISAPI, FastCGI) 41 | // !!!! Major difference exists on these servers for $_ENV, $_SERVER 42 | log_messages('PHP-SAPI-NAME: '.php_sapi_name()); 43 | // MySQL, mbstring modules are installed ?! 44 | log_messages('PHP-Extensions: '.var_export(get_loaded_extensions(),true)); 45 | } 46 | 47 | if(extension_loaded('mbstring')) 48 | { 49 | $acceptCharsetHeader = 'Accept-Charset: ' . mb_internal_encoding(); 50 | header( $acceptCharsetHeader ); 51 | $head = ''; 52 | echo $head; 53 | }else{ 54 | echo ''; 55 | } 56 | 57 | // Build connection object 58 | if (isset($_POST['Type']) && $_POST['Type'] == 'MYSQL') 59 | { 60 | require("./mysql.php"); 61 | $oConn = new MySqlConnection(@$_POST['ConnectionString'], @$_POST['Timeout'], @$_POST['Host'], @$_POST['Database'], @$_POST['UserName'], @$_POST['Password']); 62 | if (!isset($oConn) || $oConn == false){ 63 | log_messages("\n".'MySQL Connection Object initialisation failed'."\n\n".@$error); 64 | }else{ 65 | log_messages("\n".'MySQL Connection Object Created'."\n\n"); 66 | } 67 | }else{ 68 | $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__); 69 | log_messages("\nError Sent:\n\n\t".@$error."\n\n\n"); 70 | echo $error.''; 71 | return; 72 | } 73 | 74 | // Process opCode 75 | if (isset($oConn) && $oConn) 76 | { 77 | $oConn->Open(); 78 | 79 | if ($_POST['opCode'] == 'IsOpen'){ 80 | $answer = $oConn->TestOpen(); 81 | }elseif (is_resource($oConn->connectionId) && $oConn->isOpen){ 82 | 83 | switch ($_POST['opCode']){ 84 | case 'GetTables': $answer = $oConn->GetTables(@$_POST['Database']); break; 85 | case 'GetColsOfTable': $answer = $oConn->GetColumnsOfTable(@$_POST['TableName']); break; 86 | case 'ExecuteSQL': $answer = $oConn->ExecuteSQL(@$_POST['SQL'], @$_POST['MaxRows']); break; 87 | case 'GetODBCDSNs': $answer = $oConn->GetDatabaseList(); break; 88 | case 'SupportsProcedure': $answer = $oConn->SupportsProcedure(); break; 89 | case 'GetProviderTypes': $answer = $oConn->GetProviderTypes(); break; 90 | case 'GetViews': $answer = $oConn->GetViews(); break; 91 | case 'GetProcedures': $answer = $oConn->GetProcedures(); break; 92 | case 'GetParametersOfProcedure': $answer = $oConn->GetParametersOfProcedure(@$_POST['ProcName']); break; 93 | case 'ReturnsResultset': $answer = $oConn->ReturnsResultSet($_POST['RRProcName']); break; 94 | case 'ExecuteSP': $answer = $oConn->ExecuteSP(@$_POST['ExecProcName'], 0, @$_POST['ExecProcParameters']); break; 95 | case 'GetKeysOfTable': $answer = $oConn->GetPrimaryKeysOfTable(@$_POST['TableName']); break; 96 | default: $answer = create_error('The \''.$_POST['opCode'].'\' command is not supported.'); break; 97 | } 98 | } 99 | 100 | $oConn->Close(); 101 | }else{ 102 | $answer = create_error('The Connection Module was not initialized properly for an unknown reason.'); 103 | } 104 | 105 | log_messages("\nAnswer From Database:\n\n\t".@$answer."\n\n\n"); 106 | echo $answer; 107 | 108 | echo ''; 109 | ?> 110 | -------------------------------------------------------------------------------- /selectcoursesystem/_mmServerScripts/_notes/dwsync.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_mmServerScripts/mysql.php: -------------------------------------------------------------------------------- 1 | "Error", 21 | 2 => "Warning", 22 | 4 => "Parsing Error", 23 | 8 => "Notice", 24 | 16 => "Core Error", 25 | 32 => "Core Warning", 26 | 64 => "Compile Error", 27 | 128 => "Compile Warning", 28 | 256 => "User Error", 29 | 512 => "User Warning", 30 | 1024=> "User Notice", 31 | 2048=> "E_ALL", 32 | 2049=> "PHP5 E_STRICT" 33 | 34 | ); 35 | $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); 36 | if (error_reporting() != 0) { 37 | @fwrite($f, $str); 38 | if (@$errno == 2 && isset($already_sent) && !$already_sent==true){ 39 | $error = ''."\n"; 40 | $error .= 'An Warning Type error appeared. The error is logged into the log file.'."\n"; 41 | $error .= ''."\n"; 42 | $already_sent = true; 43 | echo $error; 44 | } 45 | } 46 | } 47 | if ($debug_to_file){ 48 | $old_error_handler = set_error_handler("KT_ErrorHandler"); 49 | } 50 | 51 | class MySqlConnection 52 | { 53 | /* 54 | // The 'var' keyword is deprecated in PHP5 ... we will define these variables at runtime. 55 | var $isOpen; 56 | var $hostname; 57 | var $database; 58 | var $username; 59 | var $password; 60 | var $timeout; 61 | var $connectionId; 62 | var $error; 63 | */ 64 | function MySqlConnection($ConnectionString, $Timeout, $Host, $DB, $UID, $Pwd) 65 | { 66 | $this->isOpen = false; 67 | $this->timeout = $Timeout; 68 | $this->error = ''; 69 | 70 | if( $Host ) { 71 | $this->hostname = $Host; 72 | } 73 | elseif( preg_match("/host=([^;]+);/", $ConnectionString, $ret) ) { 74 | $this->hostname = $ret[1]; 75 | } 76 | 77 | if( $DB ) { 78 | $this->database = $DB; 79 | } 80 | elseif( preg_match("/db=([^;]+);/", $ConnectionString, $ret) ) { 81 | $this->database = $ret[1]; 82 | } 83 | 84 | if( $UID ) { 85 | $this->username = $UID; 86 | } 87 | elseif( preg_match("/uid=([^;]+);/", $ConnectionString, $ret) ) { 88 | $this->username = $ret[1]; 89 | } 90 | 91 | if( $Pwd ) { 92 | $this->password = $Pwd; 93 | } 94 | elseif( preg_match("/pwd=([^;]+);/", $ConnectionString, $ret) ) { 95 | $this->password = $ret[1]; 96 | } 97 | } 98 | 99 | function Open() 100 | { 101 | $this->connectionId = mysql_connect($this->hostname, $this->username, $this->password); 102 | if (isset($this->connectionId) && $this->connectionId && is_resource($this->connectionId)) 103 | { 104 | $this->isOpen = ($this->database == "") ? true : mysql_select_db($this->database, $this->connectionId); 105 | } 106 | else 107 | { 108 | $this->isOpen = false; 109 | } 110 | } 111 | 112 | function TestOpen() 113 | { 114 | return ($this->isOpen) ? '' : $this->HandleException(); 115 | } 116 | 117 | function Close() 118 | { 119 | if (is_resource($this->connectionId) && $this->isOpen) 120 | { 121 | if (mysql_close($this->connectionId)) 122 | { 123 | $this->isOpen = false; 124 | unset($this->connectionId); 125 | } 126 | } 127 | } 128 | 129 | function GetTables($table_name = '') 130 | { 131 | $xmlOutput = ""; 132 | if ($this->isOpen && isset($this->connectionId) && is_resource($this->connectionId)){ 133 | // 1. mysql_list_tables and mysql_tablename are deprecated in PHP5 134 | // 2. For backward compatibility GetTables don't have any parameters 135 | if ($table_name === ''){ 136 | $table_name = @$_POST['Database']; 137 | } 138 | //added backtick for handling reserved words and special characters 139 | //http://dev.mysql.com/doc/refman/5.0/en/legal-names.html 140 | $sql = ' SHOW TABLES FROM ' . $this->ensureTicks($table_name) ; 141 | $results = mysql_query($sql, $this->connectionId) or $this->HandleException(); 142 | 143 | $xmlOutput = ""; 144 | 145 | // Columns are referenced by index, so Schema and 146 | // Catalog must be specified even though they are not supported 147 | 148 | $xmlOutput .= 'TABLE_CATALOG'; // column 0 (zero-based) 149 | $xmlOutput .= 'TABLE_SCHEMA'; // column 1 150 | $xmlOutput .= 'TABLE_NAME'; // column 2 151 | 152 | $xmlOutput .= ""; 153 | 154 | if (is_resource($results) && mysql_num_rows($results) > 0){ 155 | while ($row = mysql_fetch_array($results)){ 156 | $xmlOutput .= '' . $row[0]. ''; 157 | } 158 | } 159 | $xmlOutput .= ""; 160 | 161 | } 162 | return $xmlOutput; 163 | } 164 | 165 | function GetViews() 166 | { 167 | // not supported 168 | return ""; 169 | } 170 | 171 | function GetProcedures() 172 | { 173 | // not supported 174 | return ""; 175 | } 176 | 177 | function GetColumnsOfTable($TableName) 178 | { 179 | $xmlOutput = ""; 180 | //added backtick for handling reserved words and special characters 181 | //http://dev.mysql.com/doc/refman/5.0/en/legal-names.html 182 | $query = "DESCRIBE ".$this->ensureTicks($TableName); 183 | $result = mysql_query($query) or $this->HandleException(); 184 | 185 | if ($result) 186 | { 187 | $xmlOutput = ""; 188 | 189 | // Columns are referenced by index, so Schema and 190 | // Catalog must be specified even though they are not supported 191 | $xmlOutput .= "TABLE_CATALOG"; // column 0 (zero-based) 192 | $xmlOutput .= "TABLE_SCHEMA"; // column 1 193 | $xmlOutput .= "TABLE_NAME"; // column 2 194 | $xmlOutput .= "COLUMN_NAME"; 195 | $xmlOutput .= "DATA_TYPE"; 196 | $xmlOutput .= "IS_NULLABLE"; 197 | $xmlOutput .= "COLUMN_SIZE"; 198 | 199 | $xmlOutput .= ""; 200 | 201 | // The fields returned from DESCRIBE are: Field, Type, Null, Key, Default, Extra 202 | while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) 203 | { 204 | $xmlOutput .= ""; 205 | 206 | // Separate type from size. Format is: type(size) 207 | if (preg_match("/(.*)\((.*)\)/", $row["Type"], $ret)) 208 | { 209 | $type = $ret[1]; 210 | $size = $ret[2]; 211 | } 212 | else 213 | { 214 | $type = $row["Type"]; 215 | $size = ""; 216 | } 217 | 218 | // MySQL sets nullable to "YES" or "", so we need to set "NO" 219 | $null = $row["Null"]; 220 | if ($null == "") 221 | $null = "NO"; 222 | 223 | $xmlOutput .= "" . $row["Field"] . ""; 224 | $xmlOutput .= "" . $type . ""; 225 | $xmlOutput .= "" . $null . ""; 226 | $xmlOutput .= "" . $size . ""; 227 | } 228 | mysql_free_result($result); 229 | 230 | $xmlOutput .= ""; 231 | } 232 | 233 | return $xmlOutput; 234 | } 235 | 236 | function GetParametersOfProcedure($ProcedureName, $SchemaName, $CatalogName) 237 | { 238 | // not supported on MySQL 239 | return ''; 240 | } 241 | 242 | function ExecuteSQL($aStatement, $MaxRows) 243 | { 244 | if ( get_magic_quotes_gpc() ) 245 | { 246 | $aStatement = stripslashes( $aStatement ) ; 247 | } 248 | 249 | $xmlOutput = ""; 250 | 251 | $result = mysql_query($aStatement) or $this->HandleException(); 252 | 253 | if (isset($result) && is_resource($result)) 254 | { 255 | $xmlOutput = ""; 256 | 257 | $fieldCount = mysql_num_fields($result); 258 | for ($i=0; $i < $fieldCount; $i++) 259 | { 260 | $meta = mysql_fetch_field($result); 261 | if ($meta) 262 | { 263 | $xmlOutput .= 'type; 265 | $xmlOutput .= '" max_length="' . $meta->max_length; 266 | $xmlOutput .= '" table="' . $meta->table; 267 | $xmlOutput .= '" not_null="' . $meta->not_null; 268 | $xmlOutput .= '" numeric="' . $meta->numeric; 269 | $xmlOutput .= '" unsigned="' . $meta->unsigned; 270 | $xmlOutput .= '" zerofill="' . $meta->zerofill; 271 | $xmlOutput .= '" primary_key="' . $meta->primary_key; 272 | $xmlOutput .= '" multiple_key="'. $meta->multiple_key; 273 | $xmlOutput .= '" unique_key="' . $meta->unique_key; 274 | $xmlOutput .= '">' . $meta->name; 275 | $xmlOutput .= ''; 276 | } 277 | } 278 | 279 | $xmlOutput .= ""; 280 | $row = mysql_fetch_assoc($result); 281 | 282 | for ($i=0; $row && ($i < $MaxRows); $i++) 283 | { 284 | $xmlOutput .= ""; 285 | 286 | foreach ($row as $key => $value) 287 | { 288 | $xmlOutput .= ""; 289 | $xmlOutput .= htmlspecialchars($value); 290 | $xmlOutput .= ""; 291 | } 292 | 293 | $xmlOutput .= ""; 294 | $row = mysql_fetch_assoc($result); 295 | } 296 | 297 | mysql_free_result($result); 298 | 299 | $xmlOutput .= ""; 300 | } 301 | 302 | return $xmlOutput; 303 | } 304 | 305 | function GetProviderTypes() 306 | { 307 | return ''; 308 | } 309 | 310 | function ExecuteSP($aProcStatement, $TimeOut, $Parameters) 311 | { 312 | return ''; 313 | } 314 | 315 | function ReturnsResultSet($ProcedureName) 316 | { 317 | return ''; 318 | } 319 | 320 | function SupportsProcedure() 321 | { 322 | return ''; 323 | } 324 | 325 | /* 326 | * HandleException added by InterAKT for ease in database translation answer 327 | */ 328 | function HandleException() 329 | { 330 | global $debug_to_file, $f; 331 | $this->error = create_error(' MySQL Error#: '. ((int)mysql_errno()) . "\n\n".mysql_error()); 332 | log_messages($this->error); 333 | die($this->error.''); 334 | } 335 | 336 | function ensureTicks($inputSQL) 337 | { 338 | $outSQL = $inputSQL; 339 | //added backtick for handling reserved words and special characters 340 | //http://dev.mysql.com/doc/refman/5.0/en/legal-names.html 341 | 342 | //only add ticks if not already there 343 | $oLength = strlen($outSQL); 344 | $bHasTick = false; 345 | if (($oLength > 0) && (($outSQL[0] == "`") && ($outSQL[$oLength-1] == "`"))) 346 | { 347 | $bHasTick = true; 348 | } 349 | if ($bHasTick == false) 350 | { 351 | $outSQL = "`".$outSQL."`"; 352 | } 353 | return $outSQL; 354 | } 355 | 356 | function GetDatabaseList() 357 | { 358 | $xmlOutput = 'NAME'; 359 | 360 | if (isset($this->connectionId) && is_resource($this->connectionId)){ 361 | $dbList = mysql_list_dbs($this->connectionId); 362 | 363 | while ($row = mysql_fetch_object($dbList)) 364 | { 365 | $xmlOutput .= '' . $row->Database . ''; 366 | } 367 | }else{ 368 | $this->error = CONN_NOT_OPEN_GET_DB_LIST; 369 | return $this->error; 370 | } 371 | $xmlOutput .= ''; 372 | 373 | return $xmlOutput; 374 | } 375 | 376 | function GetPrimaryKeysOfTable($TableName) 377 | { 378 | $xmlOutput = ''; 379 | //added backtick for handling reserved words and special characters 380 | //http://dev.mysql.com/doc/refman/5.0/en/legal-names.html 381 | $query = "DESCRIBE ".$this->ensureTicks($TableName); 382 | $result = mysql_query($query) or $this->HandleException(); 383 | 384 | 385 | if ($result) 386 | { 387 | $xmlOutput = ''; 388 | 389 | // Columns are referenced by index, so Schema and 390 | // Catalog must be specified even though they are not supported 391 | $xmlOutput .= 'TABLE_CATALOG'; // column 0 (zero-based) 392 | $xmlOutput .= 'TABLE_SCHEMA'; // column 1 393 | $xmlOutput .= 'TABLE_NAME'; // column 2 394 | $xmlOutput .= 'COLUMN_NAME'; 395 | $xmlOutput .= 'DATA_TYPE'; 396 | $xmlOutput .= 'IS_NULLABLE'; 397 | $xmlOutput .= 'COLUMN_SIZE'; 398 | 399 | $xmlOutput .= ''; 400 | 401 | // The fields returned from DESCRIBE are: Field, Type, Null, Key, Default, Extra 402 | while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) 403 | { 404 | if (strtoupper($row['Key']) == 'PRI'){ 405 | $xmlOutput .= ''; 406 | 407 | // Separate type from size. Format is: type(size) 408 | if (preg_match("/(.*)\((.*)\)/", $row['Type'], $ret)) 409 | { 410 | $type = $ret[1]; 411 | $size = $ret[2]; 412 | } 413 | else 414 | { 415 | $type = $row['Type']; 416 | $size = ''; 417 | } 418 | 419 | // MySQL sets nullable to "YES" or "", so we need to set "NO" 420 | $null = $row['Null']; 421 | if ($null == '') 422 | $null = 'NO'; 423 | 424 | $xmlOutput .= '' . $row['Field'] . ''; 425 | $xmlOutput .= '' . $type . ''; 426 | $xmlOutput .= '' . $null . ''; 427 | $xmlOutput .= '' . $size . ''; 428 | } 429 | } 430 | mysql_free_result($result); 431 | 432 | $xmlOutput .= ''; 433 | } 434 | return $xmlOutput; 435 | } 436 | 437 | } // class MySqlConnection 438 | ?> 439 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/add-class.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/changed-admin.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/course-del.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/course-stu.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/course-stu2.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/course-stu3.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/course-tea.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/delect.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/delete-stu.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/dwsync.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/manage-stu.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/manage-tea.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/modify-stu.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/modify-tea.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/search-tea.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/welcome-admin.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/_notes/welcome-stu.php.mno: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selectcoursesystem/add-class.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 90 | 91 | 92 | 93 | 94 | 无标题文档 95 | 96 | 97 | 98 |
99 |

选课前请确认您的个人信息:

100 | 101 | 102 | 103 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 |
学号: 104 |
姓名:
所在学院ID:
所在专业:
所在班级:
123 |

 

124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 |
课程代码课程名称教师编号已选人数总人数上课时间地点学分讲授学时实验学时
139 |
154 |

 

155 | 156 |
157 | 158 | 159 | 164 | -------------------------------------------------------------------------------- /selectcoursesystem/changed-admin.php: -------------------------------------------------------------------------------- 1 | 2 | 61 | 62 | 63 | 64 | 65 | 无标题文档 66 | 67 | 68 | 69 | 70 |
71 |

返回

72 |
73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 82 | 84 | 85 | 86 | 87 | 88 |
管理员id管理员密码
81 | 83 |
89 | 90 |
91 | 92 | 93 | 96 | -------------------------------------------------------------------------------- /selectcoursesystem/changed-stu.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 修改您的密码 11 | 12 | 13 | 14 | 15 |
16 |

返回

17 |

目前您的个人信息:

18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
您的学生ID:
您目前的密码:
29 |

修改密码

30 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /selectcoursesystem/changed-tea.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 修改您的密码 11 | 12 | 13 | 14 | 15 |
16 |

返回

17 |

目前您的个人信息:

18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
您的老师ID
您目前的密码:
29 |

修改密码

30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /selectcoursesystem/course-del.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 74 | 75 | 76 | 77 | 78 | 无标题文档 79 | 80 | 81 | 82 |
83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 |
学号姓名所在学院ID所在专业班级课程编码
104 |
105 | 106 | 107 | 110 | -------------------------------------------------------------------------------- /selectcoursesystem/course-stu.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 82 | 83 | 84 | 85 | 86 | 请选择课程 87 | 88 | 89 | 90 | 91 |
92 |

返回

93 |
94 |
95 | 选课前请确认您的个人信息: 96 | 97 | 98 | 99 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
学号: 100 |
姓名:
所在学院ID:
所在专业:
所在班级:
119 |

 

120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 139 | 140 | 142 | 143 | 144 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 |
课程代码课程名称教师编号已选人数总人数上课时间地点学分讲授学时实验学时操作
137 | 138 | 141 | 145 | 添加
155 | 156 |

 

157 | 158 |
159 | 160 | 161 | 166 | -------------------------------------------------------------------------------- /selectcoursesystem/course-stu2.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 49 | 50 | 51 | 52 | 53 | 您选择的课程 54 | 55 | 56 | 57 | 58 |
59 |

返回

60 |
61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
学号姓名所在学院所在专业班级教师编号课程编码
84 |
85 | 86 | 87 | 90 | -------------------------------------------------------------------------------- /selectcoursesystem/course-stu3.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 50 | 51 | 52 | 53 | 54 | 学生退选课程 55 | 56 | 57 | 58 | 59 |
60 |

返回

61 |
62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
学号姓名所在学院ID所在专业班级教师编号课程编码操作
删除
87 |
88 | 89 | 90 | 93 | -------------------------------------------------------------------------------- /selectcoursesystem/course-tea.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 49 | 50 | 51 | 52 | 53 | 您已发布的课程 54 | 55 | 56 | 57 | 58 |
59 |

返回

60 |

您已发布的课程:

61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
课程代码课程名称教师编号已选人数总人数上课时间地点讲授学时实验学时学分
90 |
91 |
92 | 93 | 94 | 97 | -------------------------------------------------------------------------------- /selectcoursesystem/delect.php: -------------------------------------------------------------------------------- 1 | 2 | 59 | 60 | 61 | 62 | 63 | 无标题文档 64 | 75 | 76 | 77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
老师id姓名性别所属学院简介密码
100 |
101 | 102 | 103 | 106 | -------------------------------------------------------------------------------- /selectcoursesystem/delete-stu.php: -------------------------------------------------------------------------------- 1 | 2 | 59 | 60 | 61 | 62 | 63 | 无标题文档 64 | 65 | 66 | 67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
学号姓名所在院系id专业性别班级密码
92 |
93 | 94 | 95 | 98 | -------------------------------------------------------------------------------- /selectcoursesystem/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 欢迎来到选课系统! 6 | 7 | 8 | 9 | 10 |
11 |

欢迎来到选课系统!请选择您的身份:

12 |
13 |
14 |

学生

15 |

老师

16 |

管理员

17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /selectcoursesystem/login-admin.php: -------------------------------------------------------------------------------- 1 | 2 | 34 | = 5.1) {session_regenerate_id(true);} else {session_regenerate_id();} 65 | //declare two session variables and assign them 66 | $_SESSION['MM_Username'] = $loginUsername; 67 | $_SESSION['MM_UserGroup'] = $loginStrGroup; 68 | 69 | 70 | if (isset($_SESSION['PrevUrl']) && false) { 71 | $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; 72 | } 73 | header("Location: " . $MM_redirectLoginSuccess ); 74 | } 75 | else { 76 | header("Location: ". $MM_redirectLoginFailed ); 77 | } 78 | } 79 | ?> 80 | 81 | 82 | 83 | 84 | 管理员登录 85 | 86 | 87 | 88 | 89 |
90 |

请输入您的账号和密码:

91 |
92 | 93 | 94 | 95 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 |
管理员ID: 96 |
管理员密码:
106 |
107 | 108 | -------------------------------------------------------------------------------- /selectcoursesystem/login-stu.php: -------------------------------------------------------------------------------- 1 | 2 | 34 | = 5.1) {session_regenerate_id(true);} else {session_regenerate_id();} 65 | //declare two session variables and assign them 66 | $_SESSION['MM_Username'] = $loginUsername; 67 | $_SESSION['MM_UserGroup'] = $loginStrGroup; 68 | 69 | if (isset($_SESSION['PrevUrl']) && false) { 70 | $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; 71 | } 72 | header("Location: " . $MM_redirectLoginSuccess ); 73 | } 74 | else { 75 | header("Location: ". $MM_redirectLoginFailed ); 76 | } 77 | } 78 | ?> 79 | 80 | 81 | 82 | 83 | 学生登录 84 | 85 | 86 | 87 |
88 |

请输入您的账号和密码:

89 |
90 | 91 | 92 | 93 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 |
学生id: 94 |
学生密码:
104 |
105 |
106 | 107 | -------------------------------------------------------------------------------- /selectcoursesystem/login-tea.php: -------------------------------------------------------------------------------- 1 | 2 | 34 | = 5.1) {session_regenerate_id(true);} else {session_regenerate_id();} 65 | //declare two session variables and assign them 66 | $_SESSION['TEA_Username'] = $loginUsername; 67 | $_SESSION['TEA_UserGroup'] = $loginStrGroup; 68 | 69 | if (isset($_SESSION['PrevUrl']) && false) { 70 | $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; 71 | } 72 | header("Location: " . $MM_redirectLoginSuccess ); 73 | } 74 | else { 75 | header("Location: ". $MM_redirectLoginFailed ); 76 | } 77 | } 78 | ?> 79 | 80 | 81 | 82 | 83 | 老师登录 84 | 85 | 86 | 87 | 88 |
89 |

请输入您的账号和密码:

90 |
91 | 92 | 93 | 94 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 |
老师id: 95 |
老师密码:
105 |
106 |
107 | 108 | -------------------------------------------------------------------------------- /selectcoursesystem/loginfailed.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录失败! 6 | 7 | 8 | 9 | 10 |
11 |

登录失败!请检查账号或密码!

12 |

点此重新登录

13 |
14 | 15 | -------------------------------------------------------------------------------- /selectcoursesystem/manage-stu.php: -------------------------------------------------------------------------------- 1 | 2 | 80 | 81 | 82 | 83 | 84 | 管理学生信息 85 | 86 | 87 | 88 | 89 |
90 |

返回

91 |

插入学生信息:

92 |
93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 108 | 109 | 110 | 111 | 112 | 114 | 116 | 117 |
学生id姓名所在院系id专业性别班级初始密码操作
自动添加 107 | 113 | 115 |
118 | 119 |
120 |
121 |
122 |

查看学生信息:

123 |
124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 |
学生id姓名所在院系id专业性别班级操作
删除修改
147 |
148 |
149 | 150 | 151 | 154 | -------------------------------------------------------------------------------- /selectcoursesystem/manage-tea.php: -------------------------------------------------------------------------------- 1 | 2 | 71 | 72 | 73 | 74 | 75 | 管理老师信息 76 | 77 | 78 | 79 | 80 | 81 |
82 |

返回

83 |

插入老师信息

84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 98 | 99 | 100 | 101 | 103 | 104 |
教师id姓名性别所属学院初始密码操作
自动添加 97 | 102 |
105 | 106 |
107 |
108 |
109 |

查看老师信息:

110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
教师id姓名性别所属学院简介操作
删除修改
132 |
133 |
134 | 135 | 136 | 139 | -------------------------------------------------------------------------------- /selectcoursesystem/modify-stu.php: -------------------------------------------------------------------------------- 1 | 2 | 69 | 70 | 71 | 72 | 73 | 无标题文档 74 | 85 | 86 | 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 |
学生id姓名所在院系id专业性别班级操作
101 |
110 | 111 |
112 | 113 | 114 | 115 | 118 | -------------------------------------------------------------------------------- /selectcoursesystem/modify-tea.php: -------------------------------------------------------------------------------- 1 | 2 | 68 | 69 | 70 | 71 | 72 | 无标题文档 73 | 84 | 85 | 86 | 87 |
88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 101 | 102 | 103 | 104 | 105 | 106 |
教师id姓名性别所属学院简介操作
99 |
107 | 108 |
109 | 110 | 111 | 114 | -------------------------------------------------------------------------------- /selectcoursesystem/password-stu.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 60 | 61 | 62 | 63 | 64 | 无标题文档 65 | 66 | 67 | 68 |
69 | 70 | 71 | 72 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
您的ID: 73 |
输入新密码:
83 | 84 |
85 | 86 | -------------------------------------------------------------------------------- /selectcoursesystem/password-tea.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 60 | 61 | 62 | 63 | 64 | 无标题文档 65 | 66 | 67 | 68 |
69 | 70 | 71 | 72 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
您的ID: 73 |
输入新密码:
83 | 84 |
85 | 86 | -------------------------------------------------------------------------------- /selectcoursesystem/search-tea.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 50 | 51 | 52 | 53 | 54 | 选您课程的学生 55 | 56 | 57 | 58 | 59 |
60 |

返回

61 |
62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
学号姓名所在学院ID所在专业班级教师编号课程编号
85 |
86 | 87 | 88 | 91 | -------------------------------------------------------------------------------- /selectcoursesystem/style.css: -------------------------------------------------------------------------------- 1 | /* CSS Document */ 2 | div{ 3 | text-align:center; 4 | margin:0px auto; 5 | padding:10px; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /selectcoursesystem/welcome-admin.php: -------------------------------------------------------------------------------- 1 | 2 | 30 | 68 | 69 | 70 | 71 | 72 | 欢迎您,管理员! 73 | 74 | 75 | 76 | 77 |
78 |

欢迎您,管理员!请选择您要进行的操作:

79 |
80 |
81 |

管理老师信息

82 |

管理学生信息

83 |

 

84 |

注销

85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
管理员id管理员密码
修改
99 |
100 |

 

101 |
102 | 103 | 104 | 107 | -------------------------------------------------------------------------------- /selectcoursesystem/welcome-stu.php: -------------------------------------------------------------------------------- 1 | 2 | 30 | 68 | 69 | 70 | 71 | 72 | 欢迎您,学生! 73 | 74 | 75 | 76 | 77 |
78 |

欢迎您,学生!请选择您要进行的操作:

79 |
80 |
81 |

选择课程

82 |

查询已选课程

83 |

退选课程

84 |

修改密码

85 |

 

86 |

注销

87 |
88 |
89 |

您可以选择的课程:

90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
课程代码课程名称教师编号已选人数总人数上课时间地点学分讲授学时实验学时
119 |
120 |
121 | 122 | 123 | 126 | -------------------------------------------------------------------------------- /selectcoursesystem/welcome-tea.php: -------------------------------------------------------------------------------- 1 | 2 | 30 | 90 | 91 | 92 | 93 | 94 | 欢迎您,老师! 95 | 96 | 97 | 98 | 99 |
100 |

欢迎您,老师!请选择您要进行的操作:

101 |
102 |
103 |

查询已发布课程

104 |

查询选课学生信息

105 |

修改密码

106 |

 

107 |

注销

108 |
109 |
110 |

请发布课程:

111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 |
课程代码课程名称教师编号已选人数总人数上课时间地点讲授学时实验学时学分
127 | 自动添加
142 | 143 |
144 |
145 | 146 | -------------------------------------------------------------------------------- /student.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 3.3.7 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- 主机: localhost 6 | -- 生成日期: 2017 年 06 月 18 日 17:18 7 | -- 服务器版本: 5.0.90 8 | -- PHP 版本: 5.2.14 9 | 10 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 11 | 12 | 13 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 14 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 15 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 16 | /*!40101 SET NAMES utf8 */; 17 | 18 | -- 19 | -- 数据库: `courseselection` 20 | -- 21 | 22 | -- -------------------------------------------------------- 23 | 24 | -- 25 | -- 表的结构 `admin` 26 | -- 27 | 28 | CREATE TABLE IF NOT EXISTS `admin` ( 29 | `adminid` int(50) NOT NULL, 30 | `adminpassword` int(50) NOT NULL 31 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 32 | 33 | -- 34 | -- 转存表中的数据 `admin` 35 | -- 36 | 37 | INSERT INTO `admin` (`adminid`, `adminpassword`) VALUES 38 | (123456, 123456); 39 | 40 | -- -------------------------------------------------------- 41 | 42 | -- 43 | -- 表的结构 `collegeid` 44 | -- 45 | 46 | CREATE TABLE IF NOT EXISTS `collegeid` ( 47 | `collegeid` int(50) NOT NULL, 48 | `collegename` varchar(50) character set utf8 collate utf8_bin NOT NULL, 49 | `whichcampus` varchar(50) character set utf8 collate utf8_bin NOT NULL 50 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 51 | 52 | -- 53 | -- 转存表中的数据 `collegeid` 54 | -- 55 | 56 | INSERT INTO `collegeid` (`collegeid`, `collegename`, `whichcampus`) VALUES 57 | (1, '计算机学院', '厦门'); 58 | 59 | -- -------------------------------------------------------- 60 | 61 | -- 62 | -- 表的结构 `course` 63 | -- 64 | 65 | CREATE TABLE IF NOT EXISTS `course` ( 66 | `courseid` int(50) NOT NULL auto_increment, 67 | `coursename` varchar(50) character set utf8 collate utf8_bin NOT NULL, 68 | `teaid` int(50) NOT NULL, 69 | `selected` int(50) NOT NULL, 70 | `total` int(50) NOT NULL, 71 | `classtime` varchar(50) character set utf8 collate utf8_bin NOT NULL, 72 | `classroom` varchar(50) character set utf8 collate utf8_bin NOT NULL, 73 | `credit` int(50) NOT NULL, 74 | `shangketime` int(50) NOT NULL, 75 | `shiyantime` int(50) NOT NULL, 76 | PRIMARY KEY (`courseid`) 77 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; 78 | 79 | -- 80 | -- 转存表中的数据 `course` 81 | -- 82 | 83 | INSERT INTO `course` (`courseid`, `coursename`, `teaid`, `selected`, `total`, `classtime`, `classroom`, `credit`, `shangketime`, `shiyantime`) VALUES 84 | (6, 'php从入门到精通', 10009, 0, 100, '星期二', 'd4-102', 3, 50, 10), 85 | (5, 'c++ 从入门到放弃', 10009, 0, 100, '星期一', 'd4-101', 3, 50, 10), 86 | (7, '数据结构', 10010, 0, 100, '星期三', 'd4-103', 4, 50, 10); 87 | 88 | -- -------------------------------------------------------- 89 | 90 | -- 91 | -- 表的结构 `stucourse` 92 | -- 93 | 94 | CREATE TABLE IF NOT EXISTS `stucourse` ( 95 | `stuid` int(50) NOT NULL, 96 | `stuname` varchar(50) character set utf8 collate utf8_bin NOT NULL, 97 | `institute` varchar(50) character set utf8 collate utf8_bin NOT NULL, 98 | `major` varchar(50) character set utf8 collate utf8_bin NOT NULL, 99 | `class` varchar(50) character set utf8 collate utf8_bin NOT NULL, 100 | `teaid` int(50) NOT NULL, 101 | `courseid` int(11) NOT NULL, 102 | `classtime` varchar(50) character set utf8 collate utf8_bin NOT NULL, 103 | PRIMARY KEY (`stuid`,`courseid`) 104 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 105 | 106 | -- 107 | -- 转存表中的数据 `stucourse` 108 | -- 109 | 110 | INSERT INTO `stucourse` (`stuid`, `stuname`, `institute`, `major`, `class`, `teaid`, `courseid`, `classtime`) VALUES 111 | (10, '熊大', '2', '网络工程', '1班', 10009, 6, '星期二'), 112 | (11, '熊二', '1', '网络工程', '1班', 10010, 7, '星期三'); 113 | 114 | -- -------------------------------------------------------- 115 | 116 | -- 117 | -- 表的结构 `student` 118 | -- 119 | 120 | CREATE TABLE IF NOT EXISTS `student` ( 121 | `stuid` int(50) NOT NULL auto_increment, 122 | `stuname` varchar(50) collate utf8_bin NOT NULL, 123 | `collogeid` int(50) NOT NULL, 124 | `major` varchar(50) collate utf8_bin NOT NULL, 125 | `sex` varchar(50) collate utf8_bin NOT NULL, 126 | `class` varchar(50) collate utf8_bin NOT NULL, 127 | `stupassword` int(50) NOT NULL, 128 | PRIMARY KEY (`stuid`) 129 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=12 ; 130 | 131 | -- 132 | -- 转存表中的数据 `student` 133 | -- 134 | 135 | INSERT INTO `student` (`stuid`, `stuname`, `collogeid`, `major`, `sex`, `class`, `stupassword`) VALUES 136 | (10, '熊大', 2, '网络工程', '女', '1班', 123456), 137 | (11, '熊二', 1, '网络工程', '女', '1班', 123456); 138 | 139 | -- -------------------------------------------------------- 140 | 141 | -- 142 | -- 表的结构 `teacher` 143 | -- 144 | 145 | CREATE TABLE IF NOT EXISTS `teacher` ( 146 | `teaid` int(50) NOT NULL auto_increment, 147 | `teaname` varchar(50) collate utf8_bin NOT NULL, 148 | `sex` varchar(50) collate utf8_bin NOT NULL, 149 | `collegename` varchar(50) collate utf8_bin NOT NULL, 150 | `introduction` varchar(50) collate utf8_bin NOT NULL, 151 | `teapassword` int(50) NOT NULL, 152 | PRIMARY KEY (`teaid`) 153 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=10011 ; 154 | 155 | -- 156 | -- 转存表中的数据 `teacher` 157 | -- 158 | 159 | INSERT INTO `teacher` (`teaid`, `teaname`, `sex`, `collegename`, `introduction`, `teapassword`) VALUES 160 | (10010, '梁老师', '女', '计算机学院', '', 123456), 161 | (10009, '熊老师', '女', '计算机学院', '好老师', 123456); 162 | -------------------------------------------------------------------------------- /设计基于PHP的网上选课系统说明-kidaze.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kidaze/CourseSelectionSystem/42cd892b40a18d50bd4ed1905fa89f939173a464/设计基于PHP的网上选课系统说明-kidaze.docx -------------------------------------------------------------------------------- /选课系统使用指南(包含测试账号).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kidaze/CourseSelectionSystem/42cd892b40a18d50bd4ed1905fa89f939173a464/选课系统使用指南(包含测试账号).docx --------------------------------------------------------------------------------