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

    0

    1. 1
    IT Оффтоп #211

    #181: https://govnokod.ru/28739 https://govnokod.xyz/_28739
    #182: https://govnokod.ru/28749 https://govnokod.xyz/_28749
    #183: https://govnokod.ru/28777 https://govnokod.xyz/_28777
    #184: https://govnokod.ru/28790 https://govnokod.xyz/_28790
    #185: https://govnokod.ru/28794 https://govnokod.xyz/_28794
    #186: https://govnokod.ru/28815 https://govnokod.xyz/_28815
    #187: https://govnokod.ru/28833 https://govnokod.xyz/_28833
    #188: https://govnokod.ru/28837 https://govnokod.xyz/_28837
    #189: https://govnokod.ru/28840 https://govnokod.xyz/_28840
    #190: https://govnokod.ru/28875 https://govnokod.xyz/_28875
    #191: https://govnokod.ru/28878 https://govnokod.xyz/_28878
    #192: https://govnokod.ru/28886 https://govnokod.xyz/_28886
    #193: https://govnokod.ru/28911 https://govnokod.xyz/_28911
    #194: https://govnokod.ru/28914 https://govnokod.xyz/_28914
    #195: https://govnokod.ru/28917 https://govnokod.xyz/_28917
    #196: https://govnokod.ru/28925 https://govnokod.xyz/_28925
    #197: https://govnokod.ru/28935 https://govnokod.xyz/_28935
    #198: https://govnokod.ru/28938 https://govnokod.xyz/_28938
    #199: https://govnokod.ru/28942 https://govnokod.xyz/_28942
    #200: https://govnokod.ru/28945 https://govnokod.xyz/_28945
    #201: https://govnokod.ru/28948 https://govnokod.xyz/_28948
    #202: https://govnokod.ru/28951 https://govnokod.xyz/_28951
    #203: https://govnokod.ru/28954 https://govnokod.xyz/_28954
    #204: https://govnokod.ru/28971 https://govnokod.xyz/_28971
    #205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
    #206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
    #207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
    #208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
    #209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
    #210: https://govnokod.ru/29079 https://govnokod.xyz/_29079

    nepeKamHblu_nemyx, 13 Февраля 2025

    Комментарии (314)
  2. Си / Говнокод #29091

    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
    37. 37
    extern char* strcat( char* dest, const char* src );
    extern int   printf ( const char * restrict format, ... );
    extern int   putchar( int ch );
    
    #define LISPER(n, l, re) ({                                                                                                     \
                    auto int ii = l;                                                                                                          \
                    static unsigned char n[l];                                                                                      \                           
                    while (ii--) {                                                                                                             \
                        *str##n(n, (unsigned char[]){0x09 >> 1 << 1, 0x1911 >> 0xD});                \
                    };                                                                                                                               \
                    *((void**)&re) = printf((unsigned char[]){0x25, 0x73, 0x1917 >> 0xE}, n); \
                    })
    
    struct bombitterLemon{
        union {
            unsigned char   : 0;
            unsigned char   : 0;
            unsigned char v: 7;
        } pacific;
    };
    
    int main(void) {
    
        struct bombitterLemon b0; 
    
        LISPER(cat, 0x40 ^ (2 << 2), b0);
        (*putchar) (*(struct wtf**)&b0);
        LISPER(cat, ((int) (((char*)   (0x8 ^ (1 << 6))) - 3) | 1), b0);
        (**putchar) (*(struct is***)&b0);
        LISPER(cat, ((int) (((short*)  (0x9 << 3))) | 4), b0);
        (***putchar) (*(struct that****)&b0);
        LISPER(cat, ((int) (((int*)    (0x12 << 2))) | 4), b0);
        (**putchar) (*(unsigned char*****)&b0);
        LISPER(cat, ((int) (((long*)   (0x90 >> 1))) | 4 | 2 | 1), b0);
        (*putchar) (b0.pacific.v);
    
    }

    Классический собесный говнокод для кунов на громкие позиции malware ANALyst, security дрист-searcher и даже (о, ужас) compiler devteam в известные шарашки.
    Шланг<15 и ICC жуют с говном не глядя. Чего не сказать о бычаре, дристающего на коврик.
    Осилил, анонимус? Поясни пацанам на пальцах за высер без единого include с ноября прошлого.

    Dulldonch1k, 13 Февраля 2025

    Комментарии (3)
  3. Си / Говнокод #29090

    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
    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
    89. 89
    90. 90
    91. 91
    void main() {
        ph_fork f1, f2, f3, f4, f5;
    
        f_arr[0] = &f1;
        f_arr[1] = &f2;
        f_arr[2] = &f3;
        f_arr[3] = &f4;
        f_arr[4] = &f5;
    
        philosopher ph1, ph2, ph3, ph4, ph5;
    
        ph_arr[0] = &ph1;
        ph_arr[1] = &ph2;
        ph_arr[2] = &ph3;
        ph_arr[3] = &ph4;
        ph_arr[4] = &ph5;
    
        f1.number = 1;
        sem_init(&f1.is_free, 0, 1);
    
        f2.number = 2;
        sem_init(&f2.is_free, 0, 1);
    
        f3.number = 3;
        sem_init(&f3.is_free, 0, 1);
    
        f4.number = 4;
        sem_init(&f4.is_free, 0, 1);
    
        f5.number = 5;
        sem_init(&f5.is_free, 0, 1);
    
        ph1.number = 1;
        ph1.ph_fork_amount = 0;
        ph1.ph_forks[0] = 1;
        ph1.ph_forks[1] = 2;
        ph1.times_eaten = 0;
        ph1.times_thought = 0;
        ph1.st = THINKING;
        pthread_create(&ph1.thread, NULL, routine, (void*)&ph1);
    
        ph2.number = 2;
        ph2.ph_fork_amount = 0;
        ph2.ph_forks[0] = 2;
        ph2.ph_forks[1] = 3;
        ph2.times_eaten = 0;
        ph2.times_thought = 0;
        ph2.st = THINKING;
        pthread_create(&ph2.thread, NULL, routine, (void*)&ph2);
    
        ph3.number = 3;
        ph3.ph_fork_amount = 0;
        ph3.ph_forks[0] = 3;
        ph3.ph_forks[1] = 4;
        ph3.times_eaten = 0;
        ph3.times_thought = 0;
        ph3.st = THINKING;
        pthread_create(&ph3.thread, NULL, routine, (void*)&ph3);
    
        ph4.number = 4;
        ph4.ph_fork_amount = 0;
        ph4.ph_forks[0] = 4;
        ph4.ph_forks[1] = 5;
        ph4.times_eaten = 0;
        ph4.times_thought = 0;
        ph4.st = THINKING;
        pthread_create(&ph4.thread, NULL, routine, (void*)&ph4);
    
        ph5.number = 5;
        ph5.ph_fork_amount = 0;
        ph5.ph_forks[0] = 5;
        ph5.ph_forks[1] = 1;
        ph5.times_eaten = 0;
        ph5.times_thought = 0;
        ph5.st = THINKING;
        pthread_create(&ph5.thread, NULL, routine, (void*)&ph5);
    
        pthread_join(ph1.thread, NULL);
        pthread_join(ph2.thread, NULL);
        pthread_join(ph3.thread, NULL);
        pthread_join(ph4.thread, NULL);
        pthread_join(ph5.thread, NULL);
    
        sem_destroy(&f1.is_free);
        sem_destroy(&f2.is_free);
        sem_destroy(&f3.is_free);
        sem_destroy(&f4.is_free);
        sem_destroy(&f5.is_free);
    
        printf("\nThe lunch has ended!\n--------\nRESULTS:\nPhilosopher 1 has eaten %d times and thought %d times\nPhilosopher 2 has eaten %d times and thought %d times\nPhilosopher 3 has eaten %d times and thought %d times\nPhilosopher 4 has eaten %d times and thought %d times\nPhilosopher 5 has eaten %d times and thought %d times\n", ph1.times_eaten, ph1.times_thought, ph2.times_eaten, ph2.times_thought, ph3.times_eaten, ph3.times_thought, ph4.times_eaten, ph4.times_thought, ph5.times_eaten, ph5.times_thought);
    }

    Решение задачи про обедающих философов, часть вторая.

    GDMaster, 13 Февраля 2025

    Комментарии (1)
  4. Си / Говнокод #29089

    0

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    #include <pthread.h>
    #include <stdio.h>
    #include <semaphore.h>
    #include <unistd.h>
    typedef struct _ph_fork {
        int number;
        sem_t is_free;
    } ph_fork;
    typedef enum state {
        EATING,
        THINKING
    } state;
    typedef struct _philosopher {
        int number;
        int ph_fork_amount;
        int ph_forks[2];
        int times_eaten;
        int times_thought;
        state st;
        pthread_t thread;
    } philosopher;
    
    ph_fork* f_arr[5] = {0};
    philosopher* ph_arr[5] = {0};
    
    void* routine(void* arg) {
        philosopher* ph = (philosopher*)arg;
        int frks[2] = {0};
        frks[0] = ph->ph_forks[0];
        frks[1] = ph->ph_forks[1];
        int ph_fork_left_odd = frks[0] % 2;
        int ph_fork_right_odd = frks[1] % 2;
        printf("Philosopher %d has taken a seat at the table.\n", ph->number);
        for (int i = 0; i < 72; i++) {
            if (!(ph_fork_left_odd && ph_fork_right_odd)) {
                if (ph_fork_left_odd) {
                    sem_wait(&f_arr[frks[0] - 1]->is_free);
                    printf("Philosopher %d takes left fork…\n", ph->number);
                    ph->ph_fork_amount++;
                    sem_wait(&f_arr[frks[1] - 1]->is_free);
                    printf("Philosopher %d takes right fork…\n", ph->number);
                    ph->ph_fork_amount++;
                }
                if (ph_fork_right_odd) {
                    sem_wait(&f_arr[frks[1] - 1]->is_free);
                    printf("Philosopher %d takes right fork…\n", ph->number);
                    ph->ph_fork_amount++;
                    sem_wait(&f_arr[frks[0] - 1]->is_free);
                    printf("Philosopher %d takes left fork…\n", ph->number);
                    ph->ph_fork_amount++;
                }
            } else { // Special case when both ph_forks are odd
                sem_wait(&f_arr[frks[0] - 1]->is_free);
                printf("Philosopher %d takes left fork…\n", ph->number);
                ph->ph_fork_amount++;
                sem_wait(&f_arr[frks[1] - 1]->is_free);
                printf("Philosopher %d takes right fork…\n", ph->number);
                ph->ph_fork_amount++;
            }
            if (ph->ph_fork_amount == 2) {
                ph->st = EATING;
                ph->times_eaten++;
                printf("Philosopher %d is eating…\n", ph->number);
                sleep(1);
            };
            if (!(ph_fork_left_odd && ph_fork_right_odd)) {
                if (ph_fork_left_odd) {
                    printf("Philosopher %d puts back left fork…\n", ph->number);
                    sem_post(&f_arr[frks[0] - 1]->is_free);
                    ph->ph_fork_amount--;
                    printf("Philosopher %d puts back right fork…\n", ph->number);
                    sem_post(&f_arr[frks[1] - 1]->is_free);
                    ph->ph_fork_amount--;
                }
                if (ph_fork_right_odd) {
                    printf("Philosopher %d puts back right fork…\n", ph->number);
                    sem_post(&f_arr[frks[1] - 1]->is_free);
                    ph->ph_fork_amount--;
                    printf("Philosopher %d puts back left fork…\n", ph->number);
                    sem_post(&f_arr[frks[0] - 1]->is_free);
                    ph->ph_fork_amount--;
                }
            } else { // Special case when both ph_forks are odd
                printf("Philosopher %d puts back left fork…\n", ph->number);
                sem_post(&f_arr[frks[0] - 1]->is_free);
                ph->ph_fork_amount--;
                printf("Philosopher %d puts back right fork…\n", ph->number);
                sem_post(&f_arr[frks[1] - 1]->is_free);
                ph->ph_fork_amount--;
            }
            if (ph->ph_fork_amount == 0) {
                ph->st = THINKING;
                printf("Philosopher %d is thinking…\n", ph->number);
                ph->times_thought++;
                sleep(1);
            }
        }
        printf("Philosopher %d has finished his lunch and left.\n", ph->number);
        return NULL;
    };

    Решение задачи про обедающих философов, часть первая.

    GDMaster, 13 Февраля 2025

    Комментарии (0)
  5. Kotlin / Говнокод #29088

    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
    //Вдохновил говнокод от DypHuu_niBEHb
    fun main() {
        Сорок тысяч обезъян в жопу сунули банан
    }
    
    object Сорок {
        infix fun тысяч(a: обезъян) : обезъян {
            print("${this.javaClass.simpleName} ${Thread.currentThread().stackTrace[1].methodName} ")
            return обезъян
        }
    }
    
    object обезъян {
        infix fun в(a: жопу) : жопу {
            print("${this.javaClass.simpleName} ${Thread.currentThread().stackTrace[1].methodName} ")
            return жопу
        }
    }
    
    object жопу {
       infix fun сунули(a: банан) : жопу {
           print("${this.javaClass.simpleName} ${Thread.currentThread().stackTrace[1].methodName} ${a.javaClass.simpleName}")
           return this
       }
    }
    
    object банан {
    }

    Сорок тысяч обезъян в жопу сунули банан

    Trix, 12 Февраля 2025

    Комментарии (24)
  6. Ruby / Говнокод #29087

    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
    # Setup the admin service from Microsoft
      def setup_microsoft_admin_service
        # define the empty microsoft picture url
        @no_profile_picture = 'https://secure.aadcdn.microsoftonline-p.com/ests/2.1.5670.18/content/images/work_account.png'
        # Application id and secret from microsoft
        client_id = ENV['AZURE_CLIENT_ID']
        # client_secret = 'z8uGboGliWfBqa8/s8K4KbDH96l1F0+PuFwX+AOGJTQ='
        client_secret = ENV['AZURE_CLIENT_SECRET']
        # Should also be listed in microsoft app
        tenant        = Current.organization['microsoft_azure_domain_hint']
        # Create credentials using Active Directory Azure Library
        client_cred   = ADAL::ClientCredential.new(client_id, client_secret)
        context       = ADAL::AuthenticationContext.new(ADAL::Authority::WORLD_WIDE_AUTHORITY, tenant)
        # Return the acquired tokens from the graph site
        context.acquire_token_for_client('https://graph.microsoft.com', client_cred)
      end

    Perfección

    Shannarra_, 10 Февраля 2025

    Комментарии (2)
  7. Куча / Говнокод #29086

    0

    1. 1
    Пиздец-оффтоп #107

    #77: https://govnokod.ru/28722 https://govnokod.xyz/_28722
    #78: https://govnokod.ru/28730 https://govnokod.xyz/_28730
    #79: https://govnokod.ru/28736 https://govnokod.xyz/_28736
    #80: https://govnokod.ru/28740 https://govnokod.xyz/_28740
    #81: https://govnokod.ru/28750 https://govnokod.xyz/_28750
    #82: https://govnokod.ru/28779 https://govnokod.xyz/_28779
    #83: https://govnokod.ru/28788 https://govnokod.xyz/_28788
    #84: https://govnokod.ru/28795 https://govnokod.xyz/_28795
    #85: https://govnokod.ru/28808 https://govnokod.xyz/_28808
    #86: (vanished) https://govnokod.xyz/_28814
    #87: https://govnokod.ru/28817 https://govnokod.xyz/_28817
    #88: https://govnokod.ru/28836 https://govnokod.xyz/_28836
    #89: https://govnokod.ru/28843 https://govnokod.xyz/_28843
    #90: https://govnokod.ru/28874 https://govnokod.xyz/_28874
    #91: https://govnokod.ru/28880 https://govnokod.xyz/_28880
    #92: https://govnokod.ru/28884 https://govnokod.xyz/_28884
    #93: https://govnokod.ru/28889 https://govnokod.xyz/_28889
    #94: https://govnokod.ru/28895 https://govnokod.xyz/_28895
    #95: https://govnokod.ru/28904 https://govnokod.xyz/_28904
    #96: https://govnokod.ru/28912 https://govnokod.xyz/_28912
    #97: https://govnokod.ru/28918 https://govnokod.xyz/_28918
    #98: https://govnokod.ru/28932 https://govnokod.xyz/_28932
    #99: https://govnokod.ru/28936 https://govnokod.xyz/_28936
    #100: https://govnokod.ru/28940 https://govnokod.xyz/_28940
    #101: https://govnokod.ru/28949 https://govnokod.xyz/_28949
    #102: https://govnokod.ru/28978 https://govnokod.xyz/_28978
    #103: https://govnokod.ru/28982 https://govnokod.xyz/_28982
    #104: https://govnokod.ru/28989 https://govnokod.xyz/_28989
    #105: https://govnokod.ru/29052 https://govnokod.xyz/_29052
    #106: https://govnokod.ru/29069 https://govnokod.xyz/_29069

    nepeKamHblu_nemyx, 03 Февраля 2025

    Комментарии (165)
  8. Си / Говнокод #29085

    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
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    int main(int argc, char **argv) {
    	size_t buflen;
    	size_t i;
    	char *obuffer;
    	if (argc != 2) {
    		fprintf(stderr, "Usage: %s 'some ASCII string'\n", argv[0]);
    		fprintf(stderr, "\tconvert the string into overlong UTF-8.\n");
    		return 1;
    	}
    	buflen = strlen(argv[1])*2+1;
    	obuffer = malloc(buflen);
    	if (obuffer == NULL) {
    		fprintf(stderr, "Error: cannot allocate %zd bytes of memory.", buflen);
    		return 2;
    	}
    	for (i=0; argv[1][i]; i++) {
    		obuffer[2*i]   = 0xC0|(argv[1][i]>>6);
    		obuffer[2*i+1] = 0x80|(argv[1][i]&0x3F);
    	}
    	obuffer[2*i] = '\0';
    	puts(obuffer);
    	free(obuffer);
    	return 0;
    }

    В UTF-8 запрещено использовать кодовые последовательности не минимальной длины, например юникоды с номером до 127 требуется кодировать именно в один байт, а не в 2,3 и так далее. А если так всё-таки сделать, полученная фигня называется оверлонгом (overlong). Вот этот код их как раз и создаёт. Но только из ASCII символов и расширяя их только до двух байт. Написание более универсального варианта, если вдруг кому-то надо оставляем как упражнение для читателя.

    Что интересно, некоторые текстовые редакторы, если в них открыть файл, сделанный этой программой, увидят обычный текст.

    Threadwalker, 03 Февраля 2025

    Комментарии (4)
  9. PHP / Говнокод #29084

    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
    <!-- < ?php
    $isAdmin = User::checkAdmin();
    if($isAdmin) {
    ?>
    <section class="promoCertificate">
    <div class="promoCertificate__wrapper">
    <img class="promoCertificate__logo" src="/images/header/promoCertificate-logo-big.png">
    <div class="promoCertificate__title">
    <p class="promoCertificate__title_big">Это знак</p>
    <p class="promoCertificate__title_small">ЗН АК КАЧЕСТВА</p>
    </div>
    <img class="promoCertificate__nagiev" src="/images/header/promoCertificate-nagiev.png">
    <div class="promoCertificate__description">Ва м доступен <span class="promoCertificate__description_whi te">личный сертификат</span> на покупку массажного кресла номиналом <span class="promoCertificate__description_whi te promoCertificate__description_big ">30 000 ₽</span></div>
    <a href="/personal-certificate" class="promoCertificate__button-details">Подробнее</a>
    <button type="button" class="promoCertificate__button-close promoCertificate__button-close_mobile __js-closeCertificatePromo">не интересно</button>
    </div>
    <button type="button" class="promoCertificate__button-close __js-closeCertificatePromo"></button>
    </section>
    < ?php }; ?> -->
    <!-- модалка с количеством подарков и ссылкой на страницу подарков -->
    <!-- удалять prize__hide -->

    На сайте одного крупного производителя массажных кресел, прямо в исходном коде страницы отображается внебрачный ребенок Laravel и Bitrix -- чудесная смесь html и php прямо в одном файле и проверка прав пользователя прямо в исходном коде страницы.

    McLotos, 30 Января 2025

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

    0

    1. 1
    На сайте одного крупного производителя массажных кресел, прямо в исходном коде страницы отображается внебрачный ребенок Laravel и Bitrix -- чудесная смесь html и php прямо в одном файле и проверка прав пользователя прямо в исходном коде страницы.

    <!-- < ?php
    $isAdmin = User::checkAdmin();
    if($isAdmin) {
    ?>
    <section class="promoCertificate">
    <div class="promoCertificate__wrapper">
    <img class="promoCertificate__logo" src="/images/header/promoCertificate-logo-big.png">
    <div class="promoCertificate__title">
    <p class="promoCertificate__title_big">Это знак</p>
    <p class="promoCertificate__title_small">ЗН АК КАЧЕСТВА</p>
    </div>
    <img class="promoCertificate__nagiev" src="/images/header/promoCertificate-nagiev.png">
    <div class="promoCertificate__description">Ва м доступен <span class="promoCertificate__description_whi te">личный сертификат</span> на покупку массажного кресла номиналом <span class="promoCertificate__description_whi te promoCertificate__description_big ">30 000 ₽</span></div>
    <a href="/personal-certificate" class="promoCertificate__button-details">Подробнее</a>
    <button type="button" class="promoCertificate__button-close promoCertificate__button-close_mobile __js-closeCertificatePromo">не интересно</button>
    </div>
    <button type="button" class="promoCertificate__button-close __js-closeCertificatePromo"></button>
    </section>
    < ?php }; ?> -->
    <!-- модалка с количеством подарков и ссылкой на страницу подарков -->
    <!-- удалять prize__hide -->

    McLotos, 30 Января 2025

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