:  
    ,     
    PSR-2
 PHP > 5.4

:
 ,   . 
    ,     (  )     .        .

       ( /),     , / .

 17  6   .

==========================================
:

1)  christmas.sql
2)   plugins   
3)     :

#################################################################################
######################  " 2018"######################################
#################################################################################

    include_once H . 'plugins/new_year_tree/new_year.class.php';

    if (isset($_GET['snowflake'])) {

        if (isset($_GET['snowflake']) && isset($_SESSION['snowflake']) && $_SESSION['snowflake'] == $_GET['gen_code']) {

            $count = 5; # -  

            mysql_query("UPDATE `user` SET `snowflake` = `snowflake` + '" . $count . "' WHERE `id` = '$user[id]'");

            echo "<div class='main'>!   <img width='20' src='/plugins/new_year_tree/images/snowflake.png'> " . $count . " !!!</div>";

            unset($_SESSION['snowflake']);

        } else {
            echo "<div class='main'>,  !</div>";
        }

        header("refresh:5;url=/plugins/new_year_tree/");

        include_once $_SERVER['DOCUMENT_ROOT'] . '/sys/inc/tfoot.php';
    }

    $rand = mt_rand(1, 100);
    if ($rand == 50) {
        $_SESSION['snowflake'] = urlencode($rand);
        echo "<div class='main' style='text-align: center;'><img  width='20' src='/plugins/new_year_tree/images/snowflake.png'> <a href='/?snowflake&gen_code=" . urlencode($rand) . "'>   !</a> <img  width='20' src='/plugins/new_year_tree/images/snowflake.png'></div>";
    }

#################################################################################

4)          - /plugins/new_year_tree/
5)  :)