125125 <div class='forumPostPosterInfo'></div>
126126 <div class='forumPostMessageExtras'>
127127 " ;
128+
129+ $ arrAttachments = $ this ->getPostAttachments ();
130+
131+ if (count ($ arrAttachments ) > 0 && $ blnShowAttachments ) {
132+ echo "
133+ <div class='forumAttachmentsContainer'>
134+ <b>Attachments:</b><br>
135+ " ;
136+
137+ foreach ($ arrAttachments as $ downloadID ) {
138+ $ attachmentObj ->select ($ downloadID );
139+ $ attachmentInfo = $ attachmentObj ->get_info_filtered ();
140+ $ addS = ($ attachmentInfo ['downloadcount ' ] != 1 ) ? "s " : "" ;
141+ $ dispFileSize = $ attachmentInfo ['filesize ' ]/1024 ;
128142
129- $ arrAttachments = $ this ->getPostAttachments ();
130-
131- if (count ($ arrAttachments ) > 0 && $ blnShowAttachments ) {
132- echo "
133- <div class='forumAttachmentsContainer'>
134- <b>Attachments:</b><br>
135- " ;
136-
137- foreach ($ arrAttachments as $ downloadID ) {
138- $ attachmentObj ->select ($ downloadID );
139- $ attachmentInfo = $ attachmentObj ->get_info_filtered ();
140- $ addS = ($ attachmentInfo ['downloadcount ' ] != 1 ) ? "s " : "" ;
141- $ dispFileSize = $ attachmentInfo ['filesize ' ]/1024 ;
142-
143- if ($ dispFileSize < 1 ) {
144- $ dispFileSize = $ attachmentInfo ['filesize ' ]."B " ;
145- }
146- elseif (($ dispFileSize /1024 ) < 1 ) {
147- $ dispFileSize = round ($ dispFileSize , 2 )."KB " ;
148- }
149- else {
150- $ dispFileSize = round (($ dispFileSize /1024 ),2 )."MB " ;
151- }
152-
153- echo "<a href=' " .$ MAIN_ROOT ."downloads/file.php?dID= " .$ downloadID ."'> " .$ attachmentInfo ['filename ' ]."</a> - downloaded " .$ attachmentInfo ['downloadcount ' ]." time " .$ addS ." - " .$ dispFileSize ."<br> " ;
154-
143+ if ($ dispFileSize < 1 ) {
144+ $ dispFileSize = $ attachmentInfo ['filesize ' ]."B " ;
155145 }
156-
157- echo "
158- </div>
159- " ;
160- }
161-
162-
163- if ($ postMemberInfo ['forumsignature ' ] != "" && $ websiteInfo ['forum_hidesignatures ' ] == 0 ) {
146+ elseif (($ dispFileSize /1024 ) < 1 ) {
147+ $ dispFileSize = round ($ dispFileSize , 2 )."KB " ;
148+ }
149+ else {
150+ $ dispFileSize = round (($ dispFileSize /1024 ),2 )."MB " ;
151+ }
152+
153+ echo "<a href=' " .$ MAIN_ROOT ."downloads/file.php?dID= " .$ downloadID ."'> " .$ attachmentInfo ['filename ' ]."</a> - downloaded " .$ attachmentInfo ['downloadcount ' ]." time " .$ addS ." - " .$ dispFileSize ."<br> " ;
154+
155+ }
156+
164157 echo "
165- <div class='forumSignatureContainer'> " .parseBBCode ($ posterMemberObj ->get_info ("forumsignature " ))."</div>
166- " ;
167- }
168-
169- echo "<div class='forumManageLinks'> " ;
170- if ($ this ->blnManageable || $ postMemberInfo ['member_id ' ] == $ memberInfo ['member_id ' ]) {
171-
172- echo "» <a href=' " .$ MAIN_ROOT ."members/console.php?cID= " .$ intManagePostsCID ."&pID= " .$ postInfo ['forumpost_id ' ]."'>EDIT POST</a> «  " ;
173- echo "» <a href='javascript:void(0)' onclick= \"deletePost(' " .$ postInfo ['forumpost_id ' ]."') \">DELETE POST</a> «  " ;
174- $ countManagablePosts ++;
175-
176- }
177-
178- if (LOGGED_IN && $ topicInfo ['lockstatus ' ] == 0 ) {
179- echo "» <a href=' " .$ MAIN_ROOT ."members/console.php?cID= " .$ intPostTopicCID ."&bID= " .$ topicInfo ['forumboard_id ' ]."&tID= " .$ topicInfo ['forumtopic_id ' ].""e= " .$ postInfo ['forumpost_id ' ]."'>QUOTE</a> « " ;
180- }
181-
158+ </div>
159+ " ;
160+ }
182161
162+
163+ if ($ postMemberInfo ['forumsignature ' ] != "" && $ websiteInfo ['forum_hidesignatures ' ] == 0 ) {
183164 echo "
184- </div>
185- </div>
186- </div> " ;
165+ <div class='forumSignatureContainer'> " .parseBBCode ($ posterMemberObj ->get_info ("forumsignature " ))."</div>
166+ " ;
167+ }
168+
169+ echo "<div class='forumManageLinks'> " ;
170+ if ($ this ->blnManageable || $ postMemberInfo ['member_id ' ] == $ memberInfo ['member_id ' ]) {
171+
172+ echo "» <a href=' " .$ MAIN_ROOT ."members/console.php?cID= " .$ intManagePostsCID ."&pID= " .$ postInfo ['forumpost_id ' ]."'>EDIT POST</a> «  " ;
173+ echo "» <a href='javascript:void(0)' onclick= \"deletePost(' " .$ postInfo ['forumpost_id ' ]."') \">DELETE POST</a> «  " ;
174+ }
175+
176+ if (LOGGED_IN && ($ topicInfo ['lockstatus ' ] ?? '' ) == 0 ) {
177+ echo "» <a href=' " .$ MAIN_ROOT ."members/console.php?cID= " .$ intPostTopicCID ."&bID= " .$ topicInfo ['forumboard_id ' ]."&tID= " .$ topicInfo ['forumtopic_id ' ].""e= " .$ postInfo ['forumpost_id ' ]."'>QUOTE</a> « " ;
178+ }
187179
188- ?>
180+ echo "
181+ </div>
182+ </div>
183+ </div> " ;
0 commit comments