include_once("inc/setenv.php"); ?>
db_query($sql,1);
if( $db->row != 0 )
{
// html出力
$i=0;
$file=file("./new.html");
while($rec = $file[$i++]) {
$rec = str_replace("{BASECOLOR}", $basecolor, $rec);
// リスト出力
if ($rec == "\n" ) {
$tempbuf="\n";
while($rec != "\n" ){
$rec = $file[$i];
$tempbuf .= $rec;
$i++;
}
for($repcnt=0;$repcnt<$db->row;$repcnt++){
$buf = $tempbuf;
$buf = str_replace("{linkurl}", "out.php?id=".$db->rec[$repcnt]['Username']."&url=".$db->rec[$repcnt]['Site_URL'], $buf);
$buf = str_replace("{sitetitle}", $db->rec[$repcnt]['Site_Title'], $buf);
$buf = str_replace("{desc}", $db->rec[$repcnt]['Description'], $buf);
$buf = str_replace("{datetime}", date("Y/m/d H:i",$db->rec[$repcnt]['Signup_Time']), $buf);
$buf = str_replace("{BASECOLOR}", $basecolor, $buf);
echo $buf;
}
}
echo $rec;
}
}
else
{
// html出力
$i=0;
$file=file("./new.html");
while($rec = $file[$i++]) {
$rec = str_replace("{BASECOLOR}", $basecolor, $rec);
// リスト出力
if ($rec == "\n" ) {
$tempbuf="\n";
while($rec != "\n" ){
$rec = $file[$i];
$tempbuf .= $rec;
$i++;
}
for($repcnt=0;$repcnt<$db->row;$repcnt++){
$buf = $tempbuf;
$buf = str_replace("{linkurl}", "out.php?id=".$db->rec[$repcnt]['Username']."&url=".$db->rec[$repcnt]['Site_URL'], $buf);
$buf = str_replace("{sitetitle}", $db->rec[$repcnt]['Site_Title'], $buf);
$buf = str_replace("{desc}", $db->rec[$repcnt]['Description'], $buf);
$buf = str_replace("{datetime}", date("Y/m/d H:i",$db->rec[$repcnt]['Signup_Time']), $buf);
$buf = str_replace("{BASECOLOR}", $basecolor, $buf);
//echo $buf;
}
echo "
新着相互リンクサイトはありません。
";
}
echo $rec;
}
}
?>