// Siu 07-Apr-2006 Begin // simple format checking at ID field to block SPAM // 08-Apr-2006 update // 09-Apr-2006 update mysql_connect('localhost','bac98','bac2003'); mysql_select_db('bac98'); if ($_SERVER['REQUEST_METHOD']=='POST') { $idinfo = $_POST['idinfo']; $pass = true; if (strlen($idinfo) != 8) $pass = false; if (substr($idinfo,0,1) != 'c') $pass = false; $idinfo = str_replace('C','c',$idinfo); $idinfo = str_replace('c','9',$idinfo) . 'D'; $rs1 = mysql_query("SELECT sid FROM names WHERE sid = '$idinfo' "); if (mysql_num_rows($rs1) <= 0) $pass = false; if (!$pass) { header("HTTP/1.0 404 File not found"); // let spammer change target echo "File not found"; flush(); exit; } } // Siu 07-Apr-2006 End $is_msie = (! ( strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 5.5') === FALSE )) || (! ( strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 6.') === FALSE )); // colors: added 12-Jan-2004 // $mcolors = array ( 'author' => '#333333', 'footnote' => '#666666', 'subject' => '#000099', 'date' => '#006600', 'msgid' => '#666666', 'default' => '#000000' ); //** ADDED Siu 21-Nov-2003 include_once('linkdet.php'); //** END 21-Nov-2003 //** added Siu 12-Oct-2004 /** * replace dangerous strings in message body to avoid hacking */ function avoid_hacking($str) { // insert replace operation here. $ret = $str; $ret = eregi_replace('javascript\:','javascript$',$ret); $ret = eregi_replace('\ } ?>
// 17-Feb-2004, smiley insertion, siu. include_once('inc_emo.php'); ?>