You can`t access this file..."); } global $attach_sig; if(empty($wcpsval['path_avatar'])){$otn_path="$portal_subdir/images/avatar";} else {$otn_path=$wcpsval['path_avatar'];} if(!empty($wcpsval['max_symbol_name']) && is_numeric($wcpsval['max_symbol_name'])){$max_symbol_name=$wcpsval['max_symbol_name'];} else {$max_symbol_name=75;} if(!empty($wcpsval['max_symbol_slovo']) && is_numeric($wcpsval['max_symbol_slovo'])){$max_symbol_slovo=$wcpsval['max_symbol_slovo'];} else {$max_symbol_slovo=75;} include($portal_root."/inc/bbcode.php"); function eishowform($eigbvar1, $eigbvar2, $eigbvar3, $eigbvar4, $snames){ global $portal_subdir,$wcpsval; if($_SESSION['auth']==1){ #$eigbvar1=$user_fio; $disabled[0]="readonly"; $disabled[1]="readonly"; if($eigbvar3!="" and $eigbvar3!="http://"){ $disabled[2]="readonly"; } else $disabled[2]=null; } else{ $disabled="";$disabled[0]=null;$disabled[1]=null;$disabled[2]=null; } $eigbvar3=($eigbvar3)?preg_replace("/[^\w\/\-\_\.\:]/", "",$eigbvar3):''; echo BBJavaScript("form",'eigbtext'); echo "
"._YUONAME_.": *
"._YOUMAIL_.":
"._YOUURL_.":
"._YOUTEXT_.": *
";// # Вывод картинок нежелателен echo '
'.BBButton(1,"").'
'. BBSmailes(1).'
'; if ($_SESSION['auth']){ echo '
'._NASTROYKI_.' '._ADD_PODPIS_.'
';} echo "
".view_vote_keys()."
\n"; } print "

$module_name - "._GUESTBOOKADD_."

"._GUESTBOOKVIEW_."

"; if(empty($_POST['eigbmode'])){ if($_SESSION['auth']==1){ eishowform($_SESSION['user_fio'],$_SESSION['user_mail'],$_SESSION['user_url'],"", $_SESSION['sname']); } else{ eishowform("","","","",""); } } elseif ($my_http && !empty($_POST['eigbmode'])){ $eierr=""; if($_SESSION['auth']==1){ $gb_name=$_SESSION['user_fio']; $gb_mail=$_SESSION['user_mail']; $gb_url=preg_replace("/[^\w\/\-\_\.\:]/", "",$_SESSION['user_url']); } else{ $gb_name=(empty($_POST['eigbname']))?null:$_POST['eigbname']; $gb_mail=(empty($_POST['eigbmail']))?null:$_POST['eigbmail']; $gb_url=(empty($_POST['eigburl']))?null:$_POST['eigburl']; } $eigbtext=(empty($_POST['eigbtext']))?null:$_POST['eigbtext']; $result = MYSQL_QUERY("SELECT * FROM ".$wcpref."user WHERE user_login = '$_SESSION[sname]'"); $row = (MYSQL_NUM_ROWS($result))?MYSQL_FETCH_ARRAY($result):array('user_current12'=>''); #$gb_name=preg_replace("/(\w+)|(\W+)/siU", "\\1", $gb_name); #$gb_name=anti_mat($gb_name); $gb_name=ereg_replace(" +"," ",$gb_name); $gb_mail=ereg_replace(" +","",$gb_mail); $gb_url=ereg_replace(" +","",$gb_url); if(!$gb_name || strlen($gb_name)>$max_symbol_name || strlen($gb_name)<4){ print '
'._ERRORNAME_.' "'._YUONAME_.'"!
'; $eierr.="
"._ERRORNAME_.' '._YUONAME_." ".__LINE__.""; } if($gb_mail){ if(!test_mail($gb_mail)){ print 'div class=errorMsg>'._ERRORMAIL_.''; $eierr.="
". _ERRORMAIL_." ".__LINE__.""; } } if ( empty($eigbtext) ){ print '
'._ERRORTEXT_.'
'; $eierr.="
"._ERRORTEXT_." ".__LINE__.""; } elseif ( strlen($eigbtext)<5 ){ print '
'._ERRORTEXT_.'
'; $eierr.="
"._ERRORTEXT_." ".__LINE__.""; } else { $eigbtext=ereg_replace(" +"," ",$eigbtext); $array_text=explode(" ",$eigbtext); while(list($key, $val) = each($array_text)) { if ( strlen($val)>$max_symbol_slovo ){ print '
'._ERRORTEXT_.'
'; $eierr.="
"._ERRORTEXT_." ".__LINE__.""; break; } } } if($eierr=="" && empty($_POST['preview'])){ $flood=anti_flood($sname, $portal_flood); if($flood==1){ $eierr.="
"._FLOOD_." ".__LINE__.""; print "
"._FLOOD_.' ['.$portal_flood.']

'; } } // тест на IP и HOSTBYADDR $mip = explode('.',$GLOBALS['ip']); $remote = gethostbyaddr($GLOBALS['ip']); $remotes = explode('.',$remote); $num_remote=count($remotes); $num_a=$num_remote-1; $num_b=($num_remote>2)?($num_remote-2):0; $num_c=($num_remote>3)?($num_remote-3):0; $query="SELECT e_nar,e_predupr,e_pr FROM ".$wcpref."error_log WHERE e_ip='$ip' OR e_ip='$mip[0].*.*.*' OR e_ip='$mip[0].$mip[1].*.*' OR e_ip='$mip[0].$mip[1].$mip[2].*'"; if (!is_numeric($remotes[$num_a])){$query.=" OR e_ip='$remotes[$num_a].$remotes[$num_b].$remotes[$num_c].*' OR e_ip='$remotes[$num_a].$remotes[$num_b].*.*'"; } else { if (!empty($wcpsval['g_ipanonim_on']))$eierr.="
"._ERRORANONIM_." ".__LINE__.""; } if (empty($wcpsval['g_hostbyaddr_on'])){ if(!$result=MYSQL_QUERY($query)) WCInfoView(7,mysql_error(),__FILE__." ".__LINE__); if(MYSQL_NUM_ROWS($result)){$eierr.="
"._ERRORBAN_." ".__LINE__."";$ip_ban=1;} } $eigbtext=str_uncheck($eigbtext); if (!empty($wcpsval['g_antispam_on']) && preg_match("#'._ERRORSPAMER_.''; $eierr.="
"._ERRORSPAMER_." ".__LINE__.""; if(!$_SESSION['auth'] && empty($ip_ban)){ MYSQL_QUERY("insert into ".$wcpref."error_log values ('$ip', 'AntiSpam $now', '$wcpsval[portal_error_predel]', '1')"); if (!empty($wcpsval['portal_errtomail'])) { wc_mail ($portal_mail, "AntiSpam $portal_url", "$portal_url\n\n$eigbtext\n$ip\n".$_SESSION['registr_key']."\n".$_SERVER['HTTP_REFERER']."\n",$eigbmail); } } } if($eierr=="" && empty($_POST['preview']) && !empty($_SESSION['registr_key']) && $_SESSION['registr_key']==$_POST['vote_key']){ $_SESSION['registr_key']=null; $eigbname=$gb_name; $eigbmail=$gb_mail; $eigburl=$gb_url; #$eigbtext=str_replace("\n","[br]\r\n",$eigbtext); $eigbtext=anti_mat($eigbtext); $eigbname=anti_mat($eigbname); $eigbname=str_replace("'","′",$eigbname); $eigbtext=str_replace("'","′",$eigbtext); if(empty($_SESSION['sname'])){ $eiloggedstatus=$ip; $eigbsname=""; }else{ if(!empty($_SESSION['avatar'])){ $eiloggedstatus=$otn_path."/".$_SESSION['avatar']; } else {$eiloggedstatus=1;} $eigbsname=$sname; } $eigbname=strip_tags(str_uncheck($eigbname)); $eigbmail=strip_tags(str_uncheck($eigbmail)); $eigburl=strip_tags(str_uncheck($eigburl)); $eigbtext=strip_tags($eigbtext); $eigbtext = preg_replace("#\n+#is","[br]\n", $eigbtext); if (!empty($attach_sig) && !empty($row['user_current12'])){ $attach_text="
________________
".str_replace("'",'"',$row['user_current12'])."
"; } else $attach_text=null; include ("$GLOBALS[portal_root]/inc/bbdecode.php"); $viewtext=ikoncode(text_link($eigbtext).$attach_text); $subject="ADD GB ".$GLOBALS['portal_name']; $text="

$zaglavie

\n "; # # if (MYSQL_NUM_ROWS($result)){ if (!empty($row['user_otkuda'])){$text.="\n";} if (!empty($row['user_url'])){$text.="\n";} if (!empty($row['user_hobbi'])){$text.=nl2br("\n";} if (!empty($row['user_maillist'])){$text.="\n";} else {$in.="\n";} if (!empty($row['user_date'])){$text.="\n";} if (!empty($row['user_uroven'])){$text.="\n";} } $text.=nl2br(""); $text.="
"._YUONAME_."$eigbname
"._YOUMAIL_."$eigbmail
"._YOUURL_."$eigburl
Статус$eiloggedstatus
Login$eigbsname
Откуда:$row[user_otkuda]
WWW:$row[user_url]
Хобби:".$row['user_hobbi'])."
Почта:Подписан
Почта:Не подписан
Последний заход:".date_time_new($row['user_date'],2)."
Уровень:$row[user_uroven]

"._YOUTEXT_.":

$viewtext


\n
$wcpsval[portal_title]
$datagrate
\n"; $wcpsval['mail_type']=1; wc_mail ($GLOBALS['portal_mail'], $subject, $text,$eigbmail); if ($eigbmail)wc_mail ($eigbmail, $subject, $text,$GLOBALS['portal_mail']); // Разсылка Админам и модераторам if (!empty($wcpsval['gb_moderator_mail'])){ $result = MYSQL_QUERY("SELECT user_mail FROM ".$wcpref."user WHERE user_uroven = '1' OR user_uroven = '2'"); while ($row = MYSQL_FETCH_ROW($result)){ if ($GLOBALS['portal_mail']!=$row[0]){ wc_mail ($row[0], $subject, $text,$eigbmail);} } } if(!mysql_query("INSERT INTO ".$wcpref."guestbook VALUES ('','$now','$eigbname','$eigbmail','$eigburl','$eigbtext$attach_text','','$eiloggedstatus','$eigbsname')")) WCInfoView(7,mysql_error(),__FILE__." ".__LINE__); echo "

"._YUOADDOK_."


"._RENEXT_."
"; if (empty($wcpsval['no_refresh'])) echo ""; } elseif (!empty($_POST['preview'])){ $_SESSION['registr_key']=null; include ("$GLOBALS[portal_root]/inc/bbdecode.php"); echo "[".$_POST['preview']."] "; $eigbmsg = preg_replace("#\n+#is",'
', $_POST['eigbtext']); $eigbmsg=anti_mat($eigbmsg); #$eigbmsg=str_replace("\n","[br]",$_POST['eigbtext']); if (function_exists('ikoncode')) {$eigbmsg=ikoncode($eigbmsg);} if (function_exists('setsmiles')) {$eigbmsg=setsmiles($eigbmsg);} print "\n"; if (!empty($attach_sig)){ if(!$tmp=mysql_query("SELECT user_current12 FROM ".$wcpref."user WHERE user_login='$_SESSION[sname]'")) WCInfoView(7,mysql_error(),__FILE__." ".__LINE__,1,1); extract(MYSQL_FETCH_ARRAY($tmp)); echo"\n";} print "

".$now."
\n"; if (!empty($_SESSION['avatar'])){ echo "
\n"; } if ($_SESSION['auth']){ print "$gb_name
[".ReturnNameUrov($_SESSION['auth']).']
'; }else{ print "$gb_name
["._GOST_."]
"; if($gb_mail!=""){ print " \"E-mail\"
\n"; }} print "\n"; if($gb_url!=""){ if (!strstr($gb_url,"http://")) {$gb_url= "http://".$gb_url;} print " \"WWW\"
\n"; } print "
".$eigbmsg."
$user_current12


\n"; eishowform(@$gb_name,@$gb_mail,@$gb_url, @$_POST['eigbtext'], $_SESSION['sname']); } else{ $_SESSION['registr_key']=null; print '
ERROR

'.$eierr.'
'; eishowform(@$gb_name,@$gb_mail,@$gb_url, @$_POST['eigbtext'], $_SESSION['sname']); } } else { if($_SESSION['auth']==1){ eishowform($_SESSION['user_fio'],$_SESSION['user_mail'],$_SESSION['user_url'],"", $_SESSION['sname']); } else{ eishowform("","","","",""); } } ?>