$q_show_hide="SELECT * FROM marks_on_map WHERE mom_mt_id>0 AND mom_map_id=".$_GET['id_map'];
$q_show_hide=mysql_query($q_show_hide);
$q_num_show_hide=mysql_num_rows($q_show_hide);
if($q_num_show_hide>0)
{
?>
Показать карту || Скрыть карту
if(isset($mark_error[0])) echo $mark_error[0]; echo " ";
?>
} // if($q_num_show_hide>0)
?>
if(isset($mark_error[0])) echo $mark_error[0];
?>
/>
$q_link="SELECT * FROM marks_on_map
LEFT JOIN map_mark ON map_mark.id_mark=marks_on_map.mom_mark_id
LEFT JOIN map_tips ON marks_on_map.mom_mt_id=map_tips.id_mt WHERE marks_on_map.mom_map_id=".$_GET['id_map']; // echo $q_link;
$q_link=mysql_query($q_link);
$q_link_num=mysql_num_rows($q_link);
if($q_link_num>0)
{
?>
} // if($r_link['id_mt']>0)
?>
|
добавить объект для карты
$q="SELECT * FROM map_tips WHERE map_id=".$_GET['id_map']."";
$q=mysql_query($q);
$q_num=mysql_num_rows($q);
if($q_num>0)
{
?>
while($r=mysql_fetch_array($q))
{
$img_patch_prev="MAPS_files/img_mark/img_mark_prev/";
?>
|
if(!empty($r['mt_img_file'])) {
$img_with_patch="MAPS_files/img_mark/".$r['mt_img_file'];
if(!is_file($img_with_patch)) $img_error=" Картинка не найдена на сервере "; else { if(isset($img_error)) unset($img_error); }
$img_attr=getimagesize($img_with_patch);
} else $img_error=" Картинка для объекта не определена "; ?>
if(!isset($img_error)) { ?> } else { ?> } ?>
if(!empty($r['video_file'])) {
if(!is_file("MAPS_files/video_mark/".$r['video_file'])) $video_error=" Видео файл не найден на сервере "; else { if(isset($video_error)) unset($video_error); }
} else { $video_error=" Видео файл не определен для этого файла ";}
?>
if(!isset($video_error)) { ?>".$video_error." ";
if(!empty($r['mt_name'])) { echo ""; echo out_sql($r['mt_name'],"tips",$SF); echo ""; echo " "; }
if(!empty($r['mt_desc'])) { echo out_sql($r['mt_desc'],"tips",$SF); echo " "; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(!isset($video_error))
{
if(is_file("MAPS_files/img_mark/".$r['mt_img_file']))
{ $attr_tip_img=getimagesize("MAPS_files/img_mark/".$r['mt_img_file']);
echo "превьюшка к видео (открыть в новом окне) ш: ".$attr_tip_img[0]." в: ".$attr_tip_img[1]." ";
}
//////////////////////////////////////////////////////////////////////
if($r['w_video']==0) $r['w_video']=$default_w_video;
if($r['h_video']==0) $r['h_video']=$default_h_video;
//////////////////////////////////////////////////////////////////////
// вычисляем формат
$str_exp = explode(".", $r['video_file']);
$count=count($str_exp)-1;
foreach ($str_exp as $key => $value)
{
if($key==$count) $video_format=$value;
}
////////////////////////////////////////////////////////////////////////////////////////////////
if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
{
?>
} // if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
} // if(!isset($video_error))
?>', CLOSEBTNTEXT, 'Нажми и закрой [X]', CLICKSTICKY, true, CLOSEBTN, true,OFFSETX,-5,EXCLUSIVE,true,TITLE,'')" onMouseOut="UnTip()" style="cursor:pointer;"/> } else { ?> } ?>
if(!empty($r['mt_name'])||!empty($r['mt_desc']))
{
?>"; echo out_sql($r['mt_name'],"tips",$SF); echo ""; echo " "; }
if(!empty($r['mt_desc'])) { echo out_sql($r['mt_desc'],"tips",$SF); }
?>', CLOSEBTNTEXT, 'Нажми и закрой [X]', CLICKSTICKY, true, CLOSEBTN, true,OFFSETX,-5,EXCLUSIVE,true,TITLE,'')" onMouseOut="UnTip()" style="cursor:pointer;"/>
}
else { ?> } ?> |
align="left" vspace="2" style="padding-right:10px;cursor:help;" onMouseOver="Tip('
if(!empty($r['mt_name'])) { echo ""; echo out_sql($r['mt_name'],"tips",$SF); echo ""; echo " "; }
if(!empty($r['mt_desc'])) { echo out_sql($r['mt_desc'],"tips",$SF); }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(is_file("MAPS_files/img_mark/".$r['mt_img_file'])&empty($r['video_file']))
{
if(!empty($r['mt_name'])||!empty($r['mt_desc'])) echo " ";
list($iwidth, $iheight, $it, $iattr) = getimagesize("MAPS_files/img_mark/".$r['mt_img_file']);
?> width==$iwidth?> height==$iheight?> border=0/>
}
?>
if(!empty($r['video_file']))
{
if(!empty($r['mt_name'])||!empty($r['mt_desc'])) echo " ";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(is_file("MAPS_files/img_mark/".$r['mt_img_file']))
{
$attr_tip_img=getimagesize("MAPS_files/img_mark/".$r['mt_img_file']);
echo "превьюшка к видео (открыть в новом окне) ш: ".$attr_tip_img[0]." в: ".$attr_tip_img[1]." ";
}
if(!empty($r['mt_name'])||!empty($r['mt_desc'])) echo " ";
if(is_file("MAPS_files/video_mark/".$r['video_file']))
{
//////////////////////////////////////////////////////////////////////
if($r['w_video']==0) $r['w_video']=$default_w_video;
if($r['h_video']==0) $r['h_video']=$default_h_video;
//////////////////////////////////////////////////////////////////////
// вычисляем формат
$str_exp = explode(".", $r['video_file']);
$count=count($str_exp)-1;
foreach ($str_exp as $key => $value)
{
if($key==$count) $video_format=$value;
}
////////////////////////////////////////////////////////////////////////////////////////////////
if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
{
?>
} // if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
} else { if(!is_file("MAPS_files/video_mark/".$r['video_file'])) echo " Видео не найдено "; }// if(is_file($MAP_VIDEO."MAPS_files/video_mark/".$r['video_file']))
}
?>', CLOSEBTNTEXT, 'Нажми и закрой [X]', CLICKSTICKY, true, CLICKCLOSE, true, CLOSEBTN, true,OFFSETX,-50,EXCLUSIVE,true,TITLE,'')" onMouseOut="UnTip()"/> |
|
=out_sql($r['mt_name'],"tips",$SF)?>
if(!empty($r['mt_desc'])) echo " ".out_sql($r['mt_desc'],"tips",$SF).""; ?>
if(is_file("MAPS_files/video_mark/".$r['video_file'])) { ?> [>>>] } ?>
|
} // while($r=mysql_fetch_array($q))
?>
} // if($q_num>0)
?>
|
добавить метку || редкатировать удалить метки
Метки для карты:
$q="SELECT * FROM map_mark";
$q=mysql_query($q);
$q_num=mysql_num_rows($q);
if($q_num>0)
{
while($rm=mysql_fetch_array($q))
{
$img_patch="map_mark/";
if(is_file($img_patch.$rm['mark_filename']))
{
?>
} else {
$q_del="DELETE FROM `map_mark` WHERE `id_mark` = ".$rm['id_mark'];
$q_del=mysql_query($q_del);
} // else // if(is_file($img_patch.$rm['mark_filename']))
} // while($rm=mysql_fetch_array($q))
} else echo " меток не найдено "; // if($q_num>0)
?>
$q_map_marks="SELECT * FROM marks_on_map LEFT JOIN map_tips ON map_tips.id_mt=marks_on_map.mom_mt_id WHERE marks_on_map.mom_map_id='".$_GET['id_map']."'";
$q_map_marks=mysql_query($q_map_marks);
$q_map_marks_num=mysql_num_rows($q_map_marks);
if($q_map_marks_num>0)
{
?>
|
| |
while($r=mysql_fetch_array($q_map_marks))
{
// картинка
$map_mark_prev="MAPS_files/mark_prev/".$r['id_mom'].".gif";
if(is_file($map_mark_prev))
{
$attr_mark_prev=getimagesize($map_mark_prev);
?>
if(!empty($r['mt_img_file'])) {
$img_with_patch="MAPS_files/img_mark/".$r['mt_img_file'];
if(!is_file($img_with_patch)) $img_error=" Картинка не найдена на сервере "; else { if(isset($img_error)) unset($img_error); }
$img_attr=getimagesize($img_with_patch);
} else $img_error=" Картинка для объекта не определена "; ?>
if(!isset($img_error)) { ?> } else { ?> } ?>
if(!empty($r['video_file'])) {
if(!is_file("MAPS_files/video_mark/".$r['video_file'])) $video_error=" Видео файл не найден на сервере "; else { if(isset($video_error)) unset($video_error); }
} else { $video_error=" Видео файл не определен для этого файла ";}
?>
if(!isset($video_error)) { ?>".$video_error." ";
if(!empty($r['mt_name'])) { echo ""; echo out_sql($r['mt_name'],"tips",$SF); echo ""; echo " "; }
if(!empty($r['mt_desc'])) { echo out_sql($r['mt_desc'],"tips",$SF); echo " "; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(!isset($video_error))
{
if(is_file("MAPS_files/img_mark/".$r['mt_img_file']))
{ $attr_tip_img=getimagesize("MAPS_files/img_mark/".$r['mt_img_file']);
echo "превьюшка к видео (открыть в новом окне) ш: ".$attr_tip_img[0]." в: ".$attr_tip_img[1]." ";
}
//////////////////////////////////////////////////////////////////////
if($r['w_video']==0) $r['w_video']=$default_w_video;
if($r['h_video']==0) $r['h_video']=$default_h_video;
//////////////////////////////////////////////////////////////////////
// вычисляем формат
$str_exp = explode(".", $r['video_file']);
$count=count($str_exp)-1;
foreach ($str_exp as $key => $value)
{
if($key==$count) $video_format=$value;
}
////////////////////////////////////////////////////////////////////////////////////////////////
if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
{
?>
} // if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
} // if(!isset($video_error))
?>', CLOSEBTNTEXT, 'Нажми и закрой [X]', CLICKSTICKY, true, CLOSEBTN, true,OFFSETX,-5,EXCLUSIVE,true,TITLE,'')" onMouseOut="UnTip()" style="cursor:pointer;"/> } else { ?> } ?>
if(!empty($r['mt_name'])||!empty($r['mt_desc']))
{
?>"; echo out_sql($r['mt_name'],"tips",$SF); echo ""; echo " "; }
if(!empty($r['mt_desc'])) { echo out_sql($r['mt_desc'],"tips",$SF); }
?>', CLOSEBTNTEXT, 'Нажми и закрой [X]', CLICKSTICKY, true, CLOSEBTN, true,OFFSETX,-5,EXCLUSIVE,true,TITLE,'')" onMouseOut="UnTip()" style="cursor:pointer;"/>
}
else { ?> } ?>
|
border="0" if(!empty($r['video_file'])||!empty($r['mt_img_file'])||!empty($r['mt_name'])||!empty($r['mt_desc'])) { ?> onMouseOver="Tip('
if(!empty($r['mt_name'])) { echo ""; echo out_sql($r['mt_name'],"tips",$SF); echo ""; echo " "; }
if(!empty($r['mt_desc'])) { echo out_sql($r['mt_desc'],"tips",$SF); }
if(isset($video_error)) unset($video_error);
if(!empty($r['video_file'])) {
if(is_file("MAPS_files/video_mark/".$r['video_file']))
{
if(!empty($r['mt_img_file'])||!empty($r['mt_name'])||!empty($r['mt_desc'])) echo " ";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(is_file("MAPS_files/img_mark/".$r['mt_img_file']))
{ $attr_tip_img=getimagesize("MAPS_files/img_mark/".$r['mt_img_file']);
echo "превьюшка к видео (открыть в новом окне) ш: ".$attr_tip_img[0]." в: ".$attr_tip_img[1]." ";
}
//////////////////////////////////////////////////////////////////////
if($r['w_video']==0) $r['w_video']=$default_w_video;
if($r['h_video']==0) $r['h_video']=$default_h_video;
//////////////////////////////////////////////////////////////////////
// вычисляем формат
$str_exp = explode(".", $r['video_file']);
$count=count($str_exp)-1;
foreach ($str_exp as $key => $value)
{
if($key==$count) $video_format=$value;
}
////////////////////////////////////////////////////////////////////////////////////////////////
if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
{
?>
} // if($video_format=='flv'||$video_format=='iflv'||$video_format=='mp4'||$video_format=='mp3')
} else $video_error=1;// if(is_file($MAP_VIDEO."MAPS_files/video_mark/".$r['video_file']))
} // if(!empty($r['video_file'])) {
?>
if(empty($r['video_file'])||isset($video_error))
{
if(is_file("MAPS_files/img_mark/".$r['mt_img_file']))
{
if(!empty($r['mt_img_file'])||!empty($r['mt_name'])||!empty($r['mt_desc'])) echo " ";
$attr_tip_img=getimagesize("MAPS_files/img_mark/".$r['mt_img_file']);
?> width==$attr_tip_img[0]?> height==$attr_tip_img[1]?> border=0/>
} // if(is_file("MAPS_files/img_mark/".$r['mt_img_file']))
} // if(empty($r['video_file'])||isset($video_error))
?>', CLOSEBTNTEXT, 'Нажми и закрой [X]', CLICKSTICKY, true, CLOSEBTN, true,OFFSETX,-50,EXCLUSIVE,true,TITLE,'')" onMouseOut="UnTip()" style="cursor:pointer;" } /* if(!empty($r['video_file'])||!empty($r['mt_img_file'])) {*/ ?>/>
} // if(is_file($map_mark_prev))
?>
|
|
=out_sql($r['mt_name'],"tips",$SF)?>
if(!empty($r['mt_desc'])) echo " ".out_sql($r['mt_desc'],"tips",$SF).""; ?>
|
|
| |
} // while($r=mysql_fetch_array($q_map_marks))
?>
} // if($q_map_marks_num>0)
?>
|