assign("SITE_NAME",SITE_NAME); $_GET['id'] = (int)$_GET['id']; $sql = " SELECT m1.name_en, m1.name_ja, m1.works, m1.teikei_url, m1.blog_url, m1.height, m1.bust, m1.waist, m1.hip, m1.shoes, m1.model_cate, m1.model_id, m1.stat, m1.album0, m1.album1, m1.album2, m1.album3, m1.album4, m1.album5, m1.album6, m1.album7, m1.blog_img FROM m_model m1 WHERE m1.model_id = '{$_GET['id']}' AND m1.del_flg = 0 AND m1.stat = 1 "; $sth = $dbMaster->prepare($sql); $con = array(); $result = $dbMaster->execute($sth,$con); if(!$row = $result -> fetchRow(DB_FETCHMODE_ASSOC)){ print "nodata"; exit; } $tmpl->assign("name_en",$row['name_en']); $tmpl->assign("name_ja",$row['name_ja']); $tmpl->assign("works",nl2br($row['works'])); $tmpl->assign("height",$row['height']); $tmpl->assign("bust",$row['bust']); $tmpl->assign("waist",$row['waist']); $tmpl->assign("hip",$row['hip']); $tmpl->assign("shoes",$row['shoes']); if($row['teikei_url'] != "") { $tmpl->assign("teikei_url",$row['teikei_url']); } if($row['blog_img'] != "" && $row['blog_url'] != "") { $tmpl->assign("blog_url",$row['blog_url']); $tmpl->assign("blog_img",$row['blog_img']); } if($_GET['id'] == 59){ $tmpl->assign("is_furuie",true); } //--------------- //アルバム情報を作る //--------------- $albums = array(); for($x = 0; $x <= 7; $x++){ if ($row["album{$x}"] != "") { //メインに使用されていなく、画像の登録がある場合 array_push($albums,$row["album{$x}"]); } } $tmpl->loopset("list1") ; for($x = 0; $x < count($albums);$x++) { $tmpl->assign("img",$albums[$x]); $tmpl->loopnext(); } $tmpl->loopset("") ; $fobj2 = new FormObject("管理:アナウンス情報"); $sql = " SELECT m1.news_id, date_format(m1.disp_date,'%Y.%m.%d') as news_date, m1.note, m1.title, m1.news_cate, m1.img FROM ds_news m1 WHERE m1.del_flg = 0 AND m1.model_id = '{$_GET['id']}' ORDER BY m1.disp_date desc "; $sth = $dbMaster->prepare($sql); $result = $dbMaster->execute($sth,array()); $tmpl->loopset("list2") ; $cnt = 0; while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) { $cnt++; $tmpl->assign("news_id",$row['news_id']); $tmpl->assign("news_date",$row['news_date']); $tmpl->assign("title",$row['title']); $tmpl->assign("news_cate",$fobj2->getLabelValue("news_cate",$row['news_cate'])); $tmpl->loopnext(); } $tmpl->loopset("") ; if($cnt > 0) { $tmpl->assign("news_ok",1); } $tmpl->flush(); ?>