Can anyone help me wrap this code into a php table? Can anyone help me wrap this code into a php table?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Can anyone help me wrap this code into a php table?

Started by dke, January 10, 2008, 11:10:42 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

dke

Hi,

I'm no coder and i'm trying to figure out how to wrap this code:


<html>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<div align="center">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '750',
'height', '250',
'src', 'flow',
'FlashVars', 'xmlPath=http://dkeserver.mine.nu/flow.php', <!--Absolute path to 'flow.php'-->
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flow_link',
'bgcolor', '#FFFFFF',
'name', 'flow',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flow',
'salign', ''
); //end AC code
}
</script>
</body>
</html>


Into this PHP table code:

starttable("100%");

echo '<tr><td class="tableh2"><b><b>Recently added files</b></td></tr>';
endtable();
?>


I cannot figure out how to mix php and html without breaking the PHP using ?>

I would like to do something like this:

starttable("100%");

echo '<tr><td class="tableh2"><b><b>Recently added files</b></td></tr>';
echo '<td class="tableb">';
<html>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<div align="center">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '750',
'height', '250',
'src', 'flow',
'FlashVars', 'xmlPath=http://dkeserver.mine.nu/flow.php', <!--Absolute path to 'flow.php'-->
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flow_link',
'bgcolor', '#FFFFFF',
'name', 'flow',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flow',
'salign', ''
); //end AC code
}
</script>
</body>
</html>
endtable();
?>


Can any PHP/HTML wiz help me?

Thanks!

Joachim Müller

Use the heredoc syntax:starttable("100%");

echo '<tr><td class="tableh2"><b>Recently added files</b></td></tr>';
echo <<< EOT
<td class="tableb">';
<div align="center">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '750',
'height', '250',
'src', 'flow',
'FlashVars', 'xmlPath=http://dkeserver.mine.nu/flow.php', <!--Absolute path to 'flow.php'-->
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flow_link',
'bgcolor', '#FFFFFF',
'name', 'flow',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flow',
'salign', ''
); //end AC code
}
</script>
EOT;
endtable();
?>
Then edit themes/yourtheme/theme.php and add<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
into a new line before</head>, as you mustn't add mutliple instances of the tags <html> or <body>.
You should really read up some HTML tutorials first to understand the basics.

dke