ПользовательПользователь №: 90 Сообщений: 25
| Есть код отправки Лс
PHP - Код | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| <?php function message($user_name, $f_user, $t_user, $title, $text, $id, $set) { global $module_name, $user, $pm, $warlimit, $ftypefile, $userinfo, $smilies, $editor, $attach, $attach_im, $umaxsize, $db, $prefix, $defis, $stop, $fimaxsize, $fitypefile, $iwidth, $iheight; $pagetitle = "$defis "._PRIVATE."$defis "; include("header.php"); title(""._PRIVATE.""); Opentable(); Top(); Closetable(); if (is_user($user)) {getusrinfo($user); $users = $userinfo['user_name']; $user_private = $userinfo['user_private']; $user_warnings = $userinfo['user_warnings']; $user_files = $userinfo['user_files']; $user_pmlimit = $userinfo['user_pmlimit']; } if($user_private != "1"){ if($user_warnings <= "$warlimit"){ if (is_user($user)) { $max = "$user_pmlimit"; list($total_messages) = $db->sql_fetchrow($db->sql_query("SELECT Count(id) FROM ".$prefix."_private WHERE t_user = '$users' AND status !='3' AND status !='4'")); if ( !empty($max) && ($total_messages >= intval($max)) ) {
warning(""._WARNING." }else{ if ($stop) warning($stop, "", "", 1); Opentable(); echo "<table class=bgcolor4 cellSpacing=1 width=\"100%\"><tbody><tr><th align=center width=\"100%\">"._MESNEW."</th></tr></tbody></table> echo"<form name=\"post\" enctype=\"multipart/form-data\" action=\"index.php?name=$module_name\" method=\"post\">"; $result = $db->sql_query("SELECT * FROM ".$prefix."_private WHERE t_user = '$users' AND status !='0' AND status !='2' AND status !='4' AND id = '$id'"); if ($db->sql_numrows($result) > 0) { $row = $db->sql_fetchrow($result); $f_user = $row[f_user]; $t_user = $row[t_user]; $title = $row[title]; $text = $row[text]; $status = $row[status]; } if ($status =="1") {if ($text !="") {$text = "";}} if ($status =="4") {if ($text !="") {$text = "";}} if ($title !="") { if ($status !="3") { $title = "Re:".$title; $title = preg_replace( "/^(?:Re\:){1,}/i", "Re:", $title );} } echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\" align=\"center\"><tr><td>"; if($f_user =="") { echo"</td><td>"._CONT.""; echo"<tr><td>"._USERLIST.":</td><td><select name=\"t_user\" style=\"width:400px;\"><option></option>"; $result = $db->sql_query("SELECT f_user FROM ".$prefix."_private_book WHERE t_user = '$users'"); if ($db->sql_numrows($result) > 0) { while (list($f_user) = $db->sql_fetchrow($result)) { echo "<option>$f_user</option>"; } echo "</select>"; } } echo "<tr><td></td><td>"._USERSITE.""; echo"<tr><td>"._USERLIST.":</td><td><select name=\"t_user1\" style=\"width:400px;\"><option>$user_name $f_user</option>"; $result = $db->sql_query("SELECT user_name FROM ".$prefix."_users"); while (list($user_name) = $db->sql_fetchrow($result)) { echo "<option>$user_name</option>"; } echo "</select>"; echo "</td></tr><tr><td></td><td><input type=\"hidden\" name=\"f_user\" value=\"$users\"></td></tr>" ?> |
Задача.
Как сделать чтоб отправка ЛС происходила только админу (админам)
PS Разбирался, пробовал так и не получилось. Надеюсь кто-нибудь поможет
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Отредактированно Turbo 28.03.2008 г. в 09:42:03 |
|