//
require_once( "inc.php" );
//
$cMain = new cMain();
//
if( !$cMain->fMain() )
{
//
$cException = new cException( $cMain->strErrMsg );
}
exit();
//////////////////////////////////////////
// class
//
class cMain
{
//
var $strErrMsg = "";
var $cPrm = NULL;
var $cDb = NULL;
var $arrPrm = NULL;
//
function cMain()
{
//
$this->strErrMsg = "";
fCmnAttachDb( $this->cDb );
//
return TRUE;
}
//
function fMain()
{
//
$this->fData();
$this->fHtml();
//
return TRUE;
}
//
function fData()
{
//
$strSql = "SELECT ".
"KeyBig, " .
"NameBig " .
"FROM " .
"master_big " .
"WHERE " .
"KeyBig IN " .
"( " .
"SELECT " .
"KeyBig " .
"FROM " .
"master_cat " .
") " .
"ORDER BY " .
"ItemOrder;";
$this->arrCat = $this->cDb->fFetch( $strSql, __FILE__, __LINE__ );
//
foreach( $this->arrCat as $objKey => $objVal )
{
//
$strSql = "SELECT ".
"t2.KeyCat, " .
"t2.NameCat, " .
"IFNULL( t3.Cnt, 0 ) AS Cnt " .
"FROM " .
"master_big t1, " .
"master_cat t2 " .
"LEFT OUTER JOIN " .
"( " .
"SELECT " .
"KeyCat, " .
"COUNT( KeyCat ) AS Cnt " .
"FROM " .
"rec_machine " .
"WHERE " .
"OnService = 1 " .
"GROUP BY " .
"KeyCat " .
") AS t3 " .
"ON t2.KeyCat = t3.KeyCat " .
"WHERE " .
"t1.KeyBig = " . $objVal[ "KeyBig" ] . " AND " .
"t1.KeyBig = t2.KeyBig " .
"ORDER BY " .
"t2.Editable DESC, t2.ItemOrder;";
$this->arrCat[ $objKey ][ "Cat" ] = $this->cDb->fFetch( $strSql, __FILE__, __LINE__ );
}
return TRUE;
}
//
function fHtml()
{
?>
中古機械販売カテゴリー一覧 - 株式会社昇栄/中古機械販売・工作機械レトロフィット・オーバーホール
中古機械販売 カテゴリー一覧
お探しの中古機械のカテゴリーを選んで下さい。

//
for( $i = 0; $i < count( $this->arrCat ); $i++ )
{
?>
- echo $this->arrCat[ $i ][ "NameBig" ]; ?>
//
if( $this->arrCat[ $i ][ "Cat" ] )
{
//
foreach( $this->arrCat[ $i ][ "Cat" ] as $objItem )
{
//
if( $objItem[ "Cnt" ] )
{
?>
- "> echo $objItem[ "NameCat" ]; ?>( echo $objItem[ "Cnt" ]; ?>)
}
else
{
?>
- echo $objItem[ "NameCat" ]; ?>( echo $objItem[ "Cnt" ]; ?>)
}
}
}
else
{
?>
-
}
}
?>
昇栄で取り扱っている中古機械についてのご質問、買取・販売のご相談などはこちらからお問い合わせ下さい。
お電話の場合は 0297-84-2677 / 株式会社昇栄まで

}
}
?>