Rumah > php教程 > php手册 > xotpl框架

xotpl框架

WBOY
Lepaskan: 2016-06-06 19:34:51
asal
2526 orang telah melayarinya

?php define(IN_ECS, true); require(dirname(dirname(__FILE__)) . /includes/init.php); $xoopsOption[template_main] = xotpl:mod_nv#nv_dapai.xotpl; $xoopsOption[xoops_pagetitle]=现在注册少一块-现金红包送给你哟 ; include XOOPS_ROOT_PATH./yheader

define('IN_ECS', true);
require(dirname(dirname(__FILE__)) . '/includes/init.php');

$xoopsOption['template_main'] = "xotpl:mod_nv#nv_dapai.xotpl";
$xoopsOption['xoops_pagetitle']="现在注册少一块-现金红包送给你哟" ;
include XOOPS_ROOT_PATH."/yheader.php";
$xoops->services['theme']->addStylesheet( 'css/red.css' );
$hnd = & xoops_getmodulehandler("goods","goods");

$crit = new CriteriaCompo(new Criteria('is_on_sale',1));
$crit->add(new Criteria('is_delete',0));

$crit->setSort('rand()');
$crit->setLimit(12);
$xoops_vars['goods'][0] = $hnd->getAll($crit,array('goods_name','goods_img','shop_price','market_price'),false);

$infos['goods'] = $xoops_vars['goods'];
$xoopsTpl->assign('infos', $infos); // 分类树
$xoopsTpl->assign('cart_show', insert_cartshow()); // 分类树
unset($xoops_vars);
include XOOPS_ROOT_PATH."/footer.php";
?>
<?php
define('IN_ECS', true);
require(dirname(dirname(__FILE__)) . '/includes/init.php');

$xoopsOption['template_main'] =  "xotpl:mod_nv#nv_dapai.xotpl";
$xoopsOption['xoops_pagetitle']="现在注册少一块-现金红包送给你哟" ;
include XOOPS_ROOT_PATH."/yheader.php";
$xoops->services['theme']->addStylesheet( 'css/red.css' );
$hnd = & xoops_getmodulehandler("goods","goods");

$crit = new CriteriaCompo(new Criteria('is_on_sale',1));
$crit->add(new Criteria('is_delete',0));

$crit->setSort('rand()');
$crit->setLimit(12);
$xoops_vars['goods'][0] = $hnd->getAll($crit,array('goods_name','goods_img','shop_price','market_price'),false);

$infos['goods'] = $xoops_vars['goods'];
$xoopsTpl->assign('infos',      $infos); // 分类树
$xoopsTpl->assign('cart_show',      insert_cartshow()); // 分类树
unset($xoops_vars);
include XOOPS_ROOT_PATH."/footer.php";
?>
Salin selepas log masuk
Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Cadangan popular
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan