Location: PHPKode > projects > Admbook > admin/reply.php
<?php
	include("../settings-data.php");
	include("../lib.php");
	session_start();
	checkPermissions($login, $password);
	if (file_exists("../content-data.php"))
		include("../content-data.php");
	if (!isset($error))
		$error = "";
	if (!isset($style))
		$style = "";
	if (!isset($id))
		$id = "";
	if (!isset($content[$id-1]))
	{
		session_destroy();
		Header("Location: login.php");exit;
	}
	$currentContent = $content[$id-1];
	$currentContent['admin-message'] = br2nl($currentContent['admin-message']);
?>
<html>
<head>
<title>admbook :: version <?=$constant['version']?></title>
<?php
	if ($constant['charset'] != "")
	{
?>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$constant['charset']?>"/>
<?php
	}
?>
<script language="JavaScript" src="../script.js" type="text/javascript"></script>
<link href="../style.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
<!--
input.field {
	width : 170px
}

#error {
	color : <?=$constant['error-color']?>
}

input.button {
	width : 450px;
}

input.halfbutton {
	width : 225px;
}

textarea {
	width : 450px;
}

.text {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['text-color']?>
}

.link {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['link-color']?>
}

.messagetext {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['message-text-color']?>
}

.messagelink {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['message-link-color']?>
}

.admintext {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['admin-message-text-color']?>
}

.adminlink {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['admin-message-link-color']?>
}

.headertext {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['header-text-color']?>
}

.headerlink {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['header-link-color']?>
}

<?=$style?>
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
function setSmile(symbol) {
	obj = document.guestbook.admMessage;
	obj.focus();
	obj.value =	obj.value + symbol;
}
//-->
</script>
</head>
<body bgcolor="<?=$constant['background-color']?>" text="<?=$constant['text-color']?>" link="<?=$constant['link-color']?>" vlink="<?=$constant['link-color']?>" alink="<?=$constant['link-color']?>" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table width="760" border="0" cellpadding="0" cellspacing="0" align="center" height="100%">
<tr>
	<form action="reply-add.php" method="post" name="guestbook">
	<input type="hidden" name="page" value="<?=$page?>"/>
	<input type="hidden" name="id" value="<?=$id?>"/>
	<td valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="<?=$constant['border-color']?>">
				<table width="100%" border="0" cellpadding="2" cellspacing="1">
				<tr>
					<td bgcolor="<?=$constant['header-background-color']?>" class="headertext" id="book-title">Admbook versi0n <?=$constant['version']?></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="<?=$constant['border-color']?>">
				<table width="100%" border="0" cellpadding="2" cellspacing="1">
				<tr>
					<td bgcolor="<?=$constant['header-background-color']?>" class="headertext" align="center"><b>Reply to message</b></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="<?=$constant['border-color']?>">
				<table width="100%" border="0" cellpadding="0" cellspacing="1">
				<tr>
					<td>
						<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="<?=$constant['header-background-color']?>">
<?php
			// ip : host >>
?>						<tr>
							<td width="15"><a href="delete.php?id=<?=$id;?>"><img src="../img/delete.gif" width="15" height="15" border="0" alt="Delete message"></a></td>
							<td width="19"><a href="edit.php?id=<?=$id;?>&page=<?=$page?>"><img src="../img/edit.gif" width="19" height="17" border="0" alt="Edit message"></a></td>
							<td width="100%" class="headertext">&nbsp;Ip : <a href="ip-ban-add.php?ip=<?=$currentContent['ip']?>" class="headerlink"><?=$currentContent['ip']?></a><?if ($currentContent['host'] != "") print " // host : ".$currentContent['host']?><?if ($currentContent['proxy'] != "") print " // proxy: <a href=\"ip-ban-add.php?ip=".$currentContent[$i]['proxy']."\" class=\"headerlink\">".$currentContent['proxy']."</a>"; ?></td>
						</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="<?=$constant['message-background-color']?>">
<?php
	// name and email as link >>
	if ($currentContent['name'] != "")
	{
?>						<tr>
							<td width="1%" align="center"><img src="../img/name.gif" width="11" height="14" border="0" alt="Name"/></td>
							<td class="messagetext"><?php if ($currentContent['mail'] != "") { ?><a href="mailto:<?=$currentContent['mail']?>" class="messagelink"><? } ?><?=$currentContent['name']?><?php if ($currentContent['mail'] != "") { ?></a><? } ?></td>
						</tr>
<?php
	}
	// name and email as link <<
	// url >>
	if ($currentContent['url'] != "")
	{
?>						<tr>
							<td align="center"><img src="../img/url.gif" width="18" height="18" border="0" alt="Url"/></td>
							<td class="messagetext"><a href="<?=$currentContent['url']?>" class="messagelink"><?=$currentContent['url']?></a></td>
						</tr>
<?php
	}
	// url <<
	// icq >>
	if ($currentContent['icq'] != "")
	{
?>						<tr>
							<td><img src="http://online.mirabilis.com/scripts/online.dll?icq=<?=$currentContent['icq']?>&img=5" width="18" height="18" alt="User status"></td>
							<td><a href="http://web.icq.com/whitepages/message_me/1,,,00.icq?uin=<?=$currentContent['icq']?>&action=message" class="messagelink"><?=$currentContent['icq']?></td>
						</tr>
<?php
	}
	// icq <<
	// date and time >>
	if ($currentContent['time'])
	{
?>						<tr>
							<td align="center"><img src="../img/date.gif" width="17" height="18" border="0" alt="Date and Time"/></td>
							<td class="messagetext">[<?=getFullDate($currentContent['time'], $constant['locale']).", ".getTime($currentContent['time'])?>]</td>
						</tr>
<?php
	}
	// date and time <<
?>						<tr>
							<td><img src="../img/sp.gif" width="1" height="1" border="0"/></td>
							<td><hr size="1" color="<?=$constant['line-color']?>"/></td>
						</tr>
<?php
	// message >>
	if ($currentContent['message'] != "")
	{
?>						<tr>
							<td align="center"><img src="../img/sp.gif" width="18" height="20" border="0"/></td>
							<td class="messagetext" valign="top"><?=convertSmile($currentContent['message'],"../img/");?></td>
						</tr>
<?php
	}
	// message <<
?>						</table>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<div align="right">
		<table border="0" cellpadding="2" cellspacing="0">
<?php
	if ($error != "")
	{
?>
		<tr>
			<td colspan="5" class="text">
				<b>Detect following errors:</b><br/>
				<span id="error"><?=$error?></span><br/>
			</td>
		</tr>
<?php
		session_unregister("error");
	}
?>
		<tr>
			<td align="center"><img src="../img/name.gif" width="11" height="14" border="0" alt="Admin name"/></td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>
			<td class="text"><span class="adminname">Admin name:</span></td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>
			<td><input type="text" size="26" name="admName" value="<?php if (isset($admName)) { print stripslashes($admName); session_unregister("admName"); } else { if (isset($currentContent['admin-name']) && $currentContent['admin-name'] != "" ) print $currentContent['admin-name']; else if(isset($cookie['admin-name'])) print stripslashes($cookie['admin-name']); } ?>" maxlength="30" class="field"/></td>
		</tr>
		<tr>
			<td align="center"><img src="../img/mail.gif" width="18" height="15" border="0" alt="Admin e-mail"/></td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>
			<td class="text"><span class="adminmail">Admin e-mail:</span></td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>
			<td><input type="text" size="26" name="admMail" value="<?php if (isset($admMail)) { print stripslashes($admMail); session_unregister("admMail"); } else { if (isset($currentContent['admin-mail']) && $currentContent['admin-mail'] != "" ) print $currentContent['admin-mail']; else if(isset($cookie['admin-mail'])) print stripslashes($cookie['admin-mail']); } ?>" maxlength="128" class="field"/></td>
		</tr>
		<tr>
			<td align="center"><img src="../img/message.gif" width="15 height="18" border="0" alt="Admin message"/></td>
			<td><img src="../img/sp.gif" width="1" height="1"/></td>
			<td colspan="3" class="text"><span class="adminmessage">Admin message:</span></td>
		</tr>
		<tr>
			<td colspan="5" align="right"><textarea name="admMessage" rows="15" cols="35" wrap="virtual"><?php if (isset($admMessage)) {  $p = ""; $constant['bold-in-message'] ? $p .= "<b>" : $p .= ""; $constant['italic-in-message'] ? $p .= "<i>" : $p .= ""; print strip_tags(stripslashes(br2nl($admMessage)),$p); session_unregister("admMessage"); } else { $p = ""; $constant['bold-in-message'] ? $p .= "<b>" : $p .= ""; $constant['italic-in-message'] ? $p .= "<i>" : $p .= ""; print strip_tags(stripslashes(br2nl($currentContent['admin-message'])),$p); } ?></textarea></td>
		</tr>
<?php
	session_unregister("style");
	if($constant['smile-in-message'])
	{
?>		
		<tr>
			<td colspan="5" height="3"><spacer height="3" width="1" type="block"></td>
		</tr>
		<tr>
			<td colspan="5" class="text" align="center">
				<a href="javascript:setSmile(' :) ')"><img src="../img/smile.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' ;) ')"><img src="../img/wink.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' 8) ')"><img src="../img/cool.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :J ')"><img src="../img/curve-smile.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :P ')"><img src="../img/tongue.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :D ')"><img src="../img/biggrin.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :( ')"><img src="../img/frown.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :o ')"><img src="../img/astonish.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' %) ')"><img src="../img/crazy.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :[] ')"><img src="../img/fright.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :smoke: ')"><img src="../img/smoke.gif" width="21" height="20" border="0"></a>				
				<a href="javascript:setSmile(' :evil: ')"><img src="../img/evil.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :apple: ')"><img src="../img/apple.gif" width="15" height="15" border="0"></a>
				<a href="javascript:setSmile(' :moo: ')"><img src="../img/moo.gif" width="16" height="16" border="0"></a>
			</td>
		</tr>
		<tr>
			<td colspan="5" height="3"><spacer height="3" width="1" type="block"></td>
		</tr>
<?php
	}
?>
		<tr>
			<td colspan="5" align="right">
				<input type="submit" value="reply" class="button"/><br/>
				<input type="button" value="back" class="halfbutton" onClick="javascript:window.location.href='index.php?page=<?=$page?>'"/><input type="button" value="logout" class="halfbutton" onClick="javascript:window.location.href='logout.php'"/>
			</td>
		</tr>
		<tr>
			<td colspan="5"></td>
		</tr>
		<tr>
			<td colspan="5"></td>
		</tr>
		</table>
	</td>
	</form>
</tr>
<tr>
	<td valign="bottom" align="right" height="1" class="text">
		<br/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="50%" bgcolor="<?=$constant['header-background-color']?>" class="headertext" align="center"><span class="text">&copy;&nbsp;</span>trent&nbsp;<a href="http://www.low.ru/dev/guestbook/" class="text" target="_top">Download this guestbook</a>&nbsp;</td>
			<td width="50%" bgcolor="<?=$constant['header-background-color']?>" class="headertext" align="center"><span class="text">&nbsp;&nbsp;&nbsp;</span><a href="http://www.mylov.ru" onclick="location.href='http://partner.mylov.ru/link.phtml?pid=10359084&lid=553';return false;" class="link" target="_top">Çíàêîìñòâà è îáùåíèå</a>&nbsp;</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
Return current item: Admbook