Unable to open remote file.

"; exit;} $NAME=trim(fgets($fp, 2048)); $PASSWD=trim(fgets($fp, 2048)); fclose($fp); if(!isset($name)&&!isset($password)) { //Visitor needs to enter a name and password // print "
"; print ""; print ""; print ""; print ""; print "

Please Log In
".$_REQUEST['Msg'];"

"; print ""; print ""; print " "; print " "; print ""; print ""; print " "; print " "; print ""; print ""; print " "; print "
Username
Password
"; print " "; print ""; print "
"; print ""; print "
"; print "
"; print "
"; print "
"; print "
"; }//if !name/password else if(strtolower($name)==$NAME&&strtolower($password)==$PASSWD) { // visitor's name and password combination are correct // echo ""; echo ""; }//else else { // visitor's name and password combination are not correct echo "

Invalid login/password

"; echo "You must provide a valid login and password to enter this site."; }// else }//end if not Change ////////////////////// Change Password ////////////////// else if ($Change=="Change"||$Change=="TryData"||$Change=="SaveData"){ $name=$_REQUEST['name']; $password=$_REQUEST['password']; $Opasswd=$_REQUEST['Opasswd']; $Npasswd1=$_REQUEST['Npasswd1']; $Npasswd2=$_REQUEST['Npasswd2']; $Msg=$_REQUEST['Msg']; $Saveword=$_REQUEST['Saveword']; $pswFile="gigList.psw"; $fp=fopen($pswFile,"r"); if (!$fp) {echo "

Unable to open remote file.

"; exit;} $NAME=trim(fgets($fp, 2048)); $PASSWD=trim(fgets($fp, 2048)); fclose($fp); if ($Change=="SaveData"){ //save the new password $fp=fopen($pswFile,"r"); if (!$fp) {echo "

Unable to open remote file(".$inFile.").

"; exit;} $n = fgets($fp, 2048); $p = fgets($fp, 2048); fclose($fp); $fp=fopen($pswFile,'w+') or die("Cannot open ".$savFile); fwrite($fp,$n); //fwrite($fp,$p); fwrite($fp,$Saveword); fclose($fp); $str="LogIn=LogIn&Msg=password%20changed"; print ""; $Change=""; //clear Change to avoid being picked up by subsequent ifs }//end if Saveword if ($Opasswd==$PASSWD&&$Npasswd1==$Npasswd2&&$Opasswd.$Npasswd1.$Npasswd2!="") { //check if parameters correct for change submit it for change $str="Change=SaveData&Saveword=".$Npasswd1; print ""; $Change=""; //clear Change to avoid being picked up by subsequent ifs }//end if $m1="New_Passwords_not_same!"; $m2="Password_Incorrect!"; $m3="Missing_Data!"; if ($Change=="Change"&&$Opasswd.$Npasswd1.$Npasswd2!=""){ $f=""; if ($Npasswd1!=$Npasswd2){$f=$m1;} if ($Opasswd!=$PASSWD){$f=$m2;} if ($Opasswd==""||$Npasswd1==""||$Npasswd2==""){$f=$m3;} $str="Change=Change&Msg=".$f; print ""; }//end if Msg if ($Change=="Change"&&$Opasswd.$Npasswd1.$Npasswd2.$Saveword==""){ print ""; if ($Msg==""){$Msg="Change Password";} $Msg=str_replace("_"," ",$Msg); print ""; print ""; print "

$Msg

"; print ""; print ""; print " "; print " "; // print " "; print ""; print ""; print " "; print " "; // print " "; print ""; print ""; print " "; print " "; // print " "; print ""; print ""; print "
Old Password
New Password
New Password again
"; print " "; print ""; print ""; print "
"; print ""; print "
"; print "
"; }//end if $Opasswd.$Npasswd1.$Npasswd2=="" }//end if Change //////////////////////// End of Code ///////////////////////// function loadDATA($inFile){ $fp=fopen($inFile,"r"); if (!$fp) {echo "

Unable to open remote file(".$inFile.").

"; exit;} $c=0; while (!feof($fp)) { $line = fgets($fp, 2048); $DATA[$c++]=$line; }//end while fclose($fp); return $DATA; }//end loadDATA function fixChars($str){ // $str=str_replace("\n","
",$str); // $str=str_replace("
","\n",$str); // $str=str_replace("ZZZ","\n",$str); $str=str_replace("
","\n",$str); $str=str_replace("\r","
",$str); $str=str_replace("\n","",$str); $str=str_replace("\"","'",$str); //workaround for \" $str=str_replace("\'","'",$str); //workaround for \' return $str; }//fixChars ?>