15 Ocak 2015, 07:05
#1 Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
Php ve Javascript ile Yildizli Oylama Sistemi
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<?php
function Goster ( $durum ){
return "<img src=\"resim/" . $durum . ".gif\" alt=\"\" id=\"yildizoysistemi\" usemap=\"#yildizoysistemi\" style=\"border:0px;\" />" ;
}
$sonuc = 1 ;
$durum = 0 ;
$s1 = 0 ;
$s2 = 0.5 ;
for ( $i = 1 ; $i < 11 ; $i ++){
if ( $sonuc == 0 ){
echo Goster ( 0 );
$durum = 0 ;
break;
};
if ( $sonuc > $s1 && $sonuc <= $s2 ){
$durum = $i ;
echo Goster ( $i );
};
$s1 += 0.5 ;
$s2 += 0.5 ;
};
echo '<script type="text/javascript" language="javascript">' ;
echo 'function Duzenle(numara){' ;
echo "document.getElementById('yildizoysistemi').src='resim/' + numara + '.gif';" ;
echo '}' ;
echo '</script>' ;
echo '<map name="yildizoysistemi">' ;
echo '<!- #$-:Image Map file created by GIMP Imagemap Plugin ->' ;
echo '<!- #$-:GIMP Imagemap Plugin by Maurits Rijk ->' ;
echo '<!- #$-:Please do not edit lines starting with "#$" ->' ;
echo '<!- #$VERSION:2.0 ->' ;
$x1 = 7 ;
for ( $i = 0 ; $i < 10 ; $i ++){
$a = $i + 1 ;
echo "<area shape=\"rect\" coords=\"0,0," . $x1 . ",18\" OnMouseOut=\"Duzenle('" . $durum . "');\"; OnMouseOver=\"Duzenle('" . $a . "');\" />" ;
$x1 += 7 ;
}
echo '</map>' ;
?>
__________________
Bu kez pek bir afili yalnızlık, ağlatan bir kadın kadar düşman. Ağzı bozuk üstelik bırakmıyor acıtmadan.