<option selected="selected" label="none" value="none">select a category</option>'; foreach ($cats as $cat) { if ($cat['level'] == 1) { if ($selects != '') { $selects .= '</optgroup>'; } $selects .= '<optgroup label="' . $cat['crumb'] . '">'; } else { $selects .= '<option value="' . $cat['cid'] . '"' . (isset($_GET['c']) && $cat['cid'] == intval($_GET['c']) || $cat['cid'] == $in['cat'] ? ' selected="selected"' : '') . '>' . $cat['crumb'] . '</option>'; } } $selects .= '</optgroup></select>'; } require_once 'header.php'; $images = DL_Image::output_list($mng_id, $in['screen']); $cpgtpl->assign_vars(array('DL_MENU' => dl_menu(), 'DL_ERRORS' => !empty($errors), 'DL_WARNINGS' => !empty($warnings), 'DL_MIRRORS' => DL_Mirror::output_list($mng_id), 'DL_IMAGES' => $images, 'IS_NEW_DL' => !can_admin($module_name), 'CAN_ADMIN' => can_admin($module_name), 'B_SCREENSHOT' => $dl_config['screen_active'] || can_admin($module_name), 'B_ADD_IMAGE' => $dl_config['screen_active'] && $images < $dl_config['screen_max'], 'B_NOTES' => false, 'B_REASON' => false, 'B_UPL_FILE' => $dl_config['upl_file'] || can_admin($module_name), 'B_UPL_IMAGE' => $dl_config['upl_image'] || can_admin($module_name), 'B_PENDING' => false, 'B_FETCH_PAD' => $fetch_pad, 'B_REM_MD5' => $dl_config['md5_remote'], 'L_YES' => _YES, 'L_NO' => _NO, 'L_DELETE' => _DELETE, 'L_UPDATE' => 'Update', 'L_CATEGORY' => _CATEGORY, 'L_SHORT_DESC' => 'Short Description', 'L_MAX_CHARS' => sprintf(_M_CHARS, 255), 'L_DESCRIPTION' => _DESCRIPTION, 'L_AUTHORNAME' => _AUTHORNAME, 'L_AUTHOREMAIL' => _AUTHOREMAIL, 'L_MD5' => 'MD5', 'S_BBCODE' => bbcode_table('in[desc_long]', 'add_download', true), 'DL_TITLE' => htmlprepare($in['title']), 'DL_ACCESS' => group_selectbox('in[access]', $in['access']), 'DL_CATSEL' => $selects, 'DL_DESC_SHORT' => htmlprepare($in['desc_short']), 'DL_DESC_LONG' => htmlprepare($in['desc_long']), 'DL_NOTES' => '', 'DL_REASON' => '', 'DL_NAME' => htmlprepare($in['name']), 'DL_EMAIL' => $in['email'], 'U_DL_FORM' => URL::index('&file=add'))); foreach ($errors as $error) { $cpgtpl->assign_block_vars('dl_errors', array('S_ENTRY' => $error)); } foreach ($warnings as $warning) { $cpgtpl->assign_block_vars('dl_warnings', array('S_ENTRY' => $warning)); } $result = $db->sql_uquery("SELECT * FROM " . $dl_prefix . "_fields \n\tWHERE visible > 0" . (!can_admin($module_name) ? ' AND visible < 3' : '') . " \n\tORDER BY title"); while ($field = $db->sql_fetchrow($result)) { $f_title = defined($field['title']) ? constant($field['title']) : $field['title']; $f_title = $field['visible'] == 2 ? '* ' . $f_title : $f_title; if ($field['type'] == 1 || $field['type'] == 3) { $f_value = isset($in[$field['field']]) ? intval($in[$field['field']]) : $field['size']; $f_value = $f_value > 0 ? array(' checked="checked"', '') : array('', ' checked="checked"'); $cpgtpl->assign_block_vars('fields', array('TITLE' => $f_title, 'TYPE' => $field['type'], 'NAME' => $field['field'], 'S_YES' => $f_value[0], 'S_NO' => $f_value[1])); } else {
<option selected="selected" label="none" value="none">select a category</option>'; foreach ($cats as $cat) { if ($cat['level'] == 1) { if ($selects != '') { $selects .= '</optgroup>'; } $selects .= '<optgroup label="' . $cat['crumb'] . '">'; } else { $selects .= '<option value="' . $cat['cid'] . '"' . ($cat['cid'] == $in['cat'] ? ' selected="selected"' : '') . '>' . $cat['crumb'] . '</option>'; } } $selects .= '</optgroup></select>'; } require_once 'header.php'; $images = DL_Image::output_list($mng_id, $in['screen']); $cpgtpl->assign_vars(array('DL_MENU' => '<span class="gen"><strong>My Downloads</strong></span><br /><a href="' . URL::index() . '">Main Page</a> | <a href="' . URL::index('&file=manage') . '">Current Downloads</a> | <a href="' . URL::index('&file=manage&s=1') . '">Pending Downloads</a> | <a href="' . URL::index('&file=manage&s=2') . '">Broken D/L Reports</a>', 'DL_ERRORS' => !empty($errors), 'DL_WARNINGS' => !empty($warnings), 'DL_MIRRORS' => DL_Mirror::output_list($mng_id), 'DL_IMAGES' => $images, 'IS_NEW_DL' => false, 'CAN_ADMIN' => can_admin($module_name), 'B_SCREENSHOT' => $dl_config['screen_active'] || can_admin($module_name), 'B_ADD_IMAGE' => $dl_config['screen_active'] && $images < $dl_config['screen_max'], 'B_NOTES' => can_admin($module_name), 'B_REASON' => true, 'B_UPL_FILE' => $dl_config['upl_file'] || can_admin($module_name), 'B_UPL_IMAGE' => $dl_config['upl_image'] || can_admin($module_name), 'B_PENDING' => $row['active'] == 2 && can_admin($module_name), 'B_FETCH_PAD' => false, 'B_REM_MD5' => $dl_config['md5_remote'], 'L_YES' => _YES, 'L_NO' => _NO, 'L_DELETE' => _DELETE, 'L_UPDATE' => 'Update', 'L_CATEGORY' => _CATEGORY, 'L_SHORT_DESC' => 'Short Description', 'L_MAX_CHARS' => sprintf(_M_CHARS, 255), 'L_DESCRIPTION' => _DESCRIPTION, 'L_AUTHORNAME' => _AUTHORNAME, 'L_AUTHOREMAIL' => _AUTHOREMAIL, 'L_MD5' => 'MD5', 'L_PENDING' => 'Pending', 'S_BBCODE' => bbcode_table('in[desc_long]', 'add_download', true), 'DL_TITLE' => htmlprepare($in['title']), 'DL_ACCESS' => group_selectbox('in[access]', $in['access']), 'DL_CATSEL' => $selects, 'DL_DESC_SHORT' => htmlprepare($in['desc_short']), 'DL_DESC_LONG' => htmlprepare($in['desc_long']), 'DL_NOTES' => isset($in['notes']) ? htmlprepare($in['notes']) : '', 'DL_REASON' => htmlprepare($in['reason']), 'DL_NAME' => htmlprepare($in['name']), 'DL_EMAIL' => $in['email'], 'U_DL_FORM' => URL::index('&file=manage&edit=' . $mng_id))); foreach ($errors as $error) { $cpgtpl->assign_block_vars('dl_errors', array('S_ENTRY' => $error)); } foreach ($warnings as $warning) { $cpgtpl->assign_block_vars('dl_warnings', array('S_ENTRY' => $warning)); } $result = $db->sql_uquery("SELECT * FROM " . $dl_prefix . "_fields \n\t\tWHERE visible > 0" . (!can_admin($module_name) ? ' AND visible < 3' : '') . " \n\t\tORDER BY title"); while ($field = $db->sql_fetchrow($result)) { $f_title = defined($field['title']) ? constant($field['title']) : $field['title']; $f_title = $field['visible'] == 2 ? '* ' . $f_title : $f_title; if ($field['type'] == 1 || $field['type'] == 3) { $f_value = isset($in[$field['field']]) ? intval($in[$field['field']]) : $field['size']; $f_value = $f_value > 0 ? array(' checked="checked"', '') : array('', ' checked="checked"'); $cpgtpl->assign_block_vars('fields', array('TITLE' => $f_title, 'TYPE' => $field['type'], 'NAME' => $field['field'], 'S_YES' => $f_value[0], 'S_NO' => $f_value[1])); } else {