Показать сообщение отдельно
XersoNuke2005 вне форума      Старый #14  
XersoNuke2005
Новенький
Регистрация: 06.10.2006
Сообщения: 9


Пожаловаться на это сообщениеОтветить с цитированием

Посмотреть профиль Отправить персональное сообщение для XersoNuke2005 Найти все сообщения от XersoNuke2005 Добавить XersoNuke2005 в список друзей  
07.11.2006, 15:32

function edit_files($lid) {
global $prefix, $db;

$sql = "SELECT cid, title, lic, lang, oc, description, url, filesize, version, name, email, homepage, status FROM ".$prefix."_files WHERE lid='$lid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$f_cid = $row[cid];
$f_title = $row[title];
$f_lic = $row[lic];
$f_lang = $row[lang];
$f_oc = $row[oc];
$f_description = $row[description];
$f_url = $row[url];
$f_filesize = $row[filesize];
$f_version = $row[version];
$f_name = $row[name];
$f_email = $row[email];
$f_homepage = $row[homepage];
$f_status = $row[status];
include("header.php");
GraphicAdmin();
OpenTable();
echo "<center><b>"._FILESADMIN."</b></center>\n";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>"._FILEEDIT."</b></center><br><br>"
."<form action=\"admin.php\" method=\"post\">"
."<b>"._TITLE.":</b><br><input type=\"text\" name=\"title\" size=\"50\" value=\"$f_title\"><br><br>"
."<b>"._CATEGORY.":</b><br>"
."<select name=\"cid\"><option value=\"0\">"._HOMEFILES."</option>";
$sql = "select cid, title, parentid from ".$prefix."_files_categories order by parentid,title";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$cid2 = $row[cid];
$title = $row[title];
$parentid2 = $row[parentid];
if ($parentid2!=0) $title=getparent($parentid2,$title);
if ($cid2 == $f_cid) {
$shel = "selected";
}
echo "<option value=\"$cid2\" $shel>$title</option>";
}
echo "</select><br><br>";
echo "<b>"._SUBTITLE.":</b><br>"
."<textarea name=\"description\" cols=\"50\" rows=\"10\">$f_description</textarea><br><br>"
."<b>"._FILEAUTOR."</b><br><input type=\"text\" name=\"author\" size=\"50\" value=\"$f_name\"><br><br>"
."<b>"._FAUEMAIL."</b><br><input type=\"text\" name=\"authormail\" size=\"50\" value=\"$f_email\"><br><br>"
."<b>"._FAUURL."</b><br><input type=\"text\" name=\"authorurl\" size=\"50\" value=\"$f_homepage\"><br><br>"
."<b>"._FILELINK.":</b><br><input type=\"text\" name=\"filelink\" size=\"50\" value=\"$f_url\"> [ <a href=\"$f_url\" target=\"_blank\">"._TESTLINK."</a> ]<br><br>"
."<b>"._FILEVERSION."</b><br><input type=\"text\" name=\"version\" size=\"10\" value=\"$f_version\"><br><br>"
."<b>"._FILEVEROS."</b><br><select>
<option name='oc' value='$f_oc'></option>
<option name='oc' value='$f_oc'>Win2k/NT</option>
<option name='oc' value='$f_oc'>Win9x/Me</option>
<option name='oc' value='$f_oc'>Linux</option>
<option name='oc' value='$f_oc'>MacOS</option>
<option name='oc' value='$f_oc'>FreeBSD</option>
<option name='oc' value='$f_oc'>Win9x/Me/2k/NT/XP</option>
</select><br><br>" // Поле для ввода "Лицензия"
."<b>"._FILELISENSE."</b><br><select>
<option name='lic' value='$f_lic'></option>
<option name='lic' value='$f_lic'>Freeware</option>
<option name='lic' value='$f_lic'>FreeSoftware</option>
<option name='lic' value='$f_lic'>Shareware</option>
<option name='lic' value='$f_lic'>Trialware</option>
<option name='lic' value='$f_lic'>Commercialware</option>
</select><br><br>" // Поле для ввода "Язык"
."<b>"._FILELANG."</b><br><select>
<option name='lang' value='$f_lang'></option>
<option name='lang' value='$f_lang'>Русский</option>
<option name='lang' value='$f_lang'>Английский</option>
<option name='lang' value='$f_lang'>Мультиязычный</option>
</select><br><br>"
//."<b>"._FILELISENSE."</b><br><input type=\"text\" name=\"lic\" size=\"10\" value=\"$f_lic\"><br><br>"
//."<b>"._FILELANG."</b><br><input type=\"text\" name=\"lang\" size=\"10\" value=\"$f_lang\"><br><br>"
//."<b>"._FILEVEROS."</b><br><input type=\"text\" name=\"oc\" size=\"10\" value=\"$f_oc\"><br><br>"
."<b>"._FILESIZE.":</b><br><input type=\"text\" name=\"filesize\" size=\"10\" value=\"$f_filesize\"><br><br>"
."<input type=\"hidden\" name=\"lid\" value=\"$lid\">"
."<input type=\"hidden\" name=\"op\" value=\"file_edit_save\">"
."<input type=\"submit\" value=\""._SAVEFILEED."\">"
."</form>";
CloseTable();
echo "<br>";
include("footer.php");
}