コード例 #1
0
ファイル: style.php プロジェクト: cedwards-reisys/nexus-web
 /**
  * Fetch All styles
  *
  * @param 	bool 	$withdepthmark If true, style title will be prepended with depth mark
  * @param 	bool 	$userselectonly If true, this method returns only styles that allows user to select
  * @param	mixed	array of options: currently only understands "themes"-includes themes
  *
  * @return 	array 	All styles' information
  */
 public function fetchStyles($withdepthmark = false, $userselectonly = false, $nocache = false, $options = array())
 {
     // todo: if we don't need stylevars, set the second flag to false
     $stylecache = $this->library->fetchStyles($nocache, true, $options);
     $defaultStyleId = vB::getDatastore()->getOption('styleid');
     require_once DIR . '/includes/adminfunctions.php';
     foreach ($stylecache as $k => $v) {
         if ($userselectonly and !$v['userselect'] and $v['styleid'] != $defaultStyleId) {
             unset($stylecache[$k]);
         }
         if (isset($stylecache[$k]) && $withdepthmark) {
             $stylecache[$k]['title'] = construct_depth_mark($v['depth'], '-') . ' ' . $v['title'];
         }
     }
     return $stylecache;
 }
コード例 #2
0
/**
* Returns a list of <option> tags representing the list of forums
*
* @param	boolean	Whether or not to display the 'Select Forum' option
* @param	string	If specified, name for the optional top element - no name, no display
* @param	string	Text to be used in sprintf() to indicate a 'category' forum, eg: '%s (Category)'. Leave blank for no category indicator
*
* @return	string	List of <option> tags
*/
function construct_forum_chooser_options($displayselectforum = false, $topname = null, $category_phrase = null)
{
    static $vbphrase;
    if (empty($vbphrase)) {
        $vbphrase = vB_Api::instanceInternal('phrase')->fetch(array('select_forum', 'forum_is_closed_for_posting'));
    }
    $channels = vB_Api::instanceInternal('search')->getChannels(true);
    unset($channels[1]);
    // Unset Home channel
    $selectoptions = array();
    if ($displayselectforum) {
        $selectoptions[0] = $vbphrase['select_forum'];
    }
    if ($topname) {
        $selectoptions['-1'] = $topname;
        $startdepth = '--';
    } else {
        $startdepth = '';
    }
    if (!$category_phrase) {
        $category_phrase = '%s';
    }
    foreach ($channels as $nodeid => $channel) {
        $channel['title'] = vB_String::htmlSpecialCharsUni(sprintf($category_phrase, $channel['title']));
        $selectoptions["{$nodeid}"] = construct_depth_mark($channel['depth'] - 1, '--', $startdepth) . ' ' . $channel['title'];
    }
    return $selectoptions;
}
コード例 #3
0
/**
* Prints a row containing a <select> showing the available styles
*
* @param	string	Name for <select>
* @param	integer	Selected style ID
* @param	string	Name of top item in <select>
* @param	string	Title of row
* @param	boolean	Display top item?
*/
function print_style_chooser_row($name = 'parentid', $selectedid = -1, $topname = NULL, $title = NULL, $displaytop = true)
{
    global $stylecache, $vbphrase;
    if ($topname === NULL) {
        $topname = $vbphrase['no_parent_style'];
    }
    if ($title === NULL) {
        $title = $vbphrase['parent_style'];
    }
    cache_styles();
    $styles = array();
    if ($displaytop) {
        $styles['-1'] = $topname;
    }
    foreach ($stylecache as $style) {
        $styles["{$style['styleid']}"] = construct_depth_mark($style['depth'], '--', iif($displaytop, '--')) . " {$style['title']}";
    }
    print_select_row($title, $name, $styles, $selectedid);
}
コード例 #4
0
/**
* Returns a list of <option> tags representing the list of forums
*
* @param	boolean	Whether or not to display the 'Select Forum' option
* @param	string	If specified, name for the optional top element - no name, no display
* @param	string	Text to be used in sprintf() to indicate a 'category' forum, eg: '%s (Category)'. Leave blank for no category indicator
*
* @return	string	List of <option> tags
*/
function construct_forum_chooser_options($displayselectforum = false, $topname = null, $category_phrase = null)
{
    global $vbulletin, $vbphrase;
    $selectoptions = array();
    if ($displayselectforum) {
        $selectoptions[0] = $vbphrase['select_forum'];
    }
    if ($topname) {
        $selectoptions['-1'] = $topname;
        $startdepth = '--';
    } else {
        $startdepth = '';
    }
    if (!$category_phrase) {
        $category_phrase = '%s';
    }
    foreach ($vbulletin->forumcache as $forumid => $forum) {
        if (!($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads'])) {
            $forum['title'] = sprintf($category_phrase, $forum['title']);
        }
        $selectoptions["{$forumid}"] = construct_depth_mark($forum['depth'], '--', $startdepth) . ' ' . $forum['title'] . ' ' . iif(!($forum['options'] & $vbulletin->bf_misc_forumoptions['allowposting']), " ({$vbphrase['forum_is_closed_for_posting']})");
    }
    return $selectoptions;
}
コード例 #5
0
/**
* Prints out the save options for the style generator
*/

function import_generated_style() {
	global $vbphrase, $stylecache;

	cache_styles();
	echo "
	<script type=\"text/javascript\">
	<!--
	function js_confirm_upload(tform, filefield)
	{
		if (filefield.value == \"\")
		{
			return confirm(\"".construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], " + tform.serverfile.value + ")."\");
		}
		return true;
	}
	function js_fetch_style_title()
	{
		styleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value;
		document.forms.downloadform.title.value = style[styleid];
	}
	var style = new Array();
	style['-1'] = \"" . $vbphrase['master_style'] . "\"";
	foreach($stylecache AS $styleid => $style)
	{
		echo "\n\tstyle['$styleid'] = \"" . addslashes_js($style['title'], '"') . "\";";
		$styleoptions["$styleid"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title'];
	}
	echo "
	// -->
	</script>";

	echo '<div id="styleform">';
	echo '<form id="form">';
	construct_hidden_code('adid', $vbulletin->GPC['adid']);
	echo '<input id="form-data" type="hidden" name="data">';
	echo '<div class="styledetails"><div id="title-generated-style" class="help title-generated-style">';
	print_input_row($vbphrase['title_generated_style'], 'name', null, null, null, null, null, null, 'form-name');
	echo '</div><div id="parent-id" class="help parent-id">';
	print_style_chooser_row('parentid', -1, $vbphrase['no_parent_style'], $vbphrase['parent_style'], 1);
	echo '</div></div><div class="styleoptions"><div id="display-order" class="help display-order">';
	print_input_row($vbphrase['display_order'], 'displayorder', 1, null, null, null, null, null, 'form-displayorder');
	echo '</div><div id="allow-user-selection" class="help allow-user-selection">';
	print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', 1, null, null, null, null, null, 'form-userselect');
	echo '</div></div></form></div>';
}
コード例 #6
0
ファイル: forumpermission.php プロジェクト: holandacz/nb4
            $usergrouplist[] = "<input type=\"checkbox\" name=\"usergrouplist[{$usergroup['usergroupid']}]\" value=\"1\" /> {$usergroup['title']}";
        }
        $usergrouplist = implode("<br />\n", $usergrouplist);
        print_form_header('forumpermission', 'doduplicate_group');
        print_table_header($vbphrase['usergroup_based_permission_duplicator']);
        print_select_row($vbphrase['copy_permissions_from_group'], 'ugid_from', $ugarr);
        print_label_row($vbphrase['copy_permissions_to_groups'], "<span class=\"smallfont\">{$usergrouplist}</span>", '', 'top', 'usergrouplist');
        print_forum_chooser($vbphrase['only_copy_permissions_from_forum'], 'limitforumid', -1);
        print_yes_no_row($vbphrase['overwrite_duplicate_entries'], 'overwritedupes_group', 0);
        print_yes_no_row($vbphrase['overwrite_inherited_entries'], 'overwriteinherited_group', 0);
        print_submit_row($vbphrase['go']);
    }
    // generate forum check boxes
    $forumlist = array();
    foreach ($vbulletin->forumcache as $forum) {
        $depth = construct_depth_mark($forum['depth'], '--');
        $forumlist[] = "<input type=\"checkbox\" name=\"forumlist[{$forum['forumid']}]\" value=\"1\" tabindex=\"1\" />{$depth} {$forum['title']} ";
    }
    $forumlist = implode("<br />\n", $forumlist);
    print_form_header('forumpermission', 'doduplicate_forum');
    print_table_header($vbphrase['forum_based_permission_duplicator']);
    print_forum_chooser($vbphrase['copy_permissions_from_forum'], 'forumid_from', -1);
    print_label_row($vbphrase['copy_permissions_to_forums'], "<span class=\"smallfont\">{$forumlist}</span>", '', 'top', 'forumlist');
    //print_chooser_row($vbphrase['only_copy_permissions_from_group'], 'limitugid', 'usergroup', -1, $vbphrase['all_usergroups']);
    print_yes_no_row($vbphrase['overwrite_duplicate_entries'], 'overwritedupes_forum', 0);
    print_yes_no_row($vbphrase['overwrite_inherited_entries'], 'overwriteinherited_forum', 0);
    print_submit_row($vbphrase['go']);
}
// ###################### Start do duplicate (group-based) #######################
if ($_POST['do'] == 'doduplicate_group') {
    $vbulletin->input->clean_array_gpc('p', array('ugid_from' => TYPE_INT, 'limitforumid' => TYPE_INT, 'overwritedupes_group' => TYPE_INT, 'overwriteinherited_group' => TYPE_INT, 'usergrouplist' => TYPE_ARRAY));
コード例 #7
0
/**
* Fetches an array of style titles for use in select menus
*
* @param	string	Prefix for titles
* @param	boolean	Display top level style?
*
* @return	array
*/
function fetch_style_title_options_array($titleprefix = '', $displaytop = false)
{
    require_once DIR . '/includes/adminfunctions_template.php';
    global $stylecache;
    cache_styles();
    $out = array();
    foreach ($stylecache as $style) {
        $out["{$style['styleid']}"] = $titleprefix . construct_depth_mark($style['depth'], '--', iif($displaytop, '--', '')) . " {$style['title']}";
    }
    return $out;
}
コード例 #8
0
ファイル: announcement.php プロジェクト: hungnv0789/vhtm
		}
		$cell[] = $announcements;
		$cell[] = '<input type="submit" class="button" value="' . $vbphrase['new'] . '" title="' . $vbphrase['post_new_announcement'] . '" />';
		print_cells_row($cell, 0, '', -1);
		print_table_break();
	}

	// display forum-specific announcements
	foreach($vbulletin->forumcache AS $key => $forum)
	{
		if ($forum['parentid'] == -1)
		{
			print_cells_row(array($vbphrase['forum'], $vbphrase['announcements'], ''), 1, 'tcat', 1);
		}
		$cell = array();
		$cell[] = "<b>" . construct_depth_mark($forum['depth'], '- - ', '- - ') . "<a href=\"../announcement.php?" . $vbulletin->session->vars['sessionurl'] . "f=$forum[forumid]\" target=\"_blank\">$forum[title]</a></b>";
		$announcements = '';
		if (is_array($ancache[$forum['forumid']]))
		{
			foreach($ancache[$forum['forumid']] AS $announcementid => $announcement)
			{
				$announcements .=
				"\t\t<li><b>" . htmlspecialchars_uni($announcement['title']) . "</b> ($announcement[username]) ".
				construct_link_code($vbphrase['edit'], "announcement.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&a=$announcement[announcementid]").
				construct_link_code($vbphrase['delete'], "announcement.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&a=$announcement[announcementid]").
				'<span class="smallfont">('.
					construct_phrase($vbphrase['x_to_y'], vbdate($vbulletin->options['dateformat'], $announcement['startdate']), vbdate($vbulletin->options['dateformat'], $announcement['enddate'])) .
				")</span></li>\n";
			}
		}
		$cell[] = $announcements;
コード例 #9
0
ファイル: sitemap.php プロジェクト: cedwards-reisys/nexus-web
// #########################edit channel priority (VB5)#########################
if ($_REQUEST['do'] == 'channel') {
    // Get the custom priorities
    $sitemap = new vB_SiteMap_Node($vbulletin);
    print_form_header('sitemap', 'savechannel');
    print_table_header($vbphrase['channel_priority_manager']);
    print_description_row($vbphrase['sitemap_forum_priority_desc']);
    $channels = $sitemap->get_allowed_channels();
    if (is_array($channels)) {
        foreach ($channels as $key => $channel) {
            $priority = $sitemap->get_node_priority($channel['nodeid']);
            if ($priority === false) {
                $priority = 'default';
            }
            $cell = array();
            $cell[] = "<b>" . construct_depth_mark($channel['depth'], '- - ') . "<a href=\"forum.php?do=edit&amp;n={$channel['nodeid']}\">{$channel['title']}</a></b>";
            $cell[] = "\n\t<select name=\"priority[{$channel['nodeid']}]\" class=\"bginput\">\n" . construct_select_options($default_settings, $priority) . " />\n\t";
            if ($channel['parentid'] == 0) {
                print_cells_row(array($vbphrase['title'], construct_phrase($vbphrase['priority_default_x'], vb_number_format($vbulletin->options['sitemap_priority'], 1))), 1, 'tcat');
            }
            print_cells_row($cell);
        }
    }
    print_submit_row($vbphrase['save_priority']);
}
// #########################save channel priority (VB5)#########################
if ($_POST['do'] == 'savechannel') {
    $vbulletin->input->clean_array_gpc('p', array('priority' => vB_Cleaner::TYPE_ARRAY_STR));
    // Custom values to remove
    $update_values = array();
    foreach ($vbulletin->GPC['priority'] as $nodeid => $priority) {
コード例 #10
0
ファイル: kbankadmin.php プロジェクト: 0hyeah/yurivn
 $processed = true;
 print_cp_header("Forums Point Policy Manager");
 print_table_start();
 print_table_header('Forums Point Policy', 4);
 $heading = array('Forum', 'Per Thread', 'Per Reply', 'Per Char');
 print_cells_row($heading, 1);
 //Global Policy
 $cell = array();
 $cell[] = '<strong>GLOBAL</strong>';
 $cell[] = vb_number_format($vbulletin->kbank['perthread_default'], $vbulletin->kbank['roundup']);
 $cell[] = vb_number_format($vbulletin->kbank['perreply_default'], $vbulletin->kbank['roundup']);
 $cell[] = vb_number_format($vbulletin->kbank['perchar_default'], $vbulletin->kbank['roundup']);
 print_cells_row($cell);
 //Forums Policy
 foreach ($vbulletin->forumcache as $forumid => $forum) {
     $forumtitle = construct_depth_mark($forum['depth'], '--', $startdepth) . ' ' . $forum['title'] . ' ' . iif(!($forum['options'] & $vbulletin->bf_misc_forumoptions['allowposting']), " ({$vbphrase['forum_is_closed_for_posting']})");
     $policy = getPointPolicy($forum);
     $cell = array();
     $cell[] = $forumtitle;
     $cell[] = $policy['kbank_perthread_str'];
     $cell[] = $policy['kbank_perreply_str'];
     $cell[] = $policy['kbank_perchar_str'];
     print_cells_row($cell);
 }
 print_table_footer(4);
 print_form_header('kbankadmin', 'do_resetpolicy');
 print_table_header('Reset Forums Point Policy');
 print_forum_chooser('Please select forum to reset', 'forum[]', -1, null, false, true);
 print_input_row('[New] Per Thread Value', 'perthread', -1);
 print_input_row('[New] Per Reply Value', 'perreply', -1);
 print_input_row('[New] Per Char Value', 'perchar', -1);
コード例 #11
0
/**
* Prints out the save options for the style generator
*/
function import_generated_style()
{
    global $vbphrase, $stylecache;
    cache_styles();
    echo "\n\t<script type=\"text/javascript\">\n\t<!--\n\tfunction js_confirm_upload(tform, filefield)\n\t{\n\t\tif (filefield.value == \"\")\n\t\t{\n\t\t\treturn confirm(\"" . construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], " + tform.serverfile.value + ") . "\");\n\t\t}\n\t\treturn true;\n\t}\n\tfunction js_fetch_style_title()\n\t{\n\t\tstyleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value;\n\t\tdocument.forms.downloadform.title.value = style[styleid];\n\t}\n\tvar style = new Array();\n\tstyle['-2'] = \"" . $vbphrase['mobile_master_style'] . "\"\n\tstyle['-1'] = \"" . $vbphrase['master_style'] . "\"";
    foreach ($stylecache as $styleid => $style) {
        echo "\n\tstyle['{$styleid}'] = \"" . addslashes_js($style['title'], '"') . "\";";
        $styleoptions["{$styleid}"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title'];
    }
    echo "\n\t// -->\n\t</script>";
    echo '<div id="styleform">';
    echo '<form id="form" action="template.php?do=stylegenerator" method="post">';
    construct_hidden_code('adid', $vbulletin->GPC['adid']);
    echo '<input id="form-data" type="hidden" name="data" />';
    echo '<div class="styledetails"><div id="title-generated-style" class="help title-generated-style">';
    echo $vbphrase['title_generated_style'] . '<div id="ctrl_name"><input type="text" class="bginput" name="name" id="form-name" value="" size="" dir="ltr" tabindex="1" /></div>';
    echo '</div><div id="parent-id" class="help parent-id">';
    echo $vbphrase['parent_style'] . '<div><select name="parentid" id="sel_parentid_1" tabindex="1" class="bginput">' . construct_select_options($styleoptions, -1, false) . '</select></div>';
    echo '</div></div><div class="styleoptions"><div id="display-order" class="help display-order">';
    echo $vbphrase['display_order'] . '<div id="ctrl_displayorder"><input type="text" class="bginput" name="displayorder" id="form-displayorder" value="1" size="" dir="ltr" tabindex="1" /></div>';
    echo '</div><div id="allow-user-selection" class="help allow-user-selection">';
    echo $vbphrase['allow_user_selection'] . '<div id="ctrl_userselect" class="smallfont" style="white-space:nowrap">
		<label for="rb_1_userselect_2"><input type="radio" name="userselect" id="rb_1_userselect_2" value="1" tabindex="1" checked="checked" />' . $vbphrase['yes'] . '</label>
 		<label for="rb_0_userselect_2"><input type="radio" name="userselect" id="rb_0_userselect_2" value="0" tabindex="1" />' . $vbphrase['no'] . '</label>
 	</div>';
    echo '</div></div></form></div>';
}
コード例 #12
0
ファイル: sitemap.php プロジェクト: Kheros/MMOver
if ($_REQUEST['do'] == 'forum') {
    // Default priority settings, with clear
    $default_settings = array('default' => $vbphrase['default'], '0.0' => vb_number_format('0.0', 1), '0.1' => vb_number_format('0.1', 1), '0.2' => vb_number_format('0.2', 1), '0.3' => vb_number_format('0.3', 1), '0.4' => vb_number_format('0.4', 1), '0.5' => vb_number_format('0.5', 1), '0.6' => vb_number_format('0.6', 1), '0.7' => vb_number_format('0.7', 1), '0.8' => vb_number_format('0.8', 1), '0.9' => vb_number_format('0.9', 1), '1.0' => vb_number_format('1.0', 1));
    // Get the custom forum priorities
    $sitemap = new vB_SiteMap_Forum($vbulletin);
    print_form_header('sitemap', 'saveforum');
    print_table_header($vbphrase['forum_priority_manager']);
    print_description_row($vbphrase['sitemap_forum_priority_desc']);
    if (is_array($vbulletin->forumcache)) {
        foreach ($vbulletin->forumcache as $key => $forum) {
            $priority = $sitemap->get_forum_custom_priority($forum['forumid']);
            if ($priority === false) {
                $priority = 'default';
            }
            $cell = array();
            $cell[] = "<b>" . construct_depth_mark($forum['depth'], '- - ') . "<a href=\"forum.php?do=edit&amp;f={$forum['forumid']}\">{$forum['title']}</a></b>";
            $cell[] = "\n\t<select name=\"f[{$forum['forumid']}]\" class=\"bginput\">\n" . construct_select_options($default_settings, $priority) . " />\n\t";
            if ($forum['parentid'] == -1) {
                print_cells_row(array($vbphrase['forum'], construct_phrase($vbphrase['priority_default_x'], vb_number_format($vbulletin->options['sitemap_priority'], 1))), 1, 'tcat');
            }
            print_cells_row($cell);
        }
    }
    print_submit_row($vbphrase['save_priority']);
}
// ########################################################################
if ($_REQUEST['do'] == 'removesession') {
    print_form_header('sitemap', 'doremovesession');
    print_table_header($vbphrase['remove_sitemap_session']);
    print_description_row($vbphrase['are_you_sure_remove_sitemap_session']);
    print_submit_row($vbphrase['remove_sitemap_session'], null);
コード例 #13
0
        foreach ($globalannounce as $announcementid => $announcement) {
            $announcements .= "\t\t<li><b>" . htmlspecialchars_uni($announcement['title']) . "</b> ({$announcement['username']}) " . construct_link_code($vbphrase['edit'], "announcement.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&a={$announcement['announcementid']}") . construct_link_code($vbphrase['delete'], "announcement.php?" . vB::getCurrentSession()->get('sessionurl') . "do=remove&a={$announcement['announcementid']}") . '<span class="smallfont">(' . ' ' . construct_phrase($vbphrase['x_to_y'], vbdate($options['dateformat'], $announcement['startdate']), vbdate($options['dateformat'], $announcement['enddate'])) . ")</span></li>\n";
        }
        $cell[] = $announcements;
        $cell[] = '<input type="submit" class="button" value="' . $vbphrase['new'] . '" title="' . $vbphrase['post_new_announcement_gposting'] . '" />';
        print_cells_row($cell, 0, '', -1);
        print_table_break();
    }
    $channels = vB_Api::instanceInternal('search')->getChannels(true);
    // display forum-specific announcements
    foreach ($channels as $key => $channel) {
        if ($channel['parentid'] == 0) {
            print_cells_row(array($vbphrase['channel'], $vbphrase['announcements'], ''), 1, 'tcat', 1);
        }
        $cell = array();
        $cell[] = "<b>" . construct_depth_mark($channel['depth'], '- - ', '- - ') . "<a href=\"../announcement.php?" . vB::getCurrentSession()->get('sessionurl') . "n={$channel['nodeid']}\" target=\"_blank\">{$channel['htmltitle']}</a></b>";
        $announcements = '';
        if (is_array($ancache[$channel['nodeid']])) {
            foreach ($ancache[$channel['nodeid']] as $announcementid => $announcement) {
                $announcements .= "\t\t<li><b>" . htmlspecialchars_uni($announcement['title']) . "</b> ({$announcement['username']}) " . construct_link_code($vbphrase['edit'], "announcement.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&a={$announcement['announcementid']}") . construct_link_code($vbphrase['delete'], "announcement.php?" . vB::getCurrentSession()->get('sessionurl') . "do=remove&a={$announcement['announcementid']}") . '<span class="smallfont">(' . construct_phrase($vbphrase['x_to_y'], vbdate($options['dateformat'], $announcement['startdate']), vbdate($options['dateformat'], $announcement['enddate'])) . ")</span></li>\n";
            }
        }
        $cell[] = $announcements;
        $cell[] = '<input type="submit" class="button" value="' . $vbphrase['new'] . '" name="newnodeid[' . $channel['nodeid'] . ']" title="' . $vbphrase['post_new_announcement_gposting'] . '" />';
        print_cells_row($cell, 0, '', -1);
    }
    print_table_footer();
}
print_cp_footer();
/*=========================================================================*\
|| #######################################################################
コード例 #14
0
ファイル: user.php プロジェクト: cedwards-reisys/nexus-web
		<input type="button" value="' . $vbphrase['all_yes'] . '" onclick="js_check_all_option(this.form, 1);" class="button" />
		<input type="button" value=" ' . $vbphrase['all_no'] . ' " onclick="js_check_all_option(this.form, 0);" class="button" />
		<input type="button" value="' . $vbphrase['all_default'] . '" onclick="js_check_all_option(this.form, -1);" class="button" />
	');
    //require_once(DIR . '/includes/functions_databuild.php');
    //cache_forums();
    $channels = vB_Api::instanceInternal('search')->getChannels(true);
    foreach ($channels as $nodeid => $node) {
        if (!isset($accessarray["{$nodeid}"])) {
            $sel = -1;
        } elseif ($accessarray["{$nodeid}"] == 0) {
            $sel = 0;
        } elseif ($accessarray["{$nodeid}"] == 1) {
            $sel = 1;
        }
        print_yes_no_other_row(construct_depth_mark($node['depth'], '- - ') . " {$node['htmltitle']}", "accessupdate[{$nodeid}]", $vbphrase['default'], $sel);
    }
    print_submit_row();
}
// ###################### Start Update Access #######################
if ($_POST['do'] == 'updateaccess') {
    if (!can_administer('canadminpermissions')) {
        print_cp_no_permission();
    }
    $vbulletin->input->clean_array_gpc('p', array('userid' => vB_Cleaner::TYPE_INT, 'accessupdate' => vB_Cleaner::TYPE_ARRAY_INT));
    try {
        vB_Api::instanceInternal('user')->updateAccess($vbulletin->GPC['userid'], $vbulletin->GPC['accessupdate']);
    } catch (vB_Exception_Api $e) {
        $errors = $e->get_errors();
        if (!empty($errors)) {
            $error = array_shift($errors);
コード例 #15
0
ファイル: awards.php プロジェクト: 0hyeah/yurivn
                            }
                        }
                        $awarduserslist = substr($awarduserslist, 2);
                        // get rid of initial comma
                        if ($vbulletin->options['aw_display_memberlimit'] > 0 and $aw_ui > $vbulletin->options['aw_display_memberlimit']) {
                            $awarduserslist .= "<br> <div align=\"right\"><font size=\"-1\"><a href=\"awards.php?do=viewaward&award_id={$award['award_id']}\">{$vbphrase['aw_more_users']}</a></font></div>";
                        }
                    }
                    exec_switch_bg();
                    eval('$awardsbits .= "' . fetch_template('awards_awardbit') . '";');
                }
            }
            //foreach $awardcache
        }
        //if is_array
        eval('$award_categotybit = "' . construct_depth_mark($award_cat['depth'], '- - ', '') . fetch_template('awards_categorybit') . '";');
        eval('$award_categories .= "' . fetch_template('awards_category') . '";');
    }
    //foreach $award_cat_cache
    $navbits = construct_navbits(array('' => $vbphrase['awards']));
    eval('$navbar = "' . fetch_template('navbar') . '";');
    construct_forum_jump();
    eval('print_output("' . fetch_template('AWARDS') . '");');
}
if ($_REQUEST['do'] == 'viewaward') {
    $vbulletin->input->clean_array_gpc('r', array('award_id' => TYPE_UINT));
    if ($vbulletin->GPC['award_id'] == 0) {
        eval(standard_error(fetch_error('invalidid', "awardid", $vbulletin->options['contactuslink'])));
    }
    // Obtain list of users of each award
    $allawardusers = $db->query_read("\n\t\t\tSELECT u.userid, u.username, au.award_id\n\t\t\tFROM " . TABLE_PREFIX . "award_user AS au\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "user AS u ON (u.userid = au.userid)\n\t\t\tWHERE au.award_id = " . $vbulletin->GPC['award_id'] . "\n\t\t\tGROUP BY u.userid, u.username, au.award_id\n\t\t\tORDER BY u.userid\n\t\t\t");
コード例 #16
0
/**
* Fetches an array of style titles for use in select menus
*
* @param	string	Prefix for titles
* @param	boolean	Display top level style?
*
* @return	array
*/
function fetch_style_title_options_array($titleprefix = '', $displaytop = false)
{
    $stylecache = vB_Library::instance('Style')->fetchStyles(false, false);
    $out = array();
    foreach ($stylecache as $style) {
        $out["{$style['styleid']}"] = $titleprefix . construct_depth_mark($style['depth'], '--', iif($displaytop, '--', '')) . " {$style['title']}";
    }
    return $out;
}
コード例 #17
0
ファイル: forum.php プロジェクト: Kheros/MMOver
         $cell = array();
         if (!$vbulletin->options['cp_collapse_forums'] or $forum['forumid'] == $expanddata['forumid'] or in_array($forum['forumid'], $expanddata['parentids'])) {
             $cell[] = "<a name=\"forum{$forum['forumid']}\">&nbsp;</a> {$expandtext}<b>" . construct_depth_mark($forum['depth'], '- - ') . "<a href=\"forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;f={$forum['forumid']}\">{$forum['title']}</a>" . iif(!empty($forum['password']), '*') . " " . iif($forum['link'], "(<a href=\"" . htmlspecialchars_uni($forum['link']) . "\">" . $vbphrase['link'] . "</a>)") . "</b>";
             $cell[] = "\n\t<select name=\"f{$forum['forumid']}\" onchange=\"js_forum_jump({$forum['forumid']});\" class=\"bginput\">\n" . construct_select_options($mainoptions) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_forum_jump({$forum['forumid']});\" />\n\t";
             $cell[] = "<input type=\"text\" class=\"bginput\" name=\"order[{$forum['forumid']}]\" value=\"{$forum['displayorder']}\" tabindex=\"1\" size=\"3\" title=\"" . $vbphrase['edit_display_order'] . "\" />";
             $mods = array('no_value' => $vbphrase['moderators'] . ' (' . sizeof($imodcache["{$forum['forumid']}"]) . ')');
             if (is_array($imodcache["{$forum['forumid']}"])) {
                 foreach ($imodcache["{$forum['forumid']}"] as $moderator) {
                     $mods['']["{$moderator['moderatorid']}"] = $moderator['username'];
                 }
             }
             $mods['add'] = $vbphrase['add_moderator'];
             $cell[] = "\n\t<select name=\"m{$forum['forumid']}\" onchange=\"js_moderator_jump({$forum['forumid']});\" class=\"bginput\">\n" . construct_select_options($mods) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_moderator_jump({$forum['forumid']});\" />\n\t";
         } else {
             if ($vbulletin->options['cp_collapse_forums'] and ($forum['parentid'] == $expanddata['forumid'] or $forum['parentid'] == -1 or forum_is_related_to_forum($forum['parentlist'], $forum['forumid'], $expanddata['parentlist']))) {
                 $cell[] = "<a name=\"forum{$forum['forumid']}\">&nbsp;</a> <a href=\"forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandid={$forum['forumid']}\">[+]</a>  <b>" . construct_depth_mark($forum['depth'], '- - ') . "<a href=\"forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;f={$forum['forumid']}\">{$forum['title']}</a>" . iif(!empty($forum['password']), '*') . " " . iif($forum['link'], "(<a href=\"{$forum['link']}\">" . $vbphrase['link'] . "</a>)") . "</b>";
                 $cell[] = construct_link_code($vbphrase['expand'], "forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandid={$forum['forumid']}");
                 $cell[] = "&nbsp;";
                 $cell[] = "&nbsp;";
             } else {
                 continue;
             }
         }
         if ($forum['parentid'] == -1) {
             print_cells_row(array($vbphrase['forum'], $vbphrase['controls'], $vbphrase['display_order'], $vbphrase['moderators']), 1, 'tcat');
         }
         print_cells_row($cell);
     }
 }
 print_table_footer(4, "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['save_display_order'] . "\" accesskey=\"s\" />" . construct_button_code($vbphrase['add_new_forum'], "forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=add"));
 if ($vbulletin->options['cp_collapse_forums']) {
コード例 #18
0
/**
* Fetches an array of style titles for use in select menus
*
* @param	string	Prefix for titles
* @param	boolean	Display top level style?
* @param	string	'both', display both master styles, 'standard', the standard styles, 'mobile', the mobile styles
*
* @return	array
*/
function fetch_style_title_options_array($titleprefix = '', $displaytop = false, $type = 'both')
{
    require_once DIR . '/includes/adminfunctions_template.php';
    global $stylecache, $vbphrase;
    cache_styles();
    $styles = array();
    foreach ($stylecache as $style) {
        $styles[$style['type']]["{$style['styleid']}"] = $titleprefix . construct_depth_mark($style['depth'], '--', iif($displaytop, '--', '')) . " {$style['title']}";
    }
    if ($type == 'both') {
        $out = array($vbphrase['standard_styles'] => $styles['standard'], $vbphrase['mobile_styles'] => $styles['mobile']);
        return $out;
    } else {
        $out = array($vbphrase[$type . '_styles'] => $styles[$type]);
        return $out;
    }
}
コード例 #19
0
ファイル: css.php プロジェクト: benyamin20/vbregistration
        $_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 = '--';
    } else {
        $dethmark = '';
    }
    cache_styles();
    foreach ($stylecache as $style) {
        print_label_row(construct_depth_mark($style['depth'], '--', $depthmark) . " <b>{$style['title']}</b>", construct_link_code($vbphrase['edit'], "css.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;dostyleid={$style['styleid']}") . construct_link_code($vbphrase['templates'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "expandset={$style['styleid']}") . construct_link_code($vbphrase['settings'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=editstyle&amp;dostyleid={$style['styleid']}"));
    }
    print_table_footer();
}
if ($_REQUEST['do'] == 'moo') {
    unset($vbulletin->debug);
    function print_moo($l, $r)
    {
        print_label_row(htmlspecialchars($l), "<span class=\"smallfont\">{$r}</span>");
    }
    print_form_header('', '');
    print_moo($vbphrase['body'], $vbphrase['body_desc'], 'body', 1);
    print_moo($vbphrase['page_background'], $vbphrase['page_background_desc'], '.page', 1);
    print_moo('<td>, <th>, <p>, <li>', $vbphrase['text_desc'], 'td, th, p, li', 0);
    print_moo($vbphrase['table_border'], $vbphrase['table_border_desc'], '.tborder', 0);
    print_moo($vbphrase['category_strips'], $vbphrase['category_strips_desc'], '.tcat', 1);
コード例 #20
0
ファイル: forum.php プロジェクト: hungnv0789/vhtm
	foreach ($vbulletin->forumcache AS $key => $forum)
	{
		$perms = fetch_permissions($forum['forumid']);
		if (!($perms & $vbulletin->bf_ugp_forumpermissions['canview']))
		{
			continue;
		}

		if ($forum['parentid'] == -1)
		{
			print_cells_row(array('&nbsp; ' . $vbphrase['title'], $vbphrase['modify']), 1, 'tcat');
		}

		$cell = array();
		$cell[] = '&nbsp; <b>' . construct_depth_mark($forum['depth'], '- - ') . '<a href="../' . fetch_seo_url('forum', $forum) . "\">$forum[title]</a></b>";
		$cell[] =
			'&nbsp;' .
			iif(can_moderate($forum['forumid'], 'canannounce'), construct_link_code($vbphrase['add_announcement'], 'announcement.php?' . $vbulletin->session->vars['sessionurl'] . "do=add&amp;f=$forum[forumid]"), '') .
			' ' .
			iif(can_moderate($forum['forumid'], 'cansetpassword') AND ($forum['options'] & $vbulletin->bf_misc_forumoptions['canhavepassword']), construct_link_code($vbphrase['edit_password'], 'forum.php?' . $vbulletin->session->vars['sessionurl'] . "do=editpassword&amp;f=$forum[forumid]"), '');

		print_cells_row($cell);

		if (can_moderate($forum['forumid'], 'canannounce'))
		{
			$forumannouncements = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "announcement WHERE forumid = $forum[forumid]");
			if ($db->num_rows($forumannouncements))
			{
				$annc = "<ul><b>" . $vbphrase['announcements'] . ":</b><ul>\n";
				while ($announcement=$db->fetch_array($forumannouncements))
コード例 #21
0
    ?>
");
		}
		return true;
	}
	function js_fetch_style_title()
	{
		styleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value;
		document.forms.downloadform.title.value = style[styleid];
	}
	var style = new Array();
	style['-1'] = "<?php 
    echo $vbphrase['master_style'] . '";';
    foreach ($stylecache as $styleid => $style) {
        echo "\n\tstyle['{$styleid}'] = \"" . addslashes_js($style['title'], '"') . "\";";
        $styleoptions["{$styleid}"] = construct_depth_mark($style['depth'], '--', iif($vb5_config['Misc']['debug'], '--', '')) . ' ' . $style['title'];
    }
    echo "\n";
    ?>
	// -->
	</script>
	<?php 
    print_form_header('template', 'download', 0, 1, 'downloadform" target="download');
    print_table_header($vbphrase['download']);
    print_label_row($vbphrase['style'], '
		<select name="dostyleid" onchange="js_fetch_style_title();" tabindex="1" class="bginput">
		' . iif($vb5_config['Misc']['debug'], '<option value="-1">' . $vbphrase['master_style'] . '</option>') . '
		' . construct_select_options($styleoptions, $vbulletin->GPC['dostyleid']) . '
		</select>
	', '', 'top', 'dostyleid');
    print_select_row($vbphrase['product'], 'product', fetch_product_list());
コード例 #22
0
ファイル: sitemap.php プロジェクト: hungnv0789/vhtm
		$route = vB_Route::create('vBCms_Route_Content');
		foreach($sections AS $sectionid => $section)
		{

			if ($section['priority'] === false)
			{
				$section['priority'] = 'default';
			}

			if (isset($section['nodeid']) AND intval($section['nodeid']))
			{
				$cell = array();
				$route->node = $section['nodeid'] . (empty($section['url']) ? '' : '-' . $section['url']);
				$pageurl = $route->getCurrentURL();

				$cell[] = "<b>" . construct_depth_mark($section['depth'], '- - ')
					. "<a href=\"$pageurl\">$section[title]</a></b>";

				$cell[] = "\n\t<select name=\"f[$section[nodeid]]\" class=\"bginput\">\n"
					. construct_select_options($default_settings, $section['priority'])
					. " />\n\t";

				if ($forum['parentid'] == -1)
				{
					print_cells_row(array(
						$vbphrase['vbcms'],
						construct_phrase($vbphrase['priority_default_x'], vb_number_format($vbulletin->options['sitemap_priority'], 1))
					), 1, '');
				}

				print_cells_row($cell);
コード例 #23
0
 //require_once(DIR . '/includes/functions_databuild.php');
 //cache_forums();
 if ($old_sub_masks = @unserialize($sub['forums']) and is_array($old_sub_masks)) {
     $forums = array_keys($old_sub_masks);
 } else {
     $forums = explode(',', $sub['forums']);
 }
 if (is_array($vbulletin->forumcache)) {
     foreach ($vbulletin->forumcache as $forumid => $forum) {
         if (array_search($forum['forumid'], $forums) !== false) {
             $sel = 1;
         } else {
             $sel = -1;
         }
         $radioname = 'forums[' . $forum['forumid'] . ']';
         print_label_row(construct_depth_mark($forum['depth'], '- - ') . ' ' . $forum['title'], "<span class=\"smallfont\"><strong>\n\t\t\t\t<label for=\"rb_1_{$radioname}\"><input type=\"radio\" name=\"{$radioname}\" value=\"1\" id=\"rb_1_{$radioname}\" tabindex=\"1\"" . iif($sel == 1, ' checked="checked"') . " />" . $vbphrase['yes'] . "</label>\n\t\t\t\t<label for=\"rb_0_{$radioname}\"><input type=\"radio\" name=\"{$radioname}\" value=\"-1\" for=\"rb_0_{$radioname}\" tabindex=\"1\"" . iif($sel == -1, ' checked="checked"') . " />" . $vbphrase['default'] . "</label>\n\t\t\t</strong></span>\n\t\t\t");
     }
 }
 print_table_break('', $OUTERTABLEWIDTH);
 print_table_header($vbphrase['cost'], 10);
 print_cells_row(array($vbphrase['us_dollars'], $vbphrase['pounds_sterling'], $vbphrase['euros'], $vbphrase['aus_dollars'], $vbphrase['cad_dollars'], $vbphrase['subscription_length'], $vbphrase['recurring'], $vbphrase['ccbill_subid'], $vbphrase['twocheckout_prodid'], $vbphrase['options']), 1);
 $direction = verify_text_direction('');
 $sub['cost'][] = array();
 foreach ($sub['cost'] as $i => $sub_occurence) {
     $usd = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][usd]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['usd'], 2, '.', '') . '" />';
     $gbp = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][gbp]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['gbp'], 2, '.', '') . '" />';
     $eur = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][eur]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['eur'], 2, '.', '') . '" />';
     $aud = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][aud]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['aud'], 2, '.', '') . '" />';
     $cad = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][cad]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['cad'], 2, '.', '') . '" />';
     $length = '<input type="text" class="bginput" name="sub[time][' . $i . '][length]" dir="' . $direction . '" tabindex="1" size="7" value="' . $sub_occurence['length'] . '" />';
     $length .= '<select name="sub[time][' . $i . '][units]" tabindex="1" class="bginput">' . construct_select_options(array('D' => $vbphrase['days'], 'W' => $vbphrase['weeks'], 'M' => $vbphrase['months'], 'Y' => $vbphrase['years']), $sub_occurence['units']) . "</select>\n";
コード例 #24
0
ファイル: forum.php プロジェクト: holandacz/nb4
 $forums = array();
 foreach ($vbulletin->forumcache as $forumid => $forum) {
     $forums["{$forum['forumid']}"] = construct_depth_mark($forum['depth'], '--') . ' ' . $forum['title'];
 }
 print_form_header('', '');
 print_table_header($vbphrase['forums'], 2);
 foreach ($vbulletin->forumcache as $key => $forum) {
     $perms = fetch_permissions($forum['forumid']);
     if (!($perms & $vbulletin->bf_ugp_forumpermissions['canview'])) {
         continue;
     }
     if ($forum['parentid'] == -1) {
         print_cells_row(array('&nbsp; ' . $vbphrase['title'], $vbphrase['modify']), 1, 'tcat');
     }
     $cell = array();
     $cell[] = '&nbsp; <b>' . construct_depth_mark($forum['depth'], '- - ') . '<a href="../forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forum['forumid']}\">{$forum['title']}</a></b>";
     $cell[] = '&nbsp;' . iif(can_moderate($forum['forumid'], 'canannounce'), construct_link_code($vbphrase['add_announcement'], 'announcement.php?' . $vbulletin->session->vars['sessionurl'] . "do=add&amp;f={$forum['forumid']}"), '') . ' ' . iif(can_moderate($forum['forumid'], 'cansetpassword') and $forum['options'] & $vbulletin->bf_misc_forumoptions['canhavepassword'], construct_link_code($vbphrase['edit_password'], 'forum.php?' . $vbulletin->session->vars['sessionurl'] . "do=editpassword&amp;f={$forum['forumid']}"), '');
     print_cells_row($cell);
     if (can_moderate($forum['forumid'], 'canannounce')) {
         $forumannouncements = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "announcement WHERE forumid = {$forum['forumid']}");
         if ($db->num_rows($forumannouncements)) {
             $annc = "<ul><b>" . $vbphrase['announcements'] . ":</b><ul>\n";
             while ($announcement = $db->fetch_array($forumannouncements)) {
                 $annc .= "<li>{$announcement['title']} " . construct_link_code($vbphrase['edit'], 'announcement.php?' . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;a={$announcement['announcementid']}") . ' ' . construct_link_code($vbphrase['delete'], 'announcement.php?' . $vbulletin->session->vars['sessionurl'] . "do=remove&amp;a={$announcement['announcementid']}") . '</li>';
             }
             $annc .= "</ul></ul>\n";
             print_description_row($annc);
         }
     }
 }
 print_table_footer();
コード例 #25
0
ファイル: user.php プロジェクト: holandacz/nb4
    //cache_forums();
    foreach ($vbulletin->forumcache as $forumid => $forum) {
        if (is_array($accessarray["{$forum['forumid']}"])) {
            if ($accessarray["{$forum['forumid']}"]['accessmask'] == 0) {
                $sel = 0;
            } else {
                if ($accessarray["{$forum['forumid']}"]['accessmask'] == 1) {
                    $sel = 1;
                } else {
                    $sel = -1;
                }
            }
        } else {
            $sel = -1;
        }
        print_yes_no_other_row(construct_depth_mark($forum['depth'], '- - ') . " {$forum['title']}", "accessupdate[{$forum['forumid']}]", $vbphrase['default'], $sel);
    }
    print_submit_row();
}
// ###################### Start Update Access #######################
if ($_POST['do'] == 'updateaccess') {
    if (!can_administer('canadminpermissions')) {
        print_cp_no_permission();
    }
    $vbulletin->input->clean_array_gpc('p', array('userid' => TYPE_INT, 'accessupdate' => TYPE_ARRAY_INT));
    $user = fetch_userinfo($vbulletin->GPC['userid']);
    if (!$user) {
        print_stop_message('invalid_user_specified');
    }
    // delete all old access masks
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "access WHERE userid = " . $vbulletin->GPC['userid']);
コード例 #26
0
ファイル: subscriptions.php プロジェクト: hungnv0789/vhtm
	}

	if (is_array($vbulletin->forumcache))
	{
		foreach ($vbulletin->forumcache AS $forumid => $forum)
		{
			if (array_search($forum['forumid'], $forums) !== false)
			{
				$sel = 1;
			}
			else
			{
				$sel = -1;
			}
			$radioname = 'forums[' . $forum['forumid'] . ']';
			print_label_row(construct_depth_mark($forum['depth'], '- - ') . ' ' . $forum['title'], "<span class=\"smallfont\"><strong>
				<label for=\"rb_1_$radioname\"><input type=\"radio\" name=\"$radioname\" value=\"1\" id=\"rb_1_$radioname\" tabindex=\"1\"" . iif($sel==1, ' checked="checked"') . " />" . $vbphrase['yes'] . "</label>
				<label for=\"rb_0_$radioname\"><input type=\"radio\" name=\"$radioname\" value=\"-1\" for=\"rb_0_$radioname\" tabindex=\"1\"" . iif($sel==-1, ' checked="checked"') . " />" . $vbphrase['default'] . "</label>
			</strong></span>
			");
		}
	}
	print_table_break('', $OUTERTABLEWIDTH);
	print_table_header($vbphrase['cost'], 10);

	print_cells_row(array(
		$vbphrase['us_dollars'],
		$vbphrase['pounds_sterling'],
		$vbphrase['euros'],
		$vbphrase['aus_dollars'],
		$vbphrase['cad_dollars'],
コード例 #27
0
ファイル: ad.php プロジェクト: Kheros/MMOver
        }
        $db->free_result($criteria);
        $table_title = $vbphrase['edit_ad'] . " <span class=\"normal\">{$ad['title']}</span>";
    }
    // build list of usergroup titles
    $usergroup_options = array();
    foreach ($vbulletin->usergroupcache as $usergroupid => $usergroup) {
        $usergroup_options["{$usergroupid}"] = $usergroup['title'];
    }
    // build list of style names
    require_once DIR . '/includes/adminfunctions_template.php';
    cache_styles();
    $style_options = array();
    foreach ($stylecache as $style) {
        $style_options["{$style['styleid']}"] = $style['title'];
        $style_options["{$style['styleid']}"] = construct_depth_mark($style['depth'], '--') . ' ' . $style['title'];
    }
    // build the list of criteria options
    $criteria_options = array('in_usergroup_x' => array('<select name="criteria[in_usergroup_x][condition1]" tabindex="1">' . construct_select_options($usergroup_options, empty($criteria_cache['in_usergroup_x']) ? 2 : $criteria_cache['in_usergroup_x']['condition1']) . '</select>'), 'not_in_usergroup_x' => array('<select name="criteria[not_in_usergroup_x][condition1]" tabindex="1">' . construct_select_options($usergroup_options, empty($criteria_cache['not_in_usergroup_x']) ? 6 : $criteria_cache['not_in_usergroup_x']['condition1']) . '</select>'), 'browsing_content_page' => array('<select name="criteria[browsing_content_page][condition1]" tabindex="1">
				<option value="1"' . (empty($criteria_cache['browsing_content_page']['condition1']) ? ' selected="selected"' : '') . '>' . $vbphrase['content'] . '</option>
				<option value="0"' . ($criteria_cache['browsing_content_page']['condition1'] == 0 ? ' selected="selected"' : '') . '>' . $vbphrase['non_content'] . '</option>
			</select>'), 'browsing_forum_x' => array('<select name="criteria[browsing_forum_x][condition1]" tabindex="1">' . construct_select_options(construct_forum_chooser_options(), $criteria_cache['browsing_forum_x']['condition1']) . '</select>'), 'browsing_forum_x_and_children' => array('<select name="criteria[browsing_forum_x_and_children][condition1]" tabindex="1">' . construct_select_options(construct_forum_chooser_options(), $criteria_cache['browsing_forum_x_and_children']['condition1']) . '</select>'), 'style_is_x' => array('<select name="criteria[style_is_x][condition1]" tabindex="1">' . construct_select_options($style_options, $criteria_cache['style_is_x']['condition1']) . '</select>'), 'no_visit_in_x_days' => array('<input type="text" name="criteria[no_visit_in_x_days][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['no_visit_in_x_days']) ? 30 : intval($criteria_cache['no_visit_in_x_days']['condition1'])) . '" />'), 'no_posts_in_x_days' => array('<input type="text" name="criteria[no_posts_in_x_days][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['no_posts_in_x_days']) ? 30 : intval($criteria_cache['no_posts_in_x_days']['condition1'])) . '" />'), 'has_x_postcount' => array('<input type="text" name="criteria[has_x_postcount][condition1]" size="5" class="bginput" tabindex="1" value="' . $criteria_cache['has_x_postcount']['condition1'] . '" />', '<input type="text" name="criteria[has_x_postcount][condition2]" size="5" class="bginput" tabindex="1" value="' . $criteria_cache['has_x_postcount']['condition2'] . '" />'), 'has_never_posted' => array(), 'has_x_reputation' => array('<input type="text" name="criteria[has_x_reputation][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['has_x_reputation']) ? 100 : $criteria_cache['has_x_reputation']['condition1']) . '" />', '<input type="text" name="criteria[has_x_reputation][condition2]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['has_x_reputation']) ? 200 : $criteria_cache['has_x_reputation']['condition2']) . '" />'), 'pm_storage_x_percent_full' => array('<input type="text" name="criteria[pm_storage_x_percent_full][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['pm_storage_x_percent_full']) ? 90 : $criteria_cache['pm_storage_x_percent_full']['condition1']) . '" />', '<input type="text" name="criteria[pm_storage_x_percent_full][condition2]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['pm_storage_x_percent_full']) ? 100 : $criteria_cache['pm_storage_x_percent_full']['condition2']) . '" />'), 'came_from_search_engine' => array(), 'is_date' => array('<input type="text" name="criteria[is_date][condition1]" size="10" class="bginput" tabindex="1" value="' . (empty($criteria_cache['is_date']['condition1']) ? vbdate('d-m-Y', TIMENOW, false, false) : $criteria_cache['is_date']['condition1']) . '" />', '<select name="criteria[is_date][condition2]" tabindex="1">
				<option value="0"' . (empty($criteria_cache['is_date']['condition2']) ? ' selected="selected"' : '') . '>' . $vbphrase['user_timezone'] . '</option>
				<option value="1"' . ($criteria_cache['is_date']['condition2'] == 1 ? ' selected="selected"' : '') . '>' . $vbphrase['utc_universal_time'] . '</option>
			</select>'), 'is_time' => array('<input type="text" name="criteria[is_time][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['is_time']['condition1']) ? vbdate('H:i', TIMENOW, false, false) : $criteria_cache['is_time']['condition1']) . '" />', '<input type="text" name="criteria[is_time][condition2]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['is_time']['condition2']) ? intval(vbdate('H', TIMENOW, false, false)) + 1 . vbdate(':i', TIMENOW, false, false) : $criteria_cache['is_time']['condition2']) . '" />', '<select name="criteria[is_time][condition3]" tabindex="1">
				<option value="0"' . (empty($criteria_cache['is_time']['condition3']) ? ' selected="selected"' : '') . '>' . $vbphrase['user_timezone'] . '</option>
				<option value="1"' . ($criteria_cache['is_time']['condition3'] == 1 ? ' selected="selected"' : '') . '>' . $vbphrase['utc_universal_time'] . '</option>
			</select>'));
    if (sizeof($ad_name_cache)) {
        $criteria_options['ad_x_not_displayed'] = array('<select name="criteria[ad_x_not_displayed][condition1]" tabindex="1">' . construct_select_options($ad_name_cache, $criteria_cache['ad_x_not_displayed']['condition1']) . '</select>');
    }
コード例 #28
0
ファイル: css.php プロジェクト: hungnv0789/vhtm
		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 = '--';
	}
	else
	{
		$dethmark = '';
	}
	cache_styles();
	foreach ($stylecache AS $style)
	{
		print_label_row(
			construct_depth_mark($style['depth'], '--', $depthmark) . " <b>$style[title]</b>",
			construct_link_code($vbphrase['edit'], "css.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;dostyleid=$style[styleid]") .
			construct_link_code($vbphrase['templates'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "expandset=$style[styleid]") .
			construct_link_code($vbphrase['settings'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=editstyle&amp;dostyleid=$style[styleid]")
		);
	}
	print_table_footer();
}

if ($_REQUEST['do'] == 'moo')
{
	unset($vbulletin->debug);
	function print_moo($l, $r)
	{
		print_label_row(htmlspecialchars($l), "<span class=\"smallfont\">$r</span>");
	}
コード例 #29
0
ファイル: template.php プロジェクト: holandacz/nb4
    ?>
");
		}
		return true;
	}
	function js_fetch_style_title()
	{
		styleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value;
		document.forms.downloadform.title.value = style[styleid];
	}
	var style = new Array();
	style['-1'] = "<?php 
    echo $vbphrase['master_style'] . '";';
    foreach ($stylecache as $styleid => $style) {
        echo "\n\tstyle['{$styleid}'] = \"" . addslashes_js($style['title'], '"') . "\";";
        $styleoptions["{$styleid}"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title'];
    }
    echo "\n";
    ?>
	// -->
	</script>
	<?php 
    print_form_header('template', 'download', 0, 1, 'downloadform" target="download');
    print_table_header($vbphrase['download']);
    print_label_row($vbphrase['style'], '
		<select name="dostyleid" onchange="js_fetch_style_title();" tabindex="1" class="bginput">
		' . iif($vbulletin->debug, '<option value="-1">' . $vbphrase['master_style'] . '</option>') . '
		' . construct_select_options($styleoptions, $vbulletin->GPC['dostyleid']) . '
		</select>
	', '', 'top', 'dostyleid');
    print_select_row($vbphrase['product'], 'product', fetch_product_list());
コード例 #30
0
ファイル: ad.php プロジェクト: hungnv0789/vhtm
	// build list of usergroup titles
	$usergroup_options = array();
	foreach ($vbulletin->usergroupcache AS $usergroupid => $usergroup)
	{
		$usergroup_options["$usergroupid"] = $usergroup['title'];
	}

	// build list of style names
	require_once(DIR . '/includes/adminfunctions_template.php');
	cache_styles();
	$style_options = array();
	foreach($stylecache AS $style)
	{
		$style_options["$style[styleid]"] = /*construct_depth_mark($style['depth'], '&nbsp; &nbsp; ') . ' ' .*/ $style['title'];
		$style_options["$style[styleid]"] = construct_depth_mark($style['depth'], '--') . ' ' . $style['title'];
	}

	// build the list of criteria options
	$criteria_options = array(
		'in_usergroup_x' => array(
			'<select name="criteria[in_usergroup_x][condition1]" tabindex="1">' .
				construct_select_options($usergroup_options, (empty($criteria_cache['in_usergroup_x']) ? 2 : $criteria_cache['in_usergroup_x']['condition1'])) .
			'</select>'
		),
		'not_in_usergroup_x' => array(
			'<select name="criteria[not_in_usergroup_x][condition1]" tabindex="1">' .
				construct_select_options($usergroup_options, (empty($criteria_cache['not_in_usergroup_x']) ? 6 : $criteria_cache['not_in_usergroup_x']['condition1'])) .
			'</select>'
		),
		'browsing_content_page' => array(