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 ('./e11e77abfad0e765c5bbd48fb046d49a/dubler.php');
$DUB = new Dubler();
$dub = $DUB->links("./e11e77abfad0e765c5bbd48fb046d49a/");
$dubb = $DUB->banners("./e11e77abfad0e765c5bbd48fb046d49a/",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();
//-------------------------------------------------------------------------
// ����� ��������� �����
$SM_TEXT = '';
$SM = $Catalog2->Show(197);
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 .= '
'.$_name.'
';
if($_t < sizeOf($SM)){
$SM_TEXT .= ' ';
}
}
$SUB_MENU = $SM_TEXT;
}
// ���� ���� ������� - ������� ��
$SSM_TEXT = '';
$SSM = $Catalog2->Show($s_uid);
if(!is_array($SSM)){
$SSM = $Catalog2->Show($parent_uid);
}
$SSUB_MENU = '';
$_t = 0;
if(is_array($SSM)){
foreach($SSM as $ssm){
$_t++;
$_href = '/sec2.php?s_uid='.$sm['uid'];
$_name = from_base($ssm['name']);
if($ssm['file_name']!=''){
if(file_exists($ssm['file_name'])){
$_href = '/'.$ssm['file_name'];
}
}
$SSM_TEXT .= '
'.$_name.'
';
if($_t < sizeOf($SSM)){
$SSM_TEXT .= ' ';
}
}
$SSUB_MENU = $SSM_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 .= "
| ".StripSlashes(nl2br($a['name']))." |
| ".$__t." |