loadTemplateFile('index_page.tpl', true, false); } else { //v('��������� - ���'); //$main_tpl->loadTemplateFile('index.tpl',true,false); if ((!$next_sub) and (!$send_sub_z) and (!$send_sub_r) and (!$send_sub)) { $main_tpl->loadTemplateFile('index.tpl', true, false); } else { $main_tpl->loadTemplateFile('index_1form.tpl', true, false); } } // ...� header'� ����� ����� ����������� �������� ����� �� ���� $Users = new Users; $Stat = new Stat; $Pre = new Pre; $Foto_unit = new Foto_unit; $Catalog = new Catalog; $Goods = new Goods; $Best_units = new Best_units; $News = new News; $Spec = new Spec; $Keywords = new Keywords; $Menu = new Catalog; $Basket = new Basket; $News2 = new News2; $News_tema = new News_tema; $News_comment = new News_comment; $News_golos = new News_golos; $News_mark = new News_mark; if ($alter == 1) { $News2->Create_1(); } include_once("FCKeditor2/editor/fckeditor.php"); //$News_mark->Create(); $nt = (int)$nt; $rate = (int)$rate; $mark_uid = (int)$mark_uid; if ($rate <> 0) { if (($rate <= 2) and ($rate >= -2)) { $News_golos->Add($uid, $rate); } } $nt = (int)$nt; $show_new = (int)$show_new; $show_actual = (int)$show_actual; $show_popular = (int)$show_popular; $show_my = (int)$show_my; $show_user = (int)$show_user; $usid = (int)$usid; //------------------------------------------------------------------------- include_once('_common.inc'); //include_once('_show_basket.inc'); //------------------------------------------------------------------------- $this_php = 'page.php'; // ������� �� ������� ������ // (����������� �������������� � ����� "_common.inc" if ($send_sub_z or $send_sub_r or $send_sub) { $t_descr = to_base($t_descr); $t_active = 0; $last_id = $News2->Add( to_base($t_name), $t_descr, $t_tema, $t_good, $t_active, $t_wmk_number, '', $kod_us ); //v($last_id); // �������� �������� //------------------ reset($_FILES); if (is_array($_FILES)) { while (list ($key, $f_struct) = each($_FILES)) { $ext = Get_ext($f_struct["name"]); if ($ext == 'gif' or $ext == 'jpg' or $ext == 'JPEG' or $ext == 'GIF' or $ext == 'JPG' or $ext == 'png' or $ext == 'PNG' ) { $new_file_name = $_SERVER[DOCUMENT_ROOT] . "/photos/news2/" . $last_id . $key . "." . $ext; //v($new_file_name); } @copy($f_struct["tmp_name"], $new_file_name); } } $Mess = '���� ������ ����� ������� �� ������������ �����������.
'; /* $Mess = '���� ������ ����� ������� �� ������������ ����������� ����� ������.
��� ������������� ������� ��� ����� ��������� �� �����. ������� "��������"

'; */ } //��������� �������� if (($do_mark == 1) and ($kod_us > -1) and ($mark_uid > 0)) { $News_mark->Delete($mark_uid, $kod_us); $News_mark->Add($mark_uid, $kod_us); } //����� �������� if (($do_mark == 0) and ($kod_us > -1) and ($mark_uid > 0)) { $News_mark->Delete($mark_uid, $kod_us); } // �������� ���������� ������� for ($i = 1; $i < 4; $i++) { $Actual[$i] = $News2->Get_actual($i); } //v($Actual); $RATE_A = (int)($News_golos->Show_count($Actual[1][0]['uid'])); $RATE_A = '������� �������: ' . $RATE_A; $actual_name1 = from_base($Actual[1][0]['name']); $actual_name2 = from_base($Actual[2][0]['name']); $actual_name3 = from_base($Actual[3][0]['name']); $actual_descr1 = substr(from_base($Actual[1][0]['descr']), 0, 300); if (strlen(from_base($Actual[1][0]['descr'])) > 300) { $actual_descr1 .= '...'; } $actual_descr2 = substr(from_base($Actual[2][0]['descr']), 0, 300); if (strlen(from_base($Actual[2][0]['descr'])) > 300) { $actual_descr2 .= '...'; } $actual_descr3 = substr(from_base($Actual[3][0]['descr']), 0, 300); if (strlen(from_base($Actual[3][0]['descr'])) > 300) { $actual_descr3 .= '...'; } $actual_descr1 = str_replace("

", "", $actual_descr1); $actual_descr1 = str_replace("

", "", $actual_descr1); $actual_descr2 = str_replace("

", "", $actual_descr2); $actual_descr2 = str_replace("

", "", $actual_descr2); $actual_descr3 = str_replace("

", "", $actual_descr3); $actual_descr3 = str_replace("

", "", $actual_descr3); $actual_date1 = date("d.m.Y [H:i]", $Actual[1][0]['date']); $actual_date2 = date("d.m.Y [H:i]", $Actual[2][0]['date']); $actual_date3 = date("d.m.Y [H:i]", $Actual[3][0]['date']); $_kod_us = $Actual[1][0]['kod_us']; if ((int)$_kod_us > 0) { $_login = $Users->Show_by_uid($_kod_us); $actual_autor1 = $_login['login']; } else { $actual_autor1 = ' '; } $_kod_us = $Actual[2][0]['kod_us']; if ((int)$_kod_us > 0) { $_login = $Users->Show_by_uid($_kod_us); $actual_autor2 = $_login['login']; } else { $actual_autor2 = ' '; } $_kod_us = $Actual[3][0]['kod_us']; if ((int)$_kod_us > 0) { $_login = $Users->Show_by_uid($_kod_us); $actual_autor3 = $_login['login']; } else { $actual_autor3 = ' '; } $actual_tema1 = $News_tema->Get($Actual[1][0]['tema']); $_href = "page.php?nt=" . $Actual[1][0]['tema']; $actual_tema1 = '' . $actual_tema1 . ''; $actual_tema2 = $News_tema->Get($Actual[2][0]['tema']); $_href = "page.php?nt=" . $Actual[2][0]['tema']; $actual_tema2 = '' . $actual_tema2 . ''; $actual_tema3 = $News_tema->Get($Actual[3][0]['tema']); $_href = "page.php?nt=" . $Actual[3][0]['tema']; $actual_tema3 = '' . $actual_tema3 . ''; $actual_comments_count1 = $News_comment->Show_active_count($Actual[1][0]['uid']); $actual_page_n_href1 = 'page_n.php?uid=' . $Actual[1][0]['uid']; $actual_page_n_href1 = ' ��������� / ����������� [' . $actual_comments_count1 . '] '; $actual_comments_count2 = $News_comment->Show_active_count($Actual[2][0]['uid']); $actual_page_n_href2 = 'page_n.php?uid=' . $Actual[2][0]['uid']; $actual_page_n_href2 = ' ��������� / ����������� [' . $actual_comments_count2 . '] '; $actual_comments_count3 = $News_comment->Show_active_count($Actual[3][0]['uid']); $actual_page_n_href3 = 'page_n.php?uid=' . $Actual[3][0]['uid']; $actual_page_n_href3 = ' ��������� / ����������� [' . $actual_comments_count3 . '] '; // �������� - ������ //------------------ $img_path = "photos/news2/"; $fu_pic_align = 'left'; // ��������� //---------- $_name = $Actual[1][0]['uid'] . "s"; $PIC_s = Get_pic_info($_name, $img_path); $_w = $PIC_s['width']; if ($_w > 120) { $_w = 120; } if ($PIC_s['src'] != "") { $img_s = ""; } else { // �� �������� ������ ��������� �������� $img_s = ""; } // ������� //-------- $_name = $Actual[1][0]['uid'] . "b"; $PIC_b = Get_pic_info($_name, $img_path); $_pic_href = $PIC_b['src']; $new_location = "img_view3.php?pic=" . $_pic_href; //������� ������ ���� $image_w = $PIC_b['width']; $image_h = $PIC_b['height']; // �� �������� �� ������ 3-�� ������ (����� ��) $_pic = "" . $img_s . ""; // �� �������� ������ ������� ��������, // �������� ������ ��������� �������� if ($PIC_b['src'] == "") { $_pic = $img_s; } // �������� - ����� //------------------ $actual_descr1 = $_pic . $actual_descr1; if ($kod_us <= 0) { // ����������� //-------------- $ADD_NEWS = '
�����:
������:
�����������
'; } else { // ���� ������� //-------------- $tema_list = ''; $_counter = 0; $NT = $News_tema->Show(); if (is_array($NT)) { foreach ($NT as $_tema) { $_counter++; $tema_list .= '