Отзывы
rowcount() > 0) {?> }?>
пока не написал(-а) отзывов.
-
fetch()) {?>
-
", $review_data["review_text"]);?>
}?>
}?>
Сайт временно не работает $dblocation = "localhost"; $dbuser = "wikicity"; $dbpasswd = "oc9ha77gX7d83FS"; $dbname = "wikicity1"; $SiteName = "Wikicity"; $RootPath="https://wikicity.kz/"; $mRootPath="https://m.wikicity.kz/"; $RootPath_no_slash="https://wikicity.kz"; $DocRoot=$_SERVER["DOCUMENT_ROOT"]; $bRootPath="https://wikicity.kz/biz_owner/"; $mDocRoot=$_SERVER["DOCUMENT_ROOT"]."/m/"; $PhotoRoot=$DocRoot."fotos/"; $PhotoRoot_original=$DocRoot."fotos_original/"; $PhotoRoot_ls=$DocRoot."fotos_ls/"; $PhotoRoot_ms=$DocRoot."fotos_ms/"; $PhotoRoot_ss=$DocRoot."fotos_ss/"; $PhotoRoot_xss=$DocRoot."fotos_xss/"; $ImagePath="https://wikicity.kz/fotos/"; $ImagePath_original="https://wikicity.kz/fotos_original/"; $ImagePath_ls="https://wikicity.kz/fotos_ls/"; $ImagePath_ms="https://wikicity.kz/fotos_ms/"; $ImagePath_ss="https://wikicity.kz/fotos_ss/"; $ImagePath_xss="https://wikicity.kz/fotos_xss/"; $admin_email = "adil_askarov@mail.ru"; $vk_client_id = "3424744"; $vk_client_secret = "TEcVVzj26rUkXTJOCpTw"; $fb_client_id = "218254644982579"; $fb_client_secret = "49728228a99848054d1d1a8d695f4662"; ?> $Page_n = "user_details_main2"; $Reg_code = ""; if(isset($_GET['Reg_code'])) { $Reg_code = htmlspecialchars($_GET['Reg_code']); $url = $RootPath."user_details/?userid=".$Reg_code; header("HTTP/1.1 301 Moved Permanently"); header("Location: $url"); exit; } if($to_mobile==true) { require_once($mDocRoot."controllers/user_details.php"); exit; } $Reg_code = ""; if(isset($_GET['userid'])) { $Reg_code = htmlspecialchars($_GET['userid']); } $review_sort = ""; if(isset($_GET['review_sort'])) { $review_sort = htmlspecialchars($_GET['review_sort']); } //$mobile_page = "user_details/?userid=".$Reg_code; require($DocRoot."header_pre.php"); $meta_canonical = $l->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; ?>
пока не написал(-а) отзывов.
", $review_data["review_text"]);?>
}?>