";
// 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 LogIn
////////////////////// 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="weeklyList.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 ".$pswFile);
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 "$Msg | ";
print " |