#!/cgi-bin/php 741 N 3rd St.
San Jose, CA 95112 (map)
Look for yellow fire hydrant and front yard succulents
Parking is on the street"; // When ? $when = "July 19, 2025 at 4pm"; // What ? $what = "Let's get together again
This event will be held outside"; // Bring ? $bring = "Beverages, dessert, entrees, salad, or snacks
Note: no barbeque grill will be available"; // Last date to reply ? (can be "" then it is not included, is only shown by the script, later answers are possible) $lastdate = ""; // Contact ? (phone no. or similar) (can be "" then it is not included) $contact = "1-408-294-4687 (140-TAXI-HOUSE or 1-408-A-WHIM-TRIM or 1-408-BY-HINTS or 140VAX-4-GNUS)"; // Picture ? (e.g. "invite.jpg" , can be "" then it is not included) $picture = "http://clipart-library.com/img1/1465723.jpg"; // ************************************************* // ** Administrator pwd, email , files and layout ** // ************************************************* //Change under "admin" with your own password. It's required for editing the entries. Not super-safe, so don't share with bank passwords etc.. $admin_password = "teralaser"; //Enter your email here (spam protected, no robot can see it , however other users can. Other users' emails are fully protected) $admin_email = "acg7vfasvu@liamekaens.com"; //Your website URL $home = "http://invite.liberatedsoftware.com"; //Name of file used to store your guest list. $data_file = "/var/tmp/invite.dat"; //Send you an email when someone answers your invitation, YES or NO $notify = "NO"; //Your Operating System //For Windows/NT user : WIN //For Linux/Unix user : UNIX $os = "UNIX"; //Color & font setting $background = "#FFFFFF"; $table_top = "#E3C6FE"; $table_content_1a = "#EDEEFA"; $table_content_1b = "#E4E4F6"; $table_content_2a = "#EFE8F2"; $table_content_2b = "#EFEFFF"; $table_bottom = "#E3C6FE"; $table_border = "#000000"; $title_color = "black"; $link = "blue"; $visited_link = "blue"; $active_link = "red"; $font_face = "helvetica"; $message_font_face = "arial"; $message_font_size = "3"; //Maximum entry per page (not implemented properly yet) $max_entry_per_page = "60"; //Maximum entries stored in data file (if 0, it is not checked) PS: Every change is an entry too. $max_record_in_data_file = "400"; // *************************** // ** End of options to set ** // *************************** // -------------------------------------------------------- //-- Don't change below this line -- if (!empty($_GET)) { if (isset($_GET["do"])) $do = $_GET["do"]; if (isset($_GET["page"])) $page = $_GET["page"]; } if (isset($_POST["do"])) $do = $_POST["do"]; if (!isset($PHP_SELF)) { if (isset($_SERVER["PHP_SELF"])) $PHP_SELF = $_SERVER["PHP_SELF"]; else if (isset($HTTP_SERVER_VARS["PHP_SELF"])) $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"]; } $iversion = "1.0"; if (!isset($do)) $do = ""; else if (preg_match("/\W/",$do)) $do = ""; if (!isset($page) or $page == 0) $page=1; if (!file_exists($data_file)) { echo "Error !! Can't find data file : $data_file.

Webmaster/administrator : If this was the intended location please make an empty file.
"; exit; } else { if ($max_record_in_data_file != "0") { $f = file($data_file); $j = count($f); if ($j > $max_record_in_data_file) { rsort($f); for ($i = 0; $i < $j; $i++) { if (isset($f[$i])) { $r = $record[$i]; $row = explode("|~~|",$r); $chkmail = $row[2]; for($h = $i+1; $h < $jmlrec; $h++) { $r = $f[$h]; $row = explode("|~~|",$r); if (strcasecmp($row[2],$chkmail)==0 ) $f[$h] = ""; } } } $rf = fopen($data_file,"w"); if (strtoupper($os)=="UNIX") { if (flock($rf,LOCK_EX)) { for ($i=0; $i<$max_record_in_data_file; $i++) { if ($f[$i] != "") fwrite($rf,$f[$i]); } flock($rf,LOCK_UN); } } else { for ($i=0; $i<$max_record_in_data_file; $i++) { if ($f[$i] != "") fwrite($rf,$f[$i]); } } fclose($rf); } } } $emailmsg = ""; // Check email if list if ($do == "list") { if (isset($_POST["vemail"])) $vemail = $_POST["vemail"]; if (!isset($vemail)) $vemail = $_GET["vemail"]; $vemail = trim($vemail); $f = file($data_file); rsort($f); $found = -1; $frow[0] = $frow[1] = $frow[2] = $frow[3] = $frow[4] = $frow[5] = $frow[6] = $frow[7] = ""; for ($i = 0; $i < $j; $i++) { if (isset($f[$i])) { $frow = explode("|~~|",$f[$i]); if (strcasecmp($frow[2],$vemail) == 0 ) { $found = $i; break; } } } if ( $found < 0 ) { if (!preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) { echo "

Error !

Invalid email address. Please click here and try again."; exit; } if ( $vemail == "" ) { $do = ""; $vemail = "(not given)"; $emailmsg = "The email " . $vemail . " is not in the guest list. Please check with the invitation for the correct email."; } else { $idx = date("YmdHis"); $tgl = date("F d, Y - h:i A"); #$vname = $vemail; #$domain = strpos($vname, '@'); #if ($domain > 0) $vname = substr($vname, 0, $domain); $vname = ""; $newdata = "\n"; $newdata = stripslashes($newdata); $tambah = fopen($data_file,"a"); if (flock($tambah,LOCK_EX)) { fwrite($tambah,$newdata); flock($tambah,LOCK_UN); } fclose($tambah); } } // Check if vreply is never then change to "looked" if ( $frow[4] == "never" && $found >= 0 ) { $idx = date("YmdHis"); $tgl = date("F d, Y - h:i A"); $frow[4] = "looked"; $newdata = "\n"; $newdata = stripslashes($newdata); $tambah = fopen($data_file,"a"); if (strtoupper($os)=="UNIX") { if (flock($tambah,LOCK_EX)) { fwrite($tambah,$newdata); flock($tambah,LOCK_UN); } } else fwrite($tambah,$newdata); fclose($tambah); } } switch ($do) { case "list": $record = file($data_file); rsort($record); $jmlrec = count($record); // Delete duplicates (the dum way...) for ($i = 0; $i < $jmlrec; $i++) { if (isset($record[$i])) { $r = $record[$i]; $row = explode("|~~|",$r); if (count($row) < 3) { continue; } $chkmail = $row[2]; for($j = $i+1; $j < $jmlrec; $j++) { $r = $record[$j]; $row = explode("|~~|",$r); if (count($row) < 3) { continue; } if (strcasecmp($row[2],$chkmail)==0 ) { $record[$j] = ""; } } } } // ?> <?echo "$title"?> " link="" vlink="" alink="" topmargin="0" marginheight="0">
">
">(:: ">"> ::)

"; if (isset($picture) && $picture != "") echo "

click to email host"; ?>

"> " > " >
Where:
When:
What:
Food to bring:
Last date to reply:
Contact:
">
:: Hello ::
">
Your reply:
> Maybe > No > Yes (The hosts can not change their answer)"; ?>
">
Your name:
" >
">
Guests coming (incl.yourself) :
" >
">
Food you will bring :
" >
">
Comment:
" >
">

0) $jml_page++; // Set $nomaybe, $nono, $noyes DEBUG $nomaybe = 0; $nono = 0; $noyes = 0; $countmaybe = 0; $countno = 0; $countyes = 0; $counttotal = 0; $no = 0; if ($jmlrec == 0) echo ""; $w = 0; //--Color for ($i=0; $i<$max_entry_per_page; $i++) { // Find the lowest next possible record. $no = $jmlrec + 1; if ($nomaybe < $jmlrec ) $no = $nomaybe + 1; if ($nono < $no - 1 ) $no = $nono + 1; if ($noyes < $no - 1 ) $no = $noyes + 1; // Check this is valid. do { while (($no < $jmlrec + 1) && (!isset($record[$no-1]) || $record[$no-1] == "")) { $no++; } $recno = $no - 1; $cont = 0; if ($no < $jmlrec + 1) { $row = explode("|~~|",$record[$recno]); $vr = $row[4]; $cont = 0; if (($vr == "never" || $vr == "looked" || $vr == "maybe") && ($no <= $nomaybe)) $cont = 1; if (($vr == "no" ) && ($no <= $nono)) $cont = 1; if (($vr == "yes" || $vr == "host") && ($no <= $noyes)) $cont = 1; if ($cont == 1) $no++; } } while ($cont == 1); if (isset($record[$recno]) && $record[$recno] != "") { if ($w==0) { $warna = $table_content_1a; $warna2 = $table_content_1b; $w=1; } else { $warna = $table_content_2a; $warna2 = $table_content_2b; $w=0; } echo ""; } //--end if } //--end for echo ""; ?>
Invited guests: Coming:
Undecided No Yes
There is no entries.
"; do { $nomaybe++; $recno = $nomaybe-1; if (isset($record[$recno]) && $record[$recno] != "") { $row = explode("|~~|",$record[$recno]); } else { $row[4] = ""; } } while ($nomaybe <= $jmlrec && $row[4] != "never" && $row[4] != "looked" && $row[4] != "maybe" ); if ($row[4] == "never" || $row[4] == "looked" || $row[4]=="maybe") { echo "$row[3] "; $countmaybe++; } if ($row[4] == "looked") echo "(looked $row[8])"; if ($row[4] == "maybe") echo "(maybe $row[8])"; if (isset($row[7]) && ($row[4]=="looked" || $row[4]=="maybe") && $row[7] != "") echo "
Comment: $row[7]"; echo "
"; do { $nono++; $recno = $nono-1; if (isset($record[$recno]) && $record[$recno] != "") { $row = explode("|~~|",$record[$recno]); } else { $row[4] = ""; } } while ($nono <= $jmlrec && $row[4] != "no" && $row != "looked" && $row[5] != "maybe" ); if (isset($record[$recno]) && $record[$recno] != "") { $row = explode("|~~|",$record[$recno]); } else { $row[4] = ""; } if ($row[4] == "no" ) { echo "$row[3] ($row[8])"; if (isset($row[7]) && $row[7] != "") echo "
Comment: $row[7]"; $countno++; } echo "
"; do { $noyes++; $recno = $noyes-1; if (isset($record[$recno]) && $record[$recno] != "") { $row = explode("|~~|",$record[$recno]); } else { $row[4] = ""; } } while ($noyes <= $jmlrec && $row[4] != "yes" && $row[4] != "host" ); if ($row[4] == "yes" || $row[4] == "host" ) { echo "$row[3] ("; if ($row[4] == "host") print "host "; echo "$row[8])"; if (isset($row[5]) && $row[5] != "1" && $row[5] != "") echo "
($row[5] guests)"; if (isset($row[7]) && $row[7] != "" ) echo "
Comment: $row[7]"; if (isset($row[6]) && $row[6] != "" ) echo "
Food bringing: $row[6]"; $countyes++; if (isset($row[5]) && $row[5] != "") { $count = intval($row[5]); $counttotal = $counttotal + ($count > 0 ? $count : 1); } else { $counttotal += 1; } } echo "
"; if ($jml_page > 1) { if ($page <> 1) echo "[Top] "; else echo "[Top] "; echo "Page # "; if ($jml_page > 10) { if ($page < 5) { $start = 1; $stop = 10; } elseif ($jml_page - $page < 5) { $start = $jml_page - 9; $stop = $jml_page; } else { $start = $page-4; $stop = $page+5; } if ($start <> 1) echo "... "; for ($p=$start; $p<=$stop; $p++) { if ($p == $page) echo "$p  "; else echo "$p  "; } if ($stop <> $jml_page) echo "... "; echo "of $jml_page "; } else { for ($p=1; $p<=$jml_page; $p++) { if ($p == $page) echo "$p  "; else echo "$p  "; } } if ($page <> $jml_page) echo "[Bottom]"; else echo "[bottom]"; } else echo "Page #1 of 1"; echo "
Undecided : $countmaybe No : $countno Yes : $countyes Total guests : $counttotal"; echo "

Invitation :: ">admin

<?echo "$title"?> ">
">
">">Home
?" > ">
"> ">
Register or update your RSVP
Your Email:

 

Invitation :: "> admin

70) $vname = substr($vname,0,70); } if (isset($_POST["vemail"])) { $vemail = $_POST["vemail"]; $vemail = trim($vemail); if (strlen($vemail) > 100) $vemail = substr($vemail,0,100); } if (isset($_POST["vreply"])) { $vreply = $_POST["vreply"]; if (strlen($vreply) > 10) $vreply = substr($vreply,0,10); } if (isset($_POST["vamount"])) { $vamount = $_POST["vamount"]; if (strlen($vamount) > 4) $vamount = substr($vamount,0,4); } if (isset($_POST["vbrings"])) { $vbrings = $_POST["vbrings"]; if (strlen($vbrings) > 70) $vbrings = substr($vbrings,0,70); } if (isset($_POST["vcomment"])) $vcomment = $_POST["vcomment"]; } if (trim($vemail)=="") { echo "

Error !

The email got lost. Please try again from the start. Please click here and try again."; exit; } if (!preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) { echo "

Error !

Invalid email address. Please click here and try again."; exit; } $test_comment = explode(" ",$vcomment); $jmltest = count($test_comment); for ($t=0; $t<$jmltest; $t++) { if (strlen(trim($test_comment[$t])) > 35) { echo "

Error!

Please don't abuse my invitation. Click here and try again."; exit; } } //--only maxchar characters allowed for comment, change this value if necessary $maxchar = 150; if (strlen($vcomment) > $maxchar) $vcomment = substr($vcomment,0,$maxchar)."..."; $idx = date("YmdHis"); $tgl = date("F d, Y - h:i A"); $vname = str_replace("<","",$vname); $vname = str_replace(">","",$vname); $vname = str_replace("~","-",$vname); $vname = str_replace("\"",""",$vname); $vcomment = str_replace("<","<",$vcomment); $vcomment = str_replace(">",">",$vcomment); $vcomment = str_replace("~","-",$vcomment); $vcomment = str_replace("\"",""",$vcomment); $vbrings = str_replace("<","<",$vbrings); $vbrings = str_replace(">",">",$vbrings); $vbrings = str_replace("~","-",$vbrings); $vbrings = str_replace("\"",""",$vbrings); if (strtoupper($os) == "WIN") { $vcomment = str_replace("\r\n","
",$vcomment); $vcomment = str_replace("\r","",$vcomment); $vcomment = str_replace("\n","",$vcomment); } else { $vcomment = str_replace("\n","
",$vcomment); $vcomment = str_replace("\r","",$vcomment); } $newdata = "\n"; $newdata = stripslashes($newdata); $tambah = fopen($data_file,"a"); if (strtoupper($os)=="UNIX") { if (flock($tambah,LOCK_EX)) { fwrite($tambah,$newdata); flock($tambah,LOCK_UN); } } else fwrite($tambah,$newdata); fclose($tambah); //--SEND MAIL if (strtoupper($notify) == "YES") { $msgtitle = $vname." answered your invitation :".$vreply; $vcomment = str_replace(""","\"",$vcomment); $vcomment = stripslashes($vcomment); $vcomment = str_replace("
","\n",$vcomment); if ($vcomment == "") $vcomment = "(no comment)"; $msgcontent = "Local time : ".$tgl."\n\nThe reply : ".$vreply; if ($vamount != "1") $msgcontent .= "\n $vname will bring a total of ". $vamount . " guests."; $msgcontent .= " \nThe comments from ".$vname." :\n----------------------------\n\n".$vcomment."\n"; if ($vbrings != "" ) $msgcontent .= "He or she will bring : " . $vbrings . "\n"; $msgcontent .= "\n----------------------------\n"; mail($admin_email,$msgtitle,$msgcontent,"From: ".$vemail."\n"); } //----------- header("Location: http://". $_SERVER['HTTP_HOST']. $_SERVER['PHP_SELF'] . "?do=list&vemail=" . $vemail ); exit; break; case "admin": ?> Administrator
">
Administrator for

Admin password :

Invalid admin password $pwd !

Please wait...
"; exit; } $pwd2 = md5( date("z") . $admin_password); $record = file($data_file); rsort($record); $jmlrec = count($record); // Delete duplicates (the dum way...) and get host email if any $hostemail = ""; for ($i = 0; $i < $jmlrec; $i++) { if (isset($record[$i])) { $r = $record[$i]; $row = explode("|~~|",$r); $chkmail = $row[2]; if ($row[4] == "host") $hostemail = $row[2]; for($j = $i+1; $j < $jmlrec; $j++) { $r = $record[$j]; $row = explode("|~~|",$r); if (strcasecmp($row[2],$chkmail)==0 ) $record[$j] = ""; } } } // Administrator page start. ?> Administration of <?echo "$title"?> " link="" vlink="" alink="" topmargin="0" marginheight="0">
">
">(:: ">Back ::)

"> = $jmlrec) { $no++; $idx = date("YmdHis"); // Empty person $row = explode("|~~|","\n"); } } if (isset($row) && $row !="" ) { if ($w==0) { $warna = $table_content_1a; $warna2 = $table_content_1b; $w=1; } else { $warna = $table_content_2a; $warna2 = $table_content_2b; $w=0; } echo ""; // Number column echo ""; // Email column echo ""; $cemail = $row[2]; $emailsall .= "," . $cemail; // Name column $tab = 2 * $i + 2; echo ""; // Selection column $tab = 5 * $i + 5000; echo ""; // No. of persons $tab = 5 * $i + 5001; echo ""; // Brings $tab = 5 * $i + 5002; echo ""; // Comment $tab = 5 * $i + 5003; echo ""; // Date echo ""; echo ""; } // isset record } // for i echo ""; echo "
No. Email (deleted if empty) Name (deleted if empty) Reply Guests Bringing Comment
$no"; echo ""; $tab = 2 * $i + 1; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; if ( $emailsall != "" ) $emailsall = substr($emailsall,1); while ( substr($emailsall,-1) == "," ) $emailsall = substr($emailsall,0,-1); if ( $emailsundecided != "" ) $emailsundecided = substr($emailsundecided,1); while ( substr($emailsundecided,-1) == "," ) $emailsundecided = substr($emailsundecided,0,-1); if ( $emailsno != "" ) $emailsno = substr($emailsno,1); if ( $emailsyes != "" ) $emailsyes = substr($emailsyes,1); ?>  

Quick name add (from email)
List of all emails
List of all undecided emails
List of all no emails
List of all yes emails (not including hosts)

Invitation
 

Invalid admin password !

Please wait...
"; exit; } // Get all administrator changes $record = file($data_file); rsort($record); $jmlrec = count($record); // Delete duplicates (the dum way...) and get host email if any $hostemail = ""; for ($i = 0; $i < $jmlrec; $i++) { if (isset($record[$i])) { $r = $record[$i]; $row = explode("|~~|",$r); $chkmail = $row[2]; if ($row[4] == "host") $hostemail = $row[2]; for($j = $i+1; $j < $jmlrec; $j++) { $r = $record[$j]; $row = explode("|~~|",$r); if (strcasecmp($row[2],$chkmail)==0 ) { $record[$j] = ""; } } } } $updno = 0; $err = 0; for ($i = 0; $i < $jmlrec+12; $i++) { // Changes ? if (isset($_POST["vemail".$i])) $chkmail = $_POST["vemail".$i]; else $chkmail =""; $chkmail = trim($chkmail); $found = -1; if ($chkmail != "") { // Find existing record if possible... $recno = count($record); for($j = 0; $j < $recno; $j++) { $r = $record[$j]; $row = explode("|~~|",$r); if (strcasecmp($row[2],$chkmail) == 0) { $found = $j; break; } } $changed = 1; if ($found >= 0) { // Changed ? if ( $row[2] == trim($_POST["vemail".$i]) && $row[3] == $_POST["vname".$i] && $row[4] == $_POST["vreply".$i] && $row[5] == $_POST["vamount".$i] && $row[6] == $_POST["vbrings".$i] && $row[7] == $_POST["vcomment".$i] ) $changed = 0; } if ( $changed != 0 ) { $updno++; $idx = date("YmdHis"); $tgl = date("F d, Y - h:i A"); $vemail = str_replace("<","",trim($_POST["vemail".$i])); $vemail = str_replace(">","",$vemail); $vemail = str_replace("~~","--",$vemail); $vemail = str_replace("\"",""",$vemail); $vname = str_replace("<","",$_POST["vname".$i]); $vname = str_replace(">","",$vname); $vname = str_replace("~","-",$vname); $vname = str_replace("\"",""",$vname); $vreply = str_replace("<","",$_POST["vreply".$i]); $vreply = str_replace(">","",$vreply); if ($vreply != "never" && $vreply != "looked" && $vreply != "maybe" && $vreply != "no" && $vreply != "yes" && $vreply != "host") $vreply = "never"; if ($vreply != "host" && $vreply != "never" && $found >= 0 ) $tgl = $tgl . "*"; // admin change $vamount = str_replace("<","<",$_POST["vamount".$i]); $vamount = str_replace(">",">",$vamount); $vamount = str_replace("~","-",$vamount); $vamount = str_replace("\"",""",$vamount); $vcomment = str_replace("<","<",$_POST["vcomment".$i]); $vcomment = str_replace(">",">",$vcomment); $vcomment = str_replace("~","-",$vcomment); $vcomment = str_replace("\"",""",$vcomment); $vbrings = str_replace("<","<",$_POST["vbrings".$i]); $vbrings = str_replace(">",">",$vbrings); $vbrings = str_replace("~","-",$vbrings); $vbrings = str_replace("\"",""",$vbrings); if (strtoupper($os) == "WIN") { $vcomment = str_replace("\r\n","
",$_POST["vcomment".$i]); $vcomment = str_replace("\r","",$vcomment); $vcomment = str_replace("\n","",$vcomment); } else { $vcomment = str_replace("\n","
",$vcomment); $vcomment = str_replace("\r","",$vcomment); } $validemail = 1; if (!preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) $validemail = 0; if ( $vname != "" && $validemail == 0 ) { echo "Email not valid for $vname : $vemail
"; $err++; } if ( $vname != "" && $validemail == 1 ) { if ($found < 0 ) { $record[] = "\n"; $found = count($record) - 1; } $newdata = "\n"; $newdata = "!" . stripslashes($newdata); $record[$found] = $newdata; } else { if ( $vname != "") { $updno--; $changed = 0; } } } if ( $changed == 0 ) { if ($found >= 0) $record[$found] = "!".$record[$found]; } } } // Quick add $quickadd = ""; if (isset($_POST["quickadd"]) && $_POST["quickadd"] != "") $quickadd = stripslashes($_POST["quickadd"]); if (trim($quickadd) != "") { $qadd = explode("\"",$quickadd); $qaddn = count($qadd); $nametoadd = ""; for($i = 0; $i < $qaddn; $i++) { if ($i % 2 == 0) { $q2 = explode(",",$qadd[$i]); $q2n = count($q2); for($j = 0; $j < $q2n; $j++) { $mailtoadd = trim($q2[$j]); $mailtoadd = str_replace("<","",$mailtoadd); $mailtoadd = str_replace(">","",$mailtoadd); $mailtoadd = str_replace("~~","--",$mailtoadd); if ($mailtoadd != "") { $validemail = 1; if (!preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $mailtoadd)) $validemail = 0; if ($validemail == 0 ) { echo "Error at quickadd at $mailtoadd (not valid email)"; $err++; } else { if ($nametoadd == "") { $nametoaddarr = explode("@",$mailtoadd); $nametoadd = $nametoaddarr[0]; } $idx = date("YmdHis"); $newdata = "\n"; $newdata = "!" . stripslashes($newdata); $record[]= $newdata; $nametoadd = ""; } } } } if ($i % 2 == 1) { $nametoadd = $qadd[$i]; $nametoadd = str_replace("<","" ,$nametoadd); $nametoadd = str_replace(">","" ,$nametoadd); $nametoadd = str_replace("~","-",$nametoadd); } } } $jmlrec = count($record); $update_data = fopen($data_file,"w"); if (strtoupper($os) == "UNIX") { if (flock($update_data,LOCK_EX)) { for ($j=0; $j<$jmlrec; $j++) { if (strncasecmp($record[$j],"!",1) != 0 ) $updno++; if ($record[$j] != "" && strncasecmp($record[$j],"!",1) == 0 ) fputs($update_data,substr($record[$j],1)); } flock($update_data,LOCK_UN); } } else { for ($j=0; $j<$jmlrec; $j++) { if (strncasecmp($record[$j],"!",1) != 0 ) $updno++; if ($record[$j] != "" && strncasecmp($record[$j],"!",1) == 0 ) fputs($update_data,substr($record[$j],1)); } } fclose($update_data); $pwd2 = md5( date("z") . $admin_password ); if ($err == 0 ) { header("Location: http://". $_SERVER['HTTP_HOST']. $_SERVER['PHP_SELF'] . "?do=admin2&pwd2=".$pwd2 ); exit; } echo "

The errored guest have not updated. Please press your back button and correct.
"; exit; break; default: echo "

Illegal url. Get this script from www.ter"; echo "alaser.net. Thanks !

"; } //--end switch