ziedinjsh Posted October 25, 2009 Report Share Posted October 25, 2009 tātad gallery.php atrodas šis: <?php $size = "width='100' height='100'"; echo "<div class='img-list'>"; echo "<div class='img-c'><div class='img'><a href='?page=show&mink=1'><img src='gallery/mink1.jpg' ".$size."></a></div><div class='shadow'></div></div>"; echo "<div class='img-c'><div class='img'><a href='?page=show&mink=2'><img src='gallery/mink2.jpg' ".$size."></a></div><div class='shadow'></div></div>"; echo "<div class='img-c'><div class='img'><a href='?page=show&mink=3'><img src='gallery/mink3.jpg' ".$size."></a></div><div class='shadow'></div></div>"; echo "<div class='img-c'><div class='img'><a href='?page=show&mink=4'><img src='gallery/mink4.jpg' ".$size."></a></div><div class='shadow'></div></div>"; echo "</div>"; ?> uzspiežot uz bildi atveras showp.php?mink=skaitlis show.php: <?php $mink = (isset($_GET['mink'])) ? $_GET['mink'] : ''; $big = "width='530'"; echo "<div class='big-img'>"; if($mink == '1'){ echo "<div class='big-img-c'><div class='big-img-c2'><img src='gallery/mink1.jpg' ".$big."></div></div>"; echo "<div class='big-img-dic'>Kaut kas par bildi</div>"; } if($mink == '2'){ echo "<div class='big-img-c'><div class='big-img-c2'><img src='gallery/mink2.jpg' ".$big."></div></div>"; echo "<div class='big-img-dic'>Kaut kas par bildi</div>"; } if($mink == '3'){ echo "<div class='big-img-c'><div class='big-img-c2'><img src='gallery/mink3.jpg' ".$big."></div></div>"; echo "<div class='big-img-dic'>Kaut kas par bildi</div>"; } if($mink == '4'){ echo "<div class='big-img-c'><div class='big-img-c2'><img src='gallery/mink4.jpg' ".$big."></div></div>"; echo "<div class='big-img-dic'>Kaut kas par bildi</div>"; } echo "</div>"; ?> kā es varētu uztaisīt lai show.php caru pārslēgt bildes? nākamo un iepriekšējo? nevaru izdomāt.. droši vien bišķi savādāk vajag to kodu kur nosak uz kuru bildi ir uzspiests.. bez mysql Quote Link to comment Share on other sites More sharing options...
Genesis Posted October 26, 2009 Report Share Posted October 26, 2009 Ja jau tu gribji, ka uztaisit klikski bildei uz vienas malas paradas nakama bilde un uz otras - ieprieksheja, tad paskaties netā pēc lietām ko sauc par shadowbox, greybox, lightbox.. :) (Varbut noder mana atbilde.. :D) Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted October 26, 2009 Report Share Posted October 26, 2009 emm, $mink-1 iepriekšējā, $mink+1 nākamā? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.