出展企業一覧
if(empty($id)=="TRUE"){ $id="nisi_1"; } if($id=="nisi_1"){ $tempid="1"; } elseif($id=="nisi_2"){ $tempid="2"; } elseif($id=="nisi_3"){ $tempid="3"; } elseif($id=="nisi_4"){ $tempid="4"; } ?>
$i = 0;
$company = file("../company.log");
$companynum = count ($company);
while ($i < $companynum) {
$datatemp = split("\t", $company[$i]);
$datatemp[21] = chop($datatemp[21]);
$atama = substr($datatemp[2], 0, 1);
if($atama == "$tempid"){
$allcount++;
}
$i++;
}
if($allcount > 25){
$viewflg2="on";
}
if($allcount > 50){
$viewflg3="on";
}
if($allcount > 75){
$viewflg4="on";
}
define ("DATAFILE", "../company.log");
if ( file_exists( DATAFILE ) == false ) {
return false;
}
else {
$Record = array();
$TextData = file( DATAFILE );
for ( $i = 0; $i < sizeof( $TextData ); $i++ ) {
$TextData[ $i ] = ereg_replace( "\n$", "", $TextData[ $i ] ); //改行コード処理
$TextData[ $i ] = ereg_replace( "\r$", "", $TextData[ $i ] ); //改行コード処理
$datatemp = split("\t", $TextData[ $i ]);
$idtemp = substr($datatemp[2], 0, 1);
if($idtemp == "$tempid"){
$Record[ $i ] = split( "\t", $TextData[ $i ] );
}
}
}
function cmp($a, $b) {
$result = $a[0] - $b[0];
if ($result == 0) { // もし同じ値なら
$result = $a[2] - $b[2];
}
if ($result == 0) { // もし同じ値なら
$temp1 = substr($a[2], 2, 2);
$temp2 = substr($b[2], 2, 2);
$result = $temp1 - $temp2;
}
if ($result == 0) { // もし同じ値なら
// 1番目の列で比較。
$result = $a[3] - $b[3];
}
return $result;
}
usort($Record, "cmp");
$ct = count($Record);
if($ct > 25){
$firstmax = 25;
$secondstart = $ct - 25;
}
else{
$firstmax = $ct;
}
if($id=="nisi_1"){
$catename="";
if($Record[3][10]=="1"){ $catename .="男の子/"; }
if($Record[3][11]=="1"){ $catename .="女の子/"; }
if($Record[3][12]=="1"){ $catename .="乳幼児・知育/"; }
if($Record[3][13]=="1"){ $catename .="ぬいぐるみ・人形/"; }
if($Record[3][14]=="1"){ $catename .="ゲーム・パズル/"; }
if($Record[3][15]=="1"){ $catename .="ホビー・模型・RC/"; }
if($Record[3][16]=="1"){ $catename .="季節もの/"; }
if($Record[3][17]=="1"){ $catename .="雑貨・生活/"; }
if($Record[3][18]=="1"){ $catename .="その他/"; }
if(empty($catename)==TRUE){
$catename .=" /";
}
$catenum = strlen($catename);
$max = $catenum-1;
$catename = substr($catename, 0, $max);
$url = $Record[3][7];
if(empty($url)!=TRUE){
$aname = "";
$bname = "";
}
else{
$aname="";
$bname="";
}
$evnetflg = $Record[3][21];
if($evnetflg=="1"){
$temp = $Record[3][2];
$temp2 = ereg_replace("-", "_", $temp);
$event = "イベントページへ";
}
else{
$event = "";
}
print <<
EOF;
$catename="";
if($Record[0][10]=="1"){ $catename .="男の子/"; }
if($Record[0][11]=="1"){ $catename .="女の子/"; }
if($Record[0][12]=="1"){ $catename .="乳幼児・知育/"; }
if($Record[0][13]=="1"){ $catename .="ぬいぐるみ・人形/"; }
if($Record[0][14]=="1"){ $catename .="ゲーム・パズル/"; }
if($Record[0][15]=="1"){ $catename .="ホビー・模型・RC/"; }
if($Record[0][16]=="1"){ $catename .="季節もの/"; }
if($Record[0][17]=="1"){ $catename .="雑貨・生活/"; }
if($Record[0][18]=="1"){ $catename .="その他/"; }
if(empty($catename)==TRUE){
$catename .=" /";
}
$catenum = strlen($catename);
$max = $catenum-1;
$catename = substr($catename, 0, $max);
$url = $Record[0][7];
if(empty($url)!=TRUE){
$aname = "";
$bname = "";
}
else{
$aname="";
$bname="";
}
$evnetflg = $Record[0][21];
if($evnetflg=="1"){
$temp = $Record[0][2];
$temp2 = ereg_replace("-", "_", $temp);
$event = "イベントページへ";
}
else{
$event = "";
}
print <<{$Record[3][2]} {$aname}{$Record[3][3]}{$bname}{$event}
$catename
{$Record[0][2]} {$aname}{$Record[0][3]}{$bname}{$event}
$catename
{$Record[1][2]} {$aname}{$Record[1][3]}{$bname}{$event}
$catename