##############说明################ |
建立数据库 |
执行 /twe_installer/index.php |
<?php |
include ( 'includes/application_top.php' ); |
// create smarty elements |
$smarty = new Smarty; |
// include boxes |
require (DIR_FS_CATALOG . 'templates/' .CURRENT_TEMPLATE. '/source/boxes.php' ); |
// the following cPath references come from application_top.php |
$category_depth = 'top' ; |
if (isset( $cPath ) && twe_not_null( $cPath )) { |
$categories_products_query = twe_db_query( "select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'" ); |
$cateqories_products = twe_db_fetch_array( $categories_products_query ); |
if ( $cateqories_products [ 'total' ] > 0) { |
$category_depth = 'products' ; // display products |
} else { |
$category_parent_query = twe_db_query( "select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'" ); |
$category_parent = twe_db_fetch_array( $category_parent_query ); |
if ( $category_parent [ 'total' ] > 0) { |
$category_depth = 'nested' ; // navigate through the categories |
} else { |
$category_depth = 'products' ; // category has no products, but display the 'no products' message |
} |
} |
} |
require (DIR_WS_INCLUDES . 'header.php' ); |
include (DIR_WS_MODULES . 'default.php' ); |
$smarty ->assign( 'language' , $_SESSION [ 'language' ]); |
$smarty ->caching = 0; |
$smarty ->display(CURRENT_TEMPLATE . '/index.html' ); |
$c_string = 'Powered by TWE-Commerce' ; |
?> |