Файл: billing/feedback.php
Строк: 277
<?
session_set_cookie_params(86400);
session_start();
$full_home_path = dirname(__FILE__);
require_once($full_home_path."/_rootload.php");
mconnect();
validateUser();
if (!EnableLanguages()) { error("Can not load languages."); mclose(); exit; }
if (!GetCurrentCurrency()) { print $_lang[ErrorGetCurrentCurrency]; mclose(); exit; }
head('utf-8',$_lang[FeedTitle]);
//print "<H1 class=pagetitle>".$_lang[FeedTitle]."</H1><hr class=hr>";
print "<div align='center><font size='3' color='blue'><b>$_lang[FeedTitle]</b></font></div><hr class=hr>";
if ($do == 'send') {
if ($_SESSION['userId']) { $error = $_lang[FeedErrorSupportOnlyViaTickets]; $do='';}
else if (!$name) { $error = $_lang[FeedErrorNoName]; $do='';}
else if (!valid_email($email)) {$error=$_lang[FeedErrorBadEmail]; $do='';}
else if (!$to) {$error = $_lang[FeedErrorNoOtdel]; $do='';}
else if (!$subject) {$error = $_lang[FeedErrorNoSubject]; $do='';}
else if (!$message) {$error = $_lang[FeedErrorNoMessage]; $do='';}
else if (GetSetting("captcha_feedback") and $_SESSION['captchakey'] != $captchakeyin) {$error=$_lang[ErrorWrongCaptcha]; $do='';}
else {
$to_email=GetSetting($to);
if ($icq) {$icq = " (icq $icq)";}
$subject_msg = "[feedback] $subject";
$message_msg = "Посетитель $name$icq отправил вам сообщение:rnrn$messagernrnIP: $iprnrn--rnRootPanel";
WriteMailLog($subject_msg,$message_msg);
sendmail($to_email,'',$email,$subject_msg,$message_msg);
print $_lang[FeedSendSuccess];
}
}
if (!$do) {
$feedback_text=GetSetting("feedback_text");
if ($feedback_text) {
$feedback_text = preg_replace("/rn/ui", "<BR>", $feedback_text);
print "<br>$feedback_text<br><br>";
}
$phone=GetSetting("phone");
$phone2=GetSetting("phone2");
$phone3=GetSetting("phone3");
$phone4=GetSetting("phone4");
$phone5=GetSetting("phone5");
$phonec=GetSetting("phonec");
$phonec2=GetSetting("phonec2");
$phonec3=GetSetting("phonec3");
$phonec4=GetSetting("phonec4");
$phonec5=GetSetting("phonec5");
$icq1=GetSetting("icq");
$icq2=GetSetting("icq2");
$icq3=GetSetting("icq3");
$icq4=GetSetting("icq4");
$icq5=GetSetting("icq5");
$icqc1=GetSetting("icqc");
$icqc2=GetSetting("icqc2");
$icqc3=GetSetting("icqc3");
$icqc4=GetSetting("icqc4");
$icqc5=GetSetting("icqc5");
if ($icq1 or $icq2 or $icq3 or $icq4 or $icq5) {
print "<b>".$_lang[FeedContactViaICQ].":</b><br>";
if ($icq1) { print "<a class=rootlink href=http://web.icq.com/whitepages/message_me?uin=$icq1&action=message><img src=http://status.icq.com/online.gif?icq=$icq1&img=5 border=0></a> $icq1"; if ($icqc1) { print " ($icqc1)"; } print "<BR>"; }
if ($icq2) { print "<a class=rootlink href=http://web.icq.com/whitepages/message_me?uin=$icq2&action=message><img src=http://status.icq.com/online.gif?icq=$icq2&img=5 border=0></a> $icq2"; if ($icqc2) { print " ($icqc2)"; } print "<BR>"; }
if ($icq3) { print "<a class=rootlink href=http://web.icq.com/whitepages/message_me?uin=$icq3&action=message><img src=http://status.icq.com/online.gif?icq=$icq3&img=5 border=0></a> $icq3"; if ($icqc3) { print " ($icqc3)"; } print "<BR>"; }
if ($icq4) { print "<a class=rootlink href=http://web.icq.com/whitepages/message_me?uin=$icq4&action=message><img src=http://status.icq.com/online.gif?icq=$icq4&img=5 border=0></a> $icq4"; if ($icqc4) { print " ($icqc4)"; } print "<BR>"; }
if ($icq5) { print "<a class=rootlink href=http://web.icq.com/whitepages/message_me?uin=$icq5&action=message><img src=http://status.icq.com/online.gif?icq=$icq5&img=5 border=0></a> $icq5"; if ($icqc5) { print " ($icqc5)"; } print "<BR>"; }
print "<BR>";
}
if ($phone or $phone2 or $phone3 or $phone4 or $phone5) {
print "<b>".$_lang[FeedContactPhones].":</b><br>";
if ($phone) { print "$phone"; if ($phonec) { print " ($phonec)"; } print "<BR>"; }
if ($phone2) { print "$phone2"; if ($phonec2) { print " ($phonec2)"; } print "<BR>"; }
if ($phone3) { print "$phone3"; if ($phonec3) { print " ($phonec3)"; } print "<BR>"; }
if ($phone4) { print "$phone4"; if ($phonec4) { print " ($phonec4)"; } print "<BR>"; }
if ($phone5) { print "$phone5"; if ($phonec5) { print " ($phonec5)"; } print "<BR>"; }
print "<BR>";
}
if ($error) {print "<font color=red>".$_lang[Error].": $error</font><BR><BR>";}
?>
<form method=post>
<input type=hidden name=do value=send>
<table class='rpTableBlank'>
<tr><td valign=middle align=right>* <?=$_lang[FeedName]?>:</td><td><input class=input type="text" name="name" size=30 value="<?=$name?>"></td></tr>
<tr><td valign=middle align=right>* <?=$_lang[FeedEmail]?>:</td><td><input class=input type="text" name="email" size=30 value="<?=$email?>"></td></tr>
<tr><td valign=middle align=right><?=$_lang[FeedICQ]?>:</td><td><input class=input type="text" name="icq" size=30 value="<?=$icq?>"></td></tr>
<tr><td valign=middle align=right><BR>* <?=$_lang[FeedOtdel]?>:</td><td><BR><select class=input name="to"><option></option>
<?
if (GetSetting("manager_email")) {print "<option value=manager_email>".$_lang[FeedManager]."</option>";}
if (GetSetting("support_email")) {print "<option value=support_email>".$_lang[FeedSupport]."</option>";}
?>
</select></td></tr>
<tr><td valign=middle align=right>* <?=$_lang[FeedSubject]?>:</td><td><input class=input type="text" name="subject" size=30 value="<?=$subject?>"></td></tr>
<tr><Td valign=top align=right>* <?=$_lang[FeedMessage]?>:</td><Td><textarea class=input name=message cols=40 rows=5><?=$message?></textarea></td></tr>
<? if (GetSetting("captcha_feedback")) { ?>
<tr><td></td><td style="<?=$styleHelp?>"><img name="captcha" src="captcha.php" align="left" style="margin-right: 10px;"> <?=$_lang[CaptchaNeVidno]?> <A class=rootlink href="" onclick="document.captcha.src = document.captcha.src + '?' + (new Date()).getTime(); return false;"><?=$_lang[CaptchaObnovit]?></a></td>
<tr><td align=right>* <?=$_lang[Captcha]?>:</td><td><input class=input type="text" name="captchakeyin" size=10 value=""></td></tr>
<? } ?>
<tr><Td colspan=2 align=center><input class=button type=submit value='<?=$_lang[Send]?>'></td></tr>
</table>
</form><BR>
<?
print "<code class=warn>*</code> - ".$_lang[Required];
}
foot('utf-8');
mclose();
?>