Codice: |
// Add a New Download to Database
$result8 = $db->sql_query("SELECT cid, title from " . $prefix . "_downloads_categories");
$numrows = $db->sql_numrows($result8);
if ($numrows>0) {
OpenTable();
echo "<form method=\"post\" action=\"".$admin_file.".php\">"
."<font class=\"content\"><b>" . _ADDNEWDOWNLOAD . "</b><br><br>"
."" . _DOWNLOADNAME . ": <input type=\"text\" name=\"title\" size=\"50\" maxlength=\"100\"><br>"
."" . _FILEURL . ": <input type=\"text\" name=\"url\" size=\"50\" maxlength=\"100\" value=\"http://\"><br>";
$result9 = $db->sql_query("SELECT cid, title, parentid from " . $prefix . "_downloads_categories order by title");
echo "" . _CATEGORY . ": <select name=\"cat\">";
while($row9 = $db->sql_fetchrow($result9)) {
$cid2 = intval($row9['cid']);
$ctitle2 = $row9['title'];
$parentid2 = intval($row9['parentid']);
if ($parentid2!=0) $ctitle2=getparent($parentid2,$ctitle2);
echo "<option value=\"$cid2\">$ctitle2</option>";
}
echo "</select><br><br><br>"
."" . _DESCRIPTION255 . "<br><textarea name=\"description\" cols=\"70\" rows=\"15\"></textarea><br><br><br>"
."" . _AUTHORNAME . ": <input type=\"text\" name=\"name\" size=\"30\" maxlength=\"60\"><br><br>"
."" . _AUTHOREMAIL . ": <input type=\"text\" name=\"email\" size=\"30\" maxlength=\"60\"><br><br>"
."" . _FILESIZE . ": <input type=\"text\" name=\"filesize\" size=\"12\" maxlength=\"11\"> (" . _INBYTES . ")<br><br>"
."" . _VERSION . ": <input type=\"text\" name=\"version\" size=\"11\" maxlength=\"10\"><br><br>"
."" . _HOMEPAGE . ": <input type=\"text\" name=\"homepage\" size=\"30\" maxlength=\"200\" value=\"http://\"><br><br>"
."" . _HITS . ": <input type=\"text\" name=\"hits\" size=\"12\" maxlength=\"11\"><br><br>"
."<input type=\"hidden\" name=\"op\" value=\"DownloadsAddDownload\">"
."<input type=\"hidden\" name=\"new\" value=\"0\">"
."<input type=\"hidden\" name=\"lid\" value=\"0\">"
."<center><input type=\"submit\" value=\"" . _ADDURL . "\"><br>"
."</form>";
CloseTable();
echo "<br>";
} else {
} |