求图片程序!!! www.elstu.com 我的团队,里面有我们自己开发的一套个人相册程序。符合你的要求,php写的。但是是共享软件需要付费。php+mysql的程序。(希望理解我们的劳动) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?$Tmpcount=3;?><table width="435" border="0" cellpadding="0" cellspacing="0" class="word" align="center"><tr> <? $tempnum=1;//$dp->rowscount; while($row = @mysql_fetch_array($res)) { $product_id=trim($row[product_id]); $product_name=get_filedvalue_from("product_id",$product_id,"name","product_info",$mysql_server); $image_s=trim($row[image_s]); $image_b=trim($row[image_b]); if(is_file($uploadDir2.$image_b)) $img_click="<a href=\"javascript:void(0);\"><img src=\"".$uploadDir1."".$image_s."\" width=\"130\" height=\"100\" border=\"0\" onClick=\"MM_openBrWindow('pop/someworks.php?imgname=".$image_b."','','scrollbars=yes,width=495,height=440')\"></a>"; else $img_click="<img src=\"".$uploadDir1."".$image_s."\" width=\"130\" height=\"100\" border=\"0\" >"; $tmpimg="background=\"images/bg_prod.gif\""; $tempnum1=($dp->rowscount)%$Tmpcount; if($tempnum<$Tmpcount) //$tmpimg=""; ?> <td width="145" height="131" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="131" <?echo $tmpimg?>> <tr> <td height="21" align="center" class="glow" valign="bottom"><?echo sub_str($product_name,0,16);?></td> </tr> <tr> <td align="center"><?echo $img_click;?></td> </tr> </table> </td> <? if(($tempnum%$Tmpcount)==0 && $tempnum!=1) { ?> </tr> <tr> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> </tr> <tr><? } if($dp->recordcount==2 && $tempnum==2) {//$dp->recordcount总记录数?><td width="145" height="131" valign="top"> </td><? } $tempnum++;}?> </table> 用Macromedia Dreamweaver MX做好架子,把php写里!! 不就是一个嵌套循环吗?给出两种解决方案:<?php/*********************************************************** Copyright (C), 1988-1999, ustb FileName: list.php Author: 偶然 Version : 1.0 Date: 2003.9.26 Description: 多行多列输出表格 Version: 1.0 Function List: // 主要函数及其功能 1. ------- History: // 历史修改记录 <author> <time> <version > <desc> 偶然 03/9/29 1.0 创建模块 ************************************************************//*** 第一种方案,模板写法,未写分页*///从数据库取数据$sql1="select count(*) as num from category where fid='0'";$res1= mysql_query($sql1);$arr1= mysql_fetch_array($res1);$num= $arr1['num'];//每列显示三个$columns=3;//单元格宽度$td_width=100/$columns."%";$remainder=$num%$columns;$rows=ceil($num/$columns);/*** 这里用到了模板,在模板文件里设置一个嵌套的块,* 外层是表格的<tr></tr>,内层是<td></td>,* 块的名字分别是cate_list,cate_l*/$t->set_block("MyFileHandle","cate_list","C_LIST");$t->set_block("cate_list","cate_l","C_L");for($i=0; $i<$rows; $i++) { $k=$i*$columns; $sql="select * from category where fid='0' limit $k,$columns"; $res=mysql_query($sql) or die(mysql_error()); $t->set_var("C_L"); while($array=@mysql_fetch_array($res)) { $cate_list=$array['name']; $t->set_var("category_list",$cate_list); $t->parse("C_L","cate_l",true); } $t->parse("C_LIST","cate_list",true);}mysql_free_result($res);/*** 第二种方案,嵌入式写法,带有分页*///从数据库取数据$sql2 ="select count(*) as num from category where fid='0'";$res2 = mysql_query($sql2);$num2 = mysql_num_rows($res2);$arr1 = mysql_fetch_array($res1);//每列三个$col_num = 3;$total = $num2;//图片总数量$perpage = '6';//每页图片数量$pagenumber = floor($total/$perpage);//得到总页数if($total==0) { echo "没有图片";}else { //如果没有从url得到页码则置为0 if(isset($_GET[$page])||$_GET[$page]=='')) { $page=0; } else { $page=$_GET[$page]; } //容错,如果页码超过总页数或小于0,置0 if($page<0||$page>$pagenumber) { $page=0; } $startnote = $page*$perpage;//开始记录位置 $endnote = $startnote+$perpage;//结束记录位置 //显示 echo "<table>"; for($i=$startnote+1;$i<=$endnote;$i++) { if ($i%$col_num==1) { echo "<table border=1 bordercolor=#cccccc cellpadding=4 cellspacing=0 width=100% align=center><tr>\n"; } else { echo "<td align=center width=33%><img src=".$XXXX." width=150 border=0></td>\n"; if ($i%$col_num==0) { echo "</tr></table>\n"; } } } $prevpage = $page-1;//上一页的PAGE数 $nextpage = $page+1;//下一页的page数 echo "<table><tr><td>总共:".$pagenumber."页 <a href=\"uploadbig.php?page=0\">首页</a> <a href=\"uploadbig.php?page=$prevpage\">上一页</a> <a href=\"uploadbig.php?page=$nextpage\">下一页</a> <a href=\"uploadbig.php?page=$pagenumber\">尾页</a></td></tr></table>";}?> 可以给你一个自写的函数,可以随你定义行,列,还有图片的背景,框架function list_honor($where,$Offset,$num,$hang,$lie){ $star='<table width="90%" border="0" cellpadding="0" cellspacing="0">'; $end='</table>'; $tr='<tr>'; $end_tr='</tr>'; $td='<td>'; $end_td='</td>'; $div='<div align="center">'; $end_div='</div>'; mysql_select_db("数据库名"); $jcsql = "select * from 表名 $where LIMIT $Offset,$num"; //echo $jcsql; $jcresult = mysql_query($jcsql) or die(mysql_error()); //$temp=array("1"=>array(),"2"=>array(),"3"=>array()); $i=0;$h=0; $shuju=array(); while ($obj= mysql_fetch_object($jcresult)) { if ($obj->image<>'') {$img="图片路径".$obj->image; }else { $img="显示一张无图片的图片";} $table=' <table width="95%" border="0" cellpadding="0" cellspacing="10" class="hs"> <tr align="center"> <td> <table width="95" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3"><img src="../images/index18.gif" width="194" height="7"></td> </tr> <tr> <td width="9"><img src="../images/index20.gif" width="9" height="124"></td> <td width="176"><a href="'.$img.'" target="_blank"><img src="'.$img.'" width="175" height="122" border="0" align="center"></a></td> <td width="9"><img src="../images/index21.gif" width="9" height="124"></td> </tr> <tr> <td colspan="3"><img src="../images/index19.gif" width="194" height="7"></td> </tr> </table></td> </tr> <tr align="center"> <td>图片介绍</td> </tr> </table>'; $shuju[$h]=$table; $h++; } $h=0; for($i=0;$i<$hang;$i++){ for($j=0;$j<$lie;$j++){ $temp_3=$temp_3.$td.$div.$shuju[$h].$end_div.$end_td; $h++; } $temp_2=$tr.$temp_3.$end_tr; $temp_3=""; $temp_1=$temp_1.$temp_2; } $temp=$star.$temp_1.$end; echo $temp;} 其中$table可以替换为你想要的图片的框架 http://www.elstu.com/news/list.php?id=3个人相册系统v1.0版本(商业版)介绍:这个系统是主要用于存放个人的相片,每个注册用户,都可以建立和管理自己的相片。相片一相册名字归类,用户可以定制自己的个性相册和大众相册。功能:1、排序搜索功能强大,可以以相册或相片的几乎所有属性来排序或搜索。比如,时间、用户、地区、人气、评论数、分类、投票数等。 2、有评论功能。可以为没一副你喜欢的相片加以评论。3、投票功能。可以为没一副你喜欢的相片加以投票。4、后台功能有:添加删除修改分类、相册、相片。技术:使用php语言编写,用mysql数据库。速度快。技巧上使用了php模版类来管理界面风格,使界面风格的修改变的简单容易。 急急急急 参数如何传递? php开发环境 菜鸟诚心求教! php文件上传的问题 mysql如何获取时间段内每一天的结果集,没有时为0 php 与 C的结合开发网站是怎么个搞法呢?高手进来看看....... HTML语句怎样在PHP语句中执行? 急!如何将几个数分开输出. 怎么将.sql放到数据库里啊 请问各位高手 急!急!急!自写com组件访问数据库问题
<table width="435" border="0" cellpadding="0" cellspacing="0" class="word" align="center">
<tr>
<?
$tempnum=1;//$dp->rowscount;
while($row = @mysql_fetch_array($res))
{
$product_id=trim($row[product_id]); $product_name=get_filedvalue_from("product_id",$product_id,"name","product_info",$mysql_server);
$image_s=trim($row[image_s]);
$image_b=trim($row[image_b]);
if(is_file($uploadDir2.$image_b))
$img_click="<a href=\"javascript:void(0);\"><img src=\"".$uploadDir1."".$image_s."\" width=\"130\" height=\"100\" border=\"0\" onClick=\"MM_openBrWindow('pop/someworks.php?imgname=".$image_b."','','scrollbars=yes,width=495,height=440')\"></a>";
else
$img_click="<img src=\"".$uploadDir1."".$image_s."\" width=\"130\" height=\"100\" border=\"0\" >";
$tmpimg="background=\"images/bg_prod.gif\"";
$tempnum1=($dp->rowscount)%$Tmpcount;
if($tempnum<$Tmpcount)
//$tmpimg="";
?>
<td width="145" height="131" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="131" <?echo $tmpimg?>>
<tr>
<td height="21" align="center" class="glow" valign="bottom"><?echo sub_str($product_name,0,16);?></td>
</tr>
<tr>
<td align="center"><?echo $img_click;?></td>
</tr>
</table>
</td>
<?
if(($tempnum%$Tmpcount)==0 && $tempnum!=1)
{
?>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"> </td>
<td valign="top"> </td>
</tr>
<tr>
<?
}
if($dp->recordcount==2 && $tempnum==2)
{//$dp->recordcount总记录数
?>
<td width="145" height="131" valign="top">
</td>
<?
}
$tempnum++;
}
?>
</table>
<?php
/***********************************************************
Copyright (C), 1988-1999, ustb
FileName: list.php
Author: 偶然 Version : 1.0 Date: 2003.9.26
Description: 多行多列输出表格
Version: 1.0
Function List: // 主要函数及其功能
1. -------
History: // 历史修改记录
<author> <time> <version > <desc>
偶然 03/9/29 1.0 创建模块
************************************************************//**
* 第一种方案,模板写法,未写分页
*///从数据库取数据
$sql1="select count(*) as num from category where fid='0'";
$res1= mysql_query($sql1);
$arr1= mysql_fetch_array($res1);
$num= $arr1['num'];//每列显示三个
$columns=3;//单元格宽度
$td_width=100/$columns."%";$remainder=$num%$columns;
$rows=ceil($num/$columns);/**
* 这里用到了模板,在模板文件里设置一个嵌套的块,
* 外层是表格的<tr></tr>,内层是<td></td>,
* 块的名字分别是cate_list,cate_l
*/
$t->set_block("MyFileHandle","cate_list","C_LIST");
$t->set_block("cate_list","cate_l","C_L");
for($i=0; $i<$rows; $i++) {
$k=$i*$columns;
$sql="select * from category where fid='0' limit $k,$columns";
$res=mysql_query($sql) or die(mysql_error());
$t->set_var("C_L");
while($array=@mysql_fetch_array($res)) {
$cate_list=$array['name'];
$t->set_var("category_list",$cate_list);
$t->parse("C_L","cate_l",true);
}
$t->parse("C_LIST","cate_list",true);
}
mysql_free_result($res);
/**
* 第二种方案,嵌入式写法,带有分页
*/
//从数据库取数据
$sql2 ="select count(*) as num from category where fid='0'";
$res2 = mysql_query($sql2);
$num2 = mysql_num_rows($res2);
$arr1 = mysql_fetch_array($res1);//每列三个
$col_num = 3;
$total = $num2;//图片总数量
$perpage = '6';//每页图片数量
$pagenumber = floor($total/$perpage);//得到总页数
if($total==0) {
echo "没有图片";
}
else {
//如果没有从url得到页码则置为0
if(isset($_GET[$page])||$_GET[$page]==''))
{
$page=0;
}
else
{
$page=$_GET[$page];
} //容错,如果页码超过总页数或小于0,置0
if($page<0||$page>$pagenumber)
{
$page=0;
}
$startnote = $page*$perpage;//开始记录位置
$endnote = $startnote+$perpage;//结束记录位置 //显示
echo "<table>";
for($i=$startnote+1;$i<=$endnote;$i++)
{
if ($i%$col_num==1)
{
echo "<table border=1 bordercolor=#cccccc cellpadding=4 cellspacing=0 width=100% align=center><tr>\n";
}
else
{
echo "<td align=center width=33%><img src=".$XXXX." width=150 border=0></td>\n";
if ($i%$col_num==0)
{
echo "</tr></table>\n";
}
} }
$prevpage = $page-1;//上一页的PAGE数
$nextpage = $page+1;//下一页的page数
echo "<table><tr><td>总共:".$pagenumber."页 <a href=\"uploadbig.php?page=0\">首页</a> <a href=\"uploadbig.php?page=$prevpage\">上一页</a> <a href=\"uploadbig.php?page=$nextpage\">下一页</a> <a href=\"uploadbig.php?page=$pagenumber\">尾页</a></td></tr></table>";
}
?>
function list_honor($where,$Offset,$num,$hang,$lie){
$star='<table width="90%" border="0" cellpadding="0" cellspacing="0">';
$end='</table>';
$tr='<tr>';
$end_tr='</tr>';
$td='<td>';
$end_td='</td>';
$div='<div align="center">';
$end_div='</div>';
mysql_select_db("数据库名");
$jcsql = "select * from 表名 $where LIMIT $Offset,$num";
//echo $jcsql;
$jcresult = mysql_query($jcsql) or die(mysql_error());
//$temp=array("1"=>array(),"2"=>array(),"3"=>array());
$i=0;$h=0;
$shuju=array();
while ($obj= mysql_fetch_object($jcresult)) {
if ($obj->image<>'') {$img="图片路径".$obj->image;
}else { $img="显示一张无图片的图片";}
$table='
<table width="95%" border="0" cellpadding="0" cellspacing="10" class="hs">
<tr align="center">
<td> <table width="95" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><img src="../images/index18.gif" width="194" height="7"></td>
</tr>
<tr>
<td width="9"><img src="../images/index20.gif" width="9" height="124"></td>
<td width="176"><a href="'.$img.'" target="_blank"><img src="'.$img.'" width="175" height="122" border="0" align="center"></a></td>
<td width="9"><img src="../images/index21.gif" width="9" height="124"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/index19.gif" width="194" height="7"></td>
</tr>
</table></td>
</tr>
<tr align="center">
<td>图片介绍</td>
</tr>
</table>';
$shuju[$h]=$table;
$h++;
}
$h=0;
for($i=0;$i<$hang;$i++){
for($j=0;$j<$lie;$j++){
$temp_3=$temp_3.$td.$div.$shuju[$h].$end_div.$end_td;
$h++;
}
$temp_2=$tr.$temp_3.$end_tr;
$temp_3="";
$temp_1=$temp_1.$temp_2;
}
$temp=$star.$temp_1.$end;
echo $temp;
} 其中$table可以替换为你想要的图片的框架
这个系统是主要用于存放个人的相片,每个注册用户,都可以建立和管理自己的相片。相片一相册名字归类,用户可以定制自己的个性相册和大众相册。功能:1、排序搜索功能强大,可以以相册或相片的几乎所有属性来排序或搜索。比如,时间、用户、地区、人气、评论数、分类、投票数等。
2、有评论功能。可以为没一副你喜欢的相片加以评论。
3、投票功能。可以为没一副你喜欢的相片加以投票。
4、后台功能有:添加删除修改分类、相册、相片。
技术:使用php语言编写,用mysql数据库。速度快。技巧上使用了php模版类来管理界面风格,使界面风格的修改变的简单容易。