1. Куча / Говнокод #19792

    −7

    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
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><nav</span> <span class="na">class=</span><span class="s">"navbar navbar-default"</span><span class="nt">></span>
      <span class="nt"><div</span> <span class="na">class=</span><span class="s">"container-fluid"</span><span class="nt">></span>
        <span class="c"><!-- Brand and toggle get grouped for better mobile display --></span>
        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"navbar-header"</span><span class="nt">></span>
          <span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"navbar-toggle collapsed"</span> <span class="na">data-toggle=</span><span class="s">"collapse"</span> <span class="na">data-target=</span><span class="s">"#bs-example-navbar-collapse-1"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>Toggle navigation<span class="nt"></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
          <span class="nt"></button></span>
          <span class="nt"><a</span> <span class="na">class=</span><span class="s">"navbar-brand"</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Brand<span class="nt"></a></span>
        <span class="nt"></div></span>
    
        <span class="c"><!-- Collect the nav links, forms, and other content for toggling --></span>
        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"collapse navbar-collapse"</span> <span class="na">id=</span><span class="s">"bs-example-navbar-collapse-1"</span><span class="nt">></span>
          <span class="nt"><ul</span> <span class="na">class=</span><span class="s">"nav navbar-nav"</span><span class="nt">></span>
            <span class="nt"><li</span> <span class="na">class=</span><span class="s">"active"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>(current)<span class="nt"></span></a></li></span>
            <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link<span class="nt"></a></li></span>
            <span class="nt"><li</span> <span class="na">class=</span><span class="s">"dropdown"</span><span class="nt">></span>
              <span class="nt"><a</span> <span class="na">href=</span><span class="s">"#"</span> <span class="na">class=</span><span class="s">"dropdown-toggle"</span> <span class="na">data-toggle=</span><span class="s">"dropdown"</span> <span class="na">role=</span><span class="s">"button"</span> <span class="na">aria-haspopup=</span><span class="s">"true"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>Dropdown <span class="nt"><span</span> <span class="na">class=</span><span class="s">"caret"</span><span class="nt">></span></a></span>
              <span class="nt"><ul</span> <span class="na">class=</span><span class="s">"dropdown-menu"</span><span class="nt">></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Action<span class="nt"></a></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Another action<span class="nt"></a></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Something else here<span class="nt"></a></li></span>
                <span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Separated link<span class="nt"></a></li></span>
                <span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>One more separated link<span class="nt"></a></li></span>
              <span class="nt"></ul></span>
            <span class="nt"></li></span>
          <span class="nt"></ul></span>
          <span class="nt"><form</span> <span class="na">class=</span><span class="s">"navbar-form navbar-left"</span> <span class="na">role=</span><span class="s">"search"</span><span class="nt">></span>
            <span class="nt"><div</span> <span class="na">class=</span><span class="s">"form-group"</span><span class="nt">></span>
              <span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">class=</span><span class="s">"form-control"</span> <span class="na">placeholder=</span><span class="s">"Search"</span><span class="nt">></span>
            <span class="nt"></div></span>

    С сайта bootstrap

    d_fomenok, 10 Апреля 2016

    Комментарии (0)
  2. C# / Говнокод #19791

    +3

    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
    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
    public class Man
        {
            public Man(string id, string name, IEnumerable<Brother> brothers, Guid id, int year, int age) : base(id, year)
            {
                this.Name = name;
                this.Brothers = brothers;
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, string note, IEnumerable<Brother> brothers, Guid id, int year, int age) : base(id, note, year)
            {
                this.Name = name;
                this.Brothers = brothers;
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, IEnumerable<Brother> brothers, Guid id, int year, int age) : base(id, year)
            {
                this.Name = name;
                this.Brothers = brothers;
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, string note, IEnumerable<Brother> brothers, Guid id, int year, int age) : base(id, note, year)
            {
                this.Name = name;
                this.Brothers = brothers;
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, Guid id, int year, int age) : base(id, year)
            {
                this.Name = name;
                this.Brothers = new List<Brother>() { new Brother(Guid.NewGuid().ToString()) };
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, string note, Guid id, int year, int age) : base(id, note, year)
            {
                this.Name = name;
                this.Brothers = new List<Brother>() { new Brother(Guid.NewGuid().ToString()) };
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, Guid id, int year, int age) : base(id, year)
            {
                this.Name = name;
                this.Brothers = new List<Brother>() { new Brother(Guid.NewGuid().ToString()) };
                this.Id = id;
                this.Age = age;
            }
    
            public Man(string id, string name, string note, Guid id, int year, int age) : base(id, note, year)
            {
                this.Name = name;
                this.Id = id;
                this.Brothers = new List<Brother>() { new Brother(Guid.NewGuid().ToString()) };
                this.Age = age;
            }
    
            public string Name { get; }
    
            public Guid Id { get; }
    
            public IEnumerable<Brother> Brothers { get; }
    
            public int Age { get; }
    
        }

    Человек знал, но нехотел использовать значение параметра конструктора по умолчанию, потому что это усложняет структуру.
    Переменные переназвал почеловечнее.

    homk, 10 Апреля 2016

    Комментарии (19)
  3. PHP / Говнокод #19789

    +2

    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
    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
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    function op_v($n0 = NULL,$n1 = NULL,$n2 = NULL,$n3 = NULL,$n4 = NULL,$n5 = NULL,$n6 = NULL,$n7 = NULL,$n8 = NULL,$n9 = NULL, $sql) {
    //быдлокод гг
    if ($sql==0){
     if(!empty($n0)) $x0 = '<option value="0">'.$n0.'</option>';
     if(!empty($n1)) $x1 = '<option value="1">'.$n1.'</option>';
     if(!empty($n2)) $x2 = '<option value="2">'.$n2.'</option>';
     if(!empty($n3)) $x3 = '<option value="3">'.$n3.'</option>';
     if(!empty($n4)) $x4 = '<option value="4">'.$n4.'</option>';
     if(!empty($n5)) $x5 = '<option value="5">'.$n5.'</option>';
     if(!empty($n6)) $x6 = '<option value="6">'.$n6.'</option>';
     if(!empty($n7)) $x7 = '<option value="7">'.$n7.'</option>';
     if(!empty($n8)) $x8 = '<option value="8">'.$n8.'</option>';
     if(!empty($n9)) $x9 = '<option value="9">'.$n9.'</option>';
    
     $res = $x0.$x1.$x2.$x3.$x4.$x5.$x6.$x7.$x8.$x9;
     }
     if ($sql==1){
     if(!empty($n1)) $x0 = '<option value="1">'.$n1.'</option>';
     if(!empty($n0)) $x1 = '<option value="0">'.$n0.'</option>';
     if(!empty($n2)) $x2 = '<option value="2">'.$n2.'</option>';
     if(!empty($n3)) $x3 = '<option value="3">'.$n3.'</option>';
     if(!empty($n4)) $x4 = '<option value="4">'.$n4.'</option>';
     if(!empty($n5)) $x5 = '<option value="5">'.$n5.'</option>';
     if(!empty($n6)) $x6 = '<option value="6">'.$n6.'</option>';
     if(!empty($n7)) $x7 = '<option value="7">'.$n7.'</option>';
     if(!empty($n8)) $x8 = '<option value="8">'.$n8.'</option>';
     if(!empty($n9)) $x9 = '<option value="9">'.$n9.'</option>';
    
     $res = $x0.$x1.$x2.$x3.$x4.$x5.$x6.$x7.$x8.$x9;
     }
     
     if ($sql==2){
     if(!empty($n2)) $x0 = '<option value="2">'.$n2.'</option>';
     if(!empty($n0)) $x1 = '<option value="0">'.$n0.'</option>';
     if(!empty($n1)) $x2 = '<option value="1">'.$n1.'</option>';
     if(!empty($n3)) $x3 = '<option value="3">'.$n3.'</option>';
     if(!empty($n4)) $x4 = '<option value="4">'.$n4.'</option>';
     if(!empty($n5)) $x5 = '<option value="5">'.$n5.'</option>';
     if(!empty($n6)) $x6 = '<option value="6">'.$n6.'</option>';
     if(!empty($n7)) $x7 = '<option value="7">'.$n7.'</option>';
     if(!empty($n8)) $x8 = '<option value="8">'.$n8.'</option>';
     if(!empty($n9)) $x9 = '<option value="9">'.$n9.'</option>';
     
     $res = $x0.$x1.$x2.$x3.$x4.$x5.$x6.$x7.$x8.$x9;
     }
    
    if ($sql==3){
     if(!empty($n3)) $x0 = '<option value="3">'.$n3.'</option>';
     if(!empty($n0)) $x1 = '<option value="0">'.$n0.'</option>';
     if(!empty($n1)) $x2 = '<option value="1">'.$n1.'</option>';
     if(!empty($n2)) $x3 = '<option value="2">'.$n2.'</option>'; 
     if(!empty($n4)) $x4 = '<option value="4">'.$n4.'</option>';
     if(!empty($n5)) $x5 = '<option value="5">'.$n5.'</option>';
     if(!empty($n6)) $x6 = '<option value="6">'.$n6.'</option>';
     if(!empty($n7)) $x7 = '<option value="7">'.$n7.'</option>';
     if(!empty($n8)) $x8 = '<option value="8">'.$n8.'</option>';
     if(!empty($n9)) $x9 = '<option value="9">'.$n9.'</option>';
    
     $res = $x0.$x1.$x2.$x3.$x4.$x5.$x6.$x7.$x8.$x9;
     }
    
    if ($sql==4){
     if(!empty($n4)) $x0 = '<option value="4">'.$n4.'</option>';
     if(!empty($n0)) $x1 = '<option value="0">'.$n0.'</option>';
     if(!empty($n1)) $x2 = '<option value="1">'.$n1.'</option>';
     if(!empty($n2)) $x3 = '<option value="2">'.$n2.'</option>';
     if(!empty($n3)) $x4 = '<option value="3">'.$n3.'</option>';
     if(!empty($n5)) $x5 = '<option value="5">'.$n5.'</option>';
     if(!empty($n6)) $x6 = '<option value="6">'.$n6.'</option>';
     if(!empty($n7)) $x7 = '<option value="7">'.$n7.'</option>';
     if(!empty($n8)) $x8 = '<option value="8">'.$n8.'</option>';
     if(!empty($n9)) $x9 = '<option value="9">'.$n9.'</option>';
    
     $res = $x0.$x1.$x2.$x3.$x4.$x5.$x6.$x7.$x8.$x9;
     }
    
    if ($sql==5){
     if(!empty($n5)) $x0 = '<option value="5">'.$n5.'</option>';
     if(!empty($n0)) $x1 = '<option value="0">'.$n0.'</option>';
     if(!empty($n1)) $x2 = '<option value="1">'.$n1.'</option>';
     if(!empty($n2)) $x3 = '<option value="2">'.$n2.'</option>';
     if(!empty($n3)) $x4 = '<option value="3">'.$n3.'</option>';
     if(!empty($n4)) $x5 = '<option value="4">'.$n4.'</option>';
     if(!empty($n6)) $x6 = '<option value="6">'.$n6.'</option>';
     if(!empty($n7)) $x7 = '<option value="7">'.$n7.'</option>';
     if(!empty($n8)) $x8 = '<option value="8">'.$n8.'</option>';
     if(!empty($n9)) $x9 = '<option value="9">'.$n9.'</option>';
    и так далее...

    привет из wap'а

    odoviez, 10 Апреля 2016

    Комментарии (13)
  4. C++ / Говнокод #19785

    +3

    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
    #if defined(OSVR_WINDOWS)
        static const auto SEARCH_PATH_ENV = "PATH";
        static const auto SEARCH_PATH_SEP = ";";
    #else
        static const auto SEARCH_PATH_ENV = "LD_LIBRARY_PATH";
        static const auto SEARCH_PATH_SEP = ":";
    #endif
    
    
    void wrappedPutenv(std::string const &val) {
    #ifdef _MSC_VER
                _putenv_s(SEARCH_PATH_ENV, val.c_str());
    #else // not microsoft runtime specific
                auto newValue = SEARCH_PATH_ENV + "=" + val;
                // Have to allocate new string because it becomes part of the
                // environment.
                char *newString = static_cast<char *>(malloc(newValue.size() + 1));
                std::copy(begin(newValue), end(newValue), newString);
    #endif
    }

    Момент, когда я считаю, что C++-ный auto -- чистое зло(строка 14).
    Код из OSVR-Vive, плагина к OSVR, который работает с HTC Vive.

    a1batross, 08 Апреля 2016

    Комментарии (26)
  5. PHP / Говнокод #19784

    0

    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
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    <script type="text/javascript">
            var currentLeveler = 0;
            var currentPrefix = 'povorot_';
            var currentPart = 0;
            var partsCount = [];
            var oldPart, oldLeveler;
            languagePrefix = "<?php echo $lang; ?>";
            partsCount[0] = 5;
            partsCount[1] = 4;
            partsCount[2] = 3;
    
            var levelersInfo = [[], [], []];
            var levelerParts = [[], [], []];
            var content = [];
    
            <?php
                while($row = mysql_fetch_array($tmp)){
                    $content[$row['block_id']] = $row['cont'];
                    echo "content[\"" .$row['block_id']. "\"] = '".$row['cont']."';\n";
                }
                for($j = 0; $j < 3; $j++)
                    for($i = 0; $i < 5; $i++){
    
                        $val1 = $content[$lang."_tech_leveler_info_".$j.$i];
                        $val2 = $content[$lang."_tech_part_info_".$j.$i];
                  
                        echo "levelersInfo[".$j."].push('".$val1."');";
                        echo "levelerParts[".$j."].push('".$val2."');";
                    }
            ?>
            $(document).ready(function () {
                $.each($(".changeable"), function () {
                    $(this).html(content[$(this).attr("id")]);
                });
            });
        </script>

    Формируем js код, через PHP на основе данных из базы данных... или в жопку аякс

    perryutkonos, 08 Апреля 2016

    Комментарии (10)
  6. PHP / Говнокод #19783

    +6

    1. 1
    2. 2
    function pageOutput() {
    	foreach($GLOBALS as $var => $val) $$var = &$GLOBALS[$var];

    очередная находка..
    ...для тех, кто не уверен, какие переменные из global scope понадобятся...

    paulrudy, 08 Апреля 2016

    Комментарии (0)
  7. C# / Говнокод #19780

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    // 1188 references
    internal static string CombinePaths(string firstPath, string secondPath)
    {
        return Path.Combine(firstPath, secondPath);
    }

    - Шо это было?!!
    - Cэкономили точку. 1188 раз )))))

    RadChand, 08 Апреля 2016

    Комментарии (8)
  8. C# / Говнокод #19779

    +1

    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
    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
    public class FileStorage {
            public FileStorage() {
                try {
                    if (String.IsNullOrEmpty(Common.GlobalVariables.FileStorage)) {
                        throw new Exception(Common.GuiHelper.ShowErrorMessage("FileStorage", String.Empty));
                    }
    
                    if (!Directory.Exists(Common.GlobalVariables.FileStorage)) {
                        DirectoryInfo di = Directory.CreateDirectory(Common.GlobalVariables.FileStorage);
                        if (!di.Exists) {
                            throw new Exception(Common.GuiHelper.ShowErrorMessage("FileStorageDir", String.Empty));
                        }
                    }
                } catch (Exception er) {
                    throw new Exception(er.Message);
                }
            }
    
            public String CreateFileDirectory() {
                try {
                    int iIdx = 0;
                    Boolean bIsCreated = false;
                    while (!bIsCreated && iIdx < 10) {
                        String sDir = Guid.NewGuid().ToString("N").ToLower();
                        sDir = sDir.Substring(0, 2);
                        if (!Directory.Exists(Common.GlobalVariables.FileStorage + sDir + @"\")) {
                            DirectoryInfo di = Directory.CreateDirectory(Common.GlobalVariables.FileStorage + sDir + @"\");
                            if (di.Exists) {
                                return Common.GlobalVariables.FileStorage + sDir + @"\";
                            }
                        }
    
                        iIdx++;
                    }
    
                    return null;
                } catch (Exception er) {
                    throw new Exception(er.Message);
                }
            }
        }

    может я чего не понимаю, но зачем?

    Lokich, 08 Апреля 2016

    Комментарии (5)
  9. JavaScript / Говнокод #19778

    +4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    $(document).ready(function() {
    		setInterval(form_check, 10);
    
    		function form_check() {
    			if ($("#main-order-form input[name='car-name']").attr("value") == "") {
    				$("#main-order-form button").attr('disabled', 'disabled');
    			} else {
    				$("#main-order-form button").removeAttr('disabled');
    			}						
    		}
    	});

    Валидация формы)))

    IKARUS, 08 Апреля 2016

    Комментарии (2)
  10. PHP / Говнокод #19777

    +1

    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
    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
    <?php if($this->config->get('UniversumControl_status') == '1'){ ?>
    <style type="text/css">
    body {
    <?php if(( $this->config->get('UniversumControl_body_bg_pattern') != null) && ($this->config->get('UniversumControl_body_bg_pattern') != 'pattern0.png')){ ?>
     background:url("catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/image/backgrounds/<?php echo  $this->config->get('UniversumControl_body_bg_pattern');?>") top center repeat;
     <?php } ?>
     background-color:#<?php echo $this->config->get('UniversumControl_body_bg_color') ?>;
     font-family:<?php echo $this->config->get('UniversumControl_body_font') ?>;
     color:#<?php echo $this->config->get('UniversumControl_text_color') ?>;
    }
    h1,h2,h3,h4,h5,h6, #menu ul li a, #column-left .box .box-heading, #column-right .box .box-heading, .htabs a, .product-info .price-old, .product-info .price-new, .product-info .cart .button, .offer_title, div.prod_hold .prod-info-fly .name a, .accordeonHolder .name a, .prod_hold .name a, #content .boxPlain .box-heading { 
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_custom_font') != null)){	?>
    font-family: '<?php echo  $this->config->get('UniversumControl_custom_font_family');?>';
    <?php } elseif (($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_custom_font') == null) && ( $this->config->get('UniversumControl_header_font') != 'Arial')){ ?>
    <?php $headerFont = $this->config->get('UniversumControl_headings_font');
    $font = str_replace("+", " ", $headerFont);
    ?> font-family: '<?php echo $font; ?>';
    <?php } else { ?>
    font-family: 'Ubuntu Condensed';
    <?php } ?>
    }
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings_color') != null)){	?>
    h1, h2, h2.heading_title, h3, h4, h5, h6, #column-left .box .box-heading, #column-right .box .box-heading {
    color:#<?php echo $this->config->get('UniversumControl_headings_color') ?>;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings1_size') != null)){	?>
    h1 {
    font-size:<?php echo $this->config->get('UniversumControl_headings1_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings2_size') != null)){	?>
    h2, #content .boxPlain .box-heading {
    font-size:<?php echo $this->config->get('UniversumControl_headings2_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings3_size') != null)){	?>
    h3 {
    font-size:<?php echo $this->config->get('UniversumControl_headings3_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings4_size') != null)){	?>
    h4 {
    font-size:<?php echo $this->config->get('UniversumControl_headings4_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_price_size') != null)){	?>
    .product-info .price {
    font-size:<?php echo $this->config->get('UniversumControl_price_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_module_title_size') != null)){	?>
    #content h2.heading_title span {
    font-size:<?php echo $this->config->get('UniversumControl_module_title_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_column_title_size') != null)){	?>
    #column-left .box .box-heading, #column-right .box .box-heading {
    font-size:<?php echo $this->config->get('UniversumControl_column_title_size') ?>px;
    }

    И такого кода там еще на 1000 строк.

    Интернет-магазин на опенкарте. Видимо кто то сделал систему настраивания css через админку))

    IKARUS, 08 Апреля 2016

    Комментарии (7)