Вход Регистрация
Файл: gb.php
Строк: 597
<?
session_start
();
include(
"header.php");

$sql=mysql_query("select*from ".$db_pref."sysvals");
$row1=mysql_fetch_array($sql);
// $langu_ad = $_COOKIE["langu_ad"];
$lang_admin=$row1["lang_admin"];
if(
$lang_admin=='ru'):
// $urlpage='Страница аккаунта';
$urlpage='Гостевая';
else:
$urlpage='Guest book';
endif;


require_once(
'recaptchalib.php');

// Get a key from http://recaptcha.net/api/getkey
//$publickey = "6LdfUggAAAAAALs1dGKKMOVT2MlGmF3epFIwHVen";
//$privatekey = "6LdfUggAAAAAAKemC0Ve1SEHw8zkXZtYjExthFGZ";
$publickey $publickeyrecap;
$privatekey $privatekeyrecap;

# the response from reCAPTCHA
$resp null;
# the error code from reCAPTCHA, if any
$error null;

# was there a reCAPTCHA response?
if ($_POST["recaptcha_response_field"]) {
        
$resp recaptcha_check_answer ($privatekey,
                                        
$_SERVER["REMOTE_ADDR"],
                                        
$_POST["recaptcha_challenge_field"],
                                        
$_POST["recaptcha_response_field"]);

        if (
$resp->is_valid) {
//                echo "Всё ОК";
$capca="YES";



        } else {
                
# set the error code so that we can display it
                
$error $resp->error;
 
//               echo "Ошибка!";
$capca="NO";
        }
}
//echo recaptcha_get_html($publickey, $error);
//$capca=$_POST["capca"];
//$capca="123456";
$page=$_GET["page"];
$name=mysql_escape_string($_POST["name"]);
$email=mysql_escape_string($_POST["email"]);
$message=mysql_escape_string($_POST["message"]);
$messages=mysql_escape_string($_POST["messages"]);
$user_email=$userdata['email'];
$gb_17=$lang['gb17'];
$gb18=$lang['gb18'];
$gb19=$lang['gb19'];
$gb20=$lang['gb20'];
$gb21=$lang['gb21'];
$gb22=$lang['gb22'];
$gb23=$lang['gb23'];
function 
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email) {
require (
"inc/connect.inc.php");
$sql=mysql_query("select*from ".$db_pref."sysvals");
$row1=mysql_fetch_array($sql);
$publickeyrecap=$row1['publickey'];
$privatekeyrecap=$row1['privatekey'];

$publickey $publickeyrecap;
$privatekey $privatekeyrecap;


$form1form1;
$formform;
$moduletable=  moduletable;
$moduletablehilite3=  moduletablehilite3;
$moduletablehilite2=  moduletablehilite2;


?>
<form method="post" action="gb.php" id="body">
<link rel="stylesheet" type="text/css" href="css/StyleBBCode.css">
<br>

<table class="form" width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td colspan="2" align="center"><b><i><h2><?=$gb_17;?></h2></i></b><br></td>
</tr>

<?

?>

<tr>
<td align="left"><?=$gb18;?> :</td>

<?if(($user==null) || ($user_email==null)){?>
<td align="left"><input class="form6" TYPE="text" NAME="name" maxlength="10" value="<?=$name;?>" ></td>
<?}else{?>
<td align="left"><input class="form6" TYPE="text" maxlength="10" disabled value="<?=$user;?>" ></td>
<input type="hidden" name="name" value="<?=$user;?>" />


<?}?>
</tr>
<tr>
<td align="left">E-mail:</td>

<?if(($user==null) || ($user_email==null)){?>

<td align="left"><input class="form6" TYPE="text" NAME="email" size="40" maxlength="30" value="<?=$email;?>"></td>
<?}else{?>

<td align="left"><input class="form6" TYPE="text" size="40" maxlength="30" disabled value="<?=$user_email;?>"></td>
<input type="hidden" name="email" value="<?=$user_email;?>" />
<?}?>
</tr>
<?
$sql_bb_code
=mysql_query("select*from ".$db_pref."sysvals where bb_code='YES'");
$row_bb_code=mysql_fetch_array($sql_bb_code);
if(
$row_bb_code>0):
?>
<tr>
<td align="left"><?=$gb23;?> :</td>
<td align="left">
<?
require_once 'inc/bbcode.inc.php';
?>
</td>
</tr>
<?
endif;
?>
<tr>
<td align="left"><?=$gb19;?> :</td>
<td align="left"><textarea class="form6" cols="58" rows="11" wrap="hard" name="message" ><?=$message;?></textarea></td>
</tr>
<tr>
<td align="left"><?=$gb20;?> :</td>
<td align="left">
<?if(($user==null) || ($user_email==null)){
echo 
recaptcha_get_html($publickey$error);
}

else{
  
?>


<img src="turimg.php">&nbsp;<input class="form6" TYPE="text" NAME="code" maxlength="4" size="6">
<?
}

?>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input class="button" type="submit" name="messages" value=".:: <?=$gb21;?> ::.">&nbsp;<input class="button" type="reset" value=".:: <?=$gb22;?> ::.">
</td>
</tr>

</table>
</form>
    <a name="nap"></a>
<?
    
}


if(isset(
$page)):
$sqlgbactiveno=mysql_query("select*from ".$db_pref."sysvals where gb_active='NO'");
$rowgbactiveno=mysql_fetch_array($sqlgbactiveno);
if(
$rowgbactiveno>0):
?>
<table class="form" width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><i><b><?=$lang['error6'];?></b></i></td>
</tr>
<tr>
<td align="center"><font color="red"><?=$lang['gb26'];?></font></td>
</tr>
</table>
<?
echo "<script language='Javascript'>function reload() {location = "index.php"}; setTimeout('reload()', 3000);</script>";
else:
?>

<div align="center">
<div class="s5_mod_h3_l">
        <div class="s5_mod_h3_r">
        <div class="s5_mod_h3_m">
        <h3 class="s5_mod_h3"><span class="s5_h3_first">
      <?=$lang['gb'];?>

        </span></h3>
        </div>
        </div>
        </div>
        </div>
      
      

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><a href="gb.php?page=0"><?=$lang['gb1'];?></a>&nbsp;|&nbsp;<a href="gb.php?page#nap"><?=$lang['gb2'];?></a></td>
</tr></table>
<?
$sql
=mysql_query("select*from ".$db_pref."gb");
$zapis=mysql_num_rows($sql);
if(
$zapis==0):
?>


<div align="center"><font color="red"><?=$lang['gb3'];?></font></div>
<?
endif;
$sql3=mysql_query("select*from ".$db_pref."sysvals");
$row3=mysql_fetch_array($sql3);
$limit=$row3['gb_records'];
$result=mysql_query("SELECT count(*) from ".$db_pref."gb");
$row=mysql_fetch_row($result);
$numrows=$row['0'];
if (empty(
$_GET['page'])) $page=0;





$sql "SELECT * from ".$db_pref."gb ORDER BY id desc LIMIT ".intval($page).",$limit";
$result mysql_query($sql) or die(mysql_error());
while(
$row=mysql_fetch_array($result)) {
$id=$row['id'];
$names=$row['name'];
$emails=$row['email'];
$messages=$row['message'];
$date=$row['date'];
$admin_date=$row['admin_date'];
$admin_text=$row['admin_text'];
$sql_bb_code=mysql_query("select*from ".$db_pref."sysvals where bb_code='YES'");
$row_bb_code=mysql_fetch_array($sql_bb_code);
if(
$row_bb_code>'0'):

$tags_smilie = array(
"/:angry:/siU",
"/:blink:/siU",
"/:blush:/siU",
"/:canthearyou:/siU",
"/:confused:/siU",
"/:cool:/siU",
"/:crazyfun:/siU",
"/:crazy:/siU",
"/:cry:/siU",
"/:disappointed:/siU",
"/:dontcare:/siU",
"/:dontknow:/siU",
"/:flag:/siU",
"/:flirt:/siU",
"/:funny:/siU",
"/:glasses:/siU",
"/:happy:/siU",
"/:hobo:/siU",
"/:huh:/siU",
"/:idea:/siU",
"/:insane:/siU",
"/:jumping:/siU",
"/:lol:/siU",
"/:love:/siU",
"/:mad:/siU",
"/:music:/siU",
"/:mybb:/siU",
"/:neutral:/siU",
"/:no:/siU",
"/:nope:/siU",
"/:offtop:/siU",
"/:playful:/siU",
"/:question:/siU",
"/:rain:/siU",
"/:rofl:/siU",
"/:rolleyes:/siU",
"/:sad:/siU",
"/:sceptic:/siU",
"/:shine:/siU",
"/:shock:/siU",
"/:sick:/siU",
"/:smile:/siU",
"/:smoke:/siU",
"/:stupor:/siU",
"/:surprise:/siU",
"/:suspicious:/siU",
"/:tired:/siU",
"/:tomato:/siU",
"/:tongue:/siU",
"/:unsure:/siU",
"/:wacko:/siU",
"/:whistle:/siU",
"/:wink:/siU",
"/:writing:/siU",
"/:yep:/siU"
);

$html_smilie = array(
"<img src=images/smilies/angry.gif width=20 height=18 border=0>",
"<img src=images/smilies/blink.gif width=19 height=20 border=0>",
"<img src=images/smilies/blush.gif width=21 height=21 border=0>",
"<img src=images/smilies/canthearyou.gif width=35 height=18 border=0>",
"<img src=images/smilies/confused.gif width=20 height=18 border=0>",
"<img src=images/smilies/cool.gif width=62 height=21 border=0>",
"<img src=images/smilies/crazyfun.gif width=19 height=17 border=0>",
"<img src=images/smilies/crazy.gif width=21 height=17 border=0>",
"<img src=images/smilies/cry.gif width=21 height=18 border=0>",
"<img src=images/smilies/disappointed.gif width=19 height=16 border=0>",
"<img src=images/smilies/dontcare.gif width=19 height=17 border=0>",
"<img src=images/smilies/dontknow.gif width=31 height=20 border=0>",
"<img src=images/smilies/flag.gif width=27 height=28 border=0>",
"<img src=images/smilies/flirt.gif width=19 height=20 border=0>",
"<img src=images/smilies/funny.gif width=19 height=16 border=0>",
"<img src=images/smilies/glasses.gif width=21 height=17 border=0>",
"<img src=images/smilies/happy.gif width=19 height=17 border=0>",
"<img src=images/smilies/hobo.gif width=21 height=21 border=0>",
"<img src=images/smilies/huh.gif width=19 height=20 border=0>",
"<img src=images/smilies/idea.gif width=35 height=31 border=0>",
"<img src=images/smilies/insane.gif width=21 height=16 border=0>",
"<img src=images/smilies/jumping.gif width=46 height=33 border=0>",
"<img src=images/smilies/lol.gif width=19 height=17 border=0>",
"<img src=images/smilies/love.gif width=21 height=30 border=0>",
"<img src=images/smilies/mad.gif width=21 height=18 border=0>",
"<img src=images/smilies/music.gif width=30 height=21 border=0>",
"<img src=images/smilies/mybb.gif width=50 height=26 border=0>",
"<img src=images/smilies/neutral.gif width=19 height=17 border=0>",
"<img src=images/smilies/no.gif width=20 height=18 border=0>",
"<img src=images/smilies/nope.gif width=20 height=18 border=0>",
"<img src=images/smilies/offtop.gif width=50 height=40 border=0>",
"<img src=images/smilies/playful.gif width=19 height=20 border=0>",
"<img src=images/smilies/question.gif width=27 height=19 border=0>",
"<img src=images/smilies/rain.gif width=32 height=35 border=0>",
"<img src=images/smilies/rofl.gif width=30 height=20 border=0>",
"<img src=images/smilies/rolleyes.gif width=19 height=17 border=0>",
"<img src=images/smilies/sad.gif width=19 height=20 border=0>",
"<img src=images/smilies/sceptic.gif width=19 height=17 border=0>",
"<img src=images/smilies/shine.gif width=21 height=16 border=0>",
"<img src=images/smilies/shock.gif width=21 height=21 border=0>",
"<img src=images/smilies/sick.gif width=40 height=20 border=0>",
"<img src=images/smilies/smile.gif width=19 height=20 border=0>",
"<img src=images/smilies/smoke.gif width=21 height=21 border=0>",
"<img src=images/smilies/stupor.gif width=21 height=17 border=0>",
"<img src=images/smilies/surprise.gif width=28 height=25 border=0>",
"<img src=images/smilies/suspicious.gif width=19 height=19 border=0>",
"<img src=images/smilies/tired.gif width=43 height=20 border=0>",
"<img src=images/smilies/tomato.gif width=51 height=45 border=0>",
"<img src=images/smilies/tongue.gif width=20 height=18 border=0>",
"<img src=images/smilies/unsure.gif width=19 height=20 border=0>",
"<img src=images/smilies/wacko.gif width=20 height=18 border=0>",
"<img src=images/smilies/whistle.gif width=32 height=16 border=0>",
"<img src=images/smilies/wink.gif width=19 height=20 border=0>",
"<img src=images/smilies/writing.gif width=22 height=24 border=0>",
"<img src=images/smilies/yep.gif width=19 height=18 border=0>"
);

$messages=preg_replace($tags_smilie$html_smilie$messages);

$tags_text = array(
"/[font=(.*)](.*)[/font]/siU",
"/[size=(8|10|12|14|16|18|20)](.*)[/size]/siU",
"/[b](.*)[/b]/siU",
"/[i](.*)[/i]/siU",
"/[u](.*)[/u]/siU",
"/[s](.*)[/s]/siU",
"/[left](.*)[/left]/siU",
"/[center](.*)[/center]/siU",
"/[right](.*)[/right]/siU",
"/[url=(.*)](.*)[/url]/siU",
"/[email](.*)[/email]/siU",
"/[img](.*)[/img]/siU",
"/[quote](.*)[/quote]/siU",
"/[quote=(.*)](.*)[/quote]/siU",
"/[color=(.*)](.*)[/color]/siU"
);

$html_text = array(
"<span style='font-family:\1'>\2</span>",
"<span style='font-size:\1px'>\2</span>",
"<strong>\1</strong>",
"<i>\1</i>",
"<u>\1</u>",
"<s>\1</s>",
"<div align='left'>\1</div>",
"<div align='center'>\1</div>",
"<div align='right'>\1</div>",
"<a href='\1' target='_blank'>\2</a>",
"<a href='mailto:\1'>\1</a>",
"<table border='0' align='center' width='100%' cellpadding='4' cellspacing='0'><tr><td><span style='font-size: 11px'><b>Прикрепленное изображение:</b></span></td></tr><tr><td align='center' bgcolor='#000000' style='border: #C0C0C0 1px solid;'><a href="\1" target="_blank"><img src="\1"></a></td></tr></table>",
"<table border='0' align='center' width='95%' cellpadding='4' cellspacing='0'><tr><td><span style='font-size: 11px'><b>Цитата:</b></span></td></tr><tr><td bgcolor='#000000' style='border: #C0C0C0 1px solid;'>\1</td></tr></table>",
"<table border='0' align='center' width='95%' cellpadding='4' cellspacing='0'><tr><td><span style='font-size: 11px'><b>Писал(а):&nbsp;\1</b></span></td></tr><tr><td bgcolor='#000000' style='border: #C0C0C0 1px solid;'>\2</td></tr></table>",
"<font color='\1'>\2</font>"
);
$messages=preg_replace($tags_text$html_text$messages);
endif;
?>

<TABLE width=95% align=center cellPadding=0 cellSpacing=0><TBODY>
<TR><TD width='1%'><IMG src='images/1.png' width=14 height=14 border=0></TD><TD width='96%' background='images/5.png'></TD><TD width='1%'><IMG src='images/3.png' width=14 height=14 border=0></TD></TR>
<TR><TD background='images/4.png'></TD>
<TD background='images/10.png'>


<div align="center"><b><a href="mailto:<?=$emails;?>"><?=$names;?></a>&nbsp;<small><?=$date;?></small></b>&nbsp;<a href='javascript:' onclick="quote('<?=$names;?>');"><img src="images/buttons/to_quote.png" width="18" height="13" border="0" title="<?=$lang['gb25'];?>"></a></div>
<div class="accent"><div class="accent-left"></div><div class="accent-right"></div></div>
<div align="left"><?=$messages;?></div>


<?
$ulength
=strlen($admin_text);
if (
$ulength>'0'):
$sql_bb_code=mysql_query("select*from ".$db_pref."sysvals where bb_code='YES'");
$row_bb_code=mysql_fetch_array($sql_bb_code);
if(
$row_bb_code>'0'):

$admin_tags_smilie = array(
"/:angry:/siU",
"/:blink:/siU",
"/:blush:/siU",
"/:canthearyou:/siU",
"/:confused:/siU",
"/:cool:/siU",
"/:crazyfun:/siU",
"/:crazy:/siU",
"/:cry:/siU",
"/:disappointed:/siU",
"/:dontcare:/siU",
"/:dontknow:/siU",
"/:flag:/siU",
"/:flirt:/siU",
"/:funny:/siU",
"/:glasses:/siU",
"/:happy:/siU",
"/:hobo:/siU",
"/:huh:/siU",
"/:idea:/siU",
"/:insane:/siU",
"/:jumping:/siU",
"/:lol:/siU",
"/:love:/siU",
"/:mad:/siU",
"/:music:/siU",
"/:mybb:/siU",
"/:neutral:/siU",
"/:no:/siU",
"/:nope:/siU",
"/:offtop:/siU",
"/:playful:/siU",
"/:question:/siU",
"/:rain:/siU",
"/:rofl:/siU",
"/:rolleyes:/siU",
"/:sad:/siU",
"/:sceptic:/siU",
"/:shine:/siU",
"/:shock:/siU",
"/:sick:/siU",
"/:smile:/siU",
"/:smoke:/siU",
"/:stupor:/siU",
"/:surprise:/siU",
"/:suspicious:/siU",
"/:tired:/siU",
"/:tomato:/siU",
"/:tongue:/siU",
"/:unsure:/siU",
"/:wacko:/siU",
"/:whistle:/siU",
"/:wink:/siU",
"/:writing:/siU",
"/:yep:/siU"
);

$admin_html_smilie = array(
"<img src=images/smilies/angry.gif width=20 height=18 border=0>",
"<img src=images/smilies/blink.gif width=19 height=20 border=0>",
"<img src=images/smilies/blush.gif width=21 height=21 border=0>",
"<img src=images/smilies/canthearyou.gif width=35 height=18 border=0>",
"<img src=images/smilies/confused.gif width=20 height=18 border=0>",
"<img src=images/smilies/cool.gif width=62 height=21 border=0>",
"<img src=images/smilies/crazyfun.gif width=19 height=17 border=0>",
"<img src=images/smilies/crazy.gif width=21 height=17 border=0>",
"<img src=images/smilies/cry.gif width=21 height=18 border=0>",
"<img src=images/smilies/disappointed.gif width=19 height=16 border=0>",
"<img src=images/smilies/dontcare.gif width=19 height=17 border=0>",
"<img src=images/smilies/dontknow.gif width=31 height=20 border=0>",
"<img src=images/smilies/flag.gif width=27 height=28 border=0>",
"<img src=images/smilies/flirt.gif width=19 height=20 border=0>",
"<img src=images/smilies/funny.gif width=19 height=16 border=0>",
"<img src=images/smilies/glasses.gif width=21 height=17 border=0>",
"<img src=images/smilies/happy.gif width=19 height=17 border=0>",
"<img src=images/smilies/hobo.gif width=21 height=21 border=0>",
"<img src=images/smilies/huh.gif width=19 height=20 border=0>",
"<img src=images/smilies/idea.gif width=35 height=31 border=0>",
"<img src=images/smilies/insane.gif width=21 height=16 border=0>",
"<img src=images/smilies/jumping.gif width=46 height=33 border=0>",
"<img src=images/smilies/lol.gif width=19 height=17 border=0>",
"<img src=images/smilies/love.gif width=21 height=30 border=0>",
"<img src=images/smilies/mad.gif width=21 height=18 border=0>",
"<img src=images/smilies/music.gif width=30 height=21 border=0>",
"<img src=images/smilies/mybb.gif width=50 height=26 border=0>",
"<img src=images/smilies/neutral.gif width=19 height=17 border=0>",
"<img src=images/smilies/no.gif width=20 height=18 border=0>",
"<img src=images/smilies/nope.gif width=20 height=18 border=0>",
"<img src=images/smilies/offtop.gif width=50 height=40 border=0>",
"<img src=images/smilies/playful.gif width=19 height=20 border=0>",
"<img src=images/smilies/question.gif width=27 height=19 border=0>",
"<img src=images/smilies/rain.gif width=32 height=35 border=0>",
"<img src=images/smilies/rofl.gif width=30 height=20 border=0>",
"<img src=images/smilies/rolleyes.gif width=19 height=17 border=0>",
"<img src=images/smilies/sad.gif width=19 height=20 border=0>",
"<img src=images/smilies/sceptic.gif width=19 height=17 border=0>",
"<img src=images/smilies/shine.gif width=21 height=16 border=0>",
"<img src=images/smilies/shock.gif width=21 height=21 border=0>",
"<img src=images/smilies/sick.gif width=40 height=20 border=0>",
"<img src=images/smilies/smile.gif width=19 height=20 border=0>",
"<img src=images/smilies/smoke.gif width=21 height=21 border=0>",
"<img src=images/smilies/stupor.gif width=21 height=17 border=0>",
"<img src=images/smilies/surprise.gif width=28 height=25 border=0>",
"<img src=images/smilies/suspicious.gif width=19 height=19 border=0>",
"<img src=images/smilies/tired.gif width=43 height=20 border=0>",
"<img src=images/smilies/tomato.gif width=51 height=45 border=0>",
"<img src=images/smilies/tongue.gif width=20 height=18 border=0>",
"<img src=images/smilies/unsure.gif width=19 height=20 border=0>",
"<img src=images/smilies/wacko.gif width=20 height=18 border=0>",
"<img src=images/smilies/whistle.gif width=32 height=16 border=0>",
"<img src=images/smilies/wink.gif width=19 height=20 border=0>",
"<img src=images/smilies/writing.gif width=22 height=24 border=0>",
"<img src=images/smilies/yep.gif width=19 height=18 border=0>"
);

$admin_text=preg_replace($admin_tags_smilie$admin_html_smilie$admin_text);

$admin_tags = array(
"/[font=(.*)](.*)[/font]/siU",
"/[size=(8|10|12|14|16|18|20)](.*)[/size]/siU",
"/[b](.*)[/b]/siU",
"/[i](.*)[/i]/siU",
"/[u](.*)[/u]/siU",
"/[s](.*)[/s]/siU",
"/[left](.*)[/left]/siU",
"/[center](.*)[/center]/siU",
"/[right](.*)[/right]/siU",
"/[url=(.*)](.*)[/url]/siU",
"/[email](.*)[/email]/siU",
"/[img](.*)[/img]/siU",
"/[quote](.*)[/quote]/siU",
"/[quote=(.*)](.*)[/quote]/siU",
"/[color=(.*)](.*)[/color]/siU"
);

$admin_html = array(
"<span style='font-family:\1'>\2</span>",
"<span style='font-size:\1px'>\2</span>",
"<strong>\1</strong>",
"<i>\1</i>",
"<u>\1</u>",
"<s>\1</s>",
"<div align='left'>\1</div>",
"<div align='center'>\1</div>",
"<div align='right'>\1</div>",
"<a href='\1' target='_blank'>\2</a>",
"<a href='mailto:\1'>\1</a>",
"<table border='0' align='center' width='100%' cellpadding='4' cellspacing='0'><tr><td><span style='font-size: 11px'><b>Прикрепленное изображение:</b></span></td></tr><tr><td align='center' bgcolor='#000000' style='border: #C0C0C0 1px solid;'><a href="\1" target="_blank"><img src="\1"></a></td></tr></table>",
"<table border='0' align='center' width='95%' cellpadding='4' cellspacing='0'><tr><td><span style='font-size: 11px'><b>Цитата:</b></span></td></tr><tr><td bgcolor='#000000' style='border: #C0C0C0 1px solid;'>\1</td></tr></table>",
"<table border='0' align='center' width='95%' cellpadding='4' cellspacing='0'><tr><td><span style='font-size: 11px'><b>Писал(а):&nbsp;\1</b></span></td></tr><tr><td bgcolor='#000000' style='border: #C0C0C0 1px solid;'>\2</td></tr></table>",
"<font color='\1'>\2</font>"
);

$admin_text=preg_replace($admin_tags$admin_html$admin_text);
endif;
?>
<div align="left"><b><font color="gren"><?=$lang['gb4'];?></font>&nbsp;<small><?=$admin_date;?></small></b>&nbsp;<a href='javascript:' onclick="quote('admin');"><img src="images/buttons/to_quote.png" width="18" height="13" border="0" title="<?=$lang['gb24'];?>"></a></div>

<div align="left" class="form"><?=$admin_text;?></div>

<?
endif;
?>
</TD>
<TD background='images/6.png'>&nbsp;</TD>
</TR><TR><TD><IMG src='images/8.png' width=14 height=14 border=0></TD><TD background='images/2.png'></TD><TD><IMG src='images/9.png' width=14 height=14 border=0></TD></TR>
</TBODY></TABLE>
<br>
<?
}
$sqluser=mysql_query("select*from ".$db_pref."gb");
$rowuser=mysql_fetch_array($sqluser);
$sqlrecords=mysql_query("select*from ".$db_pref."sysvals");
$rowrecords=mysql_fetch_array($sqlrecords);
$limitrecords=$rowrecords['user_records'];
$gb5=$lang['gb5'];
$gb16=$lang['gb16'];
if (
$rowuser>$limitrecords):
echo 
'<table width=100% border=0 align=center cellpadding=0 cellspacing=0><tr><td class=tabletext><span style=float:left>'.$gb5.' ';
$pages=ceil($numrows/$limit);
for (
$i=1;$i<=$pages;$i++) {
$newoffset=$limit*($i-1);
if (
$page ==$newoffset)  {
print 
''.($i).' ';
}
else {
echo 
'<a href="gb.php?page='.($newoffset).'">'.($i).'</a> ';
}
}
echo 
"</span><span style=float:right><a href=javascript:window.scroll(0,0);><img src=images/buttons/up.png width=33 height=15 border=0 title='$gb16' alt='$gb16'></a></span></td></tr></table>";
endif;
?>


<br><?
mess_form
($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
endif;
elseif(isset(
$messages)):
$gb15=$lang['gb15'];
$ulength=strlen($name);
if ((
$ulength<'5') || ($ulength>'10')):
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb6'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
else:
$sqlad=mysql_query("select*from ".$db_pref."users where id='1'");
$rowad=mysql_fetch_array($sqlad);
$admin=$rowad['user'];
$lang['gb7']=str_replace("{name}",$name,$lang['gd7']);

if (((
$admin!==$user)) and (($name=='Админ') || ($name=='АДМИН') || ($name=='админ') || ($name=='Admin') || ($name=='ADMIN') || ($name=='admin')) ):
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb7'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);

else:
if ((
$admin!==$user) and($name=="$admin")):
$lang['gb8']=str_replace("{admin}",$admin,$lang['gd8']);
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb8'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
else:
$ulength=strlen($email);
if ((
$ulength<'10') || ($ulength>'30')):
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb9'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
else:
$ulength=strlen($message);
if ((
$ulength<'10') || ($ulength>'500')):
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb10'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
else:

if(((
$user!==null) and strtolower($_POST['code'])!= strtolower($_SESSION['texto']))):
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb11'];?></font></td>
</tr>
</table>
<br>
 <?
mess_form
($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
else:
if( (
$user==null) and ($capca!= "YES")):
?>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb11'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);
else:
if (
eregi("^[a-z0-9_]+([-_.]?[a-z0-9_])+@[a-z0-9]+([-_.]?[a-z0-9])+.[a-z]{2,4}"$email)):
$date=date("d.m.Y/H:i:s");
mysql_query("insert into ".$db_pref."gb values (null, '$name', '$email', '$message', '$date', '', '');");
?>
<table class="form" width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center" ><?=$lang['gb12'];?></td>
</tr>
<tr>
<td align="center"><font color="green"><?=$lang['gb13'];?></font></td>
</tr>
</table>
<?
echo "<script language='Javascript'>function reload() {location = "gb.php?page=0"}; setTimeout('reload()', 3000);</script>";
?>
<?
else:
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb14'];?></font></td>
</tr>
</table>
<br>
<?
echo "<center><b><a href="javascript:history.back(1)">$gb15</a></b></center>";
mess_form($gb_17,$gb18,$gb19,$gb20,$gb21,$gb22,$gb23,$name,$email,$message,$user,$user_email);

endif;endif;endif;endif;endif;endif;endif;endif;
endif;
?>
<?
include("footer.php");?>
Онлайн: 0
Реклама