Jump to content
php.lv forumi

vienkārša bilžu skatīšana


ziedinjsh

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...