⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insert_flash.php

📁 灵活强大的会员系统轻松构建互动应用
💻 PHP
📖 第 1 页 / 共 2 页
字号:
						selectedFlash.outerHTML = code

						selectedFlash.runtimeStyle.backgroundImage = "url(<?php echo @$_GET["DEP"]; ?>/de_images/hidden.gif)"

					} else {

						if (imageWidth != "")
							imageWidth = ' width=' + imageWidth + '" '
						else
							imageWidth = ''

						if (imageHeight != "")
							imageHeight = ' height=' + imageHeight + '" '
						else
							imageHeight = ''

						if (vspace.value != "")
							vSpace = ' vspace=' + vspace.value + '" '
						else
							vSpace = ''

						if (hspace.value != "")
							hSpace = ' hspace=' + hspace.value + '" '
						else
							hSpace = ''

						if (align[align.selectedIndex].text != "")
							falign = ' align="' + align[align.selectedIndex].text + '" '
						else
							falign = ''

						HTMLTextField = 
						'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"' + imageHeight + imageWidth + vSpace + hSpace + falign + '>' +
						'<param name=movie value="' + flashSrc + '">' +
						'<param name="LOOP" value="' + loop[loop.selectedIndex].value + '">' + 
						'<embed src="' + flashSrc +
						'" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"' 
						+ imageWidth + imageHeight + vSpace + hSpace + falign + ' loop="' + loop[loop.selectedIndex].value + '"></embed></object>'

						rng.pasteHTML(HTMLTextField)
					}	
				

					//window.opener.foo.focus();
					self.close();

					// oFlash.removeAttribute("id")


				} // End if
			} // End If
		}
} // End function

function insertExtFlash() {
	selectedFlashFile = document.getElementById("externalFlash").value
	
	if (previousFlash != null) {
		previousFlash.style.border = "3px solid #FFFFFF"
	}

	document.getElementById("previewWindow").innerHTML = "<embed src='" + selectedFlashFile.replace(/ /g, "%20") + "' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='236' height='176' bgcolor='#009933' WMODE=transparent></embed>"

	if (document.getElementById("deleteButton") != null) {
	deleteButton.disabled = true
	}

	previewButton.disabled = false
	insertButton.disabled = false

} // End function

var flashFolder = "<?php echo $FlashDirectory; ?>/"
var previousFlash
var selectedFlashEncoded
function doSelect(oFlash) {
	selectedFlashFile = flashFolder + oFlash.childNodes(0).name
	selectedFlashEncoded = oFlash.childNodes(0).name2
	
	oFlash.style.border = "3px solid #08246B"
	currentFlash = oFlash
	if (previousFlash != null) {
		if (previousFlash != currentFlash) {
			previousFlash.style.border = "3px solid #FFFFFF"
		}
	}
	previousFlash = currentFlash

	document.getElementById("previewWindow").innerHTML = "<embed src='" + selectedFlashFile.replace(/ /g, "%20") + "' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='236' height='176' bgcolor='#009933' WMODE=transparent></embed>"

	previewButton.disabled = false
	insertButton.disabled = false

	if (document.getElementById("deleteButton") != null) {
	deleteButton.disabled = false
	}
}

function CheckFlashForm()
{
	//upload, upload1, upload2, upload3, upload4
	var flashDir = '<?php echo $FlashDirectory; ?>';
	var f1 = document.getElementById("upload");

	// Extract just the filename from the paths of the files being uploaded
	f1_file = f1.value;
	last = f1_file.lastIndexOf ("\\", f1_file.length-1);
	f1_file = f1_file.substring (last + 1);

	if(f1_file == "")
	{
		alert('<?php echo sTxtChooseFlash; ?>');
		return false;
	}

	// Loop through the flashDir array
	if(f1_file != "")
	{
		for(i = 0; i < flashFiles.length; i++)
		{
			if(f1_file == flashFiles[i])
			{
				if(!confirm(f1_file + ' <?php echo sTxtFlashExists; ?>'))
				{
					return false;
				}
			}
		}
	}

	return true;
}

</script>
<title><?php echo sTxtInsertFlash; ?></title>

<body bgcolor=threedface style="border: 1px buttonhighlight;">
<iframe id=tempFrame style="display:none"></iframe>
<div class="appOutside">
<div style="border: solid 1px #000000; background-color: #FFFFEE; padding:5px;">
	<img src="de_images/popups/bulb.gif" align=left width=16 height=17>
	<span><?php echo sTxtInsertFlashInst; ?></span>
</div>
<br>

<form enctype="multipart/form-data" action="<?php echo $HTTPStr . "://" . $url . $_SERVER["PHP_SELF"]; ?>?ToDo=UploadFlash&DEP=<?php echo @$_GET["DEP"]; ?>&DEP1=<?php echo @$_GET["DEP1"]; ?>&flashDir=<?php echo $FlashDirectory; ?>&wi=<?php echo $HideWebFlash; ?>&tn=<?php echo $tn; ?>&dd=<?php echo $dd; ?>&dt=<?php echo $dt; ?>&du=<?php echo $du; ?>" method="post" onSubmit="return CheckFlashForm()">
<span class="appInside1" style="width:350px">
	<div class="appInside2">
	<?php if($du != "1") { ?>
		<div class="appInside3" style="padding:11px"><span class="appTitle"><?php echo sTxtUploadFlash; ?></span>
			<br>
				<input type="file" name="upload" class="Text240"> <input type="submit" value="<?php echo sTxtUpload; ?>" class="Text75">
				<span class="err" style="position:absolute; left:40; top:86;"><?php echo $statusText; ?></span>
	<?php } else { ?>
		<div class="appInside3" style="padding:11px"><span class="appTitle"><font color="gray"><?php echo sTxtUploadFlash; ?></font></span>
			<br>
				<input type="file" name="upload" class="Text240" disabled> <input type="submit" value="Upload" class="Text75" disabled>
	<?php } ?>
		</div>
	</div>
</span>
&nbsp;
 <?php if($HideWebFlash != "1") { ?>
<span class="appInside1" style="width:350px">
	<div class="appInside2">
		<div class="appInside3" style="padding:11px"><span class="appTitle"><?php echo sTxtExternalFlash; ?></span>
			<br>
			<input type="text" name="externalFlash" id="externalFlash" class="Text240" value="http://">&nbsp;<input type=button value=<?php echo sTxtLoad; ?> class="Text75" onClick="insertExtFlash()">
		</div>
	</div>
</span>
<?php } else { ?>
<span class="appInside1" style="width:350px">
	<div class="appInside2">
		<div class="appInside3" style="padding:11px"><span class="appTitle"><font color="gray"><?php echo sTxtExternalFlash; ?></font></span>
			<br>
			<input type="text" name="externalFlash" id="externalFlash" class="Text240" value="http://" disabled>&nbsp;<input type=button value=<?php echo sTxtLoad; ?> class="Text75" onClick="insertExtFlash()" disabled>
		</div>
	</div>
</span>
<?php } ?>
</form>

<span class="appInside1" style="width:350px">
	<div class="appInside2">
		<div class="appInside3" style="padding:11px"><span class="appTitle"><?php echo sTxtInternalFlash; ?></span>
			<table border=0 cellspacing=0 cellpadding=0 style="padding-bottom:5px">
			<tr><td><select style="width:242px; font-size:11px; font-family:Arial;" name="selFlashLib">
				<script>outputFlashLibraryOptions();</script>
			</select>
			</td><td><input type=button value="<?php echo sTxtSwitch; ?>" class=text75 onClick="switchFlashLibrary(selFlashLib.value)"></td></tr>
			</table>
	<div style="height:325px; width:325px; overflow: auto; border: 2px inset; background-color: #FFFFFF">
	<?php if(@$_GET["tn"] == 1) { ?>
		<table border="0" cellspacing="0" cellpadding="5" style="width:100%">
	<?php } else { ?>
		<table border="0" cellspacing="0" cellpadding="3" style="width:100%">
	<?php } ?>
		  <tr>
		<?php

		$counter = 0;

		if(@$_GET["tn"] == 1)
		{
			while(false !== ($file = readdir($dirHandle)))
			{
				$flashExt = strrev(substr(strrev($file), 0, strpos(strrev($file), ".")));
				if($file != "." && $file != ".." && in_array($flashExt, $validFlashExts))
				{
					$counter++;
				?>
					<td width="25%">
						<span class="body">&nbsp;<?php echo $file; ?><br></span>
						<div onclick="doSelect(this)" style="border: 3px solid #FFFFFF; background-color:#FFFFFF" style="width:80px">
						<img src="de_images/popups/flash.gif" width="80" height="80" border=1 name="<?php echo $file; ?>" name2="<?php echo urlencode($file); ?>"></div>
					</td>
				<?php
				}
				
				if($counter % 3 == 0)
					echo "</tr><tr>";
			}
		}
		else
		{
			$dirHandle = @opendir(realpath($DOCUMENT_ROOT . $FlashDirectory)) or die(sTxtFlashDirNotConfigured);
			while(false !== ($file = readdir($dirHandle)))
			{
				$flashExt = strrev(substr(strrev($file), 0, strpos(strrev($file), ".")));
				if($file != "." && $file != ".." && in_array($flashExt, $validFlashExts))
				{
					$counter++;
					$filePath = @str_replace("//", "/", $DOCUMENT_ROOT . $FlashDirectory . "/" . $file);
				?>
					<tr style="cursor:hand">
						<td width="40%" class="body" >
							<div onClick=doSelect(this) style="border: solid 3px #FFFFFF">
							<img src="de_images/popups/flash.gif" width=16 height=16 align=absmiddle name="<?php echo $file; ?>" name2="<?php echo urlencode($file); ?>">&nbsp;<?php echo $file; ?>
							<span style="position:absolute; left=200"><?php echo filesize($filePath); ?> <?php echo sTxtBytes; ?></span>
							</div>
						</td>
					</tr>
			<?php
				}
			}
		}

		if($counter == 0)
		{
		?>
			<tr>
				<td width="100%" class="body" >
					<font color="gray"><?php echo sTxtEmptyFlashLibrary; ?></font>
				</td>
			</tr>
		<?php
		}
		?>
		</table>
		</div>
		</div>
	</div>
</span>
&nbsp;
<span class="appInside1" style="width:350px; position:absolute">
	<div class="appInside2">
		<div class="appInside3" style="padding:11px"><span class="appTitle"><?php echo sTxtPreview; ?></span><br>
			<span id="previewWindow" style="height:180px; width:240px; overflow: auto; border: 2px inset; background-color: #FFFFFF">
			</span><input type="button" name="previewButton" value="<?php echo sTxtPreview; ?>" class="Text75" onClick="javascript:viewImage(selectedFlashFile)" disabled=true style="position:absolute; left:257px;">
		</div>
	</div>
</span>

<span class="appInside1" style="width:350px; padding-top:5px;">
	<div class="appInside2">
		<div class="appInside3" style="padding:11px"><span class="appTitle"><?php echo sTxtFlashProperties; ?></span>
		<table border="0" cellspacing="0" cellpadding="5">
		  <tr>
			<td class="body" width="70"><?php echo sTxtLoop; ?>:</td>
			<td class="body" width="88">
				<select class="Text70" name=loop>
					<script>printLoop()</script>
					<option value="true">True</option>
					<option value="false">False</option>
				</select>
			</td>
			<td class="body"><?php echo sTxtAlignment; ?>:</td>
				<td class="body">
				  <SELECT class=text70 name=align>
					<script>printAlign()</script>
					<option>Baseline
					<option>Top
					<option>Middle
					<option>Bottom
					<option>TextTop
					<option>ABSMiddle
					<option>ABSBottom
					<option>Left
					<option>Right</option>
				  </select>
				</td>
		  </tr>
		  <tr>
			<td class="body"><?php echo sTxtFlashWidth; ?>:</td>
			<td class="body">
			  <input type="text" name="image_width" size="3" class="Text70" maxlength="3">
		  </td>
			<td class="body"><?php echo sTxtFlashHeight; ?>:</td>
			<td class="body">
			  <input type="text" name="image_height" size="3" class="Text70" maxlength="3">
			</td>
		  </tr>
		  <tr>
			<td class="body"><?php echo sTxtHorizontalSpacing; ?>:</td>
			<td class="body">
			  <input type="text" name="hspace" size="3" class="Text70" maxlength="3">
			</td>
			<td class="body"><?php echo sTxtVerticalSpacing; ?>:</td>
			<td class="body">
			  <input type="text" name="vspace" size="3" class="Text70" maxlength="3">
			</td>
		  </tr>
		</table>
		</div>
	</div>
</span>

<div style="padding-top: 6px;">
<input type="button" name="deleteButton" value="<?php echo sTxtImageDel; ?>" class="Text75" onClick="javascript:deleteFlash(selectedFlashEncoded)" <?php if($dd == "1") { ?> style=display:none <? } ?> disabled>
</div>

</div>
<div style="padding-top: 6px; float: right;">
<input type="button" name="insertButton" value="<?php echo sTxtImageInsert; ?>" class="Text75" onClick="javascript:insertImage(selectedFlashFile)" disabled=true>
<input type="button" name="Submit" value="<?php echo sTxtCancel; ?>" class="Text75" onClick="javascript:window.close()">
</div>

</table>

<script defer>

if (window.opener.imageEdit)
{
	selectedImage = window.opener.selectedImage.src;
	previewModify();
}

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -