<SCRIPT LANGUAGE="JScript">
function changeMe() {
document.all.MyHeading.outerHTML = "<H1 ID=MyHeading><img src=\"image/" + window.event.srcElement.name + "\"/ width=\"528\"><p align=\"right\"><a href=\"cinema_photo_image_original.php?image="+ window.event.srcElement.name +"\" class=\"style12\" style=\"text-decoration:none\" onmouseover=\"this.style.color='#CCFFFF'\" onmouseout=\"this.style.color='#FFFFFF'\" target=\"_blank\">click to see the image in its original size</a></p></H1>";
window.status = "Image " + window.event.srcElement.name + " is loaded";
}
</SCRIPT>
<?php
$link=mysql_connect("host adi buraya ","veritabani kullanici adi buraya ","kullsnicinin sifresi buraya ");
if (!$link)
{
die("Couldn't reach to the datbase.link is broken.Sorry.We will try to solve this problem as soon as possible :" . mysql_error());
}
function show($key)
{
/* //preg_match fonksiyonunu kullanimi
if (preg_match ("/$show_what/i", $isim))
{
print "A match was found.";
}
else
{
print "A match was not found.";
} */
mysql_select_db("sinema") or die("Couldn't reach to the database.Sorry.We will try to solve this problem as soon as possible :" . mysql_error());
$all=mysql_query("select * from resimler") or die("mysql error");
while ($line = mysql_fetch_assoc($all))
{
$isim=$line[isim];
$yol=$line[yol];
//echo "$isim";
if (preg_match ("/$key/i", $isim))
{
if(preg_match ("/ufak/i", $isim))
{
$alt=substr($isim, 0, -5);
$uzanti=".jpg";
$buukres=$alt.$uzanti;
echo "<table width=\"100\" border=\"1\">
<tr>
<td><a href=\"#\" onclick=\"changeMe(); return false\"><img src=\"image/$yol\"/ alt=\"$alt\" border=\"0\" name=\"$buukres\"></a></td>
</tr>
</table>";
}
}
}
}
$show_what=$_GET['show'];
//echo "$show_what";
if ($txtsearch=="")//arama kutusu bos
{
if ($show_what=="")//arama kutusu ve show_what bos (su durumda search texti bos iken search e basilmasi durumu)
{
echo "arama sonucu yok tavsiye linkleri";
}
else if($show_what!="")//search texti bos ama show_what dolu durumu
{
show("$show_what");
}
}
else//search bos degil durumu
{
if($radiobutton=="includes")
show("$txtsearch");
else if($radiobutton=="begins")
{
mysql_select_db("sinema") or die("Couldn't reach to the database.Sorry.We will try to solve this problem as soon as possible :" . mysql_error());
$all=mysql_query("select * from resimler") or die("mysql error");
while ($line = mysql_fetch_assoc($all))
{
$isim=$line[isim];
$yol=$line[yol];
$lenght=strlen("$txtsearch");
$aranan=substr("$isim",0,$lenght);
if (!strcasecmp($aranan, $txtsearch))
{
if(preg_match ("/ufak/i", $isim))
{
$alt=substr($isim, 0, -5);
$uzanti=".jpg";
$buukres=$alt.$uzanti;
echo "<table width=\"100\" border=\"1\">
<tr>
<td><a href=\"#\" onclick=\"changeMe(); return false\"><img src=\"image/$yol\"/ alt=\"$alt\" border=\"0\" name=\"$buukres\"></a></td>
</tr>
</table>";
}
}
}
}
}
?> |