带有隐藏/显示下拉菜单嵌入的多个嵌入粘贴PHP
大家好,我有个问题需要大家帮忙。我想做这样的东西。然而,我想对我自己的方法稍微修改一下设计,并将其应用于以下内容:。这是上面链接的网站的PHP脚本带有隐藏/显示下拉菜单嵌入的多个嵌入粘贴PHP,php,html,Php,Html,大家好,我有个问题需要大家帮忙。我想做这样的东西。然而,我想对我自己的方法稍微修改一下设计,并将其应用于以下内容:。这是上面链接的网站的PHP脚本 <?php function pr2_embed ($width, $height) { $w = (string) (int) $width; $h = (string) (int) $height; return <<<HTMLcode_end <embed width="$w" height=
<?php
function pr2_embed ($width, $height) {
$w = (string) (int) $width;
$h = (string) (int) $height;
return <<<HTMLcode_end
<embed width="$w" height="$h" base="http://external.kongregate-games.com/gamez/0001/0110/live/" src="http://external.kongregate-games.com/gamez/0001/0110/live/embeddable_10110.swf" type="application/x-shockwave-flash"></embed>
HTMLcode_end;
}
function get_value ($name, $default) {
if (!isset($_REQUEST[$name])) return $default;
return $_REQUEST[$name];
}
function create_page () {
$rows = get_value("rows", 1);
$cols = get_value("cols", 1);
$width = get_value("width", 770);
$height = get_value("height", 560);
if ($width <= 0) $width = 770;
if ($height <= 0) $height = 560;
if ($rows <= 0) $rows = 1;
if ($cols <= 0) $cols = 1;
$i1 = (int) $rows;
$i2 = (int) $cols;
$display = pr2_embed($width, $height);
$result = "";
while ($i2) {
for ($instance = 0; $instance < $i1; $instance ++)
$result .= $display;
$result .= '<br />';
$i2 --;
}
return <<<HTMLcode_end
<html>
<head>
<title>Many PR2s!</title>
<head>
<body>$result</body>
</html>
HTMLcode_end;
}
echo create_page ();
?>
PHP脚本中列出了“多pr2”的嵌入代码。但这是“Xat聊天”的嵌入代码:`
|
`
我希望新的设计像我上面发布的JSFIDLE一样。xat聊天室将位于multipr2的正下方,距离大约2远。我想知道,我是否可以给用户提供排除或包括xat聊天的功能,就像他们是否愿意的下拉列表一样。谢谢
<embed src="http://www.xatech.com/web_gear/chat/chat.swf" quality="high" bgcolor="#000000" width="540" height="405" name="chat" FlashVars="id=1&gn=Lobby" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://xat.com/update_flash.shtml" /><br><small><a target="_BLANK" href="http://xat.com/web_gear/chat/embed.php?id=1&GroupName=Lobby">Get Lobby chat group</a> | <a target="_BLANK" href="http://xat.com/Lobby"> Goto Lobby website</a></small><br>`