<?php
include(dirname(__FILE__)."/global.php");

include("../../include/pinyin.php");



$action       =  $submitted_vars["action"];
$field_id     =  $submitted_vars["field_id"];
$aid          =  $submitted_vars["aid"];
$mid          =  $submitted_vars["mid"];

if( $action == 'photo' ){
	$sql = "SELECT * FROM `w6_module_content_$mid` WHERE `aid` = '$aid'";
	$result=mysql_query($sql);
	$title	= stripslashes(mysql_result($result,"0","title"));
	$photo	= stripslashes(mysql_result($result,"0",$field_id));
	$photo  = explode( "@@@" , $photo );
	$s_photo = $photo['0'];
	if( !eregi("^http://", $s_photo ) ) $s_photo = $webdb['www_url'].'/upload/'.$s_photo;
	echo '<img src="'.$s_photo.'">';
	echo '<br />标题：'.$title;
	echo '<br />图片地址：'.$s_photo;

}elseif( $action == 'flash' ){
	$sql = "SELECT * FROM `w6_module_content_$mid` WHERE `aid` = '$aid'";
	$result=mysql_query($sql);
	$title	= stripslashes(mysql_result($result,"0","title"));
	$fl_type	= stripslashes(mysql_result($result,"0","fl_type"));
	$flash	= stripslashes(mysql_result($result,"0",$field_id));
	if( !eregi("^http://", $flash ) ) $flash = $webdb['www_url'].'/upload/'.$flash;
	if( $fl_type == 'htm' || $fl_type == 'html' || eregi('(\.htm|\.html)$', $flash ) ){
		echo '<IFRAME src="'.$flash.'" frameBorder=0 width=620 scrolling=no height=462 offsetleft="2"></IFRAME>';
	
	}else{
		echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="620" height="462">
  <param name="movie" value="'.$flash.'">
  <param name="quality" value="high">
  <embed src="'.$flash.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="620" height="462"></embed>
</object>';
	
	}

	echo '<br />标题：'.$title;
	echo '<br />Flash地址：'.$flash;

}


?>