Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: # fLap klausimai #

Parašė fLap· 2009 Lie. 26 14:07:38
#27

6#

Turiu kodą pateikimo dainos:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";

if (!iMEMBER) fallback("index.php");

if (file_exists(INFUSIONS."siuntiniu_pateikimai/locale/".$settings['locale'].".php")) {
   include INFUSIONS."siuntiniu_pateikimai/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."siuntiniu_pateikimai/locale/Lithuanian.php";
}
      
if (isset($_POST['submit_download']) && $action == "submit") {
   $download_title = stripinput($_POST['download_title']);
   $download_description = stripinput($_POST['download_description']);
   $download_url = stripinput($_POST['download_url']);
   $download_cat = stripinput($_POST['download_cat']);
   $download_license = stripinput($_POST['download_license']);
   $download_os = stripinput($_POST['download_os']);
   $download_version = stripinput($_POST['download_version']);
   $download_filesize = stripinput($_POST['download_filesize']);
   $download_license = stripinput($_POST['download_license']);
   $result = dbquery("INSERT INTO ".$db_prefix."downloads_submissions (download_title, download_description, download_url, download_cat, download_license, download_os, download_version, download_filesize, download_datestamp, download_count, download_submitted) VALUES ('$download_title', '$download_description', '$download_url', '$download_cat', '$download_license', '$download_os', '$download_version', '$download_filesize', '".time()."', '0', '".$userdata['user_id']."')");
   opentable($locale['dls123']);
   echo "<center><br>\n".$locale['dls124']."<br><br>
<a href='submit_download.php'>".$locale['dls125']."</a><br><br>
<a href='../../index.php'>".$locale['dls126']."</a><br><br>\n</center>\n";
   closetable();
}

if ($action == "") {
opentable($locale['dls102']);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats ORDER BY download_cat_name");
if (dbrows($result) != 0) {
   while ($data = dbarray($result)) {
      $editlist .= "<option value='".$data['download_cat_id']."'>".$data['download_cat_name']."</option>\n";
   }
echo "<form name='submit_download_form' method='post' action='".FUSION_SELF."?action=submit' onSubmit='return validateDownload(this);'>
<table align='center' cellpadding='0' cellspacing='0' width='460'>
<tr>
<td width='80' class='tbl'>".$locale['dls103']."</td>
<td class='tbl'><input type='text' name='download_title' class='textbox' style='width:380px;'></td>
</tr>
<tr>
<td valign='top' width='80' class='tbl'>".$locale['dls104']."</td>
<td class='tbl'><textarea name='download_description' rows='5' class='textbox' style='width:380px;'>Tiesiog parasykit: Naujas-Nenaujas,Geras-Normalus ir pan.</textarea></td>
</tr>
<tr>
<td width='80' class='tbl'>".$locale['dls105']."</td>
<td class='tbl'><input type='text' name='download_url' class='textbox' style='width:380px;'></td>
</tr>
<tr>
<td width='80' class='tbl'>".$locale['dls106']."</td>
<td class='tbl'><select name='download_cat' class='textbox'>$editlist</select></td>
</tr>
<tr>
<td width='80' class='tbl'>".$locale['dls110']."</td>
<td class='tbl'><input type='text' name='download_filesize' class='textbox' style='width:150px;'></td>
</tr>
<tr>
<td width='80' class='tbl'>".$locale['dls129']."</td>
<td class='tbl'><input type='text' name='download_license' class='textbox' style='width:150px;'></td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><input type='submit' name='submit_download' value='".$locale['dls111']."' class='button'></td>
</tr>
</table>
</form>\n";
} else {
echo "<center><br>\n".$locale['dls128']."<br><br>\n</center>\n";
}
closetable();
}
echo "<script type='text/javascript'>
function validateDownload(frm) {
   if (frm.download_title.value==\"\" || frm.download_description.value==\"\" || frm.download_url.value==\"\" || frm.download_license.value==\"\" || frm.download_os.value==\"\" || frm.download_version.value==\"\" || frm.download_filesize.value==\"\") {
      alert(\"".$locale['dls127']."\"); return false;
   }
}
</script>\n";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>




Ir man reikią įdėti kodą nuo user_gold kad duotų tam tikrą kiekį taškų.
paygold($userdata['user_name'],$userdata['user_id'],'2');



Šis kodas teisingas?