Parašė PyccKuu· 2008 Spa. 6 21:10:12
#14
<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
opentable("Pateikti dainа");
if ($_POST['siusti']) {
$pav = stripinput($_POST['pavadinimas']);
$url = stripinput($_POST['nuoroda']);
$kat = stripinput($_POST['kategorija']);
$download_license = stripinput($_POST['download_license']);
$bus = (iADMIN ? "active" : "inactive");
$result=dbquery("INSERT INTO ".$db_prefix."downloads (download_title, download_url, download_cat, download_license, download_datestamp, download_status, download_author) VALUES ('$pav', '$url', '$kat', '$download_license', '".time()."', '$bus', '".$userdata['user_id']."')");
echo "<div align='center'><h2><b>Siuntinys pateiktas.</b><h2></div><hr>";
}
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats ORDER BY download_cat_name");
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],1);
//end usergold addon
while ($data = dbarray($result)) {
if (checkgroup($data['download_cat_access'])) $katlist .= "<option value='".$data['download_cat_id']."'>".$data['download_cat_name']."</option>\n";
}
echo "<div align='center'><b>Рia forma galite pateikti naujа dainа б mыsш portalа. Prieр pateikinлdami dainа, бsitikinkite, kad tokios pas mus dar nлra. Jыsш pateikimа perюiыrлs adminisratorius ir daina bus patvirtinta.</b></div><hr>";
echo "<form method='post' action='".FUSION_SELF."' name='submitform' onSubmit='return validate(this);'>
<table cellpadding='0' cellspadding='0' align='center'>
<tr>
<td>
Pavadinimas:</td><td><input type='textbox' class='textbox' name='pavadinimas' style='width:250px;'>
</td>
</tr>
<tr>
<td>
Siuntimo Nuoroda:</td><td><input type='textbox' class='textbox' name='nuoroda' style='width:250px;'>
</td>
<tr>
<td>
Idejo:</td><td><input type='textbox' value=\"".$userdata['user_name']."\" class='textbox' name='download_license' style='width:250px;'>
</td>
<tr>
<td>
Kategorija:</td><td><select name='kategorija' class='textbox'>
$katlist</select>
</td>
</tr>
<tr>
<td colspan='2' align='center'>
<input type='submit' name='siusti' class='button' value='Siшsti!'>
</td>
</tr>
</table>
</form>";
closetable();
echo "<script type='text/javascript'>
function validate(frm) {
if (frm.pavadinimas.value==\"\" || frm.nuoroda.value==\"\") {
alert(\"Privalote uюpildyti visus laukus!\"); return false;
}
}
</script>";
require_once "side_right.php";
require_once "footer.php";
?>
Kurion vieton dieti kaskaip nesigaudau ?|
if(iADMIN) {
- pradzioje
} else {
echo "Tu ne adminas";
}
- kur ? sita?
Redagavo PyccKuu· 2008 Spa. 6 21:10:32