require "include/common.php"; require "include/shell.php"; require_once "include/top.php"; require_once "include/pd.php"; require_once "include/interfaces.php"; require_once "include/sql.php"; // Определение сессии и сессионных переменных session_start(); $userid = $_SESSION['userid']; $userif = $_REQUEST['userif']; if($userif) $_SESSION['ifid'] = (int)$userif; elseif(!$_SESSION['ifid']) $_SESSION['ifid'] = 1; $ifid = $_SESSION['ifid']; $if = LoadInterface($ifid); $pageid = 1; $numbermales = 5; // ВЫХОД if($_REQUEST[logoff] == "YES") { unset($userid); unset($_SESSION['userid']); Header("Location: index.php"); exit; } // СЛУЖЕБНОЕ if(is_admin($userid) && $_REQUEST[special] == 1) { $qstr = "UPDATE colors SET name='Серебристо-белый', engname='Silver-White' WHERE id=49;"; mysql_query($qstr); } // ОТПРАВКА ПИСЬМА ОБРАТНОЙ СВЯЗИ $mailtext = Shield($_REQUEST['mailtext']); if($userid && $mailtext) { $usr = data_select('*', array('id' => $userid), 'users'); if(isset($_FILES['ufile']['tmp_name'])) { $boundary = "-----26de266ba67bf3804e5e0872fb034316"; $to = "yuriysemenov@yandex.ru"; $subj = "ЭПК РТ: сообщение от пользователя {$usr['name']}"; $mhead .= "From: {$usr['email']}\r\n"; $mhead .= "Mime-Version: 1.0\r\n"; $mhead .= "To: $to\r\n"; $mhead .= "Subject: [ЭПК РТ] сообщение от пользователя {$usr['name']}\n"; $mhead .= "Content-Type: multipart/mixed;boundary=\"$boundary\"\n\n"; $mtext .= "--$boundary\n"; $mtext .= "Content-Type: text/plain; charset=UTF-8;\n"; $mtext .= "Content-Transfer-Encoding: 7bit\n\n"; $mtext .= "$mailtext\n\n"; $file = $_FILES['ufile']['tmp_name']; $file_size = filesize($file); $handle = fopen($file, "r"); $content = fread($handle, $file_size); fclose($handle); $fileContent = chunk_split(base64_encode($content)); $fileName = basename($_FILES['ufile']['name']); $mtext .= "\r\n"."--".$boundary."\n"; $mtext .= "Content-Type: application/octet-stream; name=\"".$fileName."\"\n"; $mtext .= "Content-Transfer-Encoding: base64\n"; $mtext .= "Content-Disposition: attachment; filename=\"".$fileName."\"\n\n"; $mtext .= $fileContent."\n"; $mtext .= "--$boundary--"; $fl = Mail($to, $subj, $mtext, $mhead); } else { // $to = "nkp-moskstor@ya.ru"; $to = "yuriysemenov@yandex.ru"; $subj = "[ЭПК РТ] сообщение от пользователя {$usr['name']}"; $message = $mailtext; $fl = Mail($to, $subj, $message); } if(!$fl) $c1 .= ErrMsg("Не удалось отправить сообщение !"); } FormHeader(FALSE,$userid); $c1 .= Title($if['menu_index'],$if['index_welcome']); $c1 .= InfoBlock($if['index_intro'], FALSE, $if['index_intro_text']); $c1 .= InfoBlock($if['index_thanks'],FALSE,$if['index_thanks_text']); $c1 .= ForSale(3, $if); SQLConn(); $tmp = mysql_fetch_row(mysql_query("SELECT count(id) FROM dogs wHERE active>0")); // 5 ПОСЛЕДНИХ $c2 .= TopLast(5, $if, "{$if['main_dogcount']}: {$tmp[0]}"); // 5 ВЫСТАВОК $c2 .= TopShows(5, $if); // 5 ТОП КОБЕЛЕЙ //$c2 .= TopMales($numbermales, $if); // КАРТА $c2 .= "