if($mybb->input['action'] == 'do_edit')
{
if(intval($mybb->input['did']))
{
$update_download = array(
'did' => intval($mybb->input['did']),
'cid' => intval($mybb->input['cid']),
'uid' => intval($mybb->input['uid']),
'name' => addslashes($mybb->input['name']),
'description' => addslashes($mybb->input['description']),
'url' => addslashes($mybb->input['url']),
'sticky' => addslashes($mybb->input['sticky']),
'visible' => addslashes($mybb->input['visible']),
);
$db->update_query(TABLE_PREFIX."forumdownloads", $update_download, "did='".intval($mybb->input['did'])."'");
$message = 'Download geändert';
}
if(intval($mybb->input['cid']))
{
$update_category = array(
'cid' => intval($mybb->input['cid']),
'name' => addslashes($mybb->input['name']),
'description' => addslashes($mybb->input['description']),
'visible' => addslashes($mybb->input['visible']),
'allowsubmissions' => addslashes($mybb->input['allowsubmissions']),
'disporder' => addslashes($mybb->input['disporder']),
);
$db->update_query(TABLE_PREFIX."downloadcategories", $update_category, "cid='".intval($mybb->input['cid'])."'");
$message = 'Download Kategorie geändert';
}
cpredirect('downloads.php', $message);
}