Example #1
0
             if ($user_privacy['val_wall3'] == 2 and $user_id != $for_user_id) {
                 $check_friend = $db->super_query("SELECT user_id FROM `" . PREFIX . "_friends` WHERE user_id = '{$user_id}' AND friend_id = '{$for_user_id}' AND subscriptions = 0");
             }
             if ($user_privacy['val_wall3'] == 1 or $user_privacy['val_wall3'] == 2 and $check_friend or $user_id == $for_user_id) {
                 $wall->comm_query("SELECT SQL_CALC_FOUND_ROWS tb1.id, author_user_id, text, add_date, fasts_num, tb2.user_photo, user_search_pref, user_last_visit FROM `" . PREFIX . "_wall` tb1, `" . PREFIX . "_users` tb2 WHERE tb1.author_user_id = tb2.user_id AND tb1.fast_comm_id = '{$fast_comm_id}' ORDER by `add_date` ASC LIMIT 0, 200", '');
                 if ($_POST['type'] == 1) {
                     $wall->comm_template('news/news.tpl');
                 } else {
                     if ($_POST['type'] == 2) {
                         $wall->comm_template('wall/one_record.tpl');
                     } else {
                         $wall->comm_template('wall/record.tpl');
                     }
                 }
                 $wall->comm_compile('content');
                 $wall->comm_select();
                 AjaxTpl();
             } else {
                 echo 'err_privacy';
             }
         }
     }
     die;
     break;
     //################### Показ предыдущих записей ###################//
 //################### Показ предыдущих записей ###################//
 case "page":
     NoAjaxQuery();
     $last_id = intval($_POST['last_id']);
     $for_user_id = intval($_POST['for_user_id']);
     //ЧС