Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Puslapis tik adminams

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&#1072;");
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>&#1056;ia forma galite pateikti nauj&#1072; dain&#1072; &#1073; m&#1099;s&#1096; portal&#1072;. Prie&#1088; pateikin&#1083;dami dain&#1072;, &#1073;sitikinkite, kad tokios pas mus dar n&#1083;ra. J&#1099;s&#1096; pateikim&#1072; per&#1102;i&#1099;r&#1083;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&#1096;sti!'>
</td>
</tr>
</table>
</form>";
closetable();
echo "<script type='text/javascript'>
function validate(frm) {
   if (frm.pavadinimas.value==\"\" || frm.nuoroda.value==\"\") {
      alert(\"Privalote u&#1102;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