Сайт временно не работает root."user_details/?userid=".$Reg_code; //$alternate = $mRootPath.$mobile_page; require($DocRoot."model/review_vote.php"); $sql = "select id, review_count, friend_count, CONCAT(user.first_name,' ', LEFT(user.last_name,1),'.') as short_name, user.first_name as first_name, user.nickname as nickname, CONCAT(LEFT(user.last_name,1),'.') as last_name, headline, gender, img_path, date_format(user.insert_date, '%d.%m.%Y') AS insert_date, i_love, find_me_in, reason_read_review, last_book, first_concert, favorite_movie, secret_data, last_discovery, (select count(*) as biz_photo_count from image where table_name='Company' and user_id=user.id) as biz_photo_count, e_mail, active, (select city.name from city, user_location where user_location.user_id=user.id and user_location.main=1 and user_location.city_id=city.id) as city_name from user where reg_code=:regcode limit 1;"; $res = $db->q($sql, array(":regcode"=>$Reg_code)); if(!($user_data = $res->fetch())) { require_once("404_inside.php"); exit; } //Для заголовка страницы > $meta_title = htmlspecialchars($user_data["short_name"])." - "; if($user_data["review_count"]) { $meta_title .= $user_data["review_count"]." ".$l->g_count("review", $user_data["review_count"]); } else { $meta_title .= "Отзывы"; } if($user_data["biz_photo_count"]) { $meta_title .= ", ".$user_data["biz_photo_count"]." фото"; } else { $meta_title .= ", Фотографии"; } if($user_data["city_name"]) { $meta_title .= " - ".$user_data["city_name"]; } $meta_description = "Отзывы ".htmlspecialchars($user_data["short_name"]); $res = $db->q("select substring_index(group_concat(c.name SEPARATOR ','), ',', 7) as biz_list from user u left join review r on r.user_id=u.id left join company c on c.id=r.company_id where c.filtered=0 and r.user_id=:user_id and r.posted=1 order by r.id desc;", array(":user_id"=>$user_data["id"])); /* $res = $db->q("select substring_index(group_concat(name SEPARATOR ','), ',', 8) as biz_list from company where id in (select company_id from review where review.posted=1 and review.user_id=".$user_data["id"].") and filtered=0 order by id desc;"); if($biz_for_desc_data = $res->fetch()) { */ if($biz_for_desc_data = $res->fetch()) { if(!empty($biz_for_desc_data["biz_list"])) { $meta_description .= " про: ".htmlspecialchars($biz_for_desc_data["biz_list"]); } else { $meta_description .= ", фотографии, друзья, подписки и другая активность на ".$l->g("wikicity"); } } $meta_keywords = "отзывы,фото,рекомендации,".htmlspecialchars($user_data["short_name"]); //Для заголовка страницы < if(($Reg_code == $_SESSION["reg_code"]) | ($_SESSION["permission_id"] >= 5)) { $main_menu_id = 2; $filtered_str = "filtered!=2"; } else { $filtered_str = "filtered=0"; } $js_arr[0]["type"] = "file"; $js_arr[0]["data"] = $l->root."js/wi_dialog_new.js"; if($_SESSION["permission_id"] >= 5) { $js_arr[1]["type"] = "file"; $js_arr[1]["data"] = $l->root."js/admin_func.js"; } require($DocRoot."header_post3.php"); $sql = "select review.id, review.review_id, review.user_id, review.review_text, review.mark, DATE_FORMAT(review.date_post, '%d.%m.%Y') as date_post, review.filtered, company.filtered as biz_filtered, company.reg_code as company_reg_code, company.str_id as biz_str_id, company.id as company_id, company.name as company_name, company.address_1, company.phone, (select img from image where id=company.main_img_id limit 1) as img_path, city.name as city_name, city.id as city_id, city.str_id, (select CONCAT(user.first_name,' ', left(user.last_name,1),'.') from user where id=review.user_id) as user_name, (select count(*) from image where table_name = 'Company' and Rec_id = company.id and user_id=review.user_id) as user_photo_count from review, company, city where review.company_id=company.id and company.city_id=city.id and review.posted=1 and review.".$filtered_str." and review.user_id=".$user_data["id"]." order by "; if($review_sort == "alphabetical") { $sql .= "company.name "; $sort_text = "Алфавиту"; } else if($review_sort == "rating") { $sql .= "review.mark desc "; $sort_text = "Оценке"; } else { $sql .= "review.id desc"; $sort_text = "Дате"; } $sql .= " limit 10;"; //$res_main = $db->q($sql); $res_main = $db->q($sql); $user_menu_id = 1; ?>
rowcount() == 0) {?>

пока не написал(-а) отзывов.

10) {?>
= 5) {?>