include_once($_SERVER[DOCUMENT_ROOT]."/class/define.php");
include_once("utils.php");
include_once("./pear/HTML/ITX.php");
include_once("sql.class.php");
include_once("users.class.php");
include_once("stat.class.php");
include_once("pre.class.php");
include_once("news.class.php");
include_once("spec.class.php");
include_once("foto_unit2.class.php");
include_once("foto_unit.class.php");
include_once("catalog.class.php");
include_once("catalog2.class.php");
include_once("best_units.class.php");
include_once("keywords.class.php");
include_once("basket.class.php");
include_once("tpl.class.php");
include_once("form_attr.class.php");
include_once("form_sel.class.php");
// ...� header'� ����� ����� ����������� �������� ����� �� ����
$Users = new Users;
$Stat = new Stat;
$Pre = new Pre;
$Foto_unit2 = new Foto_unit2;
$Catalog2 = new Catalog2;
$Best_units = new Best_units;
$News = new News;
$Spec = new Spec;
$Keywords = new Keywords;
$Basket = new Basket;
$Tpl_class = new Tpl_class;
$Form_attr = new Form_attr;
$Form_sel = new Form_sel;
$s_uid = (int)$s_uid;
$fu_uid = (int)$fu_uid;
//-------------------------------------------------------------------------
$parent_uid = 0;
if($s_uid!=0){
$t = $Catalog2->Show_by_uid($s_uid);
$BODY_n = from_base($t[0]['name']);
$parent_uid = $t[0]['parent'];
$tpl_name = $Tpl_class->Get($t[0]['tpl_uid']);
$fr_more_info = $Pre->Show_by_uid($t[0]['more_info']);
$RIGHT_TEXT = from_base($fr_more_info[0]['pre']);
// �������� ���������-��������� ������
//------------------------------------
$img_path = "photos/img2/";
// ���������
//----------
$_name = $s_uid."ss";
$PIC_s = Get_pic_info($_name, $img_path);
//v($PIC_s);
$_w = $PIC_s['width'];
if($a['small_pic_width']!=0){
$_w = $a['small_pic_width'];
}
if($PIC_s['src']!=""){
$img_ss = "
";
}else{
// �� �������� ������ ��������� ��������
$img_ss = "";
}
// �������� ���������-��������� �����
//------------------------------------
}
$main_tpl = new IntegratedTemplateExtension('./tpl');
$main_tpl->loadTemplateFile($tpl_name,true,false);
//-------------------------------------------------------------------------
include_once('_common.inc');
include_once('_show_basket.inc');
// -- ���������������, ���� ������ ���-���� �����
include_once ('./8325e8a58fa7808de440aab59f566ca8/dubler.php');
$DUB = new Dubler();
$dub = $DUB->links("./8325e8a58fa7808de440aab59f566ca8/");
$dubb = $DUB->banners("./8325e8a58fa7808de440aab59f566ca8/",1);
// -- ���� ���
if (!defined('_SAPE_USER')){
define('_SAPE_USER', 'd2556a15257901a157581e943a5727af');
}
require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php');
$o = array();
$o[ 'force_show_code' ] = true;
$o['request_uri'] = getenv('REQUEST_URI');
$sape = new SAPE_client( $o );
$sape_context = new SAPE_context();
ob_start(array(&$sape_context,'replace_in_page'));
$saplink = $sape->return_links();
if($s_uid==121){
$saplink=$saplink.'
';
}
//-------------------------------------------------------------------------
// ����� ��������� �����
$SM_TEXT = '';
$SM = $Catalog2->Show(192);
if(!is_array($SM)){
$SM = $Catalog2->Show($parent_uid);
}
$SUB_MENU = '';
$_t = 0;
if(is_array($SM)){
foreach($SM as $sm){
$_t++;
$_href = '/sec2.php?s_uid='.$sm['uid'];
$_name = from_base($sm['name']);
if($sm['file_name']!=''){
if(file_exists($sm['file_name'])){
$_href = '/'.$sm['file_name'];
}
}
$SM_TEXT .= '| ';
if($_t < sizeOf($SM)){
$SM_TEXT .= ' ';
}
}
$SUB_MENU = $SM_TEXT;
}
// ����� ��������� �����
$SN_TEXT = '';
$SN = $Catalog2->Show(13157);
if(!is_array($SN)){
$SN = $Catalog2->Show($parent_uid);
}
$SSUB_MENU = '';
$_t = 0;
if(is_array($SN)){
foreach($SN as $sn){
$_t++;
$_href = '/sec2.php?s_uid='.$sn['uid'];
$_name = from_base($sn['name']);
if($sn['file_name']!=''){
if(file_exists($sn['file_name'])){
$_href = '/'.$sn['file_name'];
}
}
$SN_TEXT .= '-
';
if($_t < sizeOf($SN)){
$SN_TEXT .= ' ';
}
}
$SSUB_MENU = $SN_TEXT;
}
// ���� ��� ������������
//if($flag == 0){
if(1){
$BODY = $Catalog2->Show_by_uid($s_uid);
//$BODY_n = nl2br(from_base($BODY[0]["name"]));
$TITLE = nl2br(from_base($BODY[0]["title"]));
$KEYWORDS = nl2br(from_base($BODY[0]["keywords"]));
$DESCRIPTION = nl2br(from_base($BODY[0]["description"]));
$count_in_line = (int)$BODY[0]["count_in_line"];
$pic_width = (int)$BODY[0]["pic_width"];
if((int)$count_in_line==0){
$count_in_line = 1;
}
if((int)$pic_width==0){
$pic_width = 100;
}
// ������
$tr_counter = 0;
$FU = $Foto_unit2->Show($s_uid);
if(is_array($FU)){
foreach($FU as $a){
//print_vs($a);
$fu_uid = $a['uid'];
$fu_pic_align = $a['pic_align'];
// ��������
//---------
$img_path = "photos/img2/";
// ���������
//----------
$_name = $fu_uid."s";
$PIC_s = Get_pic_info($_name, $img_path);
$_w = $PIC_s['width'];
if($a['small_pic_width']!=0){
$_w = $a['small_pic_width'];
}
if($PIC_s['src']!=""){
$img_s = "
";
}else{
// �� �������� ������ ��������� ��������
$img_s = "";
}
// �������
//--------
$_name = $fu_uid."b";
$PIC_b = Get_pic_info($_name, $img_path);
$new_location = "img_view2.php?fu_uid=".$fu_uid;
//������� ������ ����
$image_w = $PIC_b['width'];
$image_h = $PIC_b['height'];
// �� �������� �� ������ 3-�� ������ (����� ��)
$_pic ="".$img_s."";
// �� �������� ������ ������� ��������,
// �������� ������ ��������� ��������
if($PIC_b['src'] == ""){
$_pic = $img_s;
}
// ��������� 1
//------------
$doc1 = '';
$_icon = '';
$_name = $fu_uid."d1";
$doc_path = "photos/doc_01/";
$DOC1 = Get_doc_info($_name, $doc_path);
if($DOC1['src']!=''){
if($DOC1['ext']=='pdf'){$_icon = '
';}
if($DOC1['ext']=='xls'){$_icon = '
';}
if($DOC1['ext']=='doc'){$_icon = '
';}
$doc1 = "".$_icon." ����������";
}
// ��������� 2
//------------
$doc2 = '';
$_icon = '';
$_name = $fu_uid."d2";
$doc_path = "photos/doc_01/";
$DOC2 = Get_doc_info($_name, $doc_path);
if($DOC2['src']!=''){
if($DOC2['ext']=='pdf'){$_icon = '
';}
if($DOC2['ext']=='xls'){$_icon = '
';}
if($DOC2['ext']=='doc'){$_icon = '
';}
$doc2 = "".$_icon." ����������";
}
$_ww = (int)(100 / $count_in_line);
$_ww .= "%";
//$ABZ .= "";
//$ABZ .= "| ".StripSlashes(nl2br($a['name']))." | ";
$ABZ .= from_base($a['name']);
$__t = $_pic.from_base($a['descr']);
if($doc1!='' or $doc2!='' ){
$__t = $__t." ".$doc1." ".$doc2;
}
///$ABZ .= "| ".$__t." | ";
$ABZ .= $__t;
/*
if($a['view_price']!=0){
$ABZ .= "
����: ".$a['price1']." ���.";
$ABZ .= $_form." ";
}
*/
// ������ - ������� �����, ���� ����
//----------------------------------
$__t = '';
if($a['form_id']>0){
$FORMS_A = $Form_attr->Show_by_uid($a['form_id']);
if(is_array($FORMS_A)){
foreach($FORMS_A as $fa){
$__t = "";
}
// ����� - ������� �����, ���� ����
//---------------------------------
}
}
}
///$BODY_b .= $ABZ." ";
$BODY_b .= $ABZ;
// ����� �������� ����� ������ ��� �������� "�������� �����"
//print $sec;
//if($s_uid == 66 or $parent_uid==120
// or $s_uid == 133 or $parent_uid==133){
if(isset($Submit1)){
$BODY_b = "
���� ��������� ����������! ".$BODY_b;
$text = "";
for($i=1;$i<=30;$i++){
if($fName[$i]!=''){
$text .= $fName[$i].": ".$fData[$i]."\n";
}
}
//v($text);
$subj = "���������� �� ������������ � �����";
$to = $Global_params->Get('ADMIN_EMAIL');
$from = $to;
My_mail($to,$subj,$from,$text);
$subj = "���������� �� ������������ � �����";
$to = "strel22@mail.ru";
$from = $to;
My_mail($to,$subj,$from,$text);
}
// ������� �������� (5 ����)
if($s_uid==160){
$SUB_MENU = '������� ';
}
//******************************************************************************
$IMG_SEC = ' ';
//print $B_TOTAL;
$main_tpl->setVariable( array( 'HEAD_x' => $HEAD_x,
'BODY_B' => $BODY_b,
'BODY_N' => $BODY_n,
'NEWS' => $NEWS,
'SPEC' => $SPEC,
'INFO' => $INFO,
'PARTNERS' => $PARTNERS,
'ABOUT' => $ABOUT,
'NEWS_R' => $NEWS_R,
'SPEC' => $SPEC,
'RIGHT_MENU' => $right_menu,
'TITLE_IMG' => $TITLE_IMG,
'CONTACTS' => $CONTACTS,
'SUB_MENU' => $SUB_MENU,
'SSUB_MENU' => $SSUB_MENU,
'SAPLINK' => $saplink,
'MENU_y' => $MENU_y,
'B_TOTAL' => $B_TOTAL,
'BASKET_R' => $BASKET_R,
'BODY_COLOR' => $BODY_COLOR,
'TITLE' => $TITLE,
'KEYWORDS' => $KEYWORDS,
'DESCRIPTION' => $DESCRIPTION,
'USER_NAME' => $user_name,
'IMG_SEC' => $IMG_SEC,
'IMG_SS' => $img_ss,
'RIGHT_TEXT' => $RIGHT_TEXT,
'DUB' => $dub,
'DUBB' => $dubb
));
$main_tpl->show();
?> |