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


PHP construct_depth_mark函数代码示例

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


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

示例1: fetchStyles

 /**
  * 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;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:25,代码来源:style.php

示例2: construct_forum_chooser_options

/**
* 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;
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:37,代码来源:adminfunctions.php

示例3: print_style_chooser_row

/**
* 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);
}
开发者ID:holandacz,项目名称:nb4,代码行数:28,代码来源:adminfunctions_template.php

示例4: construct_forum_chooser_options

/**
* 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;
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:33,代码来源:adminfunctions.php

示例5: import_generated_style

/**
* 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>';
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:49,代码来源:adminfunctions_template.php

示例6: implode

            $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));
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:forumpermission.php

示例7: fetch_style_title_options_array

/**
* 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;
}
开发者ID:holandacz,项目名称:nb4,代码行数:19,代码来源:adminfunctions_options.php

示例8: array

		}
		$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;
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:announcement.php

示例9: vB_SiteMap_Node

// #########################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) {
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:sitemap.php

示例10: print_cp_header

 $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);
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:kbankadmin.php

示例11: import_generated_style

/**
* 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>';
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:30,代码来源:adminfunctions_template.php

示例12: array

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);
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:sitemap.php

示例13: foreach

        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();
/*=========================================================================*\
|| #######################################################################
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:announcement.php

示例14: foreach

		<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);
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:user.php

示例15: substr

                            }
                        }
                        $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");
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:awards.php


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