Pereiti prie turinio

faileris001

Nariai
  • Pranešimai

    18
  • Užsiregistravo

  • Lankėsi

  • Atsiliepimai

    0%

faileris001 Pranešimai

  1. Jei labai norėsi susiinstaliuosi.

     

     

     

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <meta name="author" content="DaYeR; dayer.puslapiai.lt" />

    <title>Kasnors už taškus</title>

    <style type="text/css">

    <!--

    body,td,th {

    font-family: Verdana, Arial, Helvetica, sans-serif;

    font-size: 12px;

    color: #CCCCCC;

    margin: 0px;

    }

    td {

    padding:10px;

    text-align:center;

    border-width: thin;

    border-style:none dotted dotted dotted;

    }

    tr {

    height: 60px;

    }

    body {

    background-color: #333333;

    }

    a:link, a:visited, a img {

    text-decoration: underline;

    border: none;

    outline: none;

    }

    a:hover {

    text-decoration: none;

    }

    h1 {

    color: red;

    }

    #footer {

    position: fixed;

    left: 0px;

    right: 0px;

    bottom: 0px;

    text-align: center;

    height: 15px;

    color: white;

    background: #ddd;

    opacity: 0.6;

    font-weight: bold;

    }

    input.url {

    width: 100%;

    text-align: center;

    background: gray;

    border: 1px solid #eee;

    color: white;

    }

    -->

    </style>

    </head>

    <?php

     

    /**

    * @author DaYeR

    * @copyright 2010

    */

     

    $host = 'localhost';

    $name = 'root';

    $pass = 'namai';

    $db = 'test';

    $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];

     

    $urlid = $_GET['id'];

    $ip = $_SERVER['REMOTE_ADDR'];

    $id = md5($ip);

     

    if (!ctype_alnum($urlid) && !empty($urlid)) {

    header("location: {$url}");

    die('Neišsidirbinėjam, ok?');

    }

     

    $conn = mysql_connect($host, $name, $pass) or die(mysql_error());

    mysql_select_db($db, $conn);

     

    mysql_query('

    CREATE TABLE IF NOT EXISTS `taskai_dayer` (

    `ip` varchar(20) NOT NULL,

    `taskai` int(10) NOT NULL,

    `id` varchar(50) NOT NULL,

    `nr` INT( 10 ) NOT NULL AUTO_INCREMENT

    )');

     

     

    $yra = mysql_num_rows(mysql_query("SELECT * FROM `taskai` WHERE `ip` = '{$ip}'"));

    if ($yra == 0) {

    mysql_query("INSERT INTO `taskai` (ip, taskai, id) VALUES ('{$ip}','0','{$id}')");

    if (!empty($urlid)){

    $reftaskai = mysql_result(mysql_query("SELECT `taskai` FROM `taskai` WHERE `id` = '{$urlid}'"),

    0) + 1;

    mysql_query("UPDATE `taskai` SET `taskai` = '{$reftaskai}' WHERE `id` = '{$urlid}' LIMIT 1 ;");

    }

    }

     

    $taskai = mysql_result(mysql_query("SELECT `taskai` FROM `taskai` WHERE `id` = '{$id}'"), 0);

     

    function rodyti ($reikia, $text){

    global $taskai;

    if ($reikia <= $taskai)

    echo "<span style='color:lime;'>{$text}</span>";

    else

    echo "<span style='color:red;'>Nepakankamai taškų. Reikia {$reikia}</span>";

    }

    ?>

     

    <body>

    <table align="center" width="750" border="0" cellspacing="0" cellpadding="0">

    <tr>

    <td colspan="2"><h1 align="center">Pavadinimas, ar kažkas tokio.</h1>

    <p align="left">Mane apvogė, apgavo ir visaip kitaip pakenkė. Aš dabar piktas ir čia keršto puslapis. Pakvieskit 20 unikalių lankytojų, kad viską pamatytumėt.</p>

    <p>Jūsų nuoroda:<br /><br />

    <input type="text" class="url" name="id" readonly="readonly" onmouseover='this.select();' value="<?php echo $url.'?id='.$id; ?>" />

    </p>

    <p>Pakviesta lankytojų: <b style="color: red; font-size: 18px;"><?php echo $taskai ?></b></p>

    <p> </p></td>

    </tr>

    <tr>

    <td>Nemokama foto</td>

    <td>Nemokama foto</td>

    </tr>

    <tr>

    <td><?php rodyti(5,'Čia foto nuo 5 taškų'); ?></td>

    <td><?php rodyti(5,'Čia kita foto nuo 5 taškų'); ?></td>

    </tr>

    <tr>

    <td><?php rodyti(10,'Čia foto nuo 10 taškų'); ?></td>

    <td><?php rodyti(10,'Čia kita foto nuo 10 taškų'); ?></td>

    </tr>

    <tr>

    <td><?php rodyti(15,'Čia foto nuo 10 taškų'); ?></td>

    <td><?php rodyti(15,'Čia kita foto nuo 10 taškų'); ?></td>

    </tr>

    <tr>

    <td colspan="2"><?php rodyti(20,'Čia video nuo 20 taškų'); ?></td>

    </tr>

    </table>

    <div id="footer"><a href="http://programmer.ten.lt" target="_top">skriptas</a></div>

    </body>

    </html>

×
×
  • Pasirinkite naujai kuriamo turinio tipą...