Is the following code correct?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pbakash
Forum Newbie
Posts: 1
Joined: Sat Jun 13, 2009 1:18 am

Is the following code correct?

Post by pbakash »

Hi guys! I am very much new to php . I am starting with phpBB to create a forum. I downloaded phpBB and opened it using netBeans. It is showing some errors which I am not sure what they are. Please help me out.

The code segment:

Line: 93 <script type="text/javascript">
Line: 94 // <![CDATA[
Line: 95 if (document.rmstream_{_file.ATTACH_ID}.GetClipWidth)
Line: 96 {
Line: 97 while (!document.rmstream_{_file.ATTACH_ID}.GetClipWidth())
Line: 98 {
Line: 99 }
Line: 100
Line: 101 var width = Line: document.rmstream_{_file.ATTACH_ID}.GetClipWidth();
Line: 102 var height = document.rmstream_{_file.ATTACH_ID}.GetClipHeight();
Line: 103
Line: 104 document.rmstream_{_file.ATTACH_ID}.width = width;
Line: 105 document.rmstream_{_file.ATTACH_ID}.height = height;
Line: 106 document.ctrls_{_file.ATTACH_ID}.width = width;
Line: 107 }
Line: 108 // ]]>
Line: 109 </script>
Line: 110 <!-- ENDIF -->
Line: 111
Line: 112 <!-- IF _file.S_WM_FILE or _file.S_RM_FILE or _file.S_FLASH_FILE or _file.S_QUICKTIME_FILE -->
Line: 113 <br />
Line: 114 <!-- IF _file.S_QUICKTIME_FILE --><a href="#" onclick="play_qt_file(document.qtstream_{_file.ATTACH_ID}); return false;">[ {L_PLAY_QUICKTIME_FILE} ]</a> <!-- ENDIF -->
Line: 115 <span class="gensmall"><a href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a> [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
Line: 116 <!-- ENDIF -->

The Errors listed by netbeans:

Error missing ) after condition attachment.html 95
Error missing ) after condition attachment.html 97
Error syntax error attachment.html 99
Error missing ; before statement attachment.html 101
Error missing ; before statement attachment.html 102
Error missing ; before statement attachment.html 104
Error missing ; before statement attachment.html 105
Error missing ; before statement attachment.html 106
Error syntax error attachment.html 107
Error missing ) after argument list attachment.html 114
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Is the following code correct?

Post by Ollie Saunders »

The code you posted doesn't look like the PHP I'm used to. The stuff inside the <script> tag is JavaScript. I'm not sure what the <!--if--> stuff is, possibly a template language. I'd be guessing.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Is the following code correct?

Post by califdon »

It looks like garbage to me. There are totally empty loop blocks, etc. I think the error messages may be related to the _{_ characters that occur in several literals. I wouldn't even try to run code that looks like that.
Post Reply