<%
cstring = "DSN=profile;"
Dim name
Dim fname
Dim mname
Dim lname
Dim handle
Dim usehandle
Dim phone
Dim email
Dim pword
Dim address
Dim city
Dim state
Dim zip
Dim country
Dim website
Dim newsletter
Dim job
Dim hobbies
Dim bio
Dim other
Dim image
Dim template
Dim fontstyle
Dim fontsize
Dim fontcolor
Dim bgimage
Dim bgcolor
Dim linkcolor
Dim vlinkcolor
Dim alinkcolor
Dim tblbgimage
Dim tblbgcolor
Dim textcolor
Dim tblborder
Dim title
Dim mode
Dim editmode
Dim savemode
Function formstr(str)
formstr = Replace(Replace(str,
"'", "`"), Chr(34), """)
End Function
Sub getform()
fname =
formstr(Request.Form("fname"))
mname =
formstr(Request.Form("mname"))
lname =
formstr(Request.Form("lname"))
handle =
formstr(Request.Form("handle"))
usehandle =
Request.Form("usehandle")
phone =
Request.Form("phone")
email =
Request.Form("email")
pword =
Request.Form("pword")
address =
formstr(Request.Form("address"))
city =
formstr(Request.Form("city"))
state =
formstr(Request.Form("state"))
zip = Request.Form("zip")
country =
formstr(Request.Form("country"))
website =
Request.Form("website")
newsletter =
Request.Form("newsletter")
job =
formstr(Request.Form("job"))
hobbies =
formstr(Request.Form("hobbies"))
bio =
formstr(Request.Form("bio"))
other =
formstr(Request.Form("other"))
image =
Request.Form("image")
template =
Request.Form("template")
fontstyle =
Request.Form("fontstyle")
fontsize =
Request.Form("fontsize")
fontcolor =
Request.Form("fontcolor")
bgimage =
Request.Form("bgimage")
bgcolor =
Request.Form("bgcolor")
linkcolor =
Request.Form("linkcolor")
vlinkcolor =
Request.Form("vlinkcolor")
alinkcolor =
Request.Form("alinkcolor")
tblbgimage =
Request.Form("tblbgimage")
tblbgcolor =
Request.Form("tblbgcolor")
textcolor =
Request.Form("textcolor")
tblborder =
Request.Form("tblborder")
End Sub
Sub getrecord(emailaddress)
Set cn =
Server.CreateObject("ADODB.Connection")
cn.Open cstring
q = "SELECT * FROM profile WHERE
email = '" & emailaddress & "'"
Set rs = cn.Execute(q)
if rs.EOF then
Session("message") =
"Record Not Found. Please Enter a New Record"
Response.Redirect
"default.asp"
end if
fname = rs("fname").value
mname = rs("mname").value
lname = rs("lname").value
handle = rs("handle").value
if rs("usehandle").value =
TRUE then
usehandle = "ON"
else
usehandle = ""
end if
phone = rs("phone").value
email = rs("email").value
pword =
rs("password").value
address =
rs("address").value
city = rs("city").value
state = rs("state").value
zip = rs("zip").value
country =
rs("country").value
website =
rs("website").value
if rs("newsletter").value =
TRUE then
newsletter = "ON"
else
newsletter = ""
end if
job = rs("job").value
hobbies =
rs("hobbies").value
bio = rs("bio").value
other = rs("other").value
image = rs("image").value
template =
rs("template").value
fontstyle =
rs("fontstyle").value
fontsize =
rs("fontsize").value
fontcolor =
rs("fontcolor").value
bgimage =
rs("bgimage").value
bgcolor =
rs("bgcolor").value
linkcolor =
rs("linkcolor").value
vlinkcolor =
rs("vlinkcolor").value
alinkcolor =
rs("alinkcolor").value
tblbgimage =
rs("tblbgimage").value
tblbgcolor =
rs("tblbgcolor").value
textcolor =
rs("textcolor").value
tblborder =
rs("tblborder").value
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
End Sub
mode = Request("mode")
if mode = "previewnew" then
getform()
title = "Edit"
editmode = "previewnew"
savemode = "save"
elseif mode = "previewold"
then
getform()
title = "Edit"
editmode = "previewold"
savemode = "update"
elseif Request("mode") =
"pword" then
getrecord(Request.QueryString("email"))
title = "Edit"
editmode = "previewold"
savemode = "update"
else
editmode = "previewnew"
savemode = "save"
if Request.Cookies("ID")
<> "" then
handle =
Request.Cookies("ID")
else
handle = ""
end if
if Request.Cookies("email")
<> "" then
email =
Request.Cookies("email")
else
email = ""
end if
if
Request.Cookies("password") <> "" then
pword =
Request.Cookies("password")
else
pword = ""
end if
fname = ""
mname = ""
lname = ""
usehandle = ""
phone = ""
address = ""
city = ""
state = ""
zip = ""
country = "USA"
website = "http://"
newsletter = ""
job = ""
hobbies = ""
bio = ""
other = ""
image = "none"
template = "1"
fontstyle = "Arial, Helvetica,
Sans-serif"
fontsize = "2"
fontcolor = "32"
bgimage = ""
bgcolor = "48"
linkcolor = "29"
vlinkcolor = "31"
alinkcolor = "9"
tblbgimage = ""
tblbgcolor = "48"
textcolor = "41"
tblborder = "0"
title = "Create"
end if
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style><!--a:hover{color:rgb(255,0,0); text-decoration: none }
a{ text-decoration: none;
font-family: Arial, Helvetica; font-weight: bold }
//--></style>
<script language="JavaScript"><!--
function settemplate(choice) {
document.forms[0].template.value =
choice;
}
function setbgimage(choice) {
document.forms[0].bgimage.value =
choice;
}
function settblbgimage(choice) {
document.forms[0].tblbgimage.value =
choice;
}
function newstr(oldstr) {
var str = "";
for(j = 0; j < oldstr.length; j++)
{
if(oldstr.charAt(j) ==
"\"") str += """
else str += oldstr.charAt(j);
}
return str;
}
function preview() {
document.forms[1].fname.value =
newstr(document.forms[0].fname.value);
document.forms[1].mname.value =
newstr(document.forms[0].mname.value);
document.forms[1].lname.value =
newstr(document.forms[0].lname.value);
document.forms[1].handle.value =
newstr(document.forms[0].handle.value);
if(document.forms[0].usehandle.checked
== (true)) {
document.forms[1].usehandle.value =
"ON";
}
else {
document.forms[1].usehandle.value =
""
}
document.forms[1].email.value =
document.forms[0].email.value;
document.forms[1].address.value =
document.forms[0].address.value;
document.forms[1].city.value =
document.forms[0].city.value;
document.forms[1].state.value =
document.forms[0].state.value;
document.forms[1].zip.value =
document.forms[0].zip.value;
document.forms[1].country.value =
document.forms[0].country.value;
document.forms[1].website.value =
document.forms[0].website.value;
document.forms[1].pword.value =
document.forms[0].pword.value;
if
(document.forms[0].newsletter.checked == (true)) {
document.forms[1].newsletter.value =
"ON"
}
else {
document.forms[1].newsletter.value =
""
}
document.forms[1].job.value =
newstr(document.forms[0].job.value);
document.forms[1].hobbies.value =
newstr(document.forms[0].hobbies.value);
document.forms[1].bio.value =
newstr(document.forms[0].bio.value);
document.forms[1].other.value =
newstr(document.forms[0].other.value);
document.forms[1].image.value =
document.forms[0].image.value;
document.forms[1].template.value =
document.forms[0].template.value;
document.forms[1].fontstyle.value =
document.forms[0].fontstyle.value;
document.forms[1].fontsize.value =
document.forms[0].fontsize.value;
document.forms[1].fontcolor.value =
document.forms[0].fontcolor.value;
document.forms[1].bgimage.value =
document.forms[0].bgimage.value;
document.forms[1].bgcolor.value =
document.forms[0].bgcolor.value;
document.forms[1].linkcolor.value =
document.forms[0].linkcolor.value;
document.forms[1].vlinkcolor.value =
document.forms[0].vlinkcolor.value;
document.forms[1].alinkcolor.value =
document.forms[0].alinkcolor.value;
document.forms[1].tblbgimage.value =
document.forms[0].tblbgimage.value;
document.forms[1].tblbgcolor.value =
document.forms[0].tblbgcolor.value;
document.forms[1].textcolor.value =
document.forms[0].textcolor.value;
document.forms[1].tblborder.value =
document.forms[0].tblborder.value;
document.forms[1].submit();
}
function Validator(theForm)
{
if (theForm.email.value ==
"")
{
alert("Please enter a value for
the \"Email Address\" field.");
theForm.email.focus();
return (false);
}
if (theForm.email.value.length >
100)
{
alert("Please enter at most 100
characters in the \"Email Address\" field.");
theForm.email.focus();
return (false);
}
if (theForm.job.value.length >
255)
{
alert("Please enter at most 255
characters in the \"My Job\" field.");
theForm.job.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.textcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Text Color\" field.");
theForm.textcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Text Color\" field.");
theForm.textcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.fontcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Bold Headings Color\" field.");
theForm.fontcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Bold Headings Color\" field.");
theForm.fontcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr = theForm.bgcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Page Background Color\" field.");
theForm.bgcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Page Background Color\" field.");
theForm.bgcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.tblbgcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Table Background Color\" field.");
theForm.tblbgcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Table Background Color\" field.");
theForm.tblbgcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.linkcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Hyperlinks Color\" field.");
theForm.linkcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Hyperlinks Color\" field.");
theForm.linkcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.vlinkcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Visited Hyperlink Color\" field.");
theForm.vlinkcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Visited Hyperlink Color\" field.");
theForm.vlinkcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.alinkcolor.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Active Hyperlink Color\" field.");
theForm.alinkcolor.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Active Hyperlink Color\" field.");
theForm.alinkcolor.focus();
return (false);
}
var checkOK =
"0123456789-";
var checkStr =
theForm.tblborder.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length;
i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length;
j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit
characters in the \"Table Border Width\" field.");
theForm.tblborder.focus();
return (false);
}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" &&
!(prsVal >= "0" && prsVal <= "48"))
{
alert("Please enter a value
greater than or equal to \"0\" and less than or equal to \"48\" in the
\"Table Border Width\" field.");
theForm.tblborder.focus();
return (false);
}
document.forms[0].fname.value =
newstr(document.forms[0].fname.value);
document.forms[0].mname.value =
newstr(document.forms[0].mname.value);
document.forms[0].lname.value =
newstr(document.forms[0].lname.value);
document.forms[0].handle.value =
newstr(document.forms[0].handle.value);
document.forms[0].job.value =
newstr(document.forms[0].job.value);
document.forms[0].hobbies.value =
newstr(document.forms[0].hobbies.value);
document.forms[0].bio.value =
newstr(document.forms[0].bio.value);
document.forms[0].other.value =
newstr(document.forms[0].other.value);
return (true);
}
// --></script>
<title><%=title%> Your
Personal Profile</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#008080" alink="#FF0000"
background="images/backgrounds/takback.jpg">
<!--webbot bot="Include"
U-Include="_private/header.html" TAG="BODY" -->
<p align="center"><font
face="Arial" size="4" color="#8000FF"><strong><script
language="JavaScript"><!--
<%if Session("message")
<> "" then%>
alert("<%=Session("message")%>");
<%Session("message") =
""
end if%>
// --></script><%=title%> Your Own Personalized Web Page!</strong></font></p>
<table border="0">
<tr>
<td valign="top" width="150"><a href="searchprofiles.asp"><font
face="Arial" size="2">View
Other Profiles</font></a><p><a href="defaultasp.htm"><font face="Arial" size="2">View the
Source Code</font></a></p>
<p><!--#INCLUDE FILE="books.inc" --></td>
<td valign="top"><font
face="Arial" size="2"><font
color="#8000FF"><strong>Welcome to my
latest project!</strong></font> As the popularity
of the TAKempis Discussion Groups has
grown, it seemed to me that it might
be a good idea to provide a web page for anyone that
wishes to participate, where we can
learn a bit about each other, and give ourselves the
opportunity to contact each other as
well. Here, you can create your own personalized
"web page" on the
TAKempis.com web site. Just fill out the form below, selecting
the template style that you'd like to
use, and providing as much or as little information
about yourself as you wish. As you
work on the web page, use the "Preview"
button to get a look at it, and you
can return to this page to make the changes you wish
before saving your web page. Later,
you may return and modify or add to the web page, by
using your email address and
password.</font><form method="POST" action="viewprofile.asp"
onsubmit="return Validator(this)">
<input type="hidden" name="bgimage" value="<%=bgimage%>"><input type="hidden" name="image"
value="<%=image%>"><input
type="hidden" name="mode" value="<%=savemode%>"><input
type="hidden" name="tblbgimage" value="<%=tblbgimage%>"><input type="hidden"
name="template" value="<%=template%>"><p><font face="Arial" size="3" color="#8000FF"><strong>Personal
Information</strong></font></p>
<p><font face="Arial"
size="2">Begin by supplying us with your personal information. You
may choose to sue a
"handle" instead of your real name, if you wish, and you do
not have to supply any information
you do not wish to. Simply leave any fields blank in
this section if you do not wish
to reveal that information:</font></p>
<table border="0" width="100%" height="454">
<tr>
<td width="30%" align="right" height="25"><font
face="Arial" size="2"><strong>First Name: </strong></font></td>
<td width="70%" height="25"><input
type="text" name="fname" size="30" value="<%=fname%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Middle Name:
</strong></font></td>
<td width="70%" height="21"><input
type="text" name="mname" size="30" value="<%=mname%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Last Name: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="lname" size="30" value="<%=lname%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>"Handle:"
</strong></font></td>
<td width="70%" height="21"><input
type="text" name="handle" size="50" value="<%=handle%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>I prefer to
use my handle: </strong></font></td>
<td width="70%" height="21"><font
face="Arial" size="2"><input
type="checkbox"
name="usehandle" <%if usehandle <> "" then%> checked <%end if%> value="ON" id="fp1"><label
for="fp1">Check
if yes</label></font></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Phone
Number: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="phone" size="20" value="<%=phone%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Email
Address: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="email" size="50" value="<%=email%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Select a
Password: </strong></font></td>
<td width="70%" height="21"><input
type="password" name="pword" size="20"
value="<%=pword%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Mailing
Address: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="address" size="50"
value="<%=address%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>City: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="city" size="50" value="<%=city%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>State: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="state" size="30" value="<%=state%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Postal Code:
</strong></font></td>
<td width="70%" height="21"><input
type="text" name="zip" size="20" value="<%=zip%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Country: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="country" size="50"
value="<%=country%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Web Site
Address: </strong></font></td>
<td width="70%" height="21"><input
type="text" name="website" size="50"
value="<%=website%>"></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Send me the <br>
TAKempis Newsletter: </strong></font></td>
<td width="70%" height="21"><font
face="Arial" size="2"><input
type="checkbox"
name="newsletter" <%if newsletter <> "" then%> checked <%end if%> value="ON" id="fp2"><label
for="fp2">(as
soon as you start sending one out!)</label></font></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><strong><font face="Arial" size="2">My
Job: </font></strong></td>
<td width="70%" height="21"><textarea
rows="2" name="job" cols="50"><%=job%></textarea></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>My Hobbies: </strong></font></td>
<td width="70%" height="21"><textarea
rows="2" name="hobbies" cols="50"><%=hobbies%></textarea></td>
</tr>
<tr>
<td width="30%" align="right" height="21"><font
face="Arial" size="2"><strong>Biography: </strong></font></td>
<