1. PHP / Говнокод #10512

    +51

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    $result = dbquery(
                "SELECT a.tag_id, a.tag_name, a.tag_type, a.tag_tags, u.article_id, u.article_cat, u.article_7, u.article_6, u.article_8, u.article_subject, u.article_snippet  
    			FROM ".DB_TAGS." a
    			LEFT JOIN ".DB_ARTICLES." u ON u.article_id=a.tag_name 
    			WHERE a.tag_type = 'A' AND article_draft='0'
    			ORDER BY article_datestamp 
    			DESC");
    
    if (dbrows($result)) {
    while ($data = dbarray($result)) {
    
      if ($data['tag_tags']) {
    		$tags = explode(", ", $data['tag_tags']);
    		foreach ($tags as $values) {
    		
    		if ($values == $tagname) {
    		     echo "<tr><td class='tbl1'>";
    		     echo "Статья: <a href='".BSFURL.article($data['article_id'])."' title='".$data['article_subject']."' class='side'><strong>".$data['article_subject']."</strong></a>"; if ($data['article_6']) { echo" (Язык: <b>".$data['article_6']."</b>) "; } if ($data['article_7']) { echo"(Тип: <b><a href='".BSFURL.articlesTypes($data['article_8'])."'>".$data['article_7']."</a></b>)";} echo"\n<br />";
    		     echo nl2br(parsesmileys(parseubb($data['article_snippet'])))."<hr /></td>\n</tr>\n";
    			 }
    		   }
    		 }
    }
     }

    Запостил: GggTtt, 01 Июня 2012

    Комментарии (19) RSS

    Добавить комментарий