歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 28, 2024, 12:27:13 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  使用與操作  |  再自己的php網頁中顯示blog圖像 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 再自己的php網頁中顯示blog圖像  (閱讀 6372 次)
bejishone
新手見習
*
文章: 3


檢視個人資料
« 於: 十一月 14, 2006, 12:16:40 上午 »

我想要再子給寫的php網頁中
抓到lifetype的個人圖像
這是我目前寫的
blog名稱抓的到
但是相簿名稱跟圖檔名卻抓不到標準的
這連結是我目前寫的顯示樣式
http://163.14.68.24/92aprod/blog.php

這是我寫這個的程式的程式碼
程式碼:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>無標題文件</title>
</head>
<? session_start(); $user=$_SESSION['user'];  ?>
<body bgcolor="#85CEFA" scroll="auto" leftmargin="0" topmargin="0">
<?
  $link = mysql_connect("localhost", "root" , "");
if (!$link) die("與資料庫的連接失敗");

$db_selected = mysql_select_db("blog", $link);
if (!$db_selected) die("開啟資料庫失敗");
$a=0;

$str="SELECT * FROM lt_blogs ";
$result= mysql_query($str);
while(list($id,$blog,$owner_id,$about,$settings,$mangled_blog,$status,$show_in_summary)=mysql_fetch_row($result)){
$bname[$a]=$blog;
$a++;
}$str1="SELECT count(*) FROM lt_blogs ";
$result1= mysql_query($str1);
list($count)=mysql_fetch_row($result1);

?>
<table width="100%" height="100%" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#3333FF">
<tr>
     <td height="30" valign="middle" bgcolor="#3333FF"><font color="#FFFF66" size="3"><strong>BLOG</strong></font></td>
</tr>


<tr>

<td align="center" >

<table width="80%" border="1" bordercolor="#FFFFFF" >
<tr>
              <td width="80" height="22" bgcolor="#0099FF"><div align="center"><span class="style6"><strong>blog</strong></span></div></td>


</tr>
<?$i=0;
  $b=0;
  $c=0;
while($i<$count)

{
$str2="SELECT * FROM lt_gallery_albums ";
$result2= mysql_query($str2);
while(list($id,$owner_id,$description,$name,$flags,$parent_id,$date,$properties,$show_album,$normalized_description,$normalized_name,$mangled_name)=mysql_fetch_row($result2)){
   if(($b+1)==$owner_id)
   {$id[$b]=$owner_id;
    $uname[$b]=$name;}
   else
   {$id[$b]=0;
    $uname[$b]=$uname[0];
   }
   $b++;
}

$str3="SELECT * FROM lt_gallery_resources ";
$result3= mysql_query($str3);
while(list( $id,$owner_id,$album_id,$description,$date,$flags,$resource_type,$file_path,$file_name,$metadata,$thumbnail_format,$normalized_description,$properties  )=mysql_fetch_row($result3)){
   if(($c+1)==$owner_id)
   {
$fname[$c]=$file_name;
}
else
{
   $fname[$c]=$fname[0];
   }
   $c++;

}
?>
         <tr>

                         <td width="80" height="22" bgcolor="#FFFFCC"><img src="http://163.14.68.24/92aproD/lifetype/blog/<? echo $bname[$i] ?>/resource/<?echo $uname[$i]?>/preview/<?echo $fname[$i];?>" width="130" height="130"></td>

                       <td width="80" height="22" bgcolor="#FFFFCC"><a href="http://163.14.68.24/92aproD/lifetype/blog/<? echo $bname[$i]; ?>" target="_blank">
                    <? echo $bname[$i]."的部落格";?>
                          </a></td>
                                    <?$i=$i+1;}?>
          </tr>
</table>

</td>

</tr>
</table>
</body>
</html>
已記錄
頁: [1]
LifeType 中文開發論壇  |  支援  |  使用與操作  |  再自己的php網頁中顯示blog圖像 « 上篇主題 下篇主題 »
    前往: