Location: PHPKode > projects > M_Gbook > mgbook/index.php
<?
//////////////////////////////
/////MMMMMMMMMMMMMMMM/////////
/////MMM//MMMMMM//MMM/////////
/////MMM//MMMMMM//MMM/////////
/////MMM//MMMMMM//MMM/////////
/////MMM//MMMMMM//MMM/////////
/// (c) Mesrop Minasyan //////
///// hide@address.com ///////
///// http://mesrop.info /////
include ("functions.php");
include ("config.php");
?>
 <?
 
 
$query="select * from m_ban where ip='".$_SERVER['REMOTE_ADDR']."'";
$result=mysql_query($query);
$num_results=mysql_num_rows($result);

for ($i=0; $i<$num_results; $i++){
	$row=mysql_fetch_array($result);
	}
if ($row[0]==TRUE and $praverka==FALSE) {
echo "<div align=\"center\" style=\"width: 100%; \" class=\"modify\"><br><br>Âàø IP Àäðåñ áûë çàáàíåí àäìèíèñòðàòîðîì ãîñòåâîé êíèãè...<br>Åñëè âû ñ÷èòàåòå ÷îò ýòî íåäîðàçóìåíèå, òî ïîæàëóéñòà ñâÿæèòåñü ñ àäìèíèñòðàòîðîì ïî ýë. ïî÷òå: ".$adm_mail."<br><br><br></div>";
exit;
}



if ($_COOKIE["c_site"]==TRUE){
$site_val=$_COOKIE["c_site"];
}
else {
$site_val="http://";
}
?>
<html>
<head><title><? echo $gbook_title; ?> :: Ãîñòåâàÿ êíèãà</title></head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script type="text/javascript">
var minchars='<?=$gbook_minchars?>';
var maxchars='<?=$gbook_maxchars?>';
var color1='<?=$gbook_color_title?>';
var color2='<?=$gbook_color_title?>';

</script>

<script type="text/javascript">document.write('\u003c\u0073\u0063\u0072\u0069\u0070\u0074\u0020\u0074\u0079\u0070\u0065\u003d\u0022\u0074\u0065\u0078\u0074\u002f\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u0022\u003e\u000a\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0067\u0065\u0074\u0063\u006f\u006e\u0074\u0028\u0029\u007b\u000a\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0067\u0065\u0074\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0042\u0079\u0049\u0064\u0028\u0027\u0063\u006f\u0070\u0079\u0072\u0069\u0067\u0068\u0074\u0027\u0029\u002e\u0069\u006e\u006e\u0065\u0072\u0048\u0054\u004d\u004c\u003d\u0027\u003c\u0064\u0069\u0076\u0020\u0069\u0064\u003d\u0022\u0061\u0075\u0074\u0068\u006f\u0072\u0022\u0020\u0063\u006c\u0061\u0073\u0073\u003d\u0022\u0075\u006e\u0076\u0069\u0073\u005f\u0064\u0069\u0076\u0022\u003e\u003c\u0061\u0020\u006e\u0061\u006d\u0065\u003d\u0022\u0061\u0075\u0074\u0068\u006f\u0072\u0022\u003e\u003c\u002f\u0061\u003e\u003c\u0062\u0072\u003e\u004d\u005f\u0047\u0062\u006f\u006f\u006b\u0020\u0076\u0031\u002e\u0035\u003c\u0062\u0072\u003e\u0412\u0441\u0435\u0020\u043f\u0440\u0430\u0432\u0430\u0020\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b\u002e\u003c\u0062\u0072\u003e\u042d\u043b\u002e\u0020\u043f\u043e\u0447\u0442\u0430\u003a\u0020\u0069\u006e\u0066\u006f\u0040\u006d\u0065\u0073\u0072\u006f\u0070\u002e\u0069\u006e\u0066\u006f\u003c\u0062\u0072\u003e\u0055\u0052\u004c\u003a\u0020\u003c\u0061\u0020\u0068\u0072\u0065\u0066\u003d\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u006d\u0065\u0073\u0072\u006f\u0070\u002e\u0069\u006e\u0066\u006f\u0022\u0020\u0074\u0061\u0072\u0067\u0065\u0074\u003d\u0022\u005f\u0062\u006c\u0061\u006e\u006b\u0022\u0020\u0073\u0074\u0079\u006c\u0065\u003d\u0022\u0074\u0065\u0078\u0074\u002d\u0064\u0065\u0063\u006f\u0072\u0061\u0074\u0069\u006f\u006e\u003a\u0020\u006e\u006f\u006e\u0065\u003b\u0020\u0063\u006f\u006c\u006f\u0072\u003a\u0027\u002b\u0063\u006f\u006c\u006f\u0072\u0031\u002b\u0027\u003b\u0022\u003e\u0077\u0077\u0077\u002e\u004d\u0065\u0073\u0072\u006f\u0070\u002e\u0069\u006e\u0066\u006f\u003c\u002f\u0061\u003e\u003c\u0062\u0072\u003e\u0049\u0043\u0051\u0023\u003a\u0020\u0033\u0030\u0032\u0030\u0034\u0039\u0034\u0034\u0030\u003c\u0062\u0072\u003e\u003c\u0062\u0072\u003e\u003c\u002f\u0064\u0069\u0076\u003e\u003c\u0061\u0020\u0020\u0068\u0072\u0065\u0066\u003d\u0022\u0023\u0061\u0075\u0074\u0068\u006f\u0072\u0022\u0020\u006f\u006e\u0063\u006c\u0069\u0063\u006b\u003d\u0022\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u003a\u0074\u006f\u0067\u0067\u006c\u0065\u004c\u0061\u0079\u0065\u0072\u0028\u005c\u0027\u0061\u0075\u0074\u0068\u006f\u0072\u005c\u0027\u0029\u003b\u0022\u0020\u0073\u0074\u0079\u006c\u0065\u003d\u0022\u0074\u0065\u0078\u0074\u002d\u0064\u0065\u0063\u006f\u0072\u0061\u0074\u0069\u006f\u006e\u003a\u0020\u006e\u006f\u006e\u0065\u003b\u0020\u0063\u006f\u006c\u006f\u0072\u003a\u0020\u0027\u002b\u0063\u006f\u006c\u006f\u0072\u0032\u002b\u0027\u003b\u0022\u0020\u0074\u0069\u0074\u006c\u0065\u003d\u0022\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0020\u0438\u043d\u0444\u043e\u0022\u003e\u0043\u006f\u0070\u0079\u0072\u0069\u0067\u0068\u0074\u0020\u0062\u0079\u0020\u004d\u0065\u0073\u0072\u006f\u0070\u002e\u0020\u0032\u0030\u0030\u0036\u003c\u002f\u0061\u003e\u0027\u003b\u007d\u000a\u000a\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0074\u006f\u0067\u0067\u006c\u0065\u004c\u0061\u0079\u0065\u0072\u0028\u0077\u0068\u0069\u0063\u0068\u004c\u0061\u0079\u0065\u0072\u0029\u000a\u007b\u000a\u0076\u0061\u0072\u0020\u0073\u0074\u0079\u006c\u0065\u0032\u0020\u003d\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0067\u0065\u0074\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0042\u0079\u0049\u0064\u0028\u0077\u0068\u0069\u0063\u0068\u004c\u0061\u0079\u0065\u0072\u0029\u002e\u0073\u0074\u0079\u006c\u0065\u003b\u000a\u0073\u0074\u0079\u006c\u0065\u0032\u002e\u0064\u0069\u0073\u0070\u006c\u0061\u0079\u0020\u003d\u0020\u0073\u0074\u0079\u006c\u0065\u0032\u002e\u0064\u0069\u0073\u0070\u006c\u0061\u0079\u003f\u0020\u0022\u0022\u003a\u0022\u0062\u006c\u006f\u0063\u006b\u0022\u003b\u000a\u007d\u000a\u000a\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u006f\u0070\u0065\u006e\u006c\u0061\u0079\u0065\u0072\u0028\u0077\u0068\u0069\u0063\u0068\u004c\u0061\u0079\u0065\u0072\u0029\u007b\u000a\u0076\u0061\u0072\u0020\u0073\u0074\u0079\u006c\u0065\u0032\u0020\u003d\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0067\u0065\u0074\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0042\u0079\u0049\u0064\u0028\u0077\u0068\u0069\u0063\u0068\u004c\u0061\u0079\u0065\u0072\u0029\u002e\u0073\u0074\u0079\u006c\u0065\u003b\u000a\u0073\u0074\u0079\u006c\u0065\u0032\u002e\u0064\u0069\u0073\u0070\u006c\u0061\u0079\u0020\u003d\u0020\u0022\u0062\u006c\u006f\u0063\u006b\u0022\u003b\u000a\u007d\u000a\u000a\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0063\u0068\u0065\u0063\u006b\u0028\u0029\u0020\u007b\u000a\u0067\u0065\u0074\u0063\u006f\u006e\u0074\u0028\u0029\u003b\u000a\u0069\u0066\u0020\u0028\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u006e\u0061\u006d\u0065\u002e\u0076\u0061\u006c\u0075\u0065\u003d\u003d\u0066\u0061\u006c\u0073\u0065\u0020\u007c\u007c\u0020\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0074\u0065\u0078\u0074\u002e\u0076\u0061\u006c\u0075\u0065\u003d\u003d\u0066\u0061\u006c\u0073\u0065\u0020\u007c\u007c\u0020\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0063\u0061\u0070\u0074\u0063\u0068\u0061\u002e\u0076\u0061\u006c\u0075\u0065\u003d\u003d\u0066\u0061\u006c\u0073\u0065\u0020\u0029\u007b\u000a\u0061\u006c\u0065\u0072\u0074\u0028\u0022\u041d\u0435\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b\u0020\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435\u0020\u043f\u043e\u043b\u044f\u0020\u0028\u002a\u0029\u0022\u0029\u003b\u000a\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u007d\u000a\u000a\u0069\u0066\u0020\u0028\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0074\u0065\u0078\u0074\u002e\u0076\u0061\u006c\u0075\u0065\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0020\u003c\u0020\u006d\u0069\u006e\u0063\u0068\u0061\u0072\u0073\u0029\u007b\u000a\u0061\u006c\u0065\u0072\u0074\u0028\u0022\u041c\u0438\u043d\u002e\u0020\u0447\u0438\u0441\u043b\u043e\u0020\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432\u0020\u0432\u0020\u0442\u0435\u043a\u0441\u0442\u0435\u003a\u0022\u002b\u006d\u0069\u006e\u0063\u0068\u0061\u0072\u0073\u0029\u003b\u000a\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u007d\u000a\u000a\u0069\u0066\u0020\u0028\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0074\u0065\u0078\u0074\u002e\u0076\u0061\u006c\u0075\u0065\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0020\u003e\u0020\u006d\u0061\u0078\u0063\u0068\u0061\u0072\u0073\u0029\u007b\u000a\u0061\u006c\u0065\u0072\u0074\u0028\u0022\u041c\u0438\u043d\u002e\u0020\u0447\u0438\u0441\u043b\u043e\u0020\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432\u0020\u0432\u0020\u0442\u0435\u043a\u0441\u0442\u0435\u003a\u0022\u002b\u006d\u0061\u0078\u0063\u0068\u0061\u0072\u0073\u0029\u003b\u000a\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u007d\u000a\u000a\u0069\u0066\u0028\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u006d\u0061\u0069\u006c\u002e\u0076\u0061\u006c\u0075\u0065\u0021\u003d\u0027\u0027\u0020\u0026\u0026\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u006d\u0061\u0069\u006c\u002e\u0076\u0061\u006c\u0075\u0065\u002e\u0069\u006e\u0064\u0065\u0078\u004f\u0066\u0028\u0027\u0040\u0027\u002c\u0020\u0030\u0029\u0020\u003d\u003d\u0020\u002d\u0031\u0029\u0020\u007b\u0020\u000a\u0061\u006c\u0065\u0072\u0074\u0028\u0022\u042d\u043b\u002e\u0020\u043f\u043e\u0447\u0442\u0430\u0020\u043d\u0435\u0020\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f\u0022\u0029\u003b\u000a\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u007d\u000a\u000a\u0069\u0066\u0020\u0028\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u006e\u0061\u006d\u0065\u002e\u0076\u0061\u006c\u0075\u0065\u0021\u003d\u0027\u0027\u0020\u0026\u0026\u0020\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0074\u0065\u0078\u0074\u002e\u0076\u0061\u006c\u0075\u0065\u0021\u003d\u0027\u0027\u0029\u0020\u007b\u000a\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0061\u0064\u0064\u002e\u0064\u0069\u0073\u0061\u0062\u006c\u0065\u0064\u003d\u0074\u0072\u0075\u0065\u002c\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0072\u0065\u0070\u006c\u0079\u0066\u006f\u0072\u006d\u002e\u0061\u0064\u0064\u002e\u0076\u0061\u006c\u0075\u0065\u003d\u0022\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u002e\u002e\u002e\u0022\u003b\u000a\u0020\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0074\u0072\u0075\u0065\u003b\u0020\u007d\u000a\u000a\u000a\u007d\u000a\u000a\u000a\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0077\u0069\u006e\u006f\u0070\u0065\u006e\u0028\u0075\u0072\u006c\u002c\u0020\u0077\u002c\u0020\u0068\u0029\u0020\u007b\u000a\u0020\u0020\u0077\u0069\u006e\u0064\u006f\u0077\u002e\u006f\u0070\u0065\u006e\u0028\u0075\u0072\u006c\u002c\u0020\u0027\u0027\u002c\u0020\u0027\u0073\u0063\u0072\u006f\u006c\u006c\u0062\u0061\u0072\u0073\u003d\u0079\u0065\u0073\u002c\u0077\u0069\u0064\u0074\u0068\u003d\u0027\u002b\u0077\u002b\u0027\u002c\u0068\u0065\u0069\u0067\u0068\u0074\u003d\u0027\u002b\u0068\u0029\u003b\u000a\u007d\u000a\u003c\u002f\u0073\u0063\u0072\u0069\u0070\u0074\u003e')</script>
<script language="JavaScript" type="text/JavaScript">

<? 

if ($praverka==TRUE) {echo "
	function conf(url, question, target) {
if (target=='self') {
if (confirm(question)==true) {document.location.href=url}
}
if (target=='popup') {
if (confirm(question)==true) {
winopen(url, '600', '400');}
}

	}
";}?>
</script>


<? echo "<body bgcolor=".$gbook_bg." alink=".$gbook_a."  link=".$gbook_a." vlink=".$gbook_a." style=\"font-family:Verdana;\" onload=\"getcont()\">".$style; ?>



<?  
if ($praverka==TRUE){
$adm_menu="<tr><td colspan=2 align=center bgcolor=".$gbook_bg_title." ><font  size=".$gbook_font_text."pt color=".$gbook_color_title.">
 Àäìèí. ìåíþ:  <a href=\"javascript:winopen('admin.php?do=ban', '600', '400');\" title=\"Çàêðûòü/Îòêðûòü IP Àäðåñà.\">Çàáàíåííûå IP Àäðåñà</a> | <a href=\"javascript:winopen('admin.php?do=config', '600', '400');\" title=\"Êîíôèãóðàöèÿ êíèãè\">Êîíôèãóðàöèÿ</a> | <a href=\"javascript:conf('admin.php?do=logout', 'Âû äåéñòâèòåëüíî õîòèòå âûéòè èç ïàíåëè àäìèíèñòðàòîðà?', 'self');\"  title=\"Âûõîä èç ïàíåëÿ Àäìèíèñòðàòîðà\">Âûõîä</a></font></td></tr>";
}
else {$adm_menu="";}

$start_table="<a name=\"addbox\"></a><table width=\"".$gbook_width."%\"  cellpadding=2 cellspacing=2  bordercolor=".$gbook_border." style='border: 1px solid;' align=center border=0>
<tr><td colspan=2 align=center bgcolor=".$gbook_bg_title." ><font  size=".$gbook_font_title."pt color=".$gbook_color_title."><a href=\"".$gbook_filename."\" style=\"text-decoration: none; color: ".$gbook_color_title.";\">".$gbook_title."</a></font><br><font  size=".$gbook_font_text."pt color=".$gbook_color_title.">Ãîñòåâàÿ êíèãà</font></td></tr>
".$adm_menu."
<tr><td colspan=2 align=center bgcolor=".$gbook_bg_title_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_title.">

   <a href=\"javascript:toggleLayer('add_table');\" title=\"Îòêðûòü ôîðìó äîáàâëåíèÿ çàïèñè\">Äîáàâèòü çàïèñü</a></font></td></tr>
<tr>
<td colspan=2 align=center width=50% ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">
<div id=\"add_table\"  class=\"unvis_div\">
<table  bgcolor=".$gbook_bg_text."  width=100% style=\"border: 1px solid;\" border=\"1\">
<form method=post name=\"replyform\" onsubmit=\"return check();\">
<tr><td  width=30% bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">Èìÿ*:</td><td><input type=text name=name value=\"".strip($_COOKIE["c_name"])."\"></td></tr>
<tr><td bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">Ýë. ïî÷òà:</td><td><input type=text name=mail value=\"".strip($_COOKIE["c_mail"])."\"></td></tr>
<tr><td bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">Âåá ñàéò:</td><td><input type=text name=\"site\" value=\"".strip($site_val)."\" ></td></tr>
<tr><td bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">ICQ:</td><td><input type=text name=\"icq\" value=\"".strip($_COOKIE["c_icq"])."\" ></td></tr>


<tr><td bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">Ïðîâåðêà*:</td><td>
<img src=\"captcha.php\" /><br>
<input type=text name=\"captcha\" size=8 ></td></tr>



<tr><td bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">Òåêñò*:</td><td>

".view_textarea ('replyform', 'text', '20', '5', '', $gbook_font_text, $gbook_color_text, $gbook_color_text)."
</td></tr>
<tr><td bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text."><input type=button
onclick=\"document.replyform.name.value='', document.replyform.mail.value='', document.replyform.site.value='http://', document.replyform.icq.value='', document.replyform.text.value='';\"
 value='Ñòåðåòü!'></td><td>
 <input type=Submit value='Äîáàâèòü!' name=\"add\" >
 </td></tr>
<input type=hidden name=\"date\" value=\"".date("d/m/y")." [".date("H:i:s")."] \">
</form></table>
</div></td></tr><tr><td colspan=\"2\">
";



if ($_GET['go_to_next']==TRUE){
$when_next="where ".$_GET['go_to_next'].">`id`";
}

else {$when_next="";}

$query="select * from m_gbook ".$when_next." order by id desc";
$result=mysql_query($query);
$num_results=mysql_num_rows($result);

if ($gbook_maxmess<$num_results) {
$num=$gbook_maxmess;

}
else {$num=$num_results;} 

$minus1=$gbook_maxmess-1;

for ($i=0; $i<$num; $i++){
$row=mysql_fetch_array($result);
	if ($i==$minus1) {
	$next=$row['id'];
	}
	
	if ($row['site']==TRUE and $row['site']!="http://") {
	$disp_site="<a href=\"".htmlspecialchars(stripslashes($row['site']))."\" target=\"_blank\"><img src=\"images/".$gbook_image_path."/homepage.gif\" border=\"0\" alt=\"Ñòðàíèöà\" title=\"".htmlspecialchars(stripslashes($row['site']))."\"></a>";
	}
	else {$disp_site="";}
	
	if ($row['mail']==TRUE) {
	$disp_mail="<a href=\"mailto:".htmlspecialchars(stripslashes($row['mail']))."\"><img src=\"images/".$gbook_image_path."/mail.gif\" border=\"0\" alt=\"Ýë. ïî÷òà\" title=\"".htmlspecialchars(stripslashes($row['mail']))."\"></a>";
	}
	else {$disp_mail="";}
	
if ($row['icq']==TRUE){
$disp_icq="<img src=\"images/".$gbook_image_path."/icq.gif\" alt=\"ICQ\" style=\"cursor: help;\" title=\"ICQ#: ".$row['icq']."\">";
}
else {$disp_icq="";}

// ADMIN FUNCS next

if ($praverka==TRUE){
$adm_funcs="<a href=\"javascript:winopen('admin.php?do=reply&id=".$row['id']."', '350', '300');\" onclick=\"openlayer('modify_".$row['id']."');\"><img src=\"images/".$gbook_image_path."/reply.gif\" border=\"0\" alt=\"Îòâåòèòü\" title=\"Îòâåò àäìèíà\"></a> <a href=\"javascript:winopen('admin.php?do=edit&id=".$row['id']."', '350', '300');\" onclick=\"openlayer('modify_".$row['id']."');\"><img src=\"images/".$gbook_image_path."/edit.gif\" border=\"0\" alt=\"Ðåäàêò.\" title=\"Ðåäàêòèðîâàòü çàïèñü\"></a> <a href=\"javascript:conf('admin.php?do=del&id=".$row['id']."', 'Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòîò çàïèñü?', 'self');\" ><img src=\"images/".$gbook_image_path."/del.gif\" border=\"0\" alt=\"Óäàëèòü\" title=\"Óäàëèòü çàïèñü\"></a> 
<a href=\"javascript:conf('admin.php?do=ban&ip=".$row['ip']."', 'Âû äåéñòâèòåëüíî õîòèòå çàêðûòü ýòîò IP?', 'popup');\" ><img src=\"images/".$gbook_image_path."/ip.gif\" border=\"0\" alt=\"Ip\" title=\"IP: ".$row['ip']." - Çàáàíèòü? \"></a> | ";
$modify="<div align=\"center\" id=\"modify_".$row['id']."\" style=\"display: none;	width: 100%;\" class=\"modify\"><a href=\"javascript:document.location.href='".$gbook_filename."';\" style=\"color: red;\">ÎÁÍÎÂËÅÍÈÅ</a></div>";
}
else {$adm_funcs="";$modify="";}

// 

// ADMIN FUNCS END
if ($row['reply']==TRUE) {

$disp_reply="<tr><td colspan=2 class=text bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text."><strong>Îòâåò <a href=\"mailto:".$adm_mail."\" style=\"color: #".$gbook_color_text."; text-decoration: none;\"> Àäìèíèñòðàòîðà</a></strong>:<br>".strip($row['reply'])."</font></td></tr>";
}
else {$disp_reply="";}
$posts=$posts."<table width=\"100%\" cellpadding=\"5\"  cellspacing=\"0\" border=0 style=\"border: 1px solid;\">
<tr><td  style=\"padding-left: 20px;\" align=\"left\"  width=50%  bgcolor=".$gbook_bg_title_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text."><a href=\"#addbox\"  title=\"Îòâåòèòü  ".htmlspecialchars(stripslashes($row['name']))."\" onclick=\"javascript:openlayer('add_table'); document.replyform.text.value='äëÿ: ".htmlspecialchars(stripslashes($row['name']))."';\">
<img src=\"images/".$gbook_image_path."/user.gif\" border=\"0\" alt=\"\" align=\"left\" >".htmlspecialchars(stripslashes($row['name']))."</a></font></td><td align=right  bgcolor=".$gbook_bg_title_text." >
<font  size=".$gbook_font_text."pt color=".$gbook_a.">".$adm_funcs."
<a href=\"#addbox\" onclick=\"javascript:openlayer('add_table'); document.replyform.text.value='äëÿ: ".htmlspecialchars(stripslashes($row['name']))." ';\"><img src=\"images/".$gbook_image_path."/reply.gif\" border=\"0\" alt=\"Îòâåòèòü\" title=\"Îòâåòèòü  ".htmlspecialchars(stripslashes($row['name']))."\"></a>
".$disp_site." ".$disp_mail." ".$disp_icq." <img src=\"images/".$gbook_image_path."/time.gif\" alt=\"Âðåìÿ\" style=\"cursor: help;\" title=\"Âðåìÿ:  ".htmlspecialchars(stripslashes($row['date']))."\"></font></td></tr>
<tr><td colspan=2 class=text bgcolor=".$gbook_bg_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_text.">".$modify." ".strip($row['text'])."</font></td></tr>
".$disp_reply."
</tr></table><div class=\"small_br\"><br></div>";


}

if ($gbook_maxmess<$num_results) {
$next_button=" <a href=\"?go_to_next=".$next."\"><img border=\"0\" src=\"images/".$gbook_image_path."/next.gif\" alt=\"Ñëåäóþùèå ".$gbook_maxmess."\" title=\"Ñëåäóþùèå ".$gbook_maxmess."\"></a> ";
}
else {$next_button="";}

if ($go_to_next==TRUE) {
$last_button=" <a href=\"javascript:history.back(1);\"><img border=\"0\" src=\"images/".$gbook_image_path."/prev.gif\" alt=\"Ïðåäûäóùèå ".$gbook_maxmess."\" title=\"Ïðåäûäóùèå ".$gbook_maxmess."\"></a> ";
}
	else {$last_button="";}

$end_table="<tr><td colspan=2 align=center  bgcolor=".$gbook_bg_title_text." ><font  size=".$gbook_font_text."pt color=".$gbook_color_title.">".$last_button.$next_button."</td></tr>

</td></tr><tr><td colspan=2 align=center  bgcolor=".$gbook_bg_title." ><font  size=".$gbook_font_text."pt color=".$gbook_color_title.">
<div id=\"copyright\">
<div id=\"author\" class=\"unvis_div\"><a name=\"author\"></a><br>M_Gbook v1.5<br>Âñå ïðàâà çàùèùåíû.<br>Ýë. ïî÷òà: hide@address.com<br>URL: <a href=\"http://www.mesrop.info\" target=\"_blank\" style=\"text-decoration: none; color: ".$gbook_color_title.";\">www.Mesrop.info</a><br>ICQ#: 302049440<br><br></div><a  href=\"#author\" onclick=\"javascript:toggleLayer('author');\" style=\"text-decoration: none; color: ".$gbook_color_title.";\" title=\"Ïîêàçàòü èíôî\">Copyright by Mesrop. 2006</a>
</div>
</font>
</td></tr></table>
";

$table=$start_table.$posts.$end_table;

if (!$act) { 
echo $table;}

include ('footer.php');
?>





 
</body>
</html>
Return current item: M_Gbook