Staff紹介 |
// MySQL接続とQUERYの送信
$MyLink = mysql_connect($MySQLHost, $MySQLUserName, $MySQLPassword);
mysql_select_db($MySQLDatabase);
$MyQuery1 = "SELECT staff_id,staff_name,night_homepage.client_id as client_id,client_site_title,client_site,client_dir,staff_b,staff_w,staff_hip,staff_show FROM night_staff INNER JOIN night_homepage ON night_staff.client_id=night_homepage.client_id WHERE night_homepage.client_id > '3' AND night_staff.client_id > '0' AND night_staff.staff_name != '' AND night_staff.staff_show='1' ORDER BY night_staff.lastupdate DESC LIMIT 10";
$MyResult1 = mysql_query($MyQuery1, $MyLink);
while($MyData = mysql_fetch_object($MyResult1))
{
print("");
print($MyData->staff_name." ちゃん ");
if($MyData->staff_show >0){
print("");
if(file_exists("../".$MyData->client_dir."/img_staff/staff_".$MyData->staff_id.".jpg")){
print("client_dir."/img_staff/staff_".$MyData->staff_id.".jpg\" width=80 height=80> ");
}elseif(file_exists("../".$MyData->client_dir."/img_staff/g_".$MyData->staff_id."s.jpg")){
print("client_dir."/img_staff/g_".$MyData->staff_id."s.jpg\" width=70 height=80> ");
}elseif(file_exists("../".$MyData->client_site.$MyData->client_dir."/img_staff/g_".$MyData->staff_id."s.jpg")){
print("client_site.$MyData->client_dir."/img_staff/g_".$MyData->staff_id."s.jpg\" width=70 height=80> ");
}
print("");
}
print("");
if($MyData->staff_b==0){print("B:??");}else{print("B:".$MyData->staff_b);}
if($MyData->staff_w==0){print("W:??");}else{print("W:".$MyData->staff_w);}
if($MyData->staff_hip==0){print("H:??");}else{print("H:".$MyData->staff_hip);}
print(" ");
print("");
print(">> ".$MyData->client_site_title."へGo!!");
print(" | ");
}
mysql_free_result($MyResult1);
?>
|
最新情報 |
---|
|
|
---|
$MyQuery = "SELECT * FROM night_news LEFT JOIN night_client ON night_client.client_id=night_news.client_id WHERE night_news.news_ck_view = '1' ORDER BY night_news.news_lastupdate DESC LIMIT 20";
$MyResult = mysql_query($MyQuery, $MyLink);
while($MyData = mysql_fetch_object($MyResult))
{
print(" | | | ");
print(" | ");
print("☆ ".$MyData->client_name." / ".$MyData->news_title." -- ".$MyData->news_lastupdate."");
print(" | | ");
print(" | | ");
print(nl2br($MyData->news_memo));
print(" ");
if($MyData->news_url){print("http://".$MyData->news_url."");}
print(" | | ");
print(" | | | ");
}
mysql_free_result($MyResult);
mysql_close($MyLink);
?>
|