Jump to content
php.lv forumi

waplet

Reģistrētie lietotāji
  • Posts

    1,373
  • Joined

  • Last visited

Posts posted by waplet

  1. <script>
    function hidestatus(){
    window.status=''
    return true
    }
    
    if (document.layers)
    document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
    
    document.onmouseover=hidestatus
    document.onmouseout=hidestatus
    </script>
    <!-- right click end -->
    <style type="text/css">
    body { font-family: Tahoma, "Lucida Grande", 'Trebuchet MS', verdana, arial, sans-serif; font-size: 12px;background-color:#C0C0C0; }
    img { border: 0; }
    table { text-align: left; }
    a:visited { color: #FFSDFG; }
    input { margin-left: 5px; margin-top: 3px; margin-bottom: 3px; background: url(images/inpbg.jpg); border: 0; padding: 2px; border: 1px solid #b6b6b6; font-size: 10px; }
    </style>
    <title>SHOP!</title>
    <link rel="stylesheet" href="styles.css" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    	</head> 		
    <body>
    <style type="text/css">
    body { font-family: Tahoma, "Lucida Grande", 'Trebuchet MS', verdana, arial, sans-serif; font-size: 12px;background-color:#C0C0C0; }
    img { border: 0; }
    table { text-align: left; }
    a:visited { color: #2291FF; }
    input { margin-left: 5px; margin-top: 3px; margin-bottom: 3px; background: url(images/inpbg.jpg); border: 0; padding: 2px; border: 1px solid #b6b6b6; font-size: 10px; }
    </style>
    <br>
    <?
    if(isset($_POST['prece'])) {
    
    		if ($_POST['prece'] == '1') {
    			$links = '/fails/';
    
    		}
    		elseif ($_POST['prece'] == '2') {
    			$links = '/dooring/';
    
    		}
    		elseif ($_POST['prece'] == '3') {
    			$links = '/dooring/';
    
    		}}
    
    
    $code = $_POST["kods"];
    $price = 'cena';
    //izvelas kodu datubazi, lai parbauditu, vai kods ir derigs
    $con = mysql_connect("hosts","acc","pass");
    if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
    $db_selected = mysql_select_db("db", $con);
    if (!$db_selected) {
       die (mysql_error());
    }
    //parbauda vai der
    if(mysql_result(mysql_query("SELECT COUNT(*) FROM code WHERE code = '$code'"),0,'COUNT(*)') > 0){
    	echo "<b><body background-color:#C0C0C0><br>Kods ir derīgs! Lejupielādēt vari <a href='$links'>šeit</a>";
    }
    else{
       echo "<script>alert('Nepareizs kods!');window.back()</script>";
       unset($code);
       exit();
    }
    $delete = "DELETE FROM code WHERE code = '$code'";
    mysql_query($delete) or die(mysql_error());
    mysql_close();
    ?>
    

  2. Es nesapratu, viņš ķip definē to pirmo aiz ( šis iekavas vane?

    Tātad ja es sapratu tad jā būt tā

    array(čīti,kruti,stulbi,iesuukaa)
    un ja būs ečo čīti[1] = the same as čīti kruti , bet eči čīti[2] the same as čīti stulbi?

    P.s. ja kautkas nepatīk , sorry neko uzātro nevarēju izdomāt!

×
×
  • Create New...