Location: PHPKode > scripts > myPHProlodex > myphprolodex/index.php
<?
session_start();
$database = "";
$hostname = "";
$username = "";
$password = "";
$connection1 = mysql_connect($host,$username,$password);
mysql_select_db($database);


if($_GET[command]=="mailmergeaction" and $_GET[subcommand]=="buildlist"){
$filename = time();
$filenamepath = "/tmp/".$filename;
$handle = fopen($filenamepath,"w");
$towriteinfile = "Title,FirstName,LastName,Address1,Address2,City,State,Zip\r\n";
$result2 = mysql_query("SELECT * from entries ORDER by lastname");

while ($row = mysql_fetch_array($result2)){
if(in_array($row[EntryID],$_SESSION['mmvalues'])){
if($row[title]=="Mr." || $row[title]=="Mr. & Mrs." || $row[title]=="Dr. & Mrs."){
$towriteinfile.= $row[title].",".$row[manname].",".$row[lastname].",".$row[address1].",".$row[address2].",".$row[city].",".$row[state].",".$row[zip]."\r\n";
}
else
{
$towriteinfile.= $row[title].",".$row[womanname].",".$row[lastname].",".$row[address1].",".$row[address2].",".$row[city].",".$row[state].",".$row[zip]."\r\n";
}}}
fwrite($handle,$towriteinfile);
fclose($handle);
header("Content-Type: application/x-csv");
 // inline is for "attachment" if browser is not IE
header('Content-Disposition: attachment; filename=merge.csv');
header('Expires: 0');
// this is just for IE
header('Cache-Control: must-revalidate, post-check=0, pre-check=0', false);
// public should be "no-cache" if it is not IE
header('Pragma: no-cache');
readfile($filenamepath);
break;
unlink($filenamepath);
header("Location:index.php?command=allmerge");
}



if($_GET[command]=="mailmergeaction" and $_GET[subcommand]=="savelist"){
$isinlist = mysql_query("SELECT * from lists WHERE name='$_POST[listname]'");
$numofrows = mysql_num_rows($isinlist);
$colon_seperated = implode(":",$_SESSION['mmvalues']);
if($numofrows==1){
mysql_query("UPDATE lists SET idvalues='$colon_seperated' where name = '$_POST[listname]'") or die(mysql_error());;
}
if($numofrows==0){
mysql_query("INSERT into lists (name,idvalues) values ('$_POST[listname]','$colon_seperated')");
}
$_SESSION[currlist]=$_POST[listname];
$_SESSION[modified]=0;
header("Location:index.php?command=allmerge");
}

if($_GET[command]=="mailmergeaction" and $_GET[subcommand]=="emaillist"){
#load into a post variable the email addresses from the list.
#have it turn on the link option.
}

if($_GET[command]=="mailmergeaction" and $_GET[subcommand]=="loadlist"){
echo count($_SESSION[mmvalues]);
if(count($_SESSION['mmvalues']!=0)){
unset($_SESSION['mmvalues']);
}
$namearray = mysql_query("SELECT idvalues from lists where name = '$_POST[getlistname]'") or die(mysql_error());
$num_rows = mysql_num_rows($namearray);

if($num_rows==1)
{
$arrayname = mysql_fetch_row($namearray);

$_SESSION['mmvalues']=explode(":",$arrayname[0]);
}
$_SESSION[currlist]=$_POST[getlistname];
$_SESSION[modified]=0;
header("Location:index.php?command=allmerge");
}

if($_GET[command]=="mailmergeaction" and $_GET[subcommand]=="removelist"){

mysql_query("DELETE from lists where name = '$_POST[delname]'");
unset($_SESSION['mmvalues']);
unset($_SESSION[currlist]);
unset($_SESSION[modified]);
header("Location:index.php?command=allmerge");
}


if($_GET[command]=="mm" and $_GET[id]!="")
{
	if(!isset($_SESSION['mmvalues']))
	{
	$_SESSION['mmvalues'][]=$_GET[id];
	}
else
{
	if(!in_array($_GET[id],$_SESSION['mmvalues']))
	{
	$_SESSION['mmvalues'][]=$_GET[id];
	}
}


if($_GET[subcommand]=="mmremove"){
$locationinarray = array_search($_GET[id],$_SESSION['mmvalues']);
unset ($_SESSION['mmvalues'][$locationinarray]);
$_SESSION['mmvalues'] = array_values($_SESSION['mmvalues']);
}


if($_GET[letter]!=""){
$_SESSION[modified]=1;
header("Location:index.php?action=$_GET[letter]");
}
else
{
$_SESSION[modified]=1;
header("Location:index.php?command=allmerge");
}
}


if($_POST[editentry]=='Edit_Entry'){
mysql_query("UPDATE entries SET title='$_POST[title]',manname='$_POST[manname]',womanname='$_POST[womanname]',lastname='$_POST[lastname]',address1='$_POST[address1]',address2='$_POST[address2]',city='$_POST[city]',state='$_POST[state]',country='$_POST[country]',zip='$_POST[zip]',phone='$_POST[phone]',cell='$_POST[cell]',cell2='$_POST[cell2]',email='$_POST[email]',email2='$_POST[email2]',website='$_POST[website]' WHERE EntryID=$_POST[entryid]");
}


if($_POST[newentry]=="New_Entry"){
mysql_query("INSERT into entries (title,manname,womanname,lastname,address1,address2,city,state,country,zip,phone,cell,cell2,email,email2,website) VALUES ('$_POST[title]','$_POST[manname]','$_POST[womanname]','$_POST[lastname]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[country]','$_POST[zip]','$_POST[phone]','$_POST[cell]','$_POST[cell2]','$_POST[email]','$_POST[email2]','$_POST[website]')");
header("Location:index.php?action=A");
}

if($_POST[newentry]=="Add_and_Return"){
mysql_query("INSERT into entries (title,manname,womanname,lastname,address1,address2,city,state,country,zip,phone,cell,cell2,email,email2,website) VALUES ('$_POST[title]','$_POST[manname]','$_POST[womanname]','$_POST[lastname]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[country]','$_POST[zip]','$_POST[phone]','$_POST[cell]','$_POST[cell2]','$_POST[email]','$_POST[email2]','$_POST[website]')");
header("Location:index.php?action=add");
}

if($_GET[command]=="remove" and $_GET[id]!=""){
mysql_query("DELETE from entries where EntryID=$_GET[id]");
}

?> 


<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
		<meta name="generator" content="Adobe GoLive 6">
		<title>Herbstzuber's Rolodex</title>
		<style type="text/css" media="screen"><!--caption { color: red; font-weight: bold; font-size: 20px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
#layercntrl       { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #afafaf; visibility: <? if($_GET[cntrlpnl]==true){print "visible"; }else{print "hidden";}?>;position: fixed;padding: 5px ; z-index: 2; top: 10px; border: solid 2px black; left: 350px; display: block }
td { font-size: 11px }
.lastname { color: red; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
#addedit      { visibility: visible; display: block; position: absolute; top: 4px; left: 60px !important; border: solid 2px gray }
#myleft  { position: fixed; left: 5px }
#main    { text-align: center; position: absolute; left: 58px; min-width: 400px }
#layercntrl  INPUT { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif }
#layercntrl SELECT { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif }
.headers { font-size: 20px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: underline overline; text-align: center }
#addedit INPUT,SELECT { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif }
--></style>
	</head>
	
	<body bgcolor="#ffffff">
	<DIV id=myleft>
		<img src="media/letters.jpg" alt="" height="600" width="50" usemap="#lettersbbd6f2b7" align="left" border="0"><map name="lettersbbd6f2b7"><area shape="rect" coords="10,533,43,541" href="index.php?action=all" alt=""><area shape="rect" coords="11,576,44,593" href="index.php?command=allmerge" alt=""><area shape="rect" coords="10,557,43,565" href="index.php?action=add" alt=""><area shape="rect" coords="11,450,44,468" href="index.php?action=W" alt=""><area shape="rect" coords="11,469,44,487" href="index.php?action=X" alt=""><area shape="rect" coords="11,489,44,507" href="index.php?action=Y" alt=""><area shape="rect" coords="11,509,44,527" href="index.php?action=Z" alt=""><area shape="rect" coords="13,229,46,247" href="index.php?action=L" alt=""><area shape="rect" coords="13,250,46,268" href="index.php?action=M" alt=""><area shape="rect" coords="12,270,45,288" href="index.php?action=N" alt=""><area shape="rect" coords="11,290,44,308" href="index.php?action=O" alt=""><area shape="rect" coords="11,310,44,328" href="index.php?action=P" alt=""><area shape="rect" coords="11,330,44,348" href="index.php?action=Q" alt=""><area shape="rect" coords="11,351,44,369" href="index.php?action=R" alt=""><area shape="rect" coords="12,370,45,388" href="index.php?action=S" alt=""><area shape="rect" coords="12,390,45,408" href="index.php?action=T" alt=""><area shape="rect" coords="12,410,45,428" href="index.php?action=U" alt=""><area shape="rect" coords="11,430,44,448" href="index.php?action=V" alt=""><area shape="rect" coords="12,210,45,228" href="index.php?action=K" alt=""><area shape="rect" coords="12,170,45,188" href="index.php?action=I" alt=""><area shape="rect" coords="12,150,45,168" href="index.php?action=H" alt=""><area shape="rect" coords="11,131,44,149" href="index.php?action=G" alt=""><area shape="rect" coords="11,110,44,128" href="index.php?action=F" alt=""><area shape="rect" coords="12,190,45,208" href="index.php?action=J" alt=""><area shape="rect" coords="11,90,44,108" href="index.php?action=E" alt=""><area shape="rect" coords="11,70,44,88" href="index.php?action=D" alt=""><area shape="rect" coords="12,50,45,68" href="index.php?action=C" alt=""><area shape="rect" coords="13,30,46,48" href="index.php?action=B" alt=""><area shape="rect" coords="13,9,46,27" href="index.php?action=A" alt=""></map>
</div>


<?
##Control panel info only........

if($_GET[command]=="allmerge"){
$resultnames = mysql_query("SELECT name from lists");
$numnames = mysql_num_rows($resultnames);
print "<DIV id='layercntrl'>";
if($numnames==0){print "There are no lists created yet<P><a href=$_SERVER[PHP_SELF]?command=allmerge>CLOSE</a>";}

if($numnames>0){
print "<form action=$_SERVER[PHP_SELF]?command=mailmergeaction&subcommand=loadlist method=post>Load MM List:<select name=
getlistname onclick='this.form.submit()' size=1>";


while($rownames = mysql_fetch_row($resultnames)){
print "<OPTION value=$rownames[0]>$rownames[0]</OPTION>";
}
print "</select></form>";
}


if(count($_SESSION[mmvalues])>0){
print "<form action=$_SERVER[PHP_SELF]?command=mailmergeaction&subcommand=savelist method=post>Save MM List:<input type=text name=listname size=10></form>"; if($_SESSION[modified]==1 && $_SESSION[currlist]!=""){print"<form action=$_SERVER[PHP_SELF]?command=mailmergeaction&subcommand=savelist method=post>Update MM List:<select name=listname onclick='this.form.submit()' size=1>

<OPTION value=$_SESSION[currlist]>$_SESSION[currlist]</OPTION></select></form>";}

if($numnames>0){
print "<form action=$_SERVER[PHP_SELF]?command=mailmergeaction&subcommand=removelist method=post>Delete MM List:<select name=delname 
onclick='this.form.submit()' size=1>";

$resultnames = mysql_query("SELECT name from lists");

while($rownames = mysql_fetch_row($resultnames)){
print "<OPTION value=$rownames[0]>$rownames[0]</OPTION>";
} 
print "</select></form>";
}
if((count($_SESSION[mmvalues])>0)){
print "<A HREF=$_SERVER[PHP_SELF]?command=mailmergeaction&subcommand=buildlist>Export MM List</A><P><a href=$_SERVER[PHP_SELF]?command=allmerge>CLOSE</a>";
}

}
print "</div>";
}
##End of Control Panel control block........


##Definition of top of table!!

#		 if ($_GET[command]=="allmerge"){print "<CAPTION><DIV align=left>Current Working list:$_SESSION[currlist]"; if($_SESSION[modified]==1 && $_SESSION[currlist]!=""){print " is_modified ";} print" <a href=$_SERVER[PHP_SELF]?command=allmerge&cntrlpnl=true>Show Control Panel</a></DIV></CAPTION>";}

##End of top of table desctiption!!!!!



##Adding a new record into the database.........
if($_GET[action]!="" and ($_GET[action]=="add" || $_GET[action]=="edit")){
if($_GET[action]=="edit" and $_GET[id]!=""){
$query = mysql_query("SELECT * from entries where EntryID=$_GET[id]");
$row2 = mysql_fetch_array($query);
}

print "<div id=addedit>
<form action=$_SERVER[PHP_SELF] method=post name=FormName>
			<table width=122 border=0 cellspacing=2 cellpadding=0>
				<tr>
					<td>TITLE:</td>
					<td><select name=title size=1>
							<option";if($row2[title]=='Mr.'){print " selected";} print " value=Mr.>
							Mr.</option>

							<option"; if($row2[title]=='Mrs.'){print " selected";} print "  value=Mrs.>
							Mrs.</option>

							<option"; if($row2[title]=='Ms.'){print " selected";} print "  value=Ms.>
							Ms.</option>

							<option"; if($row2[title]=='Mr. & Mrs.'){print " selected";} print " value='Mr. & Mrs.'>
							Mr. and Mrs.</option>

							<option"; if($row2[title]=='Dr. & Mrs.'){print " selected";} print " value='Dr. & Mrs.'>
							Dr. and Mrs.</option>

						</select></td>
				</tr>
				<tr>
					<td>MAN:</td>
					<td><input type=text name=manname value='$row2[manname]' size=21></td>
				</tr>
				<tr>
					<td>WOMAN:</td>
					<td><input type=text name=womanname value='$row2[womanname]' size=34></td>
				</tr>
				<tr>
					<td>LASTNAME:</td>
					<td><input type=text name=lastname value='$row2[lastname]' size=29></td>
				</tr>
				<tr>
					<td>ADDRESS 1:</td>
					<td><input type=text name=address1 value='$row2[address1]' size=28></td>
				</tr>
				<tr>
					<td>ADDRESS 2:</td>
					<td><input type=text name=address2 value='$row2[address2]' size=28></td>
				</tr>
				<tr>
					<td>CITY:</td>
					<td><input type=text name=city value='$row2[city]' size=21></td>
				</tr>
				<tr>
					<td>STATE:</td>
					<td><input type=text name=state value='$row2[state]' size=8></td>
				</tr>
				<tr>
					<td>ZIP:</td>
					<td><input type=text name=zip value='$row2[zip]' size=8></td>
				</tr>
				<tr>
					<td>PHONE:</td>
					<td><input type=text name=phone value='$row2[phone]' size=38></td>
				</tr>
				<tr>
					<td>CELL1:</td>
					<td><input type=text name=cell value='$row2[cell]' size=38></td>
				</tr>
				<tr>
					<td>CELL2:</td>
					<td><input type=text name=cell2 value='$row2[cell2]' size=38></td>
				</tr>
				<tr>
					<td>EMAIL1:</td>
					<td><input type=text name=email value='$row2[email]' size=38></td>
				</tr>
				<tr>
					<td>EMAIL 2:</td>
					<td><input type=text name=email2 value='$row2[email2]' size=38></td>
				</tr>
				<tr>
					<td>WEBSITE:</td>
					<td><input type=text name=website value='$row2[website]' size=36></td>
				</tr>
				<tr>
					<td><input type=submit name=";

				if($_GET[action]=="add"){print "newentry ";}else{print "editentry ";} print "value=";

				if($_GET[action]=="add"){print "New_Entry";}else{print "Edit_Entry";} print "></td>
					<td>"; if($_GET[action]=="add"){print "<input type=submit name=newentry value=Add_and_Return>";} 
					print "<input type=hidden name=entryid value=$_GET[id]></td>
				</tr>
			</table>
			
		</form>					</div>";




}



##END OF EDIT/ADD CODE!!

##Allmerge command!!!!
if($_GET[command]=="allmerge"){
?>
<DIV id=main><?
print "<SPAN class=headers>Current list:$_SESSION[currlist]"; if($_SESSION[modified]==1 && $_SESSION[currlist]!=""){print " is_modified </span>";}
if(!isset($_SESSION['mmvalues']) || count($_SESSION['mmvalues'])==0){print "<a href=$_SERVER[PHP_SELF]?command=allmerge&cntrlpnl=true>   Open Control Panel</a></span>";}print"</span>";
$result1 = mysql_query("SELECT * from entries ORDER by lastname");

while ($row = mysql_fetch_array($result1)){
if(in_array($row[EntryID],$_SESSION['mmvalues'])){
print "
<table width=750 border=0 cellspacing=0 cellpadding=0 background=media/card.jpg cool gridx=2 gridy=2 height=125 showgridx showgridy usegridx usegridy>
			<tr height=14>
				<td width=749 height=14 colspan=27></td>
				<td width=1 height=14><spacer type=block width=1 height=14></td>
			</tr>
			<tr height=26>
				<td width=112 height=26 colspan=5></td>
				<td class=lastname content csheight=18 width=155 height=26 colspan=9 valign=top align=left xpos=112>$row[lastname]</td>
				<td width=482 height=26 colspan=13></td>
				<td width=1 height=26><spacer type=block width=1 height=26></td>
			</tr>
			<tr height=2>
				<td width=520 height=2 colspan=24></td>
				<td content csheight=14 cslocked width=216 height=18 colspan=2 rowspan=2 valign=top xpos=520>$row[email]</td>
				<td width=13 height=18 rowspan=2></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=16>
				<td width=59 height=16 colspan=3></td>
				<td content csheight=14 width=97 height=16 colspan=5 valign=top xpos=59>$row[title]</td>
				<td width=82 height=16 colspan=4></td>
				<td content csheight=14 width=144 height=16 colspan=5 valign=top align=left xpos=238>$row[address1]</td>
				<td width=48 height=16 colspan=3></td>
				<td content csheight=14 width=84 height=16 colspan=2 valign=top xpos=430>$row[phone]</td>
				<td width=6 height=16 colspan=2></td>
				<td width=1 height=16><spacer type=block width=1 height=16></td>
			</tr>
			<tr height=2>
				<td width=238 height=2 colspan=12></td>
				<td content csheight=14 width=144 height=18 colspan=5 rowspan=2 valign=top xpos=238>$row[address2]</td>
				<td width=367 height=2 colspan=10></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=16>
				<td width=52 height=16 colspan=2></td>
				<td content csheight=14 width=100 height=16 colspan=5 valign=top xpos=52>$row[manname]</td>
				<td width=86 height=16 colspan=5></td>
				<td width=48 height=16 colspan=3></td>
				<td content csheight=14 width=84 height=16 colspan=2 valign=top xpos=430>$row[cell]</td>
				<td width=235 height=16 colspan=5></td>
				<td width=1 height=16><spacer type=block width=1 height=16></td>
			</tr>
			<tr height=2>
				<td width=520 height=2 colspan=24></td>
				<td content csheight=14 cslocked width=216 height=20 colspan=2 rowspan=2 valign=top xpos=520>$row[email2]</td>
				<td width=13 height=20 rowspan=2></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=18>
				<td width=70 height=18 colspan=4></td>
				<td content csheight=14 width=116 height=18 colspan=5 valign=top xpos=70>$row[womanname]</td>
				<td width=16 height=18 colspan=2></td>
				<td content csheight=14 width=100 height=18 colspan=4 valign=top xpos=202>$row[city]</td>
				<td width=40 height=18></td>
				<td content csheight=14 width=71 height=18 colspan=2 valign=top xpos=342>$row[state]</td>
				<td width=15 height=18></td>
				<td content csheight=14 width=88 height=18 colspan=4 valign=top xpos=428>$row[cell2]</td>
				<td width=4 height=18></td>
				<td width=1 height=18><spacer type=block width=1 height=18></td>
			</tr>
			<tr height=2>
				<td width=196 height=2 colspan=10></td>
				<td content csheight=14 width=65 height=28 colspan=3 rowspan=2 valign=top xpos=196>$row[zip]</td>
				<td width=183 height=28 colspan=8 rowspan=2></td>
				<td content csheight=16 width=240 height=28 colspan=4 rowspan=2 valign=top xpos=444>$row[website]</td>
				<td width=65 height=28 colspan=2 rowspan=2></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=26>
				<td width=16 height=26></td>
				<td content csheight=16 width=132 height=26 colspan=5 valign=top xpos=16>";  
	if(in_array($row[EntryID],$_SESSION['mmvalues'])){
				print "<A HREF=$_SERVER[PHP_SELF]?command=mm&subcommand=mmremove&id=$row[EntryID]>Remove</A>/<a href=$_SERVER[PHP_SELF]?command=allmerge&cntrlpnl=true>Ctrl Pnl</a>";
				}
			print "</td>
				<td width=48 height=26 colspan=4></td>
				<td width=1 height=26><spacer type=block width=1 height=26></td>
			</tr>
			<tr height=1 cntrlrow>
				<td width=16 height=1><spacer type=block width=16 height=1></td>
				<td width=36 height=1><spacer type=block width=36 height=1></td>
				<td width=7 height=1><spacer type=block width=7 height=1></td>
				<td width=11 height=1><spacer type=block width=11 height=1></td>
				<td width=42 height=1><spacer type=block width=42 height=1></td>
				<td width=36 height=1><spacer type=block width=36 height=1></td>
				<td width=4 height=1><spacer type=block width=4 height=1></td>
				<td width=4 height=1><spacer type=block width=4 height=1></td>
				<td width=30 height=1><spacer type=block width=30 height=1></td>
				<td width=10 height=1><spacer type=block width=10 height=1></td>
				<td width=6 height=1><spacer type=block width=6 height=1></td>
				<td width=36 height=1><spacer type=block width=36 height=1></td>
				<td width=23 height=1><spacer type=block width=23 height=1></td>
				<td width=6 height=1><spacer type=block width=6 height=1></td>
				<td width=35 height=1><spacer type=block width=35 height=1></td>
				<td width=40 height=1><spacer type=block width=40 height=1></td>
				<td width=40 height=1><spacer type=block width=40 height=1></td>
				<td width=31 height=1><spacer type=block width=31 height=1></td>
				<td width=15 height=1><spacer type=block width=15 height=1></td>
				<td width=2 height=1><spacer type=block width=2 height=1></td>
				<td width=14 height=1><spacer type=block width=14 height=1></td>
				<td width=70 height=1><spacer type=block width=70 height=1></td>
				<td width=2 height=1><spacer type=block width=2 height=1></td>
				<td width=4 height=1><spacer type=block width=4 height=1></td>
				<td width=164 height=1><spacer type=block width=164 height=1></td>
				<td width=52 height=1><spacer type=block width=52 height=1></td>
				<td width=13 height=1><spacer type=block width=13 height=1></td>
				<td width=1 height=1></td>
			</tr>
		</table><P>";}
			
}?>
</div>
<?
}
##End of ALL MERGE LOOP!!!

##Beginning of VIEW LOOP!!!
if($_GET[action]!="" and $_GET[action]!="add"){
if($_GET[action]=="all")
{
$result1 = mysql_query("SELECT * from entries ORDER by lastname");
}
else
{
$searchvalue = $_GET[action]."%";
$result1 = mysql_query("SELECT * from entries WHERE lastname LIKE '$searchvalue' ORDER by lastname");
}
?><DIV id=main><?
while ($row = mysql_fetch_array($result1)){
print "
<table width=750 border=0 cellspacing=0 cellpadding=0 background=media/card.jpg cool gridx=2 gridy=2 height=125 showgridx showgridy usegridx usegridy>
			<tr height=14>
				<td width=749 height=14 colspan=27></td>
				<td width=1 height=14><spacer type=block width=1 height=14></td>
			</tr>
			<tr height=26>
				<td width=112 height=26 colspan=5></td>
				<td class=lastname content csheight=18 width=155 height=26 colspan=9 valign=top align=left xpos=112>$row[lastname]</td>
				<td width=482 height=26 colspan=13></td>
				<td width=1 height=26><spacer type=block width=1 height=26></td>
			</tr>
			<tr height=2>
				<td width=520 height=2 colspan=24></td>
				<td content csheight=14 cslocked width=216 height=18 colspan=2 rowspan=2 valign=top xpos=520>$row[email]</td>
				<td width=13 height=18 rowspan=2></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=16>
				<td width=59 height=16 colspan=3></td>
				<td content csheight=14 width=97 height=16 colspan=5 valign=top xpos=59>$row[title]</td>
				<td width=82 height=16 colspan=4></td>
				<td content csheight=14 width=144 height=16 colspan=5 valign=top align=left xpos=238>$row[address1]</td>
				<td width=48 height=16 colspan=3></td>
				<td content csheight=14 width=84 height=16 colspan=2 valign=top xpos=430>$row[phone]</td>
				<td width=6 height=16 colspan=2></td>
				<td width=1 height=16><spacer type=block width=1 height=16></td>
			</tr>
			<tr height=2>
				<td width=238 height=2 colspan=12></td>
				<td content csheight=14 width=144 height=18 colspan=5 rowspan=2 valign=top xpos=238>$row[address2]</td>
				<td width=367 height=2 colspan=10></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=16>
				<td width=52 height=16 colspan=2></td>
				<td content csheight=14 width=100 height=16 colspan=5 valign=top xpos=52>$row[manname]</td>
				<td width=86 height=16 colspan=5></td>
				<td width=48 height=16 colspan=3></td>
				<td content csheight=14 width=84 height=16 colspan=2 valign=top xpos=430>$row[cell]</td>
				<td width=235 height=16 colspan=5></td>
				<td width=1 height=16><spacer type=block width=1 height=16></td>
			</tr>
			<tr height=2>
				<td width=520 height=2 colspan=24></td>
				<td content csheight=14 cslocked width=216 height=20 colspan=2 rowspan=2 valign=top xpos=520>$row[email2]</td>
				<td width=13 height=20 rowspan=2></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=18>
				<td width=70 height=18 colspan=4></td>
				<td content csheight=14 width=116 height=18 colspan=5 valign=top xpos=70>$row[womanname]</td>
				<td width=16 height=18 colspan=2></td>
				<td content csheight=14 width=100 height=18 colspan=4 valign=top xpos=202>$row[city]</td>
				<td width=40 height=18></td>
				<td content csheight=14 width=71 height=18 colspan=2 valign=top xpos=342>$row[state]</td>
				<td width=15 height=18></td>
				<td content csheight=14 width=88 height=18 colspan=4 valign=top xpos=428>$row[cell2]</td>
				<td width=4 height=18></td>
				<td width=1 height=18><spacer type=block width=1 height=18></td>
			</tr>
			<tr height=2>
				<td width=196 height=2 colspan=10></td>
				<td content csheight=14 width=65 height=28 colspan=3 rowspan=2 valign=top xpos=196>$row[zip]</td>
				<td width=183 height=28 colspan=8 rowspan=2></td>
				<td content csheight=16 width=240 height=28 colspan=4 rowspan=2 valign=top xpos=444>$row[website]</td>
				<td width=65 height=28 colspan=2 rowspan=2></td>
				<td width=1 height=2><spacer type=block width=1 height=2></td>
			</tr>
			<tr height=26>
				<td width=16 height=26></td>
				<td content csheight=16 width=132 height=26 colspan=5 valign=top xpos=16><A HREF=$_SERVER[PHP_SELF]?action=$_GET[action]&command=remove&id=$row[EntryID]>Delete</A>/<A HREF=$_SERVER[PHP_SELF]?action=edit&letter=$_GET[action]&id=$row[EntryID]>Edit</A>/";  
if(in_array($row[EntryID],$_SESSION['mmvalues'])){
				print "<A HREF=$_SERVER[PHP_SELF]?command=mm&subcommand=mmremove&letter=$_GET[action]&id=$row[EntryID]>MM Remove</A>";
}
else{
print "<A HREF=$_SERVER[PHP_SELF]?command=mm&letter=$_GET[action]&id=$row[EntryID]>MM Add</A>";
}
			print "</td>
				<td width=48 height=26 colspan=4></td>
				<td width=1 height=26><spacer type=block width=1 height=26></td>
			</tr>
			<tr height=1 cntrlrow>
				<td width=16 height=1><spacer type=block width=16 height=1></td>
				<td width=36 height=1><spacer type=block width=36 height=1></td>
				<td width=7 height=1><spacer type=block width=7 height=1></td>
				<td width=11 height=1><spacer type=block width=11 height=1></td>
				<td width=42 height=1><spacer type=block width=42 height=1></td>
				<td width=36 height=1><spacer type=block width=36 height=1></td>
				<td width=4 height=1><spacer type=block width=4 height=1></td>
				<td width=4 height=1><spacer type=block width=4 height=1></td>
				<td width=30 height=1><spacer type=block width=30 height=1></td>
				<td width=10 height=1><spacer type=block width=10 height=1></td>
				<td width=6 height=1><spacer type=block width=6 height=1></td>
				<td width=36 height=1><spacer type=block width=36 height=1></td>
				<td width=23 height=1><spacer type=block width=23 height=1></td>
				<td width=6 height=1><spacer type=block width=6 height=1></td>
				<td width=35 height=1><spacer type=block width=35 height=1></td>
				<td width=40 height=1><spacer type=block width=40 height=1></td>
				<td width=40 height=1><spacer type=block width=40 height=1></td>
				<td width=31 height=1><spacer type=block width=31 height=1></td>
				<td width=15 height=1><spacer type=block width=15 height=1></td>
				<td width=2 height=1><spacer type=block width=2 height=1></td>
				<td width=14 height=1><spacer type=block width=14 height=1></td>
				<td width=70 height=1><spacer type=block width=70 height=1></td>
				<td width=2 height=1><spacer type=block width=2 height=1></td>
				<td width=4 height=1><spacer type=block width=4 height=1></td>
				<td width=164 height=1><spacer type=block width=164 height=1></td>
				<td width=52 height=1><spacer type=block width=52 height=1></td>
				<td width=13 height=1><spacer type=block width=13 height=1></td>
				<td width=1 height=1></td>
			</tr>
		</table><P>";}
			?></div><?
			}
	##END OF VIEW LOOP!!!!!
	?>	

		
</body>

</html>
Return current item: myPHProlodex