________________
".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
|
|
| "._YUONAME_." | $eigbname |
| "._YOUMAIL_." | $eigbmail |
| "._YOUURL_." | $eigburl |
";
#
| Статус | $eiloggedstatus |
#
| Login | $eigbsname |
if (MYSQL_NUM_ROWS($result)){
if (!empty($row['user_otkuda'])){$text.="
| Откуда: | $row[user_otkuda] |
\n";}
if (!empty($row['user_url'])){$text.="
| WWW: | $row[user_url] |
\n";}
if (!empty($row['user_hobbi'])){$text.=nl2br("
| Хобби: | ".$row['user_hobbi'])." |
\n";}
if (!empty($row['user_maillist'])){$text.="
| Почта: | Подписан |
\n";}
else {$in.="
| Почта: | Не подписан |
\n";}
if (!empty($row['user_date'])){$text.="
| Последний заход: | ".date_time_new($row['user_date'],2)." |
\n";}
if (!empty($row['user_uroven'])){$text.="
| Уровень: | $row[user_uroven] |
\n";}
}
$text.=nl2br("
"._YOUTEXT_.":$viewtext
|
");
$text.="
|
\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 "
";
if (empty($wcpsval['no_refresh'])) echo "
";
} elseif (!empty($_POST['preview'])){
$_SESSION['registr_key']=null;
include ("$GLOBALS[portal_root]/inc/bbdecode.php");
echo "[".$_POST['preview']."]
\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("","","","","");
}
}
?>