gusucode.com > 同城苏州黄页系统php源码程序 > list.php

    <?
# 载入 开始文件
include_once('start.php');

# 载入并初始化相关的网页类
if( !class_exists('idx_cardlist') )
	include_once("{$root_path}lib/class.webPge/idx_cardlist.class.php");
$me = & new idx_cardlist();


$_REQUEST['topclassName'] = (@$_REQUEST['directC']['topclass'])? $_Classes[$_REQUEST['directC']['topclass']]['name'] : '' ;
$_REQUEST['lowerclassName'] = (@$_REQUEST['directC']['topclass']&&@$_REQUEST['directC']['lowerclass'])? $_Classes[$_REQUEST['directC']['topclass']]['children'][$_REQUEST['directC']['lowerclass']]['name'] : '' ;

$me->title = @"{$_REQUEST['topclassName']} {$_REQUEST['lowerclassName']}" ;				// 网页标题

$me->set_records_limit(8);
$me->query_REQUEST();							//	通过用户设置的条件进行查询
$me->primary_order();
$me->query_obj->directCondition(array('is_open'=>'1','ModifyFor'=>'0'));


$me->set_list();

// 右侧推荐
$where = '' ;
if( @$_REQUEST['directC']['topclass'] )
	$where.= " and `topclass`='{$_REQUEST['directC']['topclass']}'" ;
if( @$_REQUEST['directC']['lowerclass'] )
	$where.= " and `lowerclass`='{$_REQUEST['directC']['lowerclass']}'" ;
if( !$me->commends = $db->select( 'yp_card', "`is_open`='1' and `commend_b`='1'{$where} order by `commend_order`" ) )
	$me->commends = array() ;
$me->assign('right_menu','commends.html') ;

// 左侧菜单
if( isset($_Classes[$_REQUEST['directC']['topclass']]['children']) )
{
	$me->assign('className',$_Classes[$_REQUEST['directC']['topclass']]['name']) ;
	$me->assign('classChildren',$_Classes[$_REQUEST['directC']['topclass']]['children']) ;
	$me->assign('left_menu','leftClassMenu.html') ;
}

# 输出网页
include_once('./before_display.php');
$me -> assign('content','list.html') ;
$me -> display_webPge('main-frame.html') ;

?>
<?
##################################################
# 事件
##################################################

/**
 * 查询数据以前
 * 
 * 可通过传入的 $me 增设查询条件
 *
 * @param &$me 	indexPge obj
 */
function OnBeforeQuery( &$me )
{

}

/**
 * 设置一笔纪录前
 *
 * @param unknown_type $me
 */
function OnBeforeInitRecord( &$me )
{
}

/**
 * 设置一笔纪录后
 *
 * @param unknown_type $me
 * @param unknown_type $record
 */
function OnInitializedRecord( &$me, &$record )
{
	// $record['titlePic'] = $record['_data']['titlePic']? "" : '' ;
}

?>