Results 1 to 1 of 1
  1. #1
    dunkerr
    dunkerr is offline
    New member dunkerr's Avatar
    Join Date
    2011 Jul
    Posts
    4
    Thanks Thanks Given 
    4
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Rep Power
    0

    [PHP] Rating script

    Preview:


    Live demo: http://garryone.trei.ro/tests/voting.php

    Source:

    PHP Code:
    <?php
    function get_rating($number) {
        if(
    is_numeric($number)) {
            if(
    $number <= 10 ) {
                for(
    $i=1;$i<=$number;$i++) {
                    echo 
    '<img src="http://i.imgur.com/SdT8y.png" width="20px"/>';
                }
                if(
    strpos($number,".") && substr($number,2,1) != 0) {
                    if(
    substr($number,2,1) >&& substr($number,2,1) <= 7) {
                        echo 
    '<img src="http://i.imgur.com/kl5R2.png" height="19px" />';
                    }
                    if(
    substr($number,2,1) > 7) {
                        echo 
    '<img src="http://i.imgur.com/SdT8y.png" width="20px"/>';
                    }
                }
            }    
            if(
    $number 10) {
                echo 
    'Value must be up to 10.';
            }
        }    
        if(!
    is_numeric($number)) {
            echo 
    'Value must be numeric.';
        }    
    }


    if(isset(
    $_POST['submit'])) {
        echo 
    get_rating($_POST['text']);
    }
    ?>
    <form action="" method="post">
    <input type="text" name="text" />
    <input type="submit" name="submit" />
    </form>

  2. The Following User Says Thank You to dunkerr For This Useful Post:


Similar Threads

  1. [Release] [Rohan]Extractor + Blender Script
    By CriticalError in forum Game Models and Graphic
    Replies: 20
    Last Post: 2020-05-25, 06:15 PM
  2. [Bot] The Crims Auto Script
    By Grooguz in forum Browser Games
    Replies: 11
    Last Post: 2013-11-17, 07:16 PM
  3. [Help] need script file for PW (.ahk)
    By Shibiusa in forum Perfect World
    Replies: 1
    Last Post: 2011-12-29, 12:42 PM
  4. Agbot Script Maker
    By kazaam00nix in forum Silkroad Online
    Replies: 2
    Last Post: 2010-11-25, 12:29 PM
  5. MM ReqBot Script.
    By stirlitssss in forum Requiem Bots, Hacks, Cheats
    Replies: 14
    Last Post: 2010-11-23, 02:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •