Пример #1
0
 function login()
 {
     $err = true;
     $pass = md5(params::get('user_password'));
     if (adminUser::auth(params::get('user_login'), $pass)) {
         $err = false;
         if (params::get('user_login') != adminUser::get('user_login') && $pass != adminUser::get('user_password')) {
             $err = true;
         } else {
             $word = 'legenda';
             $mem = md5(adminUser::get('user_login') . $word);
             setcookie('legenda', adminUser::get('user_login') . ',' . adminUser::get('user_id') . ',' . $mem, time() + 86400 * 14, "/");
             $_SESSION['ADMIN_AUTH'] = 1;
             $_SESSION['ADMIN_USER_ID'] = adminUser::get('user_id');
         }
     }
     if ($err) {
         buffer::add('Неверный логин или пароль');
     }
 }
Пример #2
0
 function getPoint()
 {
     db::table('menus_points');
     db::where('point_id', params::get('point_id'));
     $row = db::assoc();
     buffer::add('{non}' . arrays::array2burst($row) . '{/non}');
 }