m_method = $method; } function CheckIfNULL ( $name ) { return ( $this->m_method[$name] == NULL ); } function CheckIfSizeLarge ( $name, $size ) { return ( strlen($this->m_method[$name]) > $size ); } function CheckIfSizeSmall ( $name, $size ) { return ( strlen($this->m_method[$name]) <= $size ); } function CheckIfSizeEqual ( $name, $size ) { return ( strlen($this->m_method[$name]) < $size ); } function CheckIfEqual ( $name, $content ) { return ( strcmp($this->m_method[$name], $content ) == 0 ); } function CheckSchoolID ( $name ) { return ( ereg("^[A-Z][0-9A-Za-z]+$", $name ) ); } function CheckEnglish ( $name ) { return ( ereg("^[a-zA-Z0-9_]+$", $this->m_method[$name] ) ); } function CheckEmailFormat ( $name ) { return ( ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $this->m_method[$name] ) ); } function CheckSchoolStudent( $name, $pswd ) { $server = 'mail.ntou.edu.tw'; $port = 110; $fp = fsockopen($server, $port); if ( $fp ) { fgets($fp, 512); fputs($fp, "user " . $name . "\r\n"); fgets($fp, 512); fputs($fp, "pass " . $pswd . "\r\n"); $temp = fgets($fp, 512); if ( substr($temp, 0, 3) == '+OK' ) $auth = true; else $auth = false; fclose( $fp ); } return $auth; } } ?>
Warning: mysql_connect(): Access denied for user 'csuser'@'localhost' (using password: YES) in /var/www/CSWebPage/librarys/ClassMysql.php on line 106

Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/CSWebPage/librarys/ClassMysql.php on line 107

Warning: mysql_query(): A link to the server could not be established in /var/www/CSWebPage/librarys/ClassMysql.php on line 107

Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/CSWebPage/librarys/ClassMysql.php on line 108

Warning: mysql_query(): A link to the server could not be established in /var/www/CSWebPage/librarys/ClassMysql.php on line 108

Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/CSWebPage/librarys/ClassMysql.php on line 109

Warning: mysql_query(): A link to the server could not be established in /var/www/CSWebPage/librarys/ClassMysql.php on line 109