api/extend.func.php加入以下函数functioncat_name($catid){global$db;$catid=intval($catid);$catname='';$r=$db-get_one("SELECtcatnameFROM{$db-pre}categoryWHERecatid=$catid");$catname=$r['catname'];return$cat ...
当前已发布会员、分站、商城、供应、求购、行情、公司、展会、文章、信息、品牌、团购、图库、专题、视频、下载、人才、知道等模型……禁止同一个会员发布重复信息:已供应为例子:打开文件module/sell/sell.class.php在代码functionpass($post)前面增加一个title_exists函数:functiontitle_exists($title){$condition="title='$title'";return$this-db-get_ ...
include/global.func.php加入以下函数functioncontent($itemid){global$db;$row=$db-get_one("SELECt*FROM{$db-pre}sell_data_5WHEReitemid=$itemid");return$row['content'];}在循环标签中使用{content($t[itemid])}调用 ...
把QQ客服写入配置,就不用去模板中修改,简单方便,易用。案例如图:方法简单易用:在api/trade/setting.inc.php里找到如图:(这个文件官方基本不更新,所以放心加。)添加下方代码trtdclass="tl"售前QQ1/tdtd名称nbsp;inputname="setting[qq1name]"type="text"value="?phpecho$qq1name;?"size=&quo ...
看到好多站有类似猜您可能在西安,点击进入西安站如图:所有搞了类似一个小功能,希望对需要的哥们AND妹妹有用。第一步-在extend.func.php内加入以下函数functionget_ip2city($ip){global$db;$city=ip2area($ip);if(is_array($all_city=cache_read('allcity.php'))){foreach($all_cityas$k=$v){$v['name'] ...