当前位置: 首页>>代码示例>>PHP>>正文


PHP fetch_row_bgclass函数代码示例

本文整理汇总了PHP中fetch_row_bgclass函数的典型用法代码示例。如果您正苦于以下问题:PHP fetch_row_bgclass函数的具体用法?PHP fetch_row_bgclass怎么用?PHP fetch_row_bgclass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了fetch_row_bgclass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_statistic_result

function print_statistic_result($date, $bar, $value, $width)
{
    global $vbulletin;
    $bgclass = fetch_row_bgclass();
    $style = 'width:' . $width . '%; ' . 'height:' . vB_Template_Runtime::fetchStyleVar('pollbar_height') . '; ' . 'border:' . vB_Template_Runtime::fetchStyleVar('pollbar_border') . '; ' . 'background:' . vB_Template_Runtime::fetchStyleVar('pollbar' . $bar . '_background') . '; ';
    echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n";
    echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><div style="' . $style . '">&nbsp;</div></td>' . "\n";
    echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n";
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:9,代码来源:adminfunctions_stats.php

示例2: print_statistic_result

function print_statistic_result($date, $bar, $value, $width)
{
    global $vbulletin;
    $bgclass = fetch_row_bgclass();
    $style = 'width:' . $width . '%; ' . 'height: 23px; ' . 'border:' . vB_Template_Runtime::fetchStyleVar('poll_result_border') . '; ' . 'background:' . vB_Template_Runtime::fetchStyleVar('poll_result_color_' . str_pad(strval(intval($bar)), 2, '0', STR_PAD_LEFT)) . '; ';
    echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n";
    echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><div style="' . $style . '">&nbsp;</div></td>' . "\n";
    echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n";
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:9,代码来源:adminfunctions_stats.php

示例3: downloads_categories_admin

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) {
            $categories += downloads_categories_admin($category['id'], $categories, $spacer . '- - ');
        }
    }
    $db->free_result($result);
    return $categories;
}
开发者ID:Kheros,项目名称:MMOver,代码行数:20,代码来源:downloads2.php

示例4: print_statistic_result

function print_statistic_result($date, $bar, $value, $width)
{
    global $stylevars, $vbulletin;
    $bgclass = fetch_row_bgclass();
    if (preg_match('#^(https?://|/)#i', $stylevars['imgdir_poll'])) {
        $imgpath = $stylevars['imgdir_poll'];
    } else {
        $imgpath = '../' . $stylevars['imgdir_poll'];
    }
    if ($vbulletin->userinfo['lang_options'] & $vbulletin->bf_misc_languageoptions['direction']) {
        // ltr
        $l_img = 'l';
        $r_img = 'r';
    } else {
        // rtl
        $l_img = 'r';
        $r_img = 'l';
    }
    echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n";
    echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><img src="' . $imgpath . '/bar' . "{$bar}-{$l_img}" . '.gif" height="10" /><img src="' . $imgpath . '/bar' . $bar . '.gif" width="' . $width . '%" height="10" /><img src="' . $imgpath . "/bar{$bar}-{$r_img}.gif\" height=\"10\" /></td>\n";
    echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n";
}
开发者ID:holandacz,项目名称:nb4,代码行数:22,代码来源:adminfunctions_stats.php

示例5: array

    $vbulletin->input->clean_array_gpc('r', array('bbcodeid' => TYPE_UINT));
    if ($bbcode = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "bbcode WHERE bbcodeid = " . $vbulletin->GPC['bbcodeid'])) {
        $parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
        $parsed_code = $parser->do_parse($bbcode['bbcodeexample'], false, false, true, false, true);
        echo $parsed_code;
    }
}
// ####################################### MODIFY #####################################
if ($_REQUEST['do'] == 'modify') {
    $parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
    $bbcodes = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "bbcode");
    print_form_header('bbcode', 'add');
    print_table_header($vbphrase['bb_code_manager'], 6);
    print_cells_row(array($vbphrase['title'], $vbphrase['bb_code'], $vbphrase['html'], $vbphrase['replacement'], $vbphrase['button_image'], $vbphrase['controls']), 1, '', -5);
    while ($bbcode = $db->fetch_array($bbcodes)) {
        $class = fetch_row_bgclass();
        $altclass = iif($class == 'alt1', 'alt2', 'alt1');
        $parsed_code = $parser->do_parse($bbcode['bbcodeexample'], false, false, true, false, true);
        $cell = array("<b>{$bbcode['title']}</b>", "<div class=\"{$altclass}\" style=\"padding:2px; border:solid 1px; width:200px; height:75px; overflow:auto\"><span class=\"smallfont\">" . htmlspecialchars_uni($bbcode['bbcodeexample']) . '</span></div>', "<div class=\"{$altclass}\" style=\"padding:2px; border:solid 1px; width:200px; height:75px; overflow:auto\"><span class=\"smallfont\">" . htmlspecialchars_uni($parsed_code) . '</span></div>', '<iframe src="bbcode.php?do=previewbbcode&amp;bbcodeid=' . $bbcode['bbcodeid'] . '" style="width:200px; height:75px;"></iframe>');
        if ($bbcode['buttonimage']) {
            $src = $bbcode['buttonimage'];
            if (!preg_match('#^[a-z]+://#i', $src) and $src[0] != '/') {
                $src = "../{$src}";
            }
            $cell[] = "<img style=\"background:buttonface; border:solid 1px highlight\" src=\"{$src}\" alt=\"\" />";
        } else {
            $cell[] = $vbphrase['n_a'];
        }
        $cell[] = construct_link_code($vbphrase['edit'], "bbcode.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;bbcodeid={$bbcode['bbcodeid']}") . construct_link_code($vbphrase['delete'], "bbcode.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&amp;bbcodeid={$bbcode['bbcodeid']}");
        print_cells_row($cell, 0, $class, -4);
    }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:bbcode.php

示例6: print_form_header

    if ($totalavatars > 0) {
        print_form_header('usertools', 'avatar');
        construct_hidden_code('userid', $vbulletin->GPC['userid']);
        print_table_header($vbphrase['avatars_to_show_per_page_gcpuser'] . ': <input type="text" name="perpage" value="' . $vbulletin->GPC['perpage'] . '" size="5" tabindex="1" />
			<input type="submit" class="button" value="' . $vbphrase['go'] . '" tabindex="1" />
		');
        print_table_footer();
    }
    print_form_header('usertools', 'updateavatar', 1);
    print_table_header($vbphrase['avatars_gcpglobal']);
    $output = "<table border=\"0\" cellpadding=\"6\" cellspacing=\"1\" class=\"tborder\" align=\"center\" width=\"100%\">";
    foreach ($avatars as $avatar) {
        $avatarid = $avatar['avatarid'];
        $avatar['avatarpath'] = resolve_cp_image_url($avatar['avatarpath']);
        if ($avatarcount == 0) {
            $output .= '<tr class="' . fetch_row_bgclass() . '">';
        }
        $output .= "<td valign=\"bottom\" align=\"center\" width=\"20%\"><label for=\"av{$avatar['avatarid']}\"><input type=\"radio\" name=\"avatarid\" id=\"av{$avatar['avatarid']}\" value=\"{$avatar['avatarid']}\" tabindex=\"1\" {$avatarchecked[$avatarid]} />";
        $output .= "<img src=\"{$avatar['avatarpath']}\" alt=\"\" /><br />{$avatar['title']}</label></td>";
        $avatarcount++;
        if ($avatarcount == 5) {
            echo '</tr>';
            $avatarcount = 0;
        }
    }
    if ($avatarcount != 0) {
        while ($avatarcount != 5) {
            $output .= '<td>&nbsp;</td>';
            $avatarcount++;
        }
        echo '</tr>';
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:usertools.php

示例7: print_table_start

if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'list';
}
// ###################### Start list #######################
if ($_REQUEST['do'] == 'list') {
    $getusergroups = $db->query_read("\r\n\t\tSELECT usergroupid, title, ei_forumid\r\n\t\tFROM " . TABLE_PREFIX . "usergroup\r\n\t\tWHERE ei_auto = 1\r\n\t\tORDER BY `usergroupid`\r\n\t");
    print_table_start('admin_ei');
    print_table_header($vbphrase['ei_header_auto'], 2);
    print_description_row($vbphrase['ei_auto_how_to'], 0, 2);
    while ($getusergroup = $db->fetch_array($getusergroups)) {
        print_table_header($getusergroup['title'], 2);
        $forumlist = explode(",", $getusergroup['ei_forumid']);
        foreach ($forumlist as $key => $forumupdateid) {
            $getforuminfo = $db->query_read("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid = {$forumupdateid}");
            while ($foruminfo = $db->fetch_array($getforuminfo)) {
                $bg = fetch_row_bgclass();
                echo "<tr><td class=\"" . $bg . "\">" . $foruminfo['title'] . "</td><td class=\"" . $bg . "\"><a href=\"admin_ei.php?" . $vbulletin->session->vars['sessionurl'] . "do=autosub&f=" . $forumupdateid . "&ug=" . $getusergroup['usergroupid'] . "\">" . $vbphrase['ei_update_sub'] . "</a></td></tr>";
            }
        }
    }
    print_table_footer(2, '', '', 0);
}
// ###################### Start list #######################
if ($_REQUEST['do'] == 'autosub') {
    $vbulletin->input->clean_array_gpc('r', array('f' => TYPE_UINT, 'ug' => TYPE_UINT));
    $users = $db->query_read("\r\n\t\tSELECT userid, username\r\n\t\tFROM " . TABLE_PREFIX . "user\r\n\t\tWHERE usergroupid = '" . $vbulletin->GPC['ug'] . "' OR membergroupids REGEXP '^" . $vbulletin->GPC['ug'] . "\$|^" . $vbulletin->GPC['ug'] . ",|," . $vbulletin->GPC['ug'] . ",|," . $vbulletin->GPC['ug'] . "\$'\r\n\t\tORDER BY `userid`\r\n\t");
    while ($user = $db->fetch_array($users)) {
        $db->query_write("\r\n\t\t\t\t\t\t\t\tREPLACE INTO " . TABLE_PREFIX . "subscribeforum (userid, emailupdate, forumid)\r\n\t\t\t\t\t\t\t\tVALUES ('" . $user['userid'] . "', 1, '" . $vbulletin->GPC['f'] . "')\r\n\t\t\t\t\t\t\t");
        echo $vbphrase['ei_auto_updated'] . $user['username'] . "<br>";
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:admin_ei.php

示例8: unserialize

    $readonly = 1;
    $template = $db->query_first("\n\t\tSELECT title, template\n\t\tFROM " . TABLE_PREFIX . "template\n\t\tWHERE title = '" . $db->escape_string($vbulletin->GPC['item']) . "'\n\t\t\tAND styleid = -1\n\t\t\tAND templatetype = 'stylevar'\n\t");
    $css["{$template['title']}"] = unserialize($template['template']);
    $css["{$template['title']}"]['styleid'] = -1;
    print_form_header('', '');
    print_css_row($title . ' (default)', $vbulletin->GPC['item'], $dolinks, 0);
    print_table_footer(2, '<input type="button" class="button" value="' . $vbphrase['close'] . '" onclick="self.close();" tabindex="1" />');
}
// ###################### Start List StyleVar Colors #######################
if ($_REQUEST['do'] == 'stylevar-colors') {
    // use 'dostyleid'from GPC
    if ($vbulletin->GPC['dostyleid'] != 0 and $style = $db->query_first("\n\t\tSELECT * FROM " . TABLE_PREFIX . "style\n\t\tWHERE styleid = " . $vbulletin->GPC['dostyleid'])) {
        print_form_header('', '');
        foreach (unserialize($style['csscolors']) as $colorname => $colorvalue) {
            if (preg_match('#^[a-z0-9_]+_hex$#siU', $colorname)) {
                echo "<tr><td class=\"" . fetch_row_bgclass() . "\">{$colorname}</td><td style=\"background-color:#{$colorvalue}\" title=\"#{$colorvalue}\">#{$colorvalue}</td></tr>";
            }
        }
        print_table_footer();
    } else {
        // fail.
        $_REQUEST['do'] = 'modify';
    }
}
// ###################### Start List styles #######################
if ($_REQUEST['do'] == 'modify') {
    print_form_header('css', 'edit');
    print_table_header($vbphrase['edit_styles']);
    if ($vbulletin->debug) {
        print_label_row('<b>' . $vbphrase['master_style'] . '</b>', construct_link_code($vbphrase['edit'], "css.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;dostyleid=-1") . construct_link_code($vbphrase['templates'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "expandset={$style['styleid']}"));
        $depthmark = '--';
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:css.php

示例9: makeTable

function makeTable($section, $recordset)
{
    require_once DIR . '/includes/adminfunctions.php';
    global $vbphrase;
    $result = "\n\t<input type=\"hidden\" name=\"sectionid\" id=\"sectionid\" value=\"" . $section['nodeid'] . "\" />\n\t<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"100%\" class=\"tborder\" style=\"border-collapse: separate;\">\n\t<tr class=\"thead\">\n\t<td colspan=\"6\"> " . $section['title'] . "\n\t<!-- <tbody> -->\n\t</td>\n\t</tr>\n\t<tr class=\"tcat\">\n\t<td class=\"feature_management_header\" style=\"padding:5px;\"> " . (intval($vbulletin->GPC['sectionid']) == intval($section['permissionsfrom']) ? construct_phrase($vbphrase['permissions_assigned_section_x'], $section['title']) : construct_phrase($vbphrase['permissions_not_assigned_section_x'], $section['title'])) . "\n\t\t<input type=\"button\" id=\"button_change_section\" onclick=\"showNodeWindow('filter_section')\" value=\"" . $vbphrase['navigate_to_section'] . "\" />\n\t\t</td>\n\t\t</tr>\n\t\t<tr><td><table class=\"tborder\" cellpadding=\"4\" border=\"0\" width=\"100%\" >\n\t\t<tr class=\"thead\">\n\t\t\t<td width=\"40%\">\n\t\t\t\t" . $vbphrase['user_group'] . "\n\t\t\t</td>";
    $table_columns = array('can_read' => array('groupid' => 1, 'permid' => VBCMS_PERM_READ), 'can_download' => array('groupid' => 2, 'permid' => VBCMS_PERM_DOWNLOAD), 'create_content' => array('groupid' => 3, 'permid' => VBCMS_PERM_CREATE), 'edit_others_content' => array('groupid' => 4, 'permid' => VBCMS_PERM_EDITOTHERS), 'can_publish' => array('groupid' => 5, 'permid' => VBCMS_PERM_PUBLISH), 'can_use_html' => array('groupid' => 6, 'permid' => VBCMS_PERM_HTML));
    foreach ($table_columns as $table_column_phrase => $table_column_info) {
        $table_column_groupid = $table_column_info['groupid'];
        $table_column_permid = $table_column_info['permid'];
        $result .= "<td width=\"12%\" align=\"center\" valign=\"top\">\n\t\t\t" . $vbphrase[$table_column_phrase] . "\n\t\t\t<select id=\"change_selection_permid_" . $table_column_permid . "\" onchange=\"javascript: toggleCheckBox('cb', '" . $table_column_groupid . "', document.getElementById('count').value, this.value);\">\n\t\t\t\t<option></option>\n\t\t\t\t<option value=\"1\">" . $vbphrase['select_all'] . "</option>\n\t\t\t\t<option value=\"0\">" . $vbphrase['deselect_all'] . "</option>\n\t\t\t\t<option value=\"-1\">" . $vbphrase['invert_selection'] . "</option>\n\t\t\t</select>\n\t\t</td>\n\t\t";
    }
    $result .= "</tr>";
    $count = 0;
    while ($row = vB::$db->fetch_array($recordset)) {
        $count++;
        $bgclass = fetch_row_bgclass();
        $result .= "\n\t<tr id=\"usergroupid_{$row['usergroupid']}\" class=\"{$bgclass}\" >\n\t\t<td>" . $row['title'] . "<input type=\"hidden\" name=\"groupid_{$count}\" value=\"" . $row['usergroupid'] . "\" />\n\t\t\t<input type=\"hidden\" name=\"permid_{$count}\" value=\"" . $row['permissionid'] . "\" />\n\t\t</td>\n\t\t<td id=\"usergroupid_{$row['usergroupid']}_permissionid_" . VBCMS_PERM_READ . "\" align=\"center\"><input type=\"checkbox\" name=\"cb_1_{$count}\" id=\"cb_1_{$count}\" " . ($row['permissions'] & VBCMS_PERM_READ ? 'checked="checked"' : '') . " /></td>\n\t\t<td id=\"usergroupid_{$row['usergroupid']}_permissionid_" . VBCMS_PERM_DOWNLOAD . "\" align=\"center\"><input type=\"checkbox\" name=\"cb_2_{$count}\" id=\"cb_2_{$count}\" " . ($row['permissions'] & VBCMS_PERM_DOWNLOAD ? 'checked="checked"' : '') . " /></td>\n\t\t<td id=\"usergroupid_{$row['usergroupid']}_permissionid_" . VBCMS_PERM_CREATE . "\" align=\"center\"><input type=\"checkbox\" name=\"cb_3_{$count}\" id=\"cb_3_{$count}\" " . ($row['permissions'] & VBCMS_PERM_CREATE ? 'checked="checked"' : '') . " /></td>\n\t\t<td id=\"usergroupid_{$row['usergroupid']}_permissionid_" . VBCMS_PERM_EDITOTHERS . "\" align=\"center\"><input type=\"checkbox\" name=\"cb_4_{$count}\" id=\"cb_4_{$count}\" " . ($row['permissions'] & VBCMS_PERM_EDITOTHERS ? 'checked="checked"' : '') . " /></td>\n\t\t<td id=\"usergroupid_{$row['usergroupid']}_permissionid_" . VBCMS_PERM_PUBLISH . "\" align=\"center\"><input type=\"checkbox\" name=\"cb_5_{$count}\" id=\"cb_5_{$count}\" " . ($row['permissions'] & VBCMS_PERM_PUBLISH ? 'checked="checked"' : '') . " /></td>\n\t\t<td id=\"usergroupid_{$row['usergroupid']}_permissionid_" . VBCMS_PERM_HTML . "\" align=\"center\"><input type=\"checkbox\" name=\"cb_6_{$count}\" id=\"cb_6_{$count}\" " . ($row['permissions'] & VBCMS_PERM_HTML ? 'checked="checked"' : '') . " /></td>\n\t</tr>\n\t\t";
    }
    $result .= "</table>\n\t\t</td>\n\t\t</tr>\n\t<!-- </tbody> -->\n</table>";
    $result .= "<input type=\"hidden\" name=\"count\" id=\"count\" value=\"{$count}\" />\n";
    return $result;
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:22,代码来源:cms_permissions.php

示例10: print_description_row

		<br />&nbsp;
	</td></tr>

	<?php 
    if (!$vbulletin->options['skimlinks_enabled'] && !empty($skimlinks_pub_id)) {
        print_description_row($vbphrase['skimlinks_global_status'], false, 2, 'thead skimdisabledalert');
        print_description_row($vbphrase['skimlinks_gloabal_is_off'], false, 2, 'alt1 skimLinksInfo skimdisabledalert');
    }
    print_description_row($vbphrase['skimlinks_global_options'], false, 2, 'thead');
    print_description_row($vbphrase['skimlinks_global_enable'], false, 2, fetch_row_bgclass() . ' skimLinksInfo');
    print_yes_no_row($vbphrase['skimlinks_enabled'], 'skimlinks_enabled', $vbulletin->options['skimlinks_enabled'], 'skimEnableSubmit();');
    print_description_row($vbphrase['skimlinks_to_enable_products'], false, 2, fetch_row_bgclass() . ' skimLinksInfo');
    print_label_row($vbphrase['skimlinks_pub_id'], "<div id=\"ctrl_skimlinks_pub_id\" style=\"float: left;\"><input type=\"text\" class=\"bginput\" name=\"skimlinks_pub_id\" id=\"skimlinks_pub_id\" value=\"" . htmlspecialchars_uni($skimlinks_pub_id) . "\" readonly=\"readonly\" size=\"25\" style=\"background-color: #f6f6f6; border-color: #f6f6f6;\" /></div>" . (!empty($skimlinks_pub_id) ? '<div style="float: right; margin-right: 8px;"><a href="javascript:void(0);" onclick="skimDissociate();" id="skim_dissociate_link"><small>' . $vbphrase['skimlinks_dissociate_account'] . '</small></a></div><div style="clear: both; heigh: 0; line-height: 0;"></div>' : ''), '', 'top', skimlinks_pub_id);
    print_description_row($vbphrase['skimlinks_global_settings_description'], false, 2, 'alt1 skimLinksInfo');
    print_description_row($vbphrase['skimlinks_product_level_options'], false, 2, 'thead');
    print_description_row('<div style="font-size: 11px; margin: 4px 0;">' . $vbphrase['skimlinks_product_level_options_description'] . '</div>', false, 2, fetch_row_bgclass() . ' skimLinksInfo');
    print print_submit_row();
    ?>
	<script type="text/javascript">
	document.getElementById('cpform').addEventListener("submit", function (e) { promptchange = false; },false);
	$(function() {
		$('input[type=submit], input[type=reset]').attr('disabled', 'disabled');
	});
	</script>
	<?php 
}
function getCheckbox($name, $value = 1, $checked = true, array $attributes = null)
{
    $attributeString = '';
    if (is_array($attributes)) {
        foreach ($attributes as $attribute => $value) {
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:skimlinks.php

示例11: print_yes_no_row

        $row[] = $currow[0];
        if ($currow[0] != TABLE_PREFIX . 'word' and $currow[0] != TABLE_PREFIX . 'postindex') {
            print_yes_no_row($currow[0], "table[{$currow['0']}]", 1);
        }
    }
    print_yes_no_row(TABLE_PREFIX . 'word', "table[" . TABLE_PREFIX . "word]", 1);
    print_yes_no_row(TABLE_PREFIX . 'postindex', "table[" . TABLE_PREFIX . "postindex]", 1);
    print_submit_row($vbphrase['go']);
    print_form_header('backup', 'sqlfile');
    print_table_header($vbphrase['backup_database_to_a_file_on_the_server']);
    print_description_row($vbphrase['backup_file_warning']);
    print_input_row($vbphrase['path_and_file_to_save_backup_to'], 'filename', './forumbackup-' . vbdate(str_replace(array('\\', '/', ' '), '', $vbulletin->options['dateformat']), TIMENOW) . '-' . substr(md5(TIMENOW), 0, 5) . '.sql', 0, 60);
    print_submit_row($vbphrase['save']);
    print_form_header('backup', 'csvtable');
    print_table_header($vbphrase['csv_backup_of_single_database_table']);
    echo "<tr class='" . fetch_row_bgclass() . "'>\n<td><p>" . $vbphrase['table_name'] . "</p></td>\n<td><p>";
    echo "<select name=\"table\" size=\"1\" tabindex=\"1\" class=\"bginput\">\n";
    foreach ($row as $table) {
        echo '<option value="' . htmlspecialchars_uni($table) . '">' . htmlspecialchars_uni($table) . "</option>\n";
    }
    echo "</select></p></td></tr>\n\n";
    print_input_row($vbphrase['separator_character'], 'separator', ',');
    print_input_row($vbphrase['quote_character'], 'quotes', "'");
    print_yes_no_row($vbphrase['add_column_names'], 'showhead', 1);
    print_submit_row($vbphrase['go']);
}
// ###################### Dumping to SQL File ####################
if ($_POST['do'] == 'sqlfile') {
    $vbulletin->input->clean_array_gpc('p', array('filename' => TYPE_STR));
    if (is_demo_mode()) {
        print_cp_message('This function is disabled within demo mode');
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:backup.php

示例12: makeTable

function makeTable($section, $recordset)
{
	require_once(DIR . '/includes/adminfunctions.php');
	global $vbphrase;
	$result = "
	<input type=\"hidden\" name=\"sectionid\" id=\"sectionid\" value=\"" . $section['nodeid'] . "\" />
	<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"100%\" class=\"tborder\" style=\"border-collapse: separate;\">
	<tr class=\"thead\">
	<td colspan=\"6\"> " . $section['title'] . "
	<!-- <tbody> -->
	</td>
	</tr>
	<tr class=\"tcat\">
	<td class=\"feature_management_header\" style=\"padding:5px;\"> " .
		(
			intval($vbulletin->GPC['sectionid']) == intval($section['permissionsfrom']) ?
			construct_phrase($vbphrase['permissions_assigned_section_x'], $section['title']) :
			construct_phrase($vbphrase['permissions_not_assigned_section_x'], $section['title'])
		) . "
		<input type=\"button\" onclick=\"showNodeWindow('filter_section')\" value=\"" . $vbphrase['navigate_to_section'] ."\" />
		</td>
		</tr>
		<tr><td><table class=\"tborder\" cellpadding=\"4\" border=\"0\" width=\"100%\" >
		<tr class=\"thead\">
			<td width=\"40%\">
				" . $vbphrase['user_group'] . "
			</td>";

	$table_columns = array(
		'can_read'            => 1,
		'can_download'        => 2,
		'create_content'      => 3,
		'edit_others_content' => 4,
		'can_publish'         => 5,
		'can_use_html'        => 6,
	);
	foreach ($table_columns AS $table_column_phrase => $table_column_groupid)
	{
		$result .= "<td width=\"12%\" align=\"center\" valign=\"top\">
			" . $vbphrase[$table_column_phrase] . "
			<select onchange=\"javascript: toggleCheckBox('cb', '" . $table_column_groupid . "', document.getElementById('count').value, this.value);\">
				<option></option>
				<option value=\"1\">" . $vbphrase['select_all'] . "</option>
				<option value=\"0\">" . $vbphrase['deselect_all'] . "</option>
				<option value=\"-1\">" . $vbphrase['invert_selection'] . "</option>
			</select>
		</td>
		";
	}
	$result .= "</tr>";

	$count = 0;
	while($row = vB::$db->fetch_array($recordset))
	{
		$count++;
		$bgclass = fetch_row_bgclass();
		$result .= "
	<tr class=\"$bgclass\" >
		<td>" . $row['title'] ."<input type=\"hidden\" name=\"groupid_$count\" value=\"" . $row['usergroupid'] . "\" />
			<input type=\"hidden\" name=\"permid_$count\" value=\"" . $row['permissionid'] . "\" />
		</td>
		<td align=\"center\"><input type=\"checkbox\" name=\"cb_1_$count\" id=\"cb_1_$count\" " . ( ($row['permissions'] & 1) ? 'checked="checked"' : '')
			." /></td>
			<td align=\"center\"><input type=\"checkbox\" name=\"cb_2_$count\" id=\"cb_2_$count\" " . ( ($row['permissions'] & 32) ? 'checked="checked"' : '')
			." /></td>
			<td align=\"center\"><input type=\"checkbox\" name=\"cb_3_$count\" id=\"cb_3_$count\" " . ( ($row['permissions'] & 2) ? 'checked="checked"' : '')
			."  /></td>
				<td align=\"center\"><input type=\"checkbox\" name=\"cb_4_$count\" id=\"cb_4_$count\" " . ( ($row['permissions'] & 4) ? 'checked="checked"' : '')
			." /></td>
				<td align=\"center\"><input type=\"checkbox\" name=\"cb_5_$count\" id=\"cb_5_$count\" " . ( ($row['permissions'] & 8) ? 'checked="checked"' : '')
			." /></td>
			<td align=\"center\"><input type=\"checkbox\" name=\"cb_6_$count\" id=\"cb_6_$count\" " . ( ($row['permissions'] & 16) ? 'checked="checked"' : '')
			."  /></td>
	</tr>	";
	}
	$result .= "</table>
		</td>
		</tr>
	<!-- </tbody> -->
</table>";
	$result .= "<input type=\"hidden\" name=\"count\" id=\"count\" value=\"$count\" />\n";
	return $result;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:83,代码来源:cms_permissions.php

示例13: photoplog_make_field_form

function photoplog_make_field_form($fielddata_inputs, $catid, $fieldtype, $fieldid, $donext)
{
    global $vbulletin, $vbphrase, $photoplog_fieldtypes;
    $doadd = $donext == 'doadd';
    $fielddata = array('name' => '', 'groupid' => '0', 'title' => '', 'description' => '', 'maxlength' => '100', 'default' => '1', 'size' => '40', 'height' => '8', 'options' => '', 'limit' => '0', 'perline' => '2', 'active' => '1', 'hidden' => '0', 'required' => '0', 'inherited' => '1');
    if ($fieldtype <= 1) {
        $fielddata['default'] = '';
    }
    if ($fieldtype == 1) {
        $fielddata['maxlength'] = '1000';
    }
    foreach ($fielddata_inputs as $fielddata_name => $fielddata_value) {
        $fielddata[$fielddata_name] = $fielddata_value;
    }
    $catname = intval($catid) == -1 ? $vbphrase['photoplog_all_categories'] : photoplog_get_category_title($catid);
    print_form_header('photoplog_field', $donext);
    construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
    construct_hidden_code('catid', $catid);
    if ($doadd) {
        construct_hidden_code('fieldtype', $fieldtype);
        print_table_header($vbphrase['photoplog_add_new_field'], 2);
    } else {
        construct_hidden_code('fieldid', $fieldid);
        print_table_header($vbphrase['photoplog_edit_field'], 2);
    }
    // NOTE THAT htmlspecialchars_uni is automatically done by the below functions unless turned off! EXCEPT label_row!
    print_label_row($vbphrase['photoplog_category'], htmlspecialchars_uni($catname));
    print_label_row($vbphrase['photoplog_field_type'], htmlspecialchars_uni($photoplog_fieldtypes[$fieldtype]));
    if ($doadd) {
        $photoplog_available_groups = photoplog_make_available_groups($catid);
        if (empty($photoplog_available_groups)) {
            print_input_row(photoplog_row_info('photoplog_field_name', 'photoplog_field_name_description', 50), 'fielddata[name]', $fielddata['name']);
        } else {
            $photoplog_available_groups['0'] = $vbphrase['photoplog_select_name_or_enter_below'];
            ksort($photoplog_available_groups);
            print_radio_row(photoplog_row_info('photoplog_field_name', 'photoplog_field_name_select_description', 50), 'fielddata[groupid]', $photoplog_available_groups, '0', 'smallfont');
            $bgclass = fetch_row_bgclass();
            print_input_row(photoplog_row_info('', 'photoplog_field_name_description'), 'fielddata[name]', $fielddata['name']);
        }
    } else {
        print_label_row($vbphrase['photoplog_field_name'], htmlspecialchars_uni($fielddata['name']));
    }
    print_input_row(photoplog_row_info('photoplog_field_title', 'photoplog_field_title_description', 50), 'fielddata[title]', $fielddata['title']);
    print_input_row(photoplog_row_info('photoplog_field_description', 'photoplog_field_description_description', 250), 'fielddata[description]', $fielddata['description']);
    if ($fieldtype <= 1) {
        print_input_row(photoplog_row_info('photoplog_field_maxlength', 'photoplog_field_maxlength_description'), 'fielddata[maxlength]', $fielddata['maxlength']);
        print_input_row(photoplog_row_info('photoplog_field_default', 'photoplog_field_default_description_text'), 'fielddata[default]', $fielddata['default']);
        print_input_row(photoplog_row_info('photoplog_field_size', 'photoplog_field_size_description'), 'fielddata[size]', $fielddata['size']);
    }
    if ($fieldtype == 1) {
        print_input_row(photoplog_row_info('photoplog_field_height', 'photoplog_field_height_description_text'), 'fielddata[height]', $fielddata['height']);
    }
    if ($fieldtype >= 2 && $fieldtype <= 5) {
        print_textarea_row(photoplog_row_info('photoplog_field_options', 'photoplog_field_options_description'), 'fielddata[options]', $fielddata['options'], 8, 40);
        print_yes_no_row(photoplog_row_info('photoplog_field_default', 'photoplog_field_default_description_select'), 'fielddata[default]', $fielddata['default']);
    }
    if ($fieldtype == 4 || $fieldtype == 2) {
        print_input_row(photoplog_row_info('photoplog_field_height', 'photoplog_field_height_description_select'), 'fielddata[height]', $fielddata['height']);
    }
    if ($fieldtype >= 4) {
        print_input_row(photoplog_row_info('photoplog_field_limit', 'photoplog_field_limit_description'), 'fielddata[limit]', $fielddata['limit']);
    }
    if ($fieldtype == 3) {
        print_input_row(photoplog_row_info('photoplog_field_perline_radio', 'photoplog_field_perline_radio_description'), 'fielddata[perline]', $fielddata['perline']);
    }
    if ($fieldtype == 5) {
        print_input_row(photoplog_row_info('photoplog_field_perline_checkbox', 'photoplog_field_perline_checkbox_description'), 'fielddata[perline]', $fielddata['perline']);
    }
    print_yes_no_row(photoplog_row_info('photoplog_field_active', 'photoplog_field_active_description'), 'fielddata[active]', $fielddata['active']);
    print_yes_no_row(photoplog_row_info('photoplog_field_hidden', 'photoplog_field_hidden_description'), 'fielddata[hidden]', $fielddata['hidden']);
    print_yes_no_row(photoplog_row_info('photoplog_field_required', 'photoplog_field_required_description'), 'fielddata[required]', $fielddata['required']);
    print_yes_no_row(photoplog_row_info('photoplog_field_inherited', 'photoplog_field_inherited_description'), 'fielddata[inherited]', $fielddata['inherited']);
    print_submit_row($vbphrase['photoplog_save'], '_default_', 2, $vbphrase['go_back']);
}
开发者ID:holandacz,项目名称:nb4,代码行数:74,代码来源:photoplog_field.php

示例14: listSections

	public static function listSections($page, $per_page = 10)
	{
		global $vbphrase;
		global $vbulletin;
		require_once DIR . '/includes/functions_databuild.php';
		fetch_phrase_group('cpcms');

		$sectionid = ( ($vbulletin->GPC_exists['sectionid'] AND intval($vbulletin->GPC['sectionid']))?
			$vbulletin->GPC['sectionid'] : false);

		$sections = self::getSection($sectionid);

		if ($record_count = count($sections))
		{
			$sections = array_slice($sections, ($page-1) * $per_page, $per_page, true);
			$parent = $vbulletin->db->query_first($sql = "SELECT info.title FROM " .
				TABLE_PREFIX . "cms_node AS node INNER JOIN " . TABLE_PREFIX .
				"cms_nodeinfo AS info ON info.nodeid = node.nodeid
				WHERE " .
				( $sectionid ?
					" node.nodeid = " . $sectionid : " node.nodeid IS NULL" ));
			$i = 1;

			$result = print_form_header('cms_content_admin', '', false, true, 'cms_data', '100%', '_self',
					true, 'post', 0, false);
			$result .= "<input type=\"hidden\" id=\"sectionid\" value=\"" .
				( $sectionid ? $sectionid :'') .	"\" name=\"sectionid\"/>
			<input type=\"hidden\" name=\"sentfrom\" id=\"section\" value=\"section\"/>
			<input type=\"hidden\" name=\"id\" id=\"id\" value=\"0\"/>";

			$result .= self::getSectionHeaders($sectionid) . "<br />\n";
			$result .= "<tr class=\"tcat\">
					<td class=\"feature_management_header\" style=\"padding:5px;float:" . vB_Template_Runtime::fetchStyleVar('left') . ";\"><div style=\"float:" . vB_Template_Runtime::fetchStyleVar('left') . "\">
					" . $vbphrase['you_are_managing'] . " " . $vbphrase['section'] . ": <span class=\"section_name\">" . $parent['title'] .
					($vbulletin->GPC_exists['sectionid'] ? '' : '(' . $vbphrase['all_sections'] .')') . "</span>
					<input type=\"button\" onclick=\"showNodeWindow('filter_section')\" value=\"" . $vbphrase['navigate_to_section'] ."\">
					"
					.  "
					</div>
					</td>
					</tr>";
			$result.= "<tr><td>\n";
			$result .= "<div style=\"overflow:auto;margin: auto;\">
			<table class=\"tborder\" cellpadding=\"4\" border=\"0\" width=\"100%\" align=\"center\">\n";
			$bgclass = fetch_row_bgclass();
			$result .= "<tr align=\"center\" class=\"thead\">\n";
			$result .= "<td class=\"thead\" width=\"20\">#</td>
				<td class=\"thead\" align=\"" . vB_Template_Runtime::fetchStyleVar('left') . "\" width=\"400\"><a href=\"cms_content_admin.php?do=sort&sentfrom=section&sortby=config4.value\" target=\"_self\">" . $vbphrase['title'] . "</a></td>
				<td class=\"thead\"><a href=\"cms_content_admin.php?do=sort&sentfrom=section&sortby=setpublish\">" . $vbphrase['published'] . "</a></td>
				<td class=\"thead\">" . $vbphrase['content_layout'] . "</td>
				<td class=\"thead\"><a href=\"cms_content_admin.php?do=sort&sentfrom=section&sortby=auto_displayorder\" target=\"_self\">" . $vbphrase['display_order'] . "</a></td>
				<td class=\"thead\" width=\"50\">" . $vbphrase['records_per_page'] . "</td>
				<td class=\"thead\">" . $vbphrase['subsections'] . "</td>
				<td class=\"thead\">" . $vbphrase['content'] . "</td>
				<td class=\"thead\">" . $vbphrase['viewcount'] . "</td>".
/*				<td class=\"thead\">" . $vbphrase['layout'] . "</td>
				<td class=\"thead\">" . $vbphrase['style'] . "</td> */
			" </tr>";
			$sequence = 0;

			foreach($sections as $key => $section)
			{
				$sequence++;
				$first_selected_parent_row_class = "";
				$change_display_order_buttons = "";
				$section_name_prefix = ((vB_Template_Runtime::fetchStyleVar('textdirection') == 'ltr') ?
						'&gt;' : '&gt;');

				if ($sequence == 1 AND $page == 1)
				{
					$first_selected_parent_row_class = " class=\"selected_parent_row\"";
					$section_name_prefix = "";
				}

				// for sub-sections, display up or down arrows to change the display order
				else
				{
					$change_display_order_buttons = "<div style=\"float:" . vB_Template_Runtime::fetchStyleVar('left') . "; width:32px;\">";
					// dont display up arrow if its already first section in list
					if ($sequence > 2 AND isset($sections[$key-1]))
					{
						$change_display_order_buttons .= "<a style=\"float:" . vB_Template_Runtime::fetchStyleVar('left') . ";\" href=\"javascript:swapSections(".$section['nodeid'].", ".$sections[$key-1]['nodeid'].")\"><img src=\"" . self::getImagePath('imgdir_cms') . "/arrow_up.png\" style=\"border-style:none\" /></a>";
					}
					// dont display down arrow is its already last section in list
					if ($sequence < count($sections) AND isset($sections[$key+1]))
					{
						$change_display_order_buttons .= "<a style=\"float:right;\" href=\"javascript:swapSections(".$section['nodeid'].", ".$sections[$key+1]['nodeid'].")\"><img src=\"" . self::getImagePath('imgdir_cms') . "/arrow_down.png\" style=\"border-style:none\" /></a>";
					}
					$change_display_order_buttons .= "</div>";
				}

				$bgclass = fetch_row_bgclass();
				$result .= "<tr" . $first_selected_parent_row_class . " align=\"center\">\n <input type=\"hidden\" name=\"ids[]\" value=\"" .
					$section['nodeid'] . "\" />\n";
				$result .= "  <td class=\"$bgclass\" style=\"font-size:80%;\">$sequence</td>\n";
				$result .= "  <td align=\"" . vB_Template_Runtime::fetchStyleVar('left') . "\" class=\"$bgclass\" style=\"font-size:80%;width:400px;\"><div class=\"sectionTitleWrapper\" style=\"width:400px;\">
					" . $change_display_order_buttons . $section_name_prefix . "<a href=\"./cms_content_admin.php?do=filter&sectionid=" . $section['nodeid'] . "&contenttypeid=" .
					vb_Types::instance()->getContentTypeID("vBCms_Section") .
						"\" target=\"_self\" >" . htmlspecialchars_uni($section['title']) . "</a>
						<div style=\"float:" . vB_Template_Runtime::fetchStyleVar('right') . "\">
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:contentmanager.php

示例15: print_membergroup_row

/**
* Prints a row containing a number of <input type="checkbox" /> fields representing a user's membergroups
*
* @param	string	Title for row
* @param	string	Base name for checkboxes - $name[]
* @param	integer	Number of columns to split checkboxes into
* @param	mixed	Either NULL or a user info array
*/
function print_membergroup_row($title, $name = 'membergroup', $columns = 0, $userarray = NULL)
{
    global $vbulletin, $iusergroupcache;
    $uniqueid = fetch_uniqueid_counter();
    if (!is_array($iusergroupcache)) {
        $iusergroupcache = array();
        $usergroups = $vbulletin->db->query_read("SELECT usergroupid,title FROM " . TABLE_PREFIX . "usergroup ORDER BY title");
        while ($usergroup = $vbulletin->db->fetch_array($usergroups)) {
            $iusergroupcache["{$usergroup['usergroupid']}"] = $usergroup['title'];
        }
        unset($usergroup);
        $vbulletin->db->free_result($usergroups);
    }
    // create a blank user array if one is not set
    if (!is_array($userarray)) {
        $userarray = array('usergroupid' => 0, 'membergroupids' => '');
    }
    $options = array();
    foreach ($iusergroupcache as $usergroupid => $grouptitle) {
        // don't show the user's primary group (if set)
        if ($usergroupid != $userarray['usergroupid']) {
            $options[] = "\t\t<div><label for=\"{$name}{$usergroupid}_{$uniqueid}\" title=\"usergroupid: {$usergroupid}\"><input type=\"checkbox\" tabindex=\"1\" name=\"{$name}" . "[]\" id=\"{$name}{$usergroupid}_{$uniqueid}\" value=\"{$usergroupid}\"" . iif(strpos(",{$userarray['membergroupids']},", ",{$usergroupid},") !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;{$name}&quot;\"") . " />{$grouptitle}</label></div>\n";
        }
    }
    $class = fetch_row_bgclass();
    if ($columns > 1) {
        $html = "\n\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr valign=\"top\">\n";
        $counter = 0;
        $totaloptions = sizeof($options);
        $percolumn = ceil($totaloptions / $columns);
        for ($i = 0; $i < $columns; $i++) {
            $html .= "\t<td class=\"{$class}\"><span class=\"smallfont\">\n";
            for ($j = 0; $j < $percolumn; $j++) {
                $html .= $options[$counter++];
            }
            $html .= "\t</span></td>\n";
        }
        $html .= "</tr></table>\n\t";
    } else {
        $html = "<div id=\"ctrl_{$name}\" class=\"smallfont\">\n" . implode('', $options) . "\t</div>";
    }
    print_label_row($title, $html, $class, 'top', $name);
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:51,代码来源:adminfunctions.php


注:本文中的fetch_row_bgclass函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。