永发信息网

在ecshop首页有$position = assign_ur_here();其中assign_ur_here();是哪个地方传过来的

答案:1  悬赏:20  手机版
解决时间 2021-02-20 10:45
就是说这个函数是在哪里定义的!
最佳答案
assign_ur_here在lib_main.php的129行,详细内函数容如下:

function assign_ur_here($cat = 0, $str = '')
{

$cur_url = basename(PHP_SELF);
if (intval($GLOBALS['_CFG']['rewrite']))
{
$filename = strpos($cur_url,'-') ? substr($cur_url, 0, strpos($cur_url,'-')) : substr($cur_url, 0, -4);
}
else
{
$filename = substr($cur_url, 0, -4);
}


$page_title = $GLOBALS['_CFG']['shop_title'] . ' - ' . 'Powered by ECShop';
$ur_here = '' . $GLOBALS['_LANG']['home'] . '';


if ($filename != 'index')
{

if (in_array($filename, array('category', 'goods', 'article_cat', 'article', 'brand')))
{

if ('category' == $filename || 'goods' == $filename || 'brand' == $filename)
{
if ($cat > 0)
{
$cat_arr = get_parent_cats($cat);

$key = 'cid';
$type = 'category';
}
else
{
$cat_arr = array();
}
}

elseif ('article_cat' == $filename || 'article' == $filename)
{
if ($cat > 0)
{
$cat_arr = get_article_parent_cats($cat);

$key = 'acid';
$type = 'article_cat';
}
else
{
$cat_arr = array();
}
}


if (!empty($cat_arr))
{
krsort($cat_arr);
foreach ($cat_arr AS $val)
{
$page_title = htmlspecialchars($val['cat_name']) . '_' . $page_title;
$args = array($key => $val['cat_id']);
$ur_here .= ' > ' .
htmlspecialchars($val['cat_name']) . '';
}
}
}

else
{

if ('group_buy' == $filename)
{
$page_title = $GLOBALS['_LANG']['group_buy_goods'] . '_' . $page_title;
$args = array('gbid' => '0');
$ur_here .= ' > ' .
$GLOBALS['_LANG']['group_buy_goods'] . '';
}

elseif ('auction' == $filename)
{
$page_title = $GLOBALS['_LANG']['auction'] . '_' . $page_title;
$args = array('auid' => '0');
$ur_here .= ' > ' .
$GLOBALS['_LANG']['auction'] . '';
}

elseif ('snatch' == $filename)
{
$page_title = $GLOBALS['_LANG']['snatch'] . '_' . $page_title;
$args = array('id' => '0');
$ur_here .= ' > ' . $GLOBALS['_LANG']['snatch_list'] . '';
}

elseif ('wholesale' == $filename)
{
$page_title = $GLOBALS['_LANG']['wholesale'] . '_' . $page_title;
$args = array('wsid' => '0');
$ur_here .= ' > ' .
$GLOBALS['_LANG']['wholesale'] . '';
}

elseif ('exchange' == $filename)
{
$page_title = $GLOBALS['_LANG']['exchange'] . '_' . $page_title;
$args = array('wsid' => '0');
$ur_here .= ' > ' .
$GLOBALS['_LANG']['exchange'] . '';
}

}
}


if (!empty($str))
{
$page_title = $str . '_' . $page_title;
$ur_here .= ' > ' . $str;
}


return array('title' => $page_title, 'ur_here' => $ur_here);
}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
要一段女生的说话声音:你好呀
圆柱子的体积怎么算
彩钢棚长不加利柱用方管怎么焊大梁7米
平面内有一长度为4的线段AB,动点P满足PA+PB=6
在湖南学铁路专业哪个学校好点那些专业好一些
北门果蔬批发市场我想知道这个在什么地方
20个数字复式六中六有多少组
我被录取不知道什么时候去交学费什么时候去学
艺术学院画人体都是用裸模特吗
甲国该企业在20世纪90年代中期向本国的丙租赁
岫岩从9月9日到9月13日的天气是怎么样的
银行流水账单怎么算
与口腔颌面部感染发生有关的主要因素是A.外伤
老余杭坐哪路公交到下沙金沙湖
办理2015年度年所得12万元以上个人自行纳税申
推荐资讯
个性比较龟毛?“龟毛”怎么理解噢?
有谁知道广州市星烁文化艺术传播有限公司是不
最常见的慢性支气管炎的X线胸片表现是A.双肺
测甲醛的上面写着0.043超标吗
骨灰为什么有金黄色
广东海洋大学有什么专业可以跟当老师有关系?
(√3+√2-1)(√3-√2+1)
考取大学的学生本人该怎样写金榜题名祝酒辞?
我家枣树五年了为什么不接枣
建筑工程包括哪些方面?
下列反映古代阿拉伯文明成就的图片是A BCD
基金管理人、代销机构的工作人员在从事基金销
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?