Wtf Is This Supposed To Be?


Subject: Wtf Is This Supposed To Be?
Code: [Download] [Hide]
  1. <?php  
  2. global $userdata;  
  3. $path_parts2 = pathinfo($_SERVER['PHP_SELF']);  
  4. $query = $_SERVER['QUERY_STRING'];  
  5. if ($path_parts2['basename'] != PORTAL_MG && $path_parts2['basename'] != VIEWTOPIC_MG && $path_parts2['basename'] != 'album_showpage.php' && (!preg_match("/article/", $query)) && (!preg_match("/edit/", $query)) && (!preg_match("/add/", $query)) && (!preg_match("/results/", $query)) && $path_parts2['basename'] != 'posting.php' ){?>  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  7. <?php }  
  8. if (preg_match("/news=categories/", $query)){  
  9. ?>  
  10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  11. <?php }  
  12. ?>  
  13. <html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">  
  14. <head>  
  15. <meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />  
  16. <meta http-equiv="Content-Style-Type" content="text/css" />  
  17. {META}  
  18. {META_TAG}  
  19. {NAV_LINKS} 


why are there 2 doctypes?
and why that much opening and closing of php for no reason

and the weirdest there's "if" stuff around there that does nothing.. for as far as I can see..
it's just like if something.. and the php is thinking yeah it is now what LOL

just messy coding or am I still a newb with this? :mrg:

Subject: Respuesta: Wtf Is This Supposed To Be?
This for a News only
Code: [Download] [Hide]
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <?php }  
  3. if (preg_match("/news=categories/", $query)){  
  4. ?> 

And other to all page XS ? :oops:

Subject: Re: Wtf Is This Supposed To Be?
it does nothing..
for as far as I can see there

the tag just gets closed 5 lines further without any change..


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.3975s (PHP: 6% SQL: 94%)
SQL queries: 10 - Debug Off - GZIP Enabled