本文整理汇总了PHP中Frontend::getDetailByAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP Frontend::getDetailByAlias方法的具体用法?PHP Frontend::getDetailByAlias怎么用?PHP Frontend::getDetailByAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frontend
的用法示例。
在下文中一共展示了Frontend::getDetailByAlias方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkCat
function checkCat($uri)
{
require_once 'backend/model/Frontend.php';
$model = new Frontend();
$uri = str_replace("+", "", $uri);
$p_detail = '#chi-tiet/[a-z0-9\\-\\+]+\\-\\d+.html#';
$p_detail_news = '#tin-tuc/[a-z0-9\\-\\+]+\\-\\d+.html#';
$p_cate_page = '#/[a-z0-9\\-\\+]+.html#';
$p_product_detail = '#[a-z0-9\\-\\+]/[a-z0-9\\-\\+]/[a-z0-9\\-\\+]+.html#';
$p_cate_news = '#danh-muc/[a-z0-9\\-\\+]+\\-\\d+.html#';
$p_detail_event = '#su-kien/[a-z0-9\\-\\+]+\\-\\d+.html#';
$p_tag = '#/tag/[a-z\\-]+.html#';
$p_contact = '#/lien-he+.html#';
$p_order = '#/quan-ly-don-hang+.html#';
$p_orderdetail = '#/chi-tiet-don-hang+.html#';
$p_info = '#/cap-nhat-thong-tin+.html#';
$p_changepass = '#/doi-mat-khau+.html#';
$p_logout = '#/thoat+.html#';
$p_hot = '#/[a-z0-9\\-]+\\-+c+\\d+h+\\d+.html#';
$p_sale = '#/[a-z0-9\\-]+\\-+c+\\d+s+\\d+.html#';
$p_cart = '#/gio-hang+.html#';
$p_register = '#/dang-ky+.html#';
$p_about = '#/gioi-thieu+.html#';
$p_thanhtoan = '#/thanh-toan+.html#';
$p_tintuc = '#/tin-tuc+.html#';
$p_cate = '#/[a-z0-9\\-]+\\-+p+\\d+.html#';
$p_content = '#/[a-z0-9\\-]+\\-+c+\\d+.html#';
$p_search = '#/tim-kiem+.html#';
$mod = $seo = "";
$uri = str_replace(".html", '', $uri);
$object_id = 0;
$city_id = $district_id = $type_id = $price_id = "";
$arrTmp = explode('/', $uri);
unset($arrTmp[0]);
if (strpos($uri, 'trang/')) {
$mod = "page";
} elseif (strpos($uri, 'chi-tiet/')) {
$mod = "detail";
} elseif (strpos($uri, 'tin-tuc')) {
$mod = "news";
} elseif (strpos($uri, 'chi-tiet-tin')) {
$mod = "news-detail";
} else {
if (isset($arrTmp[1]) && $arrTmp[1] != '') {
$alias = $model->processData($arrTmp[1]);
$detail = $model->getDetailByAlias('type_bds', $alias);
$type_id = $detail['id'];
$mod = "list";
$type = $detail['type'];
} else {
$type_id = 1;
$mod = "home";
}
if (isset($arrTmp[2])) {
$alias = $model->processData($arrTmp[2]);
$detail = $model->getDetailByAlias('city', $alias);
$city_id = $detail['id'];
} else {
$city_id = 1;
}
if (isset($arrTmp[3])) {
$alias = $model->processData($arrTmp[3]);
$detail = $model->getDetailByAlias('district', $alias);
if ($detail) {
$district_id = $detail['id'];
} else {
$district_id = 0;
$detail = $model->getDetailByAlias('price', $alias);
if ($detail) {
$price_id = $detail['id'];
}
}
} else {
$district_id = 0;
}
if ($price_id == "") {
if (isset($arrTmp[4])) {
$alias = $model->processData($arrTmp[4]);
$detail = $model->getDetailByAlias('price', $alias);
$price_id = $detail['id'];
} else {
$price_id = -1;
}
}
}
/*
var_dump($city_id);die;
if(count($arrTmp) == 4){
$mod = "detail";
}elseif(strpos($uri, 'tin-tuc/')){
$mod = "detail-news";
}elseif(strpos($uri, 'tim-kiem.')){
$mod = "search";
}elseif(strpos($uri, 'dat-hang-thanh-cong.')){
$mod = "thanks";
//.........这里部分代码省略.........