Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Nuzna pomosch

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Russian
View previous topic :: View next topic  
Author Message
buxarIL
Smarty n00b


Joined: 23 Apr 2007
Posts: 1

PostPosted: Mon Apr 23, 2007 2:09 am    Post subject: Nuzna pomosch Reply with quote

??????? ???????????? ? ???????? Smarty
? ??? ????????? ????????? ?????? ?? ???.
??????? ????? ??????, ???? ??? ????? ????????.
??? ???????? ???:
Code:
<?php
session_start();
session_register("sess_name");
session_register("sess_passwd");
session_register("sess_data");
include("vars.php");
include("headfoot.php");
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
$warning="<font size=2 color=red>????????! ???? ?? ????????? ????? ?????????????, ?? ??????????? ??????????? ??????? ????? ????? \"??????????????? ????/?????? ???????\"</font><br><br>";
$msg="<font size=\"2\"><strong><br>????? ??? ??? ?????? ??????, ?????????? ?????????? ??????? \"??????\" ? \"???????\".<br>??? ?? ??????? ?????? ?? ?????? ???? ???????.<br><font color=red>????????????? ?? ????? ???????? ?? ???????, ?????? ?? ??????? ???? ? ????????? ???????? ????? !<br></strong></font>";
if($_GET['p']=='top'){$msg="<font size=\"2\"><br>???? ?? ?????? ?????????? ??????? ?? ??????? ???????? ??????, ?? ???????? ?????? <b>\$$top_ad_price ?? ?????</b> ????? ?? ????????? ?????????:<br>WebMoney ?? ??????? <b>$admin_wm_acc</b><br>E-Gold ?? ???? <b>$admin_eg_acc</b><br>????? ?????? ????????? ??? ?????????? ????? ? ??????? ?????? ??????, ? ????? ??? ????????? ?????. ?????? ? ??????? ?? ?????? ?????????? ? ??????.<br></font>$warning";}
if($_GET['p']=='bottom'){$msg="<font size=\"2\"><br>???? ?? ?????? ?????????? ??????? ?? ??????? ???????? ?????, ?? ???????? ?????? <b>\$$bottom_ad_price ?? ?????</b> ????? ?? ????????? ?????????:<br>WebMoney ?? ??????? <b>$admin_wm_acc</b><br>E-Gold ?? ???? <b>$admin_eg_acc</b><br>????? ?????? ????????? ??? ?????????? ????? ? ??????? ?????? ??????, ? ????? ??? ????????? ?????. ?????? ? ??????? ?? ?????? ?????????? ? ??????.<br></font>$warning";}
if($_GET['p']=='adorder'){$msg="<font size=\"2\"><br>???? ?? ?????? ?????????? ????????? ?????????? ?? ??????? ???????? ?????, ?? ???????? ?????? <b>\$$left_ad_price</b> ????? ?? ????????? ?????????:<br>WebMoney ?? ??????? <b>$admin_wm_acc</b><br>E-Gold ?? ???? <b>$admin_eg_acc</b><br>????? ?????? ????????? ??? ?????????? ????? ? ??????? ?????? ??????, ? ????? ??? ????????? ?????. ?????? ? ??????? ?? ?????? ??????? ?????? ?? ??????, ??????? ????? ?????????? ??? ????????? ????????? ?? ??? ????? ??????????.<br></font>$warning";}
if($_GET['p']=='rightadorder'){$msg="<font size=\"2\"><br>???? ?? ?????? ?????????? ?????? ???????? 125?125 ??? ?????? ?????? ?? ??????? ???????? ?????, ?? ???????? ?????? ? ??????? <b>\$$right_ad_price ?? 1000 ???????</b> ????? ?? ????????? ?????????:<br>WebMoney ?? ??????? <b>$admin_wm_acc</b><br>E-Gold ?? ???? <b>$admin_eg_acc</b><br>????? ?????? ????????? ??? ?????????? ????? ? ??????? ?????? ??????, ? ????? ???? ?????? ? ?????? ??? ???????? ???????. <b>??????????? ????? - 10000 ???????</b>. ?? ???????? ????? ???????? ???????????? $right_ad_count ????????? ???????, ????????? ?? ???? ????????? ???????.<br></font>$warning";}

if ($_POST['submit'] == '  ?????????  ') {
$error = "no";
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$myid = trim($_POST['my_id']);
$subject = trim($_POST['subject']);
$message = trim($_POST['message']);
if ($name == "") {
$error = "yes";
$why = $why . "???? ??? ??????!<br>";
}
if ($email == "") {
$error = "yes";
$why = $why . "??? ??????????? ????? ??????!<br>";
} elseif (!ereg('@', $email) || !ereg('.', $email)) {
$error = "yes";
$why = $why . "???????????? ??????????? ?????!<br>";
}
if ($myid != "") {
if (!is_numeric($myid)) {
$error = "yes";
$why = $why . "??? $title ID ???????????? ?????? ???? ??????!<br>";
} else {
$get_mem = mysql_query("SELECT * FROM user WHERE id=$myid");
if (mysql_num_rows($get_mem) == 0) {
$error = "yes";
$why = $why . "??? $title ID ???????????? ?? ?????? ? ????? ???? ??????!<br>";
}
}
}
if ($subject == "") {
$error = "yes";
$why = $why . "?? ?????? ??????? ????!<br>";
}
if ($message == "") {
$error = "yes";
$why = $why . "?? ?????? ??????? ????? ?????????!<br>";
} elseif (ereg("<", $message) || ereg(">", $message)) {
$error = "yes";
$why = $why . "???? ????????? ?? ?????? ????????? HTML ?????!<br>";
}
if ($error == 'no') {
$email_head = "MIME-Version: 1.0\r\nContent-type: text/plain; charset=windows-1251\r\nFrom: \"$name\" <$email>\r\nReply-To: \"$name\" <$email>\r\nX-Priority: 3\r\nX-Mailer: PHP 4\r\n";
mail($contact_sys_email, "$title ?????????? ?????????", "???: $name\n\nE-mail: $email\n\n$title ID ????????????: $myid\n\n????: $subject\n\n?????????: $message\n\n?????????? ?: ".$_SERVER['REMOTE_ADDR']."\n\n???????????? ???????: " . $_SERVER['HTTP_USER_AGENT'], $email_head);
uheader();
if ($_SESSION['sess_name'] != "" && $_SESSION['sess_passwd'] != "") {
members_main_menu($members_menu);
}
echo("<p align=center><br><font face=$fontface size=2>???? ????????? ???? ??????????!<br>????? $title ??????? ?? ???? ????????? ??? ????? ?????? ?? ???? ??????????? ?????:<br><b>$email</b></font></p>");
ufooter();
mysql_close;
exit;
}
}
uheader();
if ($_SESSION['sess_name'] != "" && $_SESSION['sess_passwd'] != "") {
members_main_menu($members_menu);
}
if ($error == 'yes') {
echo("<p align=center><font face=\"$fontface\" size=2 color=red><b>$why</b></font></p>");
}
echo("<form name=\"contact\" method=\"post\">
<table width=\"700\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\">
  <tr>
    <td colspan=\"2\" height=25><div align=\"center\"><font size=\"4\"><strong>??????? ? $title</strong></font></div></td>
  </tr>
  <tr>
    <td colspan=\"2\"><p align=justify>$msg</td>
  </tr>
  <tr>
    <td width=\"42%\"><font size=\"2\">??? :</font></td>
    <td width=\"58%\"><font size=\"2\">
      <input type=\"text\" name=\"name\" maxlength=\"30\" value=\"$name\" class=webforms>
      </font></td>
  </tr>
  <tr>
    <td><font size=\"2\">??? E-mail :</font></td>
    <td><input type=\"text\" name=\"email\" size=\"30\" maxlength=\"30\" value=\"$email\" class=webforms></td>
  </tr>
  <tr>
    <td><font size=\"2\">$title ID ????????????:</font></td>
    <td><input name=\"my_id\" type=\"text\" size=\"6\" maxlength=\"11\" value=\"$myid\" class=webforms></td>
  </tr>
  <tr>
    <td><font size=\"2\">???? :</font></td>
    <td><input type=\"text\" name=\"subject\" size=\"50\" maxlength=\"255\" value=\"$subject\" class=webforms></td>
  </tr>
  <tr>
    <td><font size=\"2\">????? ?????????</font><font size=\"2\"><br>(??? HTML ?????! ???? ?? ??????????? ??? ??????? ??? ?????? ????? ??????? ??????? ??????? ?????, ?? ???????? ???? \"<font color=red>&lt;</font>\" ? \"<font color=red>&gt;</font>\" ?? \"<b>(</b>\" ? \"<b>)</b>\" ??? \"<b>[</b>\" ? \"<b>]</b>\")  :</font></td>
    <td><textarea name=\"message\" cols=\"50\" rows=\"10\" wrap=\"VIRTUAL\" class=webforms>$message</textarea></td>
  </tr>
  <tr>
    <td height=\"27\"><font size=\"2\"></font></td>
    <td><input type=\"submit\" name=\"submit\" value=\"  ?????????  \" class=\"formbutton\"></td>
  </tr>
</table>
</form>");
ufooter();
mysql_close;
exit;
?>

??? ????? ???????? ?????, ??? ??????? ??????? ? ??????:
Code:
{if $smarty.get.p=='top'} {#msg1#}{#warning#}
{elseif $smarty.get.p=='bottom'}{#msg2#}{#warning#}
{elseif $smarty.get.p=='adorder'}{#msg3#}{#warning#}
{elseif $smarty.get.p=='rightadorder'}{#msg4#}{#warning#}
{else} {#msg#}{/if}

<form name="contact.php" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr>
    <td colspan="2" height=25><div align="center"><font size="4"><strong>Контакт с {$title}</strong></font></div></td>
  </tr>
  <tr>
    <td colspan="2"><p align=justify>{$msg}</td>
  </tr>
  <tr>
    <td width="42%"><font size="2">Имя :</font></td>
    <td width="58%"><font size="2">
      <input type="text" name="name" maxlength="30" value="{$name}" class=webforms>
      </font></td>
  </tr>
  <tr>
    <td><font size="2">Ваш E-mail :</font></td>
    <td><input type="text" name="email" size="30" maxlength="30" value="{$email}" class=webforms></td>
  </tr>
  <tr>
    <td><font size="2">$title ID Пользователя:</font></td>
    <td><input name="my_id" type="text" size="6" maxlength="11" value="{$myid}" class=webforms></td>
  </tr>
  <tr>
    <td><font size="2">Тема :</font></td>
    <td><input type="text" name="subject" size="50" maxlength="255" value="{$subject}" class=webforms></td>
  </tr>
  <tr>
    <td><font size="2">Текст сообщения</font><font size="2"><br>(без HTML тэгов! если вы отправляете код баннера или другой текст который требует наличия тэгов, то замените теги "<font color=red>&lt;</font>" и "<font color=red>&gt;</font>" на "<b>(</b>" и "<b>)</b>" или "<b>[</b>" и "<b>]</b>")  :</font></td>
    <td><textarea name="message" cols="50" rows="10" wrap="VIRTUAL" class=webforms>{$message}</textarea></td>
  </tr>
  <tr>
    <td height="27"><font size="2"></font></td>
    <td><input type="submit" name="submit" value="{#post#}" class="formbutton"></td>
  </tr>
</table>
</form>

? ????? ???????? ?????????, ?? ??? ????? ? ?????? ?? ????????? ??????????, ??????? ?????? ???????????? ? ????????? ??????.
? ? ??? ???????, ??? ??????? ?????????? ????????? ? ????? ?? ???? (???????? ? ??? ?? ?????????? ??? ?????? ??????? ????????? ?? ??????? ?????? ??? ?? ???????)

????? ??? ?? ???? ??????? ??? ????????? ??? ???????????? ??????? ???????.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP