"PHP" / Говнокод #16401 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
/*
     * BANERS
     */
    $IMG="<div class=\"tovMain\" id=\"bnList1_imgBlock\"></div>
          <script type=\"text/javascript\">
            var bnList1_images=[";
    $banerId=$res->show1Var("s_rzd","page='".PAGE_BANER."'","id");
    $imgPreRes=$res->showTabAsPage("s_cnt","rzdId='".$banerId."' AND image>'' AND `show`='Y'","image","id",0);
    foreach($imgPreRes as $imgRes){
        $IMG.="'{ROOTPATH}images/".$imgRes["image"]."',";
    }
    $IMG=substr($IMG,0,-1);
    $IMG.="];
            var bnList1_old_image='';
            var bnList1_x=10;
            var bnList1_y=3;
            var bnList1_mercaniy=2;
            var bnList1_speed=500;
            var bnList1_speed1=800;
            var bnList1_w=Math.round(document.getElementById(\"bnList1_imgBlock\").offsetWidth/bnList1_x);
            var bnList1_h=Math.round(document.getElementById(\"bnList1_imgBlock\").offsetHeight/bnList1_y);
        
            var tek=0;
            bnList1Listing(bnList1_images[tek]);
            setInterval(\"tek=(bnList1_images.length>(tek+1)?tek+1:0);bnList1Listing(bnList1_images[tek]);\",5000);
            
            for(var i=1;i<=bnList1_x;i++){
                for(var j=1;j<=bnList1_y;j++){
                    bnList1CreateBlocks(\"bnList1_block_\"+i+\"_\"+j+\"_1\",bnList1_w,bnList1_h,bnList1_w*(i-1),bnList1_h*(j-1));
                    bnList1CreateBlocks(\"bnList1_block_\"+i+\"_\"+j+\"_2\",bnList1_w,bnList1_h,bnList1_w*(i-1),bnList1_h*(j-1));
                }
            }
        </script>";
    /*$rndBanerId=array_rand($imgPreRes);
    $img=$imgPreRes[$rndBanerId]["image"];
    $IMG="<div class=\"tovMain\" id=\"slideshow\">
            <img src=\"{ROOTPATH}images/empty.gif\" alt=\"\" />
            <img src=\"{ROOTPATH}img.php?image=".$img."&w=656&h=189\" alt=\"\" />
          </div>"; // Простая сквозная картинка
    //$HD_IMG="<div class=\"tovMain\">".($cntRes->hdImg())."</div>"; // Сменяющиеся картинки
     * s
     */
    $BANER=$cntRes->site_simpleStr(PAGE_BANER,"text");
        $content=str_replace("{BANER}",$BANER,$content);
        $content=str_replace("{IMG}",$IMG,$content);
    
    /*
     * IMAG
     */
    $TOVMAIN=$imagRes->showAsTovList("main");
        $content=str_replace("{TOVMAIN}",$TOVMAIN,$content);
    unset($TOVMAIN);
        
    /*
     * CONTENT
     */
    
    $NAV_ROW=$cntRes->site_nav();
    $STR=$cntRes->site_pageHd();
    $STR.=$cntRes->site_imagFilter();
    $STR.=$cntRes->site_cont();
    $SUB_STR=$cntRes->commonStr();
        $content=str_replace("{NAV_ROW}",$NAV_ROW,$content);
        $content=str_replace("{STR}",$STR,$content);
        $content=str_replace("{SUB_STR}",$SUB_STR,$content);
    unset($STR,$SUB_STR);

            $content=str_replace("{BACK}",BACK,$content);
            $content=str_replace("{UP}",UP,$content);
            $content=str_replace("{SEND}",SEND,$content);
            $content=str_replace("{FORM_SEND_ZAG}",FORM_SEND_ZAG,$content);
            $content=str_replace("{FORM_NAME}",FORM_NAME,$content);
            $content=str_replace("{FORM_POSTADDR}",FORM_POSTADDR,$content);
            $content=str_replace("{FORM_PHONE}",FORM_PHONE,$content);
            $content=str_replace("{FORM_EML}",FORM_EML,$content);
            $content=str_replace("{FORM_MSG}",FORM_MSG,$content);
            $content=str_replace("{FORM_SEND_SUCCESS}",FORM_SEND_SUCCESS,$content);
            $content=str_replace("{FORM_SEND_ERROR}",FORM_SEND_ERROR,$content);
            $content=str_replace("{REQUIRED_FIELDS}",REQUIRED_FIELDS,$content);
            $content=str_replace("{MAIN}",MAIN,$content);
  if(__lang=="en"){
    $content=str_replace("logo.png","logo_en.png",$content);
  }

templates/default/template.php
Знакомьтесь, "DEFAULT SITE TEMPLATE" (Кусок 2-й) ;)

Запостил: RuJack RuJack, (Updated )

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

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

Семь раз отмерь — один отрежь, guest!

    А не использовать ли нам bbcode?


    8