Gallery中的PrettyPhoto出错

时间:2016-07-11 18:19:09

标签: prettyphoto

我希望有人可以帮助我。 我正在建立一个网站,其中有一个部分,其中包含照片,文字说明和图库链接等内容。

照片 - 文字叙述产品1 链接画廊(2张)

照片 - 文字叙述产品2 链接画廊(1张)

照片 - 文字叙述产品3 链接画廊(0张)

在文本下面我希望你有一个链接,可以让我抬起PrettyPhoto,并在模态窗口中显示其他照片。

我遇到的问题是,从网络管理员的照片,成功记录,你的记录上的每张照片。但是,当我运行Product1的图库时,加载3张照片,我们的记录中有2张:FOTO1和FOTO2,但太过FOTO 3(product2)

代码

sqla="SELECT gallery_obra FROM subservicio WHERE id_servicio=   '{$data['id_servicio']}'";

//这么多,SQL给了我注册表的照片(id_servicio)我给他FOTO1; FOTO2

querya=mysql_query(sqla);
data01=mysql_fetch_assoc(querya);

if((strlen(data01['gallery_obra']))>3)

 {

images=explode(';',data01['gallery_obra']);
//So far this well because in the array visualize the names of the
  photos, according to Id. For example I have for product1

images [0] = FOTO1
images [1] = FOTO2

and product 2, I have
images [0] = FOTO3

//但是当你运行漂亮的照片已经出了别的东西。

foreach($images as $key => $value)

{
if($value!='')
{
   if($key==0)
   echo "<div style='text-align:right;width:94%;padding:10px;'><a   href='".SUBSERV_IMAG.$value."' rel='prettyPhoto[galeria]'><img src='images/vermas.png' border='0'></a></div>";
else
 echo "<a href='".SUBSERV_IMAG.$value."' rel='prettyPhoto[galeria]'><img src='".SUBSERV_IMAG.$value."' style='display:none;'></a>";
}
} 

错误在哪里?

0 个答案:

没有答案