Parašė vlc· 2008 Rugs. 6 11:09:17
#5
va prasau,jei nemoki pakeist vieno zodzio tai tau cia nera ka veikt
<?php
require_once BASEDIR."maincore.php";
if (iMEMBER) {
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
$id = $userdata['user_id'];
opentable("V.I.P");
$data = dbarray(dbquery("SELECT * FROM ".$db_prefix."vip"));
echo "<table align='center' cellpadding='0' cellspacing='0'>";
if (iVIP) {
echo "<tr>
<td class='tbl' align='center'>Jus jau esate V.I.P narys!</td>
</tr>";
} elseif ($klaida == "0") {
echo "<tr>
<td class='tbl' align='center'>Sveikiname tapus V.I.P nariu.</td>
</tr>";
} elseif ($klaida == "1") {
echo "<tr>
<td class='tbl' align='center'>Jusu apmokejimas nerastas.</td>
</tr>";
} else {
echo "<form name='submitform' method='post' action='".FUSION_SELF."'>";
echo "<tr>
<td class='tbl' align='center'>Jus neesate V.I.P narys! Noredami tapti V.I.P nariu siuskite SMS numeriu <b>1371</b> su tekstu <b>TIK".$data['sms_kaina']."</b><small><tarpas></small><b>".$data['paramos_zodis']."<small><tarpas></small><b>".$userdata['user_name']."</b>. Ir spauskite [Toliau]</td>
</tr>
<tr>
<td class='tbl' align='center'><input type='button' name='siusti' value='Toliau' class='button'></td>
</tr>";
echo "</form>";
}
echo "</table>";
closetable();
$zodis = $data['paramos_zodis'];
$useris = $userdata['user_name'];
$amount = $data['sms_kaina'];
$grupe = $data['grupes_id'];
if ($amount == 1) {
$kaina = 100;
} elseif ($amount == 2) {
$kaina = 200;
} elseif ($amount == 3) {
$kaina = 300;
} elseif ($amount == 4) {
$kaina = 400;
} elseif ($amount == 5) {
$kaina = 500;
} elseif ($amount == 7) {
$kaina = 700;
} elseif ($amount == 10) {
$kaina = 1000;
}
if ($_POST['siusti']) {
$result = dbquery("SELECT * FROM parama WHERE txt='$useris' AND amount='$kaina' AND word='$zodis'");
if (dbrows($result)) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_groups='$grupe' WHERE user_id='$id'");
redirect(FUSION_SELF."?klaida=0");
} else {
redirect(FUSION_SELF."?klaida=1");
}
}
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
} else {
fallback(BASEDIR."index.php");
}
?>
Redagavo vlc· 2008 Rugs. 6 11:09:36