Esempio n. 1
0
 *		* For any reuse or distribution, you must make clear to others the license terms of this work.
 *		* Any of these conditions can be waived if you get permission from the copyright holder.
 */
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
@set_time_limit(0);
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once './includes/class_downloads.php';
require_once './includes/functions_newpost.php';
$dl = new vB_Downloads();
$categories = $dl->construct_select_array(0, array(0 => 'None'), false);
// ########################################################
// ################## Settings Functions ##################
// ########################################################
if ($_GET['do'] == 'settings') {
    $cat = $db->query_first("SELECT downloadsIIforumid FROM " . TABLE_PREFIX . "dl_main WHERE 1=1");
    print_cp_header('Manage Global Forum Setting');
    print_form_header('download2newthreadadmin', 'doeditset');
    print_table_header('Edit Global Forum');
    print_forum_chooser('Select the default forum to use when creating threads. If left to \'Select Forum\', a thread will only be created if the category has a forum set.</dfn>', 'dl_forumid_cat', $cat['downloadsIIforumid'], null, true, false, '[%s]');
    print_submit_row('Save Setting', 0);
    print_cp_footer();
}
// ########################################################
// ################### Do Edit Settings ###################
Esempio n. 2
0
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/class_downloads2.php';
require_once DIR . '/includes/functions_newpost.php';
// ############################# LOG ACTION ###############################
log_admin_action();
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if (empty($_GET['do'])) {
    $_GET['do'] = 'category';
}
$dl = new vB_Downloads();
$categories = $dl->construct_select_array(0, array(0 => $vbphrase['none']), false);
function downloads_categories_admin($id = 0, $categories = array(), $spacer = '')
{
    global $db, $dl, $vbphrase;
    $catexclude = $dl->exclude_cat();
    $result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "dl2_categories WHERE {$catexclude} `parent` = {$id} ORDER BY `weight`");
    while ($category = $db->fetch_array($result)) {
        $class = fetch_row_bgclass();
        echo '<tr>
			<td class="' . $class . '" width="100%">&nbsp;' . $spacer . htmlspecialchars_uni($category['name']) . '</td>
			<td class="' . $class . '" align="center"><input type="text" class="bginput" name="displayorder[' . $category['id'] . ']" value="' . $category['weight'] . '" tabindex="1" size="2" title="' . $vbphrase['display_order'] . '" /></td>
			<td class="' . $class . '"><a href="downloads2.php?' . $vbulletin->session->vars['sessionurl'] . 'do=editcat&amp;id=' . $category['id'] . '">' . $vbphrase['edit'] . '</a></td>
			<td class="' . $class . '"><a href="downloads2.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delcat&amp;id=' . $category['id'] . '">' . $vbphrase['delete'] . '</a></td>
		</tr>';
        if ($category['subs'] > 0) {
Esempio n. 3
0
// pre-cache templates used by specific actions
$actiontemplates = array('add' => array('downloads_file_addit', 'editor_clientscript', 'editor_jsoptions_font', 'editor_jsoptions_size', 'editor_toolbar_off', 'editor_toolbar_on', 'editor_smilie', 'editor_smiliebox', 'editor_smiliebox_row', 'editor_smiliebox_straggler', 'newpost_disablesmiliesoption'), 'assignuser' => array('downloadsbuddy_assign_user'), 'cat' => array('downloads_cat', 'downloads_cat_filebit', 'downloads_cat_files', 'downloads_cat_subbit', 'downloads_cat_subs'), 'edit' => array('downloads_file_addit', 'editor_clientscript', 'editor_jsoptions_font', 'editor_jsoptions_size', 'editor_toolbar_off', 'editor_toolbar_on', 'editor_smilie', 'editor_smiliebox', 'editor_smiliebox_row', 'editor_smiliebox_straggler', 'newpost_disablesmiliesoption'), 'file' => array('downloads_file', 'downloads_file_addit', 'editor_clientscript', 'editor_jsoptions_font', 'editor_jsoptions_size', 'editor_toolbar_off', 'editor_toolbar_on', 'editor_smilie', 'editor_smiliebox', 'editor_smiliebox_row', 'editor_smiliebox_straggler', 'newpost_disablesmiliesoption', 'downloads_file_comment'), 'manfiles' => array('downloads_man', 'downloads_man_bit'), 'my' => array('downloads_my', 'downloads_my_bit'), 'search' => array('downloads_search', 'downloads_search_result', 'downloads_search_result_bit'), 'stats' => array('downloads_stats', 'downloads_stats_bit'), 'tree' => array('downloads_tree'));
// ######################### REQUIRE BACK-END ############################
require_once './global.php';
require_once './includes/class_downloads.php';
require_once './includes/class_bbcode.php';
require_once './includes/functions_editor.php';
/* included to build editor for description */
require_once './includes/functions_wysiwyg.php';
/* included to build editor for description */
require_once './includes/functions_newpost.php';
/* included to build editor for description */
require_once './includes/functions.php';
/* included to strip bbcode */
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$dl = new vB_Downloads();
$navbits = array('downloads.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['ecdownloads_downloads']);
$forceredirect = false;
$vbulletin->url = 'downloads.php' . $vbulletin->session->vars['sessionurl_q'];
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$limitjoin .= " group delay: " . $permissions['ecdownloaddelaygrp'];
if ($dl->disabled) {
    if ($permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['canviewdisabled']) {
        $dwarning = $vbphrase['ecdownloads_disabled'] . ': ' . $dl->reason;
        eval('$dwarning = "' . fetch_template('downloads_warning') . '";');
        $header = $dwarning . "<br />" . $header;
        $footer .= "<br />" . $dwarning;
    } else {
        $errormessage = $vbphrase['ecdownloads_disabled'] . ': ' . $dl->reason;
Esempio n. 4
0
// get special phrase groups
$phrasegroups = array('downloads2', 'posting');
// get special data templates from the datastore
$specialtemplates = array('smiliecache', 'bbcodecache');
// pre-cache templates used by all actions
$globaltemplates = array('DOWNLOADS2', 'downloads2_panel_bit', 'downloads2_panel_side', 'downloads2_wrapper_top', 'downloads2_wrapper_side', 'downloads2_wrapper_none', 'downloads2_warning');
// pre-cache templates used by specific actions
$actiontemplates = array('add' => array('downloads2_file_addit'), 'cat' => array('downloads2_cat', 'downloads2_cat_filebit', 'downloads2_cat_subbit', 'downloads2_cat_subs', 'forumdisplay_sortarrow'), 'edit' => array('downloads2_file_addit'), 'file' => array('downloads2_file', 'downloads2_file_commentbit', 'downloads2_file_imagebit', 'editor_clientscript', 'editor_jsoptions_font', 'editor_jsoptions_size', 'editor_toolbar_colors', 'editor_toolbar_fontname', 'editor_toolbar_fontsize', 'showthread_quickreply', 'newpost_errormessage'), 'manfiles' => array('downloads2_man', 'downloads2_man_bit'), 'none' => array('downloads2_main', 'downloads2_main_catbit'), 'report' => array('downloads2_report'), 'search' => array('downloads2_search', 'downloads2_search_result', 'downloads2_search_result_bit'));
// allows proper template caching for the default action (none) if no valid action is specified
if (!empty($_REQUEST['do']) and !isset($actiontemplates["{$_REQUEST['do']}"])) {
    $actiontemplates["{$_REQUEST['do']}"] =& $actiontemplates['none'];
}
// ######################### REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/class_downloads2.php';
$dl = new vB_Downloads();
$navbits = array('downloads.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['dl2_downloads']);
$forceredirect = false;
$vbulletin->url = 'downloads.php' . $vbulletin->session->vars['sessionurl_q'];
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
if (!$vbulletin->options['dl2active']) {
    if ($permissions['downloads2permissions'] & $vbulletin->bf_ugp['downloads2permissions']['canviewdisabled']) {
        $dwarning = '<strong>' . $vbphrase['dl2_disabled'] . ':</strong> ' . $vbulletin->options['dl2closedreason'];
        $templater = vB_Template::create('downloads2_warning');
        $templater->register('dwarning', $dwarning);
        $dwarning = $templater->render();
    } else {
        standard_error($vbulletin->options['dl2closedreason']);
    }