// index.php
require( 'config.php' );
require( 'lib.php' );
//
session_start();
//
$login = auth();
// db connect
$link = mysql_connect( $db_host, $db_user, $db_password );
mysql_select_db( $db_name );
$result = mysql_query( 'set character set utf8' );
?>
require( 'header.php' ) ?>
require( 'topbar.php' ) ?>
最近チェックした商品
if ( $_SESSION['checked_item'] != '' ) {
foreach( $_SESSION['checked_item'] as $value ) {
$sql = "select * from item
left join author on item.author_id = author.author_id
where item_id = '$value'";
$result = mysql_query( $sql );
while ( $item = mysql_fetch_array( $result ) ) {
?>
![]()
|
}
}
} else {
echo '最近チェックした商品はありません | ';
}
?>
最近追加された商品
$sql = "select * from item
left join author on item.author_id = author.author_id
order by item_id desc limit 0, 4";
$result = mysql_query( $sql );
while ( $item = mysql_fetch_array( $result ) ) {
?>
![]()
|
} ?>
require( 'footer.php' ) ?>