コード例 #1
0
function print_statistic_code($title, $name, $start, $end, $nullvalue = true, $scope = 'daily', $sort = 'date_desc')
{

	global $vbphrase;

	print_form_header('stats', $name);
	print_table_header($title);

	print_time_row($vbphrase['start_date'], 'start', $start, false);
	print_time_row($vbphrase['end_date'], 'end', $end, false);

	if ($name != 'activity')
	{
		print_select_row($vbphrase['scope'], 'scope', array('daily' => $vbphrase['daily'], 'weekly' => $vbphrase['weekly'], 'monthly' => $vbphrase['monthly']), $scope);
	}
	else
	{
		construct_hidden_code('scope', 'daily');
	}
	print_select_row($vbphrase['order_by'], 'sort', array(
		'date_asc'   => $vbphrase['date_ascending'],
		'date_desc'  => $vbphrase['date_descending'],
		'total_asc'  => $vbphrase['total_ascending'],
		'total_desc' => $vbphrase['total_descending'],
	), $sort);
	print_yes_no_row($vbphrase['include_empty_results'], 'nullvalue', $nullvalue);
	print_submit_row($vbphrase['go']);
}
コード例 #2
0
ファイル: rssposter.php プロジェクト: Kheros/MMOver
            $feeds["{$feed['rssfeedid']}"] = $feed;
        }
    }
    $db->free_result($feeds_result);
    if (empty($feeds)) {
        print_stop_message('no_feeds_defined', $vbulletin->session->vars['sessionurl']);
    } else {
        print_form_header('rssposter', 'updatestatus');
        print_table_header($vbphrase['rss_feed_manager'], 5);
        print_cells_row(array('', $vbphrase['rss_feed'], $vbphrase['forum'] . ' / ' . $vbphrase['username'], $vbphrase['last_checked'], $vbphrase['controls']), true, '', -4);
        foreach ($feeds as $rssfeedid => $feed) {
            $x = @parse_url($feed['url']);
            if ($feed['lastrun'] > 0) {
                $date = vbdate($vbulletin->options['dateformat'], $feed['lastrun'], true);
                $time = vbdate($vbulletin->options['timeformat'], $feed['lastrun']);
                $datestring = $date . ($vbulletin->options['yestoday'] == 2 ? '' : ", {$time}");
            } else {
                $datestring = '-';
            }
            print_cells_row(array("<input type=\"checkbox\" name=\"enabled[{$rssfeedid}]\" value=\"{$rssfeedid}\" title=\"{$vbphrase['enabled']}\"" . ($feed['options'] & $vbulletin->bf_misc_feedoptions['enabled'] ? ' checked="checked"' : '') . " />", "<div><a href=\"rssposter.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;rssfeedid={$feed['rssfeedid']}\" title=\"" . htmlspecialchars_uni($feed['url']) . "\"><strong>{$feed['title']}</strong></a></div>\r\n\t\t\t\t<div class=\"smallfont\"><a href=\"" . htmlspecialchars_uni($feed['url']) . "\" target=\"feed\">{$x['host']}</a></div>", "<div><a href=\"forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;forumid={$feed['forumid']}\">{$feed['forumtitle']}</a></div>\r\n\t\t\t\t<div class=\"smallfont\"><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;userid={$feed['userid']}\">{$feed['username']}</a></div>", "<span class=\"smallfont\">{$datestring}</span>", construct_link_code($vbphrase['edit'], "rssposter.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;rssfeedid={$feed['rssfeedid']}") . construct_link_code($vbphrase['delete'], "rssposter.php?" . $vbulletin->session->vars['sessionurl'] . "do=delete&amp;rssfeedid={$feed['rssfeedid']}")), false, '', -4);
        }
        print_submit_row($vbphrase['save_enabled_status'], false, 5, '', "\r\n\t\t\t\t<input type=\"button\" class=\"button\" value=\"{$vbphrase['run_scheduled_task_now']}\" onclick=\"window.location='cronadmin.php?" . $vbulletin->session->vars['sessionurl'] . "do=runcron&amp;varname=rssposter'\" />\r\n\t\t\t\t<input type=\"button\" class=\"button\" value=\"{$vbphrase['add_new_rss_feed']}\" onclick=\"window.location='rssposter.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit'\" />\r\n\t\t\t");
    }
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 23:48, Wed Mar 24th 2010
|| # CVS: $RCSfile$ - $Revision: 32878 $
|| ####################################################################
\*======================================================================*/
コード例 #3
0
ファイル: resources.php プロジェクト: hungnv0789/vhtm
if ($_REQUEST['do'] == 'index')
{
	print_form_header('resources', 'view');
	print_table_header($vbphrase['view_forum_permissions']);
	print_forum_chooser($vbphrase['forum'], 'forumid', -1, "($vbphrase[forum])");
	print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', '', "($vbphrase[usergroup])");
	print_label_row(
		$vbphrase['forum_permissions'],
		'<label for="cb_checkall"><input type="checkbox" id="cb_checkall" name="allbox" onclick="js_check_all(this.form)" />' . $vbphrase['check_all'] . '</label>',
		'thead'
	);
	foreach ($vbulletin->bf_ugp_forumpermissions AS $field => $value)
	{
		print_checkbox_row($perm_phrase["$field"], "checkperm[$value]", false, $value);
	}
	print_submit_row($vbphrase['find']);

}

// ###################### Start viewing resources for forums or usergroups ########################
if ($_REQUEST['do'] == 'view')
{
	$vbulletin->input->clean_array_gpc('r', array(
		'checkperm' => TYPE_ARRAY_INT,
	));

	if ($vbulletin->GPC['forumid'] == -1 AND $vbulletin->GPC['usergroupid'] == -1)
	{
		print_stop_message('you_must_pick_a_usergroup_or_forum_to_check_permissions');
	}
	if (empty($vbulletin->GPC['checkperm']))
コード例 #4
0
ファイル: queries.php プロジェクト: 0hyeah/yurivn
                $time_before = microtime();
                $db->query_write($query);
                $time_taken = fetch_microtime_difference($time_before);
                print_form_header('queries', 'doquery');
                print_table_header($vbphrase['vbulletin_message']);
                if ($errornum = $db->errno()) {
                    print_description_row(construct_phrase($vbphrase['an_error_occured_while_attempting_to_run_your_query'], $errornum, nl2br(htmlspecialchars_uni($db->error()))));
                } else {
                    print_description_row(construct_phrase($vbphrase['affected_rows'], vb_number_format($db->affected_rows()), vb_number_format($time_taken, 4)));
                }
                print_table_footer();
            }
            break;
    }
}
// ##################### START MODIFY #####################
if ($_REQUEST['do'] == 'modify') {
    print_form_header('queries', 'doquery');
    print_table_header($vbphrase['execute_sql_query']);
    print_select_row($vbphrase['auto_query'], 'autoquery', $queryoptions, -1);
    print_textarea_row($vbphrase['manual_query'], 'query', '', 10, 55);
    print_input_row($vbphrase['results_to_show_per_page'], 'perpage', 20);
    print_submit_row($vbphrase['continue']);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 37230 $
|| ####################################################################
\*======================================================================*/
コード例 #5
0
ファイル: adminreputation.php プロジェクト: 0hyeah/yurivn
    $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "reputation\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid']);
    define('CP_REDIRECT', "adminreputation.php?do=list&amp;u={$repinfo['userid']}");
    print_stop_message('deleted_reputation_successfully');
}
// *************************************************************************************************
if ($_REQUEST['do'] == 'deletereputation') {
    $vbulletin->input->clean_array_gpc('r', array('reputationid' => TYPE_INT));
    print_delete_confirmation('reputation', $vbulletin->GPC['reputationid'], 'adminreputation', 'killreputation');
}
if ($_REQUEST['do'] == 'modify') {
    $reputationlevels = $db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "reputationlevel\n\t\tORDER BY minimumreputation\n\t");
    print_form_header('adminreputation', 'updateminimums');
    print_table_header($vbphrase['user_reputation_manager'], 3);
    print_cells_row(array($vbphrase['reputation_level'], $vbphrase['minimum_reputation_level'], $vbphrase['controls']), 1);
    while ($reputationlevel = $db->fetch_array($reputationlevels)) {
        $reputationlevel['level'] = htmlspecialchars_uni($vbphrase['reputation' . $reputationlevel['reputationlevelid']]);
        $cell = array();
        $cell[] = "{$vbphrase['user']} <b>{$reputationlevel['level']}</b>";
        $cell[] = "<input type=\"text\" class=\"bginput\" tabindex=\"1\" name=\"reputation[{$reputationlevel['reputationlevelid']}]\" value=\"{$reputationlevel['minimumreputation']}\" size=\"5\" />";
        $cell[] = construct_link_code($vbphrase['edit'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&reputationlevelid={$reputationlevel['reputationlevelid']}") . construct_link_code($vbphrase['delete'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&minimumreputation={$reputationlevel['minimumreputation']}");
        print_cells_row($cell);
    }
    print_submit_row($vbphrase['update'], $vbphrase['reset'], 3);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 40911 $
|| ####################################################################
\*======================================================================*/
コード例 #6
0
        print_stop_message('please_complete_required_fields');
    }
    if (empty($vbulletin->GPC['infractionbanid'])) {
        $db->query_write("INSERT INTO " . TABLE_PREFIX . "infractionban (amount) VALUES (0)");
        $vbulletin->GPC['infractionbanid'] = $db->insert_id();
    }
    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "infractionban\n\t\tSET amount = " . $vbulletin->GPC['amount'] . ",\n\t\t\tmethod = '" . $db->escape_string($vbulletin->GPC['method']) . "',\n\t\t\tusergroupid = " . $vbulletin->GPC['usergroupid'] . ",\n\t\t\tbanusergroupid = " . $vbulletin->GPC['banusergroupid'] . ",\n\t\t\tperiod = '" . $db->escape_string($vbulletin->GPC['period']) . "'\n\t\tWHERE infractionbanid = " . $vbulletin->GPC['infractionbanid'] . "\n\t");
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('saved_automatic_ban_successfully');
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'removebangroup') {
    print_form_header('admininfraction', 'killbangroup');
    construct_hidden_code('infractionbanid', $vbulletin->GPC['infractionbanid']);
    print_table_header(construct_phrase($vbphrase['confirm_deletion_x'], $vbphrase['automatic_ban']));
    print_description_row($vbphrase['are_you_sure_you_want_to_delete_this_automatic_ban']);
    print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #######################
if ($_POST['do'] == 'killbangroup') {
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "infractionban WHERE infractionbanid = " . $vbulletin->GPC['infractionbanid']);
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('deleted_automatic_ban_successfully');
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
|| # CVS: $RCSfile$ - $Revision: 39862 $
|| ####################################################################
\*======================================================================*/
コード例 #7
0
ファイル: ad.php プロジェクト: Kheros/MMOver
    if (empty($vbulletin->GPC['confirmerrors'])) {
        $errors = check_template_errors($template);
        if (!empty($errors)) {
            print_form_header('ad', 'update', 0, 1, '', '75%');
            construct_hidden_code('confirmerrors', 1);
            construct_hidden_code('adid', intval($vbulletin->GPC['adid']));
            construct_hidden_code('title', $vbulletin->GPC['title']);
            construct_hidden_code('ad_location', $vbulletin->GPC['ad_location']);
            construct_hidden_code('ad_html', $vbulletin->GPC['ad_html']);
            construct_hidden_code('displayorder', intval($vbulletin->GPC['displayorder']));
            construct_hidden_code('active', $vbulletin->GPC['active']);
            construct_hidden_code('criteria_serialized', $criterion);
            print_table_header($vbphrase['vbulletin_message']);
            print_description_row(construct_phrase($vbphrase['template_eval_error'], $errors));
            print_description_row(construct_phrase($template_un, $errors));
            print_submit_row($vbphrase['continue'], 0, 2, $vbphrase['go_back']);
            print_cp_footer();
            exit;
        }
    }
    // The insert of the template.
    replace_ad_template(0, $vbulletin->GPC['ad_location'], $template, $template_un, $vbulletin->userinfo['username'], $vbulletin->options['templateversion']);
    replace_ad_template(-1, $vbulletin->GPC['ad_location'], $template, $template_un, $vbulletin->userinfo['username'], $vbulletin->options['templateversion']);
    build_all_styles();
    define('CP_REDIRECT', 'ad.php');
    print_stop_message('saved_ad_x_successfully', $vbulletin->GPC['title']);
}
// #############################################################################
// confirm deletion of a ad
if ($_REQUEST['do'] == 'delete') {
    print_delete_confirmation('ad', $vbulletin->GPC['adid'], 'ad', 'remove');
コード例 #8
0
ファイル: template.php プロジェクト: hungnv0789/vhtm
	function updatetemplate_print_error_page($template_un, $error)
	{
		global $vbulletin, $vbphrase;
		print_form_header('template', 'updatetemplate', 0, 1, '', '75%');
		construct_hidden_code('confirmerrors', 1);
		construct_hidden_code('title', $vbulletin->GPC['title']);
		construct_hidden_code('template', $template_un);
		construct_hidden_code('templateid', $vbulletin->GPC['templateid']);
		construct_hidden_code('group', $vbulletin->GPC['group']);
		construct_hidden_code('searchstring', $vbulletin->GPC['searchstring']);
		construct_hidden_code('dostyleid', $vbulletin->GPC['dostyleid']);
		construct_hidden_code('product', $vbulletin->GPC['product']);
		construct_hidden_code('savehistory', intval($vbulletin->GPC['savehistory']));
		construct_hidden_code('histcomment', $vbulletin->GPC['histcomment']);
		print_table_header($vbphrase['vbulletin_message']);
		print_description_row($error);
		print_submit_row($vbphrase['continue'], 0, 2, $vbphrase['go_back']);
		print_cp_footer();
	}
コード例 #9
0
function fetch_reminders_array2()
{
    // prints out all reminders for the appropriate control panel
    global $vbulletin, $permissions, $vbphrase;
    if ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) {
        $condition = '';
    } else {
        $condition = 'AND allowmodcp = 1';
    }
    $reminders = $vbulletin->db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "adminreminder\n\t\tWHERE duedate < " . (TIMENOW + 7 * 86400) . "\n\t\t{$condition} ORDER BY duedate\n\t");
    if ($vbulletin->db->num_rows($reminders)) {
        print_form_header(iif(VB_AREA == 'AdminCP', '../modcp/reminder', 'reminder'), 'docompleted');
        print_table_header($vbphrase['adminfunctions_getreminders2_header'], 4);
        print_cells_row(array($vbphrase['adminfunctions_getreminders2_duedate'], $vbphrase['event'], $vbphrase['edit'], $vbphrase['status']), 1, 0, -1);
        while ($reminder = $vbulletin->db->fetch_array($reminders)) {
            if ($reminder['completed'] == 0) {
                if ($reminder['duedate'] < TIMENOW) {
                    $date = '<b class="col-i">%s</b>';
                    $status = '<b>' . $vbphrase['adminfunctions_getreminders2_overdue'] . '</b>';
                    $hint = $vbphrase['adminfunctions_getreminders2_completed'];
                    $checkbox = '';
                } else {
                    $date = '%s';
                    $status = 'Pending';
                    $hint = $vbphrase['adminfunctions_getreminders2_completed'];
                    $checkbox = '';
                }
            } else {
                $date = '%s';
                $status = $vbphrase['adminfunctions_getreminders2_complete'];
                $hint = $vbphrase['adminfunctions_getreminders2_delete'];
                $checkbox = ' checked="checked" disabled="disabled"';
            }
            $cell = array();
            $cell[] = '<p class="smallfont" style="white-space:nowrap">' . sprintf($date, vbdate("M jS 'y", $reminder['duedate'])) . '</p>';
            $cell[] = '<p class="smallfont">' . $reminder['title'] . '</p>';
            //$cell[] = '<span class="smallfont">'.construct_link_code($status, $link, 0, $hint) . '</span>';
            $cell[] = '<p class="smallfont">' . construct_link_code($vbphrase['edit'], "reminder.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;id[{$reminder['adminreminderid']}]=1") . '</p>';
            $cell[] = '<p class="smallfont" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '">' . $status . '<input type="checkbox" name="id[' . $reminder['adminreminderid'] . ']" value="1" tabindex="1"' . $checkbox . ' /></p>';
            print_cells_row($cell, 0, '', -2);
        }
        print_submit_row($vbphrase['adminfunctions_getreminders2_delcomplete'], 0, 4);
    }
    unset($reminder);
    $vbulletin->db->free_result($reminders);
}
コード例 #10
0
ファイル: photoplog_category.php プロジェクト: holandacz/nb4
            print_cp_redirect("photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify", 1);
        } else {
            print_stop_message('generic_error_x', $vbphrase['photoplog_bad_order_update']);
        }
    } else {
        print_stop_message('no_results_matched_your_query');
    }
}
if ($_REQUEST['do'] == 'delete') {
    $vbulletin->input->clean_array_gpc('g', array('catid' => TYPE_UINT));
    print_form_header('photoplog_category', 'dodelete');
    construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
    construct_hidden_code('catid', $vbulletin->GPC['catid']);
    print_table_header($vbphrase['photoplog_confirm_deletion']);
    print_description_row($vbphrase['photoplog_confirm_delete_category']);
    print_submit_row($vbphrase['photoplog_yes'], '', 2, $vbphrase['photoplog_no']);
}
if ($_REQUEST['do'] == 'dodelete') {
    $vbulletin->input->clean_array_gpc('p', array('catid' => TYPE_UINT));
    $photoplog_catid = $vbulletin->GPC['catid'];
    $photoplog_dscatopts = $photoplog_ds_catopts;
    $photoplog_child_list = array();
    $photoplog_parent_list = array();
    photoplog_child_list($photoplog_child_list, $photoplog_parent_list, $photoplog_catid);
    $photoplog_catids_array = array_merge(array($photoplog_catid), $photoplog_child_list, $photoplog_parent_list);
    $photoplog_sql = "WHERE catid = " . intval($photoplog_catid);
    unset($photoplog_dscatopts["{$photoplog_catid}"]);
    if (!empty($photoplog_child_list)) {
        $photoplog_sql = "WHERE catid IN (" . intval($photoplog_catid) . "," . implode(",", $photoplog_child_list) . ")";
        foreach ($photoplog_child_list as $photoplog_childid) {
            unset($photoplog_dscatopts["{$photoplog_childid}"]);
コード例 #11
0
if ($_REQUEST['do'] == 'edit') {
    print_form_header('subscriptionpermission', 'doupdate');
    if (empty($subobj->subscriptioncache[$vbulletin->GPC['subscriptionid']])) {
        print_stop_message('invalid_x_specified', $vbphrase['subscription']);
    }
    if (empty($vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']])) {
        print_stop_message('invalid_x_specified', $vbphrase['usergroup']);
    }
    $getperms = $db->query_first("\n\t\tSELECT subscriptionpermission.*\n\t\tFROM " . TABLE_PREFIX . "subscriptionpermission AS subscriptionpermission\n\t\tINNER JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = subscriptionpermission.usergroupid)\n\t\tWHERE subscriptionid = " . $vbulletin->GPC['subscriptionid'] . " AND subscriptionpermission.usergroupid = " . $vbulletin->GPC['usergroupid']);
    $usergroup = $vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']];
    $subtitle = $vbphrase['sub' . $vbulletin->GPC['subscriptionid'] . '_title'];
    construct_hidden_code('subscriptionid', $vbulletin->GPC['subscriptionid']);
    construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']);
    print_table_header(construct_phrase($vbphrase['edit_usergroup_permissions_for_usergroup_x_in_subscription_y'], $usergroup['title'], $subtitle));
    print_yes_no_row($vbphrase['can_use_subscription'], 'usesub', !$getperms);
    print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'doupdate') {
    $vbulletin->input->clean_array_gpc('p', array('usesub' => TYPE_BOOL, 'subscriptionpermissionid' => TYPE_INT, 'subscriptionid' => TYPE_INT, 'usergroupid' => TYPE_INT));
    if (empty($subobj->subscriptioncache[$vbulletin->GPC['subscriptionid']])) {
        print_stop_message('invalid_x_specified', $vbphrase['subscription']);
    }
    if (empty($vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']])) {
        print_stop_message('invalid_x_specified', $vbphrase['usergroup']);
    }
    define('CP_REDIRECT', "subscriptionpermission.php?do=modify#subscription" . $vbulletin->GPC['subscriptionid']);
    if ($vbulletin->GPC['usesub']) {
        $db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "subscriptionpermission\n\t\t\tWHERE subscriptionid = " . $vbulletin->GPC['subscriptionid'] . " AND usergroupid = " . $vbulletin->GPC['usergroupid']);
        if ($db->affected_rows()) {
            print_stop_message('deleted_subscription_permissions_successfully');
コード例 #12
0
ファイル: thread.php プロジェクト: holandacz/nb4
        $cells[] = "<input type=\"checkbox\" name=\"thread[{$thread['threadid']}]\" tabindex=\"1\" checked=\"checked\" />";
        $cells[] = $thread['prefix_plain_html'] . ' <a href="../showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$thread['threadid']}\" target=\"_blank\">{$thread['title']}</a>";
        if ($thread['postuserid']) {
            $cells[] = '<span class="smallfont"><a href="../member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$thread['postuserid']}\">{$thread['postusername']}</a></span>";
        } else {
            $cells[] = '<span class="smallfont">' . $thread['postusername'] . '</span>';
        }
        $cells[] = "<span class=\"smallfont\">{$thread['replycount']}</span>";
        $cells[] = '<span class="smallfont">' . vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $thread['lastpost']) . '</span>';
        print_cells_row($cells, 0, 0, -1);
    }
    if ($vbulletin->GPC['type'] == 'prune') {
        print_submit_row($vbphrase['prune_threads'], NULL, 5);
    } else {
        if ($vbulletin->GPC['type'] == 'move') {
            print_submit_row($vbphrase['move_threads'], NULL, 5);
        }
    }
}
// ###################### Start move/prune select - finish! #######################
if ($_POST['do'] == 'dothreadsselfinish') {
    $vbulletin->input->clean_array_gpc('p', array('thread' => TYPE_ARRAY, 'destforumid' => TYPE_INT));
    if (!empty($vbulletin->GPC['thread'])) {
        require_once DIR . '/includes/functions_databuild.php';
        if ($vbulletin->GPC['type'] == 'prune') {
            echo '<p>' . $vbphrase['deleting_threads'];
            foreach ($vbulletin->GPC['thread'] as $threadid => $confirm) {
                $threadinfo = fetch_threadinfo($threadid);
                if (empty($forumids["{$threadinfo['forumid']}"])) {
                    // make sure we have access to prune / move this thread, if not then skip it
                    continue;
コード例 #13
0
                construct_hidden_code('currency', $vbulletin->GPC['currency']);
                construct_hidden_code('type', $vbulletin->GPC['type']);
                construct_hidden_code('subscriptionid', $vbulletin->GPC['subscriptionid']);
                construct_hidden_code('state', $vbulletin->GPC['state']);
                construct_hidden_code('userid', $userinfo['userid']);
                construct_hidden_code('scope', 1);
                if ($vbulletin->GPC['limitstart'] == 0 and $counttrans['trans'] > $vbulletin->GPC['limitnumber']) {
                    construct_hidden_code('limitstart', $vbulletin->GPC['limitstart'] + $vbulletin->GPC['limitnumber'] + 1);
                    print_submit_row($vbphrase['next_page'], 0, 7);
                } else {
                    if ($limitfinish < $counttrans['trans']) {
                        construct_hidden_code('limitstart', $vbulletin->GPC['limitstart'] + $vbulletin->GPC['limitnumber'] + 1);
                        print_submit_row($vbphrase['next_page'], 0, 7, $vbphrase['prev_page'], '', true);
                    } else {
                        if ($vbulletin->GPC['limitstart'] > 0 and $limitfinish >= $counttrans['trans']) {
                            print_submit_row($vbphrase['first_page'], 0, 7, $vbphrase['prev_page'], '', true);
                        } else {
                            print_table_footer();
                        }
                    }
                }
            }
        }
    }
}
print_cp_footer();
// ###################### Start toggle_subs #######################
// Function disables subs if there isn't an active API or active SUB (and vice versa)
function toggle_subs()
{
    global $vbulletin;
コード例 #14
0
ファイル: tag.php プロジェクト: hungnv0789/vhtm
function displaytags()
{
	global $vbulletin, $vbphrase, $db;

	if ($vbulletin->GPC['pagenumber'] < 1)
	{
		$vbulletin->GPC['pagenumber'] = 1;
	}

	if ($vbulletin->GPC['sort'] == 'dateline')
	{
		$where = 'WHERE canonicaltagid = 0';
		$order = 'dateline DESC';
		$synonyms_in_list = false;
	}
	else if ($vbulletin->GPC['sort'] == 'alphaall')
	{
		$where = '';
		$order = 'tagtext ASC';
		$synonyms_in_list = true;
	}
	else
	{
		$where = 'WHERE canonicaltagid = 0';
		$order = 'tagtext ASC';
		$synonyms_in_list = false;
	}

	$column_count = 3;
	$max_per_column = 15;
	$perpage = $column_count * $max_per_column;

	list($tag_count) = $db->query_first(
		"SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "tag $where",
		DBARRAY_NUM
	);

	$start = ($vbulletin->GPC['pagenumber'] - 1) * $perpage;
	if ($start >= $tag_count)
	{
		$start = max(0, $tag_count - $perpage);
	}

	$tags = $db->query_read("
		SELECT *
		FROM " . TABLE_PREFIX . "tag
		$where
		ORDER BY $order
		LIMIT $start, $perpage
	");

	print_form_header('tag', '', false, true, 'tagsform');
	print_table_header($vbphrase['tag_list'], 3);
	if ($db->num_rows($tags))
	{
		$columns = array();
		$counter = 0;

		// build page navigation
		$pagenav = tagcp_build_page_nav($vbulletin->GPC['pagenumber'], ceil($tag_count / $perpage),
			$vbulletin->GPC['sort']);
		$sort_links[''] =  '<a href="tag.php?do=tags">' . $vbphrase['display_alphabetically'] . '</a>';
		$sort_links['dateline'] = '<a href="tag.php?do=tags&amp;sort=dateline">' . $vbphrase['display_newest'] . '</a>';
		$sort_links['alphaall'] = '<a href="tag.php?do=tags&amp;sort=alphaall">' . $vbphrase['display_alphabetically_all'] . '</a>';

		//dont show the current sort
		unset($sort_links[$vbulletin->GPC['sort']]);

		print_description_row(
			"<div style=\"float: " . vB_Template_Runtime::fetchStyleVar('left') . "\">" . implode("&nbsp;&nbsp;" , $sort_links) . "</div>$pagenav",
			false, 3, 'thead', 'right'
		);

		// build columns
		while ($tag = $db->fetch_array($tags))
		{
			$columnid = floor($counter++ / $max_per_column);
			$columns["$columnid"][] = tagcp_format_tag_entry($tag, $synonyms_in_list);
		}

		// make column values printable
		$cells = array();
		for ($i = 0; $i < $column_count; $i++)
		{
			if ($columns["$i"])
			{
				$cells[] = implode("<br />\n", $columns["$i"]);
			}
			else
			{
				$cells[] = '&nbsp;';
			}
		}

		print_column_style_code(array(
			'width: 33%',
			'width: 33%',
			'width: 34%'
		));
		print_cells_row($cells, false, false, -3);

		?>
		<tr>
			<td colspan="<?php echo $column_count; ?>" align="center" class="tfoot">
				<select id="select_tags" name="do">
					<option value="tagmerge" id="select_tags_merge"><?php echo $vbphrase['merge_selected_synonym']; ?></option>
					<option value="tagdopromote" id="select_tags_delete"><?php echo $vbphrase['promote_synonyms_selected']; ?></option>
					<option value="tagkill" id="select_tags_delete"><?php echo $vbphrase['delete_selected']; ?></option>
					<optgroup label="____________________">
						<option value="tagclear"><?php echo $vbphrase[deselect_all_tags]; ?></option>
					</optgroup>
				</select>
				<input type="hidden" name="page" value="<?php echo $vbulletin->GPC['pagenumber']; ?>" />
				<input type="hidden" name="sort" value="<?php echo $vbulletin->GPC['sort']; ?>" />
				<input type="submit" value="<?php echo $vbphrase[go]; ?>" id="tag_inlinego" class="button" />
			</td>
		</tr>
		</table>

		<script type="text/javascript" src="../clientscript/vbulletin_inlinemod.js?v=<?php echo $vboptions[simpleversion]; ?>"></script>
		<script type="text/javascript">
			<!--
			inlineMod_tags = new vB_Inline_Mod('inlineMod_tags', 'tag', 'tagsform', '<?php echo $vbphrase[go_x]; ?>', 'vbulletin_inline', 'tag');
			/* vBmenu.register("inlinemodsel"); */
			//-->

			function js_show_synlist(trigger, listid)
			{
				list = document.getElementById(listid);
				list.style.display = 'block';
				trigger.onclick = function() {return js_hide_synlist(trigger, listid)};
				trigger.getElementsByTagName('img')[0].src = '../cpstyles/<?php echo $vbulletin->options['cpstylefolder']  ?>/collapse_generic.gif';
				return false;
			}

			function js_hide_synlist(trigger, listid)
			{
				list = document.getElementById(listid);
				list.style.display = 'none';
				trigger.onclick = function() {return js_show_synlist(trigger, listid)};
				trigger.getElementsByTagName('img')[0].src = '../cpstyles/<?php echo $vbulletin->options['cpstylefolder']  ?>/collapse_generic_collapsed.gif';
				return false;
			}
		</script>
		</form>
		<?php
	}
	else
	{
		print_description_row($vbphrase['no_tags_defined'], false, 3, '', 'center');
		print_table_footer();
	}

	construct_hidden_code('page', $vbulletin->GPC['pagenumber']);
	construct_hidden_code('sort', $vbulletin->GPC['sort']);

	print_form_header('tag', 'taginsert');
	print_input_row($vbphrase['add_tag'], 'tagtext');
	print_submit_row();
}
コード例 #15
0
ファイル: user.php プロジェクト: holandacz/nb4
    }
}
// ###################### Start Reputation Edit Form #######################
if ($_REQUEST['do'] == 'editreputation') {
    $vbulletin->input->clean_array_gpc('r', array('reputationid' => TYPE_INT));
    if (!can_moderate(0, 'caneditreputation') or !$vbulletin->options['reputationenable']) {
        print_stop_message('no_permission');
    }
    $reputation = $db->query_first("\n\t\tSELECT reason, dateline, userid\n\t\tFROM " . TABLE_PREFIX . "reputation\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid'] . "\n\t");
    print_form_header('user', 'doeditreputation');
    construct_hidden_code('reputationid', $vbulletin->GPC['reputationid']);
    construct_hidden_code('userid', $reputation['userid']);
    print_table_header($vbphrase['edit_reputation_comment']);
    print_label_row($vbphrase['date'], vbdate($vbulletin->options['logdateformat'], $reputation['dateline']));
    print_textarea_row($vbphrase['reason'], 'reason', $reputation['reason'], 4, 40, 1, 0);
    print_submit_row($vbphrase['update'], 0);
}
// ###################### Start Actual Reputation Editing #######################
if ($_POST['do'] == 'doeditreputation') {
    $vbulletin->input->clean_array_gpc('p', array('reputationid' => TYPE_INT, 'reason' => TYPE_STR));
    if (!can_moderate(0, 'caneditreputation') or !$vbulletin->options['reputationenable']) {
        print_stop_message('no_permission');
    }
    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "reputation\n\t\tSET reason = '" . $db->escape_string($vbulletin->GPC['reason']) . "'\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid'] . "\n\t");
    define('CP_REDIRECT', 'user.php?do=reputation&amp;u=' . $vbulletin->GPC['userid']);
    print_stop_message('updated_reason_successfully');
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
コード例 #16
0
ファイル: avatar.php プロジェクト: holandacz/nb4
            // update $vboptions
            $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting SET value =\n\t\t\t\tCASE varname\n\t\t\t\t\tWHEN 'avatarpath' THEN '" . $db->escape_string($vbulletin->GPC['avatarpath']) . "'\n\t\t\t\t\tWHEN 'avatarurl' THEN '" . $db->escape_string($vbulletin->GPC['avatarurl']) . "'\n\t\t\t\t\tWHEN 'profilepicpath' THEN '" . $db->escape_string($vbulletin->GPC['profilepicpath']) . "'\n\t\t\t\t\tWHEN 'profilepicurl' THEN '" . $db->escape_string($vbulletin->GPC['profilepicurl']) . "'\n\t\t\t\t\tWHEN 'sigpicpath' THEN '" . $db->escape_string($vbulletin->GPC['sigpicpath']) . "'\n\t\t\t\t\tWHEN 'sigpicurl' THEN '" . $db->escape_string($vbulletin->GPC['sigpicurl']) . "'\n\t\t\t\tELSE value END\n\t\t\t\tWHERE varname IN('avatarpath', 'avatarurl', 'profilepicurl', 'profilepicpath', 'sigpicurl', 'sigpicpath')\n\t\t\t");
            build_options();
            break;
    }
    // #############################################################################
    print_form_header('avatar', 'domoveavatar');
    print_table_header(construct_phrase($vbphrase['edit_storage_type'], "<span class=\"normal\">" . $vbphrase['user_pictures'] . "</span>"));
    construct_hidden_code('dowhat', $vbulletin->GPC['dowhat']);
    if ($vbulletin->GPC['dowhat'] == 'DB_to_FS') {
        print_description_row($vbphrase['we_are_ready_to_attempt_to_move_your_images_from_database_to_filesystem']);
    } else {
        print_description_row($vbphrase['we_are_ready_to_attempt_to_move_your_images_from_filesystem_to_database']);
    }
    print_input_row($vbphrase['number_of_users_to_process_per_cycle'], 'perpage', 300, 1, 5);
    print_submit_row($vbphrase['go']);
}
// ################### Move avatars ######################################
if ($_REQUEST['do'] == 'domoveavatar') {
    $vbulletin->input->clean_array_gpc('r', array('perpage' => TYPE_INT, 'startat' => TYPE_INT));
    if (is_demo_mode()) {
        print_cp_message('This function is disabled within demo mode');
    }
    if ($vbulletin->GPC['perpage'] < 1) {
        $vbulletin->GPC['perpage'] = 10;
    }
    if ($vbulletin->GPC['startat'] < 0) {
        $vbulletin->GPC['startat'] = 0;
    }
    if ($vbulletin->debug) {
        echo '<p>' . $imagetype . '</p>';
コード例 #17
0
        echo '<p>';
        if ($vbulletin->GPC['disablesetting'] == 1) {
            $db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value=0 WHERE varname='timeoutcontrolpanel'");
            echo $upgrade_phrases['upgrade_300b5.php']['disabled_timeout_admin'];
        } else {
            echo $upgrade_phrases['upgrade_300b5.php']['timeout_admin_not_changed'];
        }
        echo '</p>';
    } else {
        if ($vbulletin->options['timeoutcontrolpanel'] == 1) {
            print_form_header('upgrade_300b5', '');
            construct_hidden_code('step', $vbulletin->GPC['step']);
            construct_hidden_code('settingconfirm', 1);
            print_table_header($upgrade_phrases['upgrade_300b5.php']['change_setting_value']);
            print_yes_no_row($upgrade_phrases['upgrade_300b5.php']['setting_info'], 'disablesetting', 0);
            print_submit_row($upgrade_phrases['upgrade_300b5.php']['proceed'], '');
            print_cp_footer();
        } else {
            echo "<p>{$upgrade_phrases['upgrade_300b5.php']['no_change_needed']}</p>";
        }
    }
}
// #############################################################################
// FINAL step (notice the SCRIPTCOMPLETE define)
if ($vbulletin->GPC['step'] == 4) {
    // tell log_upgrade_step() that the script is done
    define('SCRIPTCOMPLETE', true);
}
// #############################################################################
print_next_step();
print_upgrade_footer();
コード例 #18
0
    foreach ($crons as $cron) {
        $options = array('edit' => $vbphrase['edit'], 'switchactive' => $cron['effective_active'] ? $vbphrase['disable'] : $vbphrase['enable']);
        if (!$cron['volatile'] or $vb5_config['Misc']['debug']) {
            $options['kill'] = $vbphrase['delete'];
        }
        $item_title = htmlspecialchars_uni($vbphrase['task_' . $cron['varname'] . '_title']);
        if (isset($vbphrase['task_' . $cron['varname'] . '_title'])) {
            $item_title = htmlspecialchars_uni($vbphrase['task_' . $cron['varname'] . '_title']);
        } else {
            $item_title = $cron['varname'];
        }
        if (!$cron['effective_active']) {
            $item_title = "<strike>{$item_title}</strike>";
        }
        $item_desc = htmlspecialchars_uni($vbphrase['task_' . $cron['varname'] . '_desc']);
        $timerule = fetch_cron_timerule($cron);
        // this will happen in the future which the yestoday setting doesn't handle when its in the detailed mode
        $future = ($cron['nextrun'] > TIMENOW and $vbulletin->options['yestoday'] == 2);
        $cell = array("<input type=\"checkbox\" name=\"enabled[{$cron['varname']}]\" value=\"1\" title=\"{$vbphrase['enabled']}\" id=\"cb_enabled_{$cron['varname']}\" tabindex=\"1\"" . ($cron['active'] ? ' checked="checked"' : '') . " />", $timerule['minute'], $timerule['hour'], $timerule['day'], $timerule['month'], $timerule['weekday'], "<label for=\"cb_enabled_{$cron['varname']}\"><strong>{$item_title}</strong><br /><span class=\"smallfont\">{$item_desc}</span></label>", '<div style="white-space:nowrap">' . ($cron['effective_active'] ? vbdate($vbulletin->options['dateformat'], $cron['nextrun'], true and !$future) . (($vbulletin->options['yestoday'] != 2 or $future) ? '<br />' . vbdate($vbulletin->options['timeformat'], $cron['nextrun']) : '') : $vbphrase['n_a']) . '</div>', "\n\t<select name=\"c{$cron['cronid']}\" onchange=\"js_cron_jump({$cron['cronid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select><input type=\"button\" class=\"button\" value=\"{$vbphrase['go']}\" onclick=\"js_cron_jump({$cron['cronid']});\" />\n\t" . "\n\t<input type=\"button\" class=\"button\" value=\"{$vbphrase['run_now']}\" onclick=\"js_run_cron({$cron['cronid']});\" />");
        print_cells_row($cell, 0, '', -6);
    }
    print_description_row("<div class=\"smallfont\" align=\"center\">{$vbphrase['all_times_are_gmt_x_time_now_is_y']}</div>", 0, 9, 'thead');
    print_submit_row($vbphrase['save_enabled_status'], 0, 9, '', "<input type=\"button\" class=\"button\" value=\"{$vbphrase['add_new_scheduled_task_gcron']}\" tabindex=\"1\" onclick=\"window.location='cronadmin.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit'\" />");
}
print_cp_footer();
/*=========================================================================*\
|| #######################################################################
|| # Downloaded: 15:45, Tue Sep 8th 2015
|| # CVS: $RCSfile$ - $Revision: 83432 $
|| #######################################################################
\*=========================================================================*/
コード例 #19
0
/**
* Prints a dialog box asking if the user is sure they want to delete the specified item from the database
*
* @param	string	Name of table from which item will be deleted
* @param	mixed	ID of item to be deleted
* @param	string	PHP script to which the form will submit
* @param	string	'do' action for target script
* @param	string	Word describing item to be deleted - eg: 'forum' or 'user' or 'post' etc.
* @param	mixed	If not empty, an array containing name=>value pairs to be used as hidden input fields
* @param	string	Extra text to be printed in the dialog box
* @param	string	Name of 'title' field in the table in the database
*/
function print_delete_confirmation($table, $itemid, $phpscript, $do, $itemname = '', $hiddenfields = 0, $extra = '', $titlename = 'title')
{
    global $vbulletin, $vbphrase;
    $idfield = $table . 'id';
    $itemname = iif($itemname, $itemname, $table);
    $deleteword = 'delete';
    $encodehtml = true;
    switch ($table) {
        case 'infraction':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT infractionid, infractionid AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "infraction\n\t\t\t\tWHERE infractionid = {$itemid}\n\t\t\t");
            break;
        case 'reputation':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT reputationid, reputationid AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "reputation\n\t\t\t\tWHERE reputationid = {$itemid}\n\t\t\t");
            break;
        case 'user':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT userid, username AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "user\n\t\t\t\tWHERE userid = {$itemid}\n\t\t\t");
            break;
        case 'moderator':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT moderatorid, username, title\n\t\t\t\tFROM " . TABLE_PREFIX . "moderator AS moderator,\n\t\t\t\t" . TABLE_PREFIX . "user AS user,\n\t\t\t\t" . TABLE_PREFIX . "forum AS forum\n\t\t\t\tWHERE user.userid = moderator.userid AND\n\t\t\t\tforum.forumid = moderator.forumid AND\n\t\t\t\tmoderatorid = {$itemid}\n\t\t\t");
            $item['title'] = construct_phrase($vbphrase['x_from_the_forum_y'], $item['username'], $item['title']);
            $encodehtml = false;
            break;
        case 'calendarmoderator':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT calendarmoderatorid, username, title\n\t\t\t\tFROM " . TABLE_PREFIX . "calendarmoderator AS calendarmoderator,\n\t\t\t\t" . TABLE_PREFIX . "user AS user,\n\t\t\t\t" . TABLE_PREFIX . "calendar AS calendar\n\t\t\t\tWHERE user.userid = calendarmoderator.userid AND\n\t\t\t\tcalendar.calendarid = calendarmoderator.calendarid AND\n\t\t\t\tcalendarmoderatorid = {$itemid}\n\t\t\t");
            $item['title'] = construct_phrase($vbphrase['x_from_the_calendar_y'], $item['username'], $item['title']);
            $encodehtml = false;
            break;
        case 'phrase':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT phraseid, varname AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "phrase\n\t\t\t\tWHERE phraseid = {$itemid}\n\t\t\t");
            break;
        case 'userpromotion':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT userpromotionid, usergroup.title\n\t\t\t\tFROM " . TABLE_PREFIX . "userpromotion AS userpromotion,\n\t\t\t\t" . TABLE_PREFIX . "usergroup AS usergroup\n\t\t\t\tWHERE userpromotionid = {$itemid} AND\n\t\t\t\tuserpromotion.usergroupid = usergroup.usergroupid\n\t\t\t");
            break;
        case 'usergroupleader':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT usergroupleaderid, username AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "usergroupleader AS usergroupleader\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING (userid)\n\t\t\t\tWHERE usergroupleaderid = {$itemid}\n\t\t\t");
            break;
        case 'setting':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT varname AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "setting\n\t\t\t\tWHERE varname = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $idfield = 'title';
            break;
        case 'settinggroup':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT grouptitle AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "settinggroup\n\t\t\t\tWHERE grouptitle = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $idfield = 'title';
            break;
        case 'adminhelp':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT adminhelpid, phrase.text AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "adminhelp AS adminhelp\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "phrase AS phrase ON (phrase.varname = CONCAT(adminhelp.script, IF(adminhelp.action != '', CONCAT('_', REPLACE(adminhelp.action, ',', '_')), ''), IF(adminhelp.optionname != '', CONCAT('_', adminhelp.optionname), ''), '_title') AND phrase.fieldname = 'cphelptext' AND phrase.languageid IN (-1, 0))\n\t\t\t\tWHERE adminhelpid = {$itemid}\n\t\t\t");
            break;
        case 'faq':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT faqname, IF(phrase.text IS NOT NULL, phrase.text, faq.faqname) AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "faq AS faq\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "phrase AS phrase ON (phrase.varname = faq.faqname AND phrase.fieldname = 'faqtitle' AND phrase.languageid IN(-1, 0))\n\t\t\t\tWHERE faqname = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $idfield = 'faqname';
            break;
        case 'product':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT productid, title\n\t\t\t\tFROM " . TABLE_PREFIX . "product\n\t\t\t\tWHERE productid = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            break;
        case 'prefix':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT prefixid\n\t\t\t\tFROM " . TABLE_PREFIX . "prefix\n\t\t\t\tWHERE prefixid = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $item['title'] = $vbphrase["prefix_{$item['prefixid']}_title_plain"];
            break;
        case 'prefixset':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT prefixsetid\n\t\t\t\tFROM " . TABLE_PREFIX . "prefixset\n\t\t\t\tWHERE prefixsetid = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $item['title'] = $vbphrase["prefixset_{$item['prefixsetid']}_title"];
            break;
        default:
            $handled = false;
            ($hook = vBulletinHook::fetch_hook('admin_delete_confirmation')) ? eval($hook) : false;
            if (!$handled) {
                $item = $vbulletin->db->query_first("\n\t\t\t\t\tSELECT {$idfield}, {$titlename} AS title\n\t\t\t\t\tFROM " . TABLE_PREFIX . "{$table}\n\t\t\t\t\tWHERE {$idfield} = {$itemid}\n\t\t\t\t");
            }
            break;
    }
    switch ($table) {
        case 'template':
            if ($itemname == 'replacement_variable') {
                $deleteword = 'delete';
            } else {
                $deleteword = 'revert';
            }
            break;
        case 'adminreminder':
            if (vbstrlen($item['title']) > 30) {
                $item['title'] = substr($item['title'], 0, 30) . '...';
            }
            break;
        case 'subscription':
            $item['title'] = $vbphrase['sub' . $item['subscriptionid'] . '_title'];
            break;
    }
    if ($encodehtml and (strcspn($item['title'], '<>"') < strlen($item['title']) or strpos($item['title'], '&') !== false and !preg_match('/&(#[0-9]+|amp|lt|gt|quot);/si', $item['title']))) {
        // title contains html entities that should be encoded
        $item['title'] = htmlspecialchars_uni($item['title']);
    }
    if ($item["{$idfield}"] == $itemid and !empty($itemid)) {
        echo "<p>&nbsp;</p><p>&nbsp;</p>";
        print_form_header($phpscript, $do, 0, 1, '', '75%');
        construct_hidden_code(($idfield == 'styleid' or $idfield == 'languageid') ? 'do' . $idfield : $idfield, $itemid);
        if (is_array($hiddenfields)) {
            foreach ($hiddenfields as $varname => $value) {
                construct_hidden_code($varname, $value);
            }
        }
        print_table_header(construct_phrase($vbphrase['confirm_deletion_x'], $item['title']));
        print_description_row("\n\t\t\t<blockquote><br />\n\t\t\t" . construct_phrase($vbphrase["are_you_sure_want_to_{$deleteword}_{$itemname}_x"], $item['title'], $idfield, $item["{$idfield}"], iif($extra, "{$extra}<br /><br />")) . "\n\t\t\t<br /></blockquote>\n\t");
        print_submit_row($vbphrase['yes'], 0, 2, $vbphrase['no']);
    } else {
        print_stop_message('could_not_find', '<b>' . $itemname . '</b>', $idfield, $itemid);
    }
}
コード例 #20
0
                    }
                }
            }
            echo "</ul>";
        } else {
            redirect('tools', 'ame_no_results');
        }
    } else {
        redirect('tools', 'ame_no_results');
    }
    print_form_header('ame', 'dorebuild', false, true, 'cpform', '90%', '', true, 'get');
    print_table_header($vbphrase['ame_rebuild_title']);
    if ($return) {
        print_label_row($vbphrase['ame_rebuild_seconds_till_next'], "<input type=\"text\" name=\"timer\" id=\"timer\" readonly=\"true\" value=\"{$delay}\" />");
        construct_hidden_code("cont", true);
        construct_hidden_code("perpage", $perpage);
        construct_hidden_code("seconds", $seconds);
        construct_hidden_code("length", $length);
        construct_hidden_code("test", $test);
        construct_hidden_code("verbose", $verbose);
        construct_hidden_code("start", $start + 1);
        construct_hidden_code("zone", $zone);
        construct_hidden_code("ameup", $ameup);
        print_submit_row($vbphrase['next'], '');
        echo "<script language=\"javascript\"><!--\n\n\t\t\t\tvar countdown = " . $seconds . ";\n\n\t\t\t  function submit_form()\n\t\t\t  {\n\t\t\t     document.cpform.submit();\n\t\t\t  }\n\n\t\t\t  function count_down()\n\t\t\t  {\n\t\t\t      countdown = countdown-1;\n\t\t\t  \t  document.cpform.timer.value=countdown+ ' {$vbphrase['ame_rebuild_seconds_remaining']}';\n\t\t\t  \t  if (countdown == 0)\n\t\t\t  \t  {\n\t\t\t  \t  \tsubmit_form();\n\t\t\t  \t  }\n\t\t\t  \t  else\n\t\t\t  \t  {\n\t\t\t  \t  \tsetTimeout('count_down()',1000);\n\t\t\t  \t  }\n\t\t\t  }\n\t\t\t  //-->\n\t\t\tsetTimeout('count_down()',1000);\n\t\t  </script>";
    } else {
        $inp = $in ? $in . "_" : "";
        print_description_row($vbphrase['ame_rebuild_completed']);
        print_table_footer();
    }
}
コード例 #21
0
ファイル: template.php プロジェクト: holandacz/nb4
    $products = fetch_product_list();
    if ($template['styleid'] == -1) {
        print_select_row($vbphrase['product'], 'product', $products, $template['product']);
    } else {
        print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
        construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
    }
    print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
    print_input_row($vbphrase['title'] . ($template['styleid'] != -1 ? '<dfn>' . construct_link_code($vbphrase['view_history'], 'template.php?do=history&amp;dostyleid=' . $template['styleid'] . '&amp;title=' . urlencode($template['title']), 1) . '</dfn>' : ''), 'title', $template['title']);
    print_textarea_row($vbphrase['template'] . '
			<br /><br />
			<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&amp;title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
			</span>', 'template', $template['template_un'], 22, '75" style="width:100%', true, true, 'ltr', 'code');
    print_template_javascript();
    print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" />' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment'] . '</span> <input type="text" name="histcomment" value="" tabindex="1" class="bginput" size="50" />');
    print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
    ?>
	<script type="text/javascript">
	<!--
	var initial_crc32 = crc32(YAHOO.util.Dom.get(textarea_id).value);
	var confirmUnload = true;
	YAHOO.util.Event.addListener('cpform', 'submit', function(e) { confirmUnload = false; });
	YAHOO.util.Event.addListener(window, 'beforeunload', function(e) {
		if (initial_crc32 != crc32(YAHOO.util.Dom.get(textarea_id).value) && confirmUnload) {
			e.returnValue = '<?php 
    echo addslashes_js($vbphrase[unsaved_data_may_be_lost]);
    ?>
';
		}
	});
	//-->
コード例 #22
0
ファイル: usergroup.php プロジェクト: holandacz/nb4
            print_form_header('usergroup', 'processjoinrequests');
            construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']);
            print_table_header("{$usergroup['title']} - ({$vbphrase['join_requests']}: {$usergroup['joinrequests']})", 6);
            if (!empty($leaders)) {
                print_description_row("<span style=\"font-weight:normal\">(" . $vbphrase['usergroup_leader'] . ': ' . implode(', ', $leaders) . ')</span>', 0, 6, 'thead');
            }
            print_cells_row(array($vbphrase['username'], $vbphrase['reason'], '<span style="white-space:nowrap">' . $vbphrase['date'] . '</span>', '<input type="button" value="' . $vbphrase['accept'] . '" onclick="js_check_all_option(this.form, 1);" class="button" title="' . $vbphrase['check_all'] . '" />', '<input type="button" value=" ' . $vbphrase['deny'] . ' " onclick="js_check_all_option(this.form, 0);" class="button" title="' . $vbphrase['check_all'] . '" />', '<input type="button" value="' . $vbphrase['ignore'] . '" onclick="js_check_all_option(this.form, -1);" class="button" title="' . $vbphrase['check_all'] . '" />'), 1);
            $i = 0;
            while ($request = $db->fetch_array($requests)) {
                if ($i > 0 and $i % 10 == 0) {
                    print_description_row('<div align="center"><input type="submit" class="button" value="' . $vbphrase['process'] . '" accesskey="s" tabindex="1" /></div>', 0, 6, 'thead');
                }
                $i++;
                $cell = array("<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u={$request['userid']}\"><b>{$request['username']}</b></a>", $request['reason'], '<span class="smallfont">' . vbdate($vbulletin->options['dateformat'], $request['dateline']) . '<br />' . vbdate($vbulletin->options['timeformat'], $request['dateline']) . '</span>', '<label for="a' . $request['usergrouprequestid'] . '" class="smallfont">' . $vbphrase['accept'] . '<input type="radio" name="request[' . $request['usergrouprequestid'] . ']" value="1" id="a' . $request['usergrouprequestid'] . '" tabindex="1" /></label>', '<label for="d' . $request['usergrouprequestid'] . '" class="smallfont">' . $vbphrase['deny'] . '<input type="radio" name="request[' . $request['usergrouprequestid'] . ']" value="0" id="d' . $request['usergrouprequestid'] . '" tabindex="1" /></label>', '<label for="i' . $request['usergrouprequestid'] . '" class="smallfont">' . $vbphrase['ignore'] . '<input type="radio" name="request[' . $request['usergrouprequestid'] . ']" value="-1" id="i' . $request['usergrouprequestid'] . '" tabindex="1" checked="checked" /></label>');
                print_cells_row($cell, 0, '', -5);
            }
            unset($request);
            $db->free_result($requests);
            print_submit_row($vbphrase['process'], $vbphrase['reset'], 6);
        } else {
            print_stop_message('no_join_requests_matched_your_query');
        }
    }
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 22:41, Fri Oct 10th 2008
|| # CVS: $RCSfile$ - $Revision: 27232 $
|| ####################################################################
\*======================================================================*/
コード例 #23
0
		{
			case 'edit': window.location = "usertitle.php?<?php 
    echo vB::getCurrentSession()->get('sessionurl_js');
    ?>
do=edit&usertitleid=" + usertitleid; break;
			case 'kill': window.location = "usertitle.php?<?php 
    echo vB::getCurrentSession()->get('sessionurl_js');
    ?>
do=remove&usertitleid=" + usertitleid; break;
			default: return false; break;
		}
	}
	</script>
	<?php 
    $options = array('edit' => $vbphrase['edit'], 'kill' => $vbphrase['delete']);
    print_form_header('usertitle', 'add');
    print_table_header($vbphrase['user_title_manager_gcpuser'], 3);
    print_description_row('<p>' . construct_phrase($vbphrase['it_is_recommended_that_you_update_user_titles'], vB::getCurrentSession()->get('sessionurl')) . '</p>', 0, 3);
    print_cells_row(array($vbphrase['user_title_guser'], $vbphrase['minimum_posts'], $vbphrase['controls']), 1);
    foreach ($usertitles as $usertitle) {
        print_cells_row(array('<b>' . $usertitle['title'] . '</b>', $usertitle['minposts'], "\n\t<select name=\"u{$usertitle['usertitleid']}\" onchange=\"js_usergroup_jump({$usertitle['usertitleid']}, this);\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usertitle['usertitleid']}, this.form.u{$usertitle['usertitleid']});\" />\n\t"));
    }
    print_submit_row($vbphrase['add_new_user_title_gcpuser'], 0, 3);
}
print_cp_footer();
/*=========================================================================*\
|| #######################################################################
|| # Downloaded: 15:45, Tue Sep 8th 2015
|| # CVS: $RCSfile$ - $Revision: 83432 $
|| #######################################################################
\*=========================================================================*/
コード例 #24
0
            $sqltable["{$table['0']}"] = $table[0];
        }
        print_form_header('upgrade_300b3', 'sqltable');
        print_table_header($upgradecore_phrases['dump_data_to_sql']);
        construct_hidden_code('step', 'backup');
        print_label_row($upgradecore_phrases['choose_table_to_dump'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>');
        print_submit_row($upgradecore_phrases['dump_tables'], 0);
        unset($sqltable['all tables']);
        print_form_header('upgrade_300b3', 'csvtable');
        print_table_header($upgradecore_phrases['dump_data_to_csv']);
        construct_hidden_code('step', 'backup');
        print_label_row($upgradecore_phrases['backup_individual_table'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>');
        print_input_row($upgradecore_phrases['field_seperator'], 'separator', ',', 0, 15);
        print_input_row($upgradecore_phrases['quote_character'], 'quotes', "'", 0, 15);
        print_yes_no_row($upgradecore_phrases['show_column_names'], 'showhead', 1);
        print_submit_row($upgradecore_phrases['dump_table'], 0);
        define('NO_LOG', true);
        $vbulletin->GPC['step'] = 0;
        print_next_step();
    }
}
// ***************************************************************************************************************************
// #########################################################################
// ############# GENERIC UPGRADE / INSTALL FUNCTIONS PROTOTYPES ############
// #########################################################################
// #########################################################################
// checks the environment for vB3 conditions
function verify_vb3_enviroment()
{
    global $upgradecore_phrases, $db;
    $errorthrown = false;
コード例 #25
0
ファイル: banning.php プロジェクト: hungnv0789/vhtm
				}
				else
				{
					$pagenav .= " <a href=\"banning.php?$session[sessionurl]do=modify&amp;page=$thispage\" class=\"normal\">$thispage</a> ";
				}
			}

			print_description_row($pagenav, false, 8, '', 'right');
		}

		print_cells_row($headercell, 1);
		while ($user = $db->fetch_array($permusers))
		{
			print_cells_row(construct_banned_user_row($user));
		}
		print_submit_row($vbphrase['ban_user'], 0, 8);
	}

	if (!$havebanned)
	{
		if ($canbanuser)
		{
			print_stop_message('no_users_banned_from_x_board_click_here', '<b>' . $vbulletin->options['bbtitle'] . '</b>', 'banning.php?' . $vbulletin->session->vars['sessionurl'] . 'do=banuser');
		}
		else
		{
			print_stop_message('no_users_banned_from_x_board', '<b>' . $vbulletin->options['bbtitle'] . '</b>');
		}
	}

}
コード例 #26
0
ファイル: modlog.php プロジェクト: holandacz/nb4
        $userlist["{$user['userid']}"] = $user['username'];
    }
    print_form_header('modlog', 'view');
    print_table_header($vbphrase['moderator_log_viewer']);
    print_input_row($vbphrase['log_entries_to_show_per_page'], 'perpage', 15);
    print_select_row($vbphrase['show_only_entries_generated_by'], 'userid', $userlist);
    print_time_row($vbphrase['start_date'], 'startdate', 0, 0);
    print_time_row($vbphrase['end_date'], 'enddate', 0, 0);
    if (count($products = fetch_product_list()) > 1) {
        print_select_row($vbphrase['product'], 'product', array('' => $vbphrase['all_products']) + $products);
    }
    print_select_row($vbphrase['order_by'], 'orderby', array('date' => $vbphrase['date'], 'user' => $vbphrase['username']), 'date');
    print_submit_row($vbphrase['view'], 0);
    if (can_access_logs($vbulletin->config['SpecialUsers']['canpruneadminlog'], 0, '')) {
        print_form_header('modlog', 'prunelog');
        print_table_header($vbphrase['prune_moderator_log']);
        print_select_row($vbphrase['remove_entries_logged_by_user'], 'userid', $userlist);
        if (count($products) > 1) {
            print_select_row($vbphrase['product'], 'product', array('' => $vbphrase['all_products']) + $products);
        }
        print_input_row($vbphrase['remove_entries_older_than_days'], 'daysprune', 30);
        print_submit_row($vbphrase['prune_log_entries'], 0);
    }
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26275 $
|| ####################################################################
\*======================================================================*/
コード例 #27
0
ファイル: tools.php プロジェクト: holandacz/nb4
                build_options();
                build_language($_languageid);
                build_language_datastore();
                define('SCRIPT_REDIRECT', true);
            } else {
                $sellanguages = array();
                while ($language = $db->fetch_array($languages)) {
                    $sellanguages[$language['languageid']] = $language['title'];
                }
                $languageids = implode(',', array_keys($sellanguages));
                $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\tSET languageid = 0\n\t\t\tWHERE languageid NOT IN ({$languageids})\n\t\t");
                if (empty($vbulletin->GPC['languageid'])) {
                    print_form_header('tools', 'language');
                    print_table_header('Select the new default language');
                    print_select_row('Language', 'languageid', $sellanguages, $vbulletin->options['languageid']);
                    print_submit_row('Submit', '');
                } else {
                    $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = " . $vbulletin->GPC['languageid'] . "\n\t\t\t\tWHERE varname = 'languageid'\n\t\t\t");
                    build_options();
                    build_language($vbulletin->GPC['languageid']);
                    build_language_datastore();
                    define('SCRIPT_REDIRECT', true);
                }
            }
        }
    }
}
if (defined('SCRIPT_REDIRECT')) {
    echo '<p align="center" class="smallfont"><a href="tools.php" onclick="javascript:clearTimeout(timerID);">' . $vbphrase['processing_complete_proceed'] . '</a></p>';
    echo "\n<script type=\"text/javascript\">\n";
    echo "myvar = \"\"; timeout = " . 10 . ";\n\tfunction exec_refresh()\n\t{\n\t\twindow.status=\"" . $vbphrase['redirecting'] . "\"+myvar; myvar = myvar + \" .\";\n\t\ttimerID = setTimeout(\"exec_refresh();\", 100);\n\t\tif (timeout > 0)\n\t\t{ timeout -= 1; }\n\t\telse { clearTimeout(timerID); window.status=\"\"; window.location=\"tools.php\"; }\n\t}\n\texec_refresh();";
コード例 #28
0
ファイル: qhvbmailer.php プロジェクト: holandacz/nb4
        $vbulletin->input->clean_array_gpc('g', array('campaign_id' => TYPE_UINT));
        $campaign_id = $vbulletin->GPC['campaign_id'];
        if ($campaign_id > 0) {
            $sent = countTracks($campaign_id, 'sent');
            $failed = countTracks($campaign_id, 'failed');
            $unqread = countTracks($campaign_id, 'unique_read');
            $read = countTracks($campaign_id, 'read');
            $links = countTracks($campaign_id, 'link');
            print_form_header('qhvbmailer', 'manage_campaigns');
            print_table_header('Campaign Statistics');
            if (file_exists(DIR . '/includes/charts/chart.php')) {
                print_description_row('<center>' . InsertChart('../includes/charts/charts.swf', '../includes/charts/charts_library', '../includes/charts/chart.php?sent=' . $sent . '&failed=' . $failed . '&unqread=' . $unqread . '&read=' . $read . '&links=' . $links, 400, 320, 'FFFFFF', true) . '</center>');
            } else {
                print_cp_message('No charts file!', 'qhvbmailer.php?do=manage_campaigns', 2);
            }
            print_submit_row('Back', '');
        } else {
            print_cp_message('Campaign ID must be greater than zero!', 'qhvbmailer.php?do=manage_campaigns', 2);
        }
    } elseif ($_GET['act'] == 3) {
        $vbulletin->input->clean_array_gpc('g', array('campaign_id' => TYPE_UINT));
        if ($vbulletin->GPC['campaign_id'] > 0) {
            $db->query_write("DELETE FROM " . TABLE_PREFIX . "qhvbmailer_campaigns WHERE id='" . $vbulletin->GPC['campaign_id'] . "'");
            print_cp_message('Campaign deleted!', 'qhvbmailer.php?do=manage_campaigns', 1);
        } else {
            print_cp_message('Campaign ID must be greater than zero!', 'qhvbmailer.php?do=manage_campaigns', 2);
        }
    }
} else {
    print_cp_message("Invalid page: " . $_GET['do']);
}
コード例 #29
0
    } else {
        // add new
        $bookmarksite = $vbulletin->db->query_first("SELECT MAX(displayorder) AS displayorder FROM " . TABLE_PREFIX . "bookmarksite");
        $bookmarksite['displayorder'] += 10;
        $bookmarksite['url'] = 'http://';
        $bookmarksite['active'] = true;
        $bookmarksite['utf8encode'] = false;
        print_table_header($vbphrase['add_new_social_bookmarking_site']);
    }
    print_input_row($vbphrase['title'], 'title', $bookmarksite['title'], false, 50);
    print_input_row($vbphrase['icon'] . '<dfn>' . $vbphrase['icon_bookmarksite_help'] . '</dfn>', 'iconpath', $bookmarksite['iconpath'], true, 50);
    print_input_row($vbphrase['link'] . '<dfn>' . $vbphrase['link_replacement_variables_help'] . '</dfn>', 'url', $bookmarksite['url'], true, 50);
    print_input_row($vbphrase['display_order'], 'displayorder', $bookmarksite['displayorder'], true, 2);
    print_yes_no_row($vbphrase['active'], 'active', $bookmarksite['active']);
    print_yes_no_row($vbphrase['utf8encode_title'] . '<dfn>' . $vbphrase['utf8encode_title_help'] . '</dfn>', 'utf8encode', $bookmarksite['utf8encode']);
    print_submit_row();
}
// #############################################################################
// quick update of active and display order fields
if ($_POST['do'] == 'quickupdate') {
    $vbulletin->input->clean_array_gpc('p', array('active' => TYPE_ARRAY_BOOL, 'displayorder' => TYPE_ARRAY_UINT, 'displayorderswap' => TYPE_CONVERT_KEYS));
    $changes = false;
    $update_ids = '0';
    $update_active = '';
    $update_displayorder = '';
    $bookmarksites_result = $db->query_read("SELECT bookmarksiteid, displayorder, active FROM " . TABLE_PREFIX . "bookmarksite");
    while ($bookmarksite = $db->fetch_array($bookmarksites_result)) {
        if (intval($bookmarksite['active']) != $vbulletin->GPC['active']["{$bookmarksite['bookmarksiteid']}"] or $bookmarksite['displayorder'] != $vbulletin->GPC['displayorder']["{$bookmarksite['bookmarksiteid']}"]) {
            $update_ids .= ",{$bookmarksite['bookmarksiteid']}";
            $update_active .= " WHEN {$bookmarksite['bookmarksiteid']} THEN " . intval($vbulletin->GPC['active']["{$bookmarksite['bookmarksiteid']}"]);
            $update_displayorder .= " WHEN {$bookmarksite['bookmarksiteid']} THEN " . $vbulletin->GPC['displayorder']["{$bookmarksite['bookmarksiteid']}"];
コード例 #30
0
ファイル: prefix.php プロジェクト: holandacz/nb4
        if (isset($prefixsets["{$prefix['prefixsetid']}"])) {
            $prefixsets["{$prefix['prefixsetid']}"]['prefixes']["{$prefix['prefixid']}"] = $prefix;
        }
    }
    print_form_header('prefix', 'displayorder');
    print_table_header($vbphrase['thread_prefixes'], 3);
    if (!$prefixsets) {
        print_description_row($vbphrase['no_prefix_sets_defined_click_create'], false, 3, '', 'center');
    } else {
        // display existing sets
        foreach ($prefixsets as $prefixset) {
            print_cells_row(array(htmlspecialchars_uni($vbphrase["prefixset_{$prefixset['prefixsetid']}_title"]), '<input type="text" size="3" class="bginput" name="prefixset_order[' . $prefixset['prefixsetid'] . ']" value="' . $prefixset['displayorder'] . '" />', '<div align="right" class="smallfont">' . construct_link_code($vbphrase['add_prefix'], "prefix.php?do=addprefix&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['edit'], "prefix.php?do=editset&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteset&amp;prefixsetid={$prefixset['prefixsetid']}") . '</div>'), 1);
            if (!$prefixset['prefixes']) {
                print_description_row(construct_phrase($vbphrase['no_prefixes_defined_click_create'], $prefixset['prefixsetid']), false, 3, '', 'center');
            } else {
                foreach ($prefixset['prefixes'] as $prefix) {
                    print_cells_row(array(htmlspecialchars_uni($vbphrase["prefix_{$prefix['prefixid']}_title_plain"]), '<input type="text" size="3" class="bginput" name="prefix_order[' . $prefix['prefixid'] . ']" value="' . $prefix['displayorder'] . '" />', '<div align="right" class="smallfont">' . construct_link_code($vbphrase['edit'], "prefix.php?do=editprefix&amp;prefixid={$prefix['prefixid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteprefix&amp;prefixid={$prefix['prefixid']}") . '</div>'));
                }
            }
        }
    }
    print_submit_row($vbphrase['save_display_order'], false, 3);
    echo '<p align="center">' . construct_link_code($vbphrase['add_prefix_set'], 'prefix.php?do=addset') . '</p>';
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 27175 $
|| ####################################################################
\*======================================================================*/