⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 html.php

📁 GForge 3.0 协作开发平台 支持CVS, mailing lists, bug tracking, message boards/forums, task management, perman
💻 PHP
📖 第 1 页 / 共 2 页
字号:
	$return .= '		<select name="'.$name.'" multiple="multiple" size="'.$size.'">';	if ($show_100) {		/*			Put in the default NONE box		*/		$return .= '		<option value="100"';		for ($j=0; $j<$checked_count; $j++) {			if ($checked_array[$j] == '100') {				$return .= ' selected="selected"';			}		}		$return .= '>'.$Language->getText('include_html','none').'</option>';	}	$rows=db_numrows($result);	for ($i=0; $i<$rows; $i++) {		if ((db_result($result,$i,0) != '100') || (db_result($result,$i,0) == '100' && !$show_100)) {			$return .= '				<option value="'.db_result($result,$i,0).'"';			/*				Determine if it's checked			*/			$val=db_result($result,$i,0);			for ($j=0; $j<$checked_count; $j++) {				if ($val == $checked_array[$j]) {					$return .= ' selected="selected"';				}			}			$return .= '>'.$val.'-'. substr(db_result($result,$i,1),0,35). '</option>';		}	}	$return .= '		</select>';	return $return;}/** *	html_build_checkbox() - Render checkbox control * *	@param name - name of control *	@param value - value of control *	@param checked - true if control should be checked *	@return html code for checkbox control */function html_build_checkbox($name, $value, $checked) {	return '<input type="checkbox" name="'.$name.'"'		.' value="'.$value.'"'		.($checked ? 'checked="checked"' : '').'>';}/** * html_get_priority_color() - Return the color value for the index that was passed in * (defined in $sys_urlroot/themes/<selected theme>/theme.php) * * @param		int		Index */function html_get_priority_color ($index) {	global $bgpri;	/* make sure that index is of appropriate type and range */	$index = (int)$index;	if ($index<1) {		$index=1;	} else if ($index>9) {		$index=9;	}	//return "prior$index";	return $bgpri[$index];}/** * build_priority_select_box() - Wrapper for html_build_priority_select_box() * * @see html_build_priority_select_box() */function build_priority_select_box ($name='priority', $checked_val='5', $nochange=false) {	echo html_build_priority_select_box ($name, $checked_val, $nochange);}/** * html_build_priority_select_box() - Return a select box of standard priorities. * The name of this select box is optional and so is the default checked value. * * @param		string	Name of the select box * @param		string	The value to be checked * @param		bool	Whether to make 'No Change' selected. */function html_build_priority_select_box ($name='priority', $checked_val='5', $nochange=false) {	global $Language;?>	<select name="<?php echo $name; ?>"><?php if($nochange) { ?>	<option value="100"<?php if ($nochange) {echo " selected=\"selected\"";} ?>><?php echo $Language->getText('include_html','no_change') ?></option><?php }  ?>	<option value="1"<?php if ($checked_val=="1") {echo " selected=\"selected\"";} ?>>1 - <?php echo $Language->getText('include_html','priority_lowest') ?></option>	<option value="2"<?php if ($checked_val=="2") {echo " selected=\"selected\"";} ?>>2</option>	<option value="3"<?php if ($checked_val=="3") {echo " selected=\"selected\"";} ?>>3</option>	<option value="4"<?php if ($checked_val=="4") {echo " selected=\"selected\"";} ?>>4</option>	<option value="5"<?php if ($checked_val=="5") {echo " selected=\"selected\"";} ?>>5 - <?php echo $Language->getText('include_html','priority_medium') ?></option>	<option value="6"<?php if ($checked_val=="6") {echo " selected=\"selected\"";} ?>>6</option>	<option value="7"<?php if ($checked_val=="7") {echo " selected=\"selected\"";} ?>>7</option>	<option value="8"<?php if ($checked_val=="8") {echo " selected=\"selected\"";} ?>>8</option>	<option value="9"<?php if ($checked_val=="9") {echo " selected=\"selected\"";} ?>>9 - <?php echo $Language->getText('include_html','priority_highest') ?></option>	</select><?php}/** * html_buildcheckboxarray() - Build an HTML checkbox array. * * @param		array	Options array * @param		name	Checkbox name * @param		array	Array of boxes to be pre-checked */function html_buildcheckboxarray($options,$name,$checked_array) {	$option_count=count($options);	$checked_count=count($checked_array);	for ($i=1; $i<=$option_count; $i++) {		echo '			<br /><input type="checkbox" name="'.$name.'" value="'.$i.'"';		for ($j=0; $j<$checked_count; $j++) {			if ($i == $checked_array[$j]) {				echo ' checked="checked"';			}		}		echo ' /> '.$options[$i];	}}/** *	site_user_header() - everything required to handle security and *	add navigation for user pages like /my/ and /account/ * *	@param		array	Must contain $user_id */function site_header($params) {	GLOBAL $HTML;	/*		Check to see if active user		Check to see if logged in	*/	echo $HTML->header($params);	echo html_feedback_top($GLOBALS['feedback']);}/** * site_footer() - Show the HTML site footer. * * @param		array	Footer params array */function site_footer($params) {	GLOBAL $HTML;	$HTML->footer($params);}/** *	site_project_header() - everything required to handle *	security and state checks for a project web page * *	@param params array() must contain $toptab and $group */function site_project_header($params) {	GLOBAL $HTML;	/*		Check to see if active		Check to see if project rather than foundry		Check to see if private (if private check if user_ismember)	*/	$group_id=$params['group'];	//get the project object	$project =& group_get_object($group_id);	if (!$project || !is_object($project)) {		exit_error("GROUP PROBLEM","PROBLEM CREATING GROUP OBJECT");	} else if ($project->isError()) {		exit_error("Group Problem",$project->getErrorMessage());	}	//group is private	if (!$project->isPublic()) {		//if it's a private group, you must be a member of that group		session_require(array('group'=>$group_id));	}	//for dead projects must be member of admin project	if (!$project->isActive()) {		//only SF group can view non-active, non-holding groups		session_require(array('group'=>'1'));	}	echo $HTML->header($params);	echo html_feedback_top($GLOBALS['feedback']);//	echo $HTML->project_tabs($params['toptab'],$params['group'],$params['tabtext']);}/** *	site_project_footer() - currently a simple shim *	that should be on every project page,  rather than *	a direct call to site_footer() or theme_footer() * *	@param params array() empty */function site_project_footer($params) {	GLOBAL $HTML;	echo html_feedback_bottom($GLOBALS['feedback']);	echo $HTML->footer($params);}/** *	site_user_header() - everything required to handle security and *	add navigation for user pages like /my/ and /account/ * *	@param params array() must contain $user_id */function site_user_header($params) {	GLOBAL $HTML,$Language;	/*		Check to see if active user		Check to see if logged in	*/	echo $HTML->header($params);	echo html_feedback_top($GLOBALS['feedback']);	echo ($HTML->BeginSubMenu());	echo ($HTML->PrintSubMenu(		      array($Language->getText('menu','my_personal_page'),			    $Language->getText('menu','diary_notes'),			    $Language->getText('menu','account_maintenance')),		      array('"/my/"','"/my/diary.php"','"/account/"')));	plugin_hook ("usermenu", false) ;	echo ($HTML->EndSubMenu());}/** *	site_user_footer() - currently a simple shim that should be on every user page, *	rather than a direct call to site_footer() or theme_footer() * *	@param params array() empty */function site_user_footer($params) {	GLOBAL $HTML;	echo html_feedback_bottom($GLOBALS['feedback']);	echo $HTML->footer($params);}/** *	html_clean_hash_string() - Remove noise characters from hex hash string * *	Thruout SourceForge, URLs with hexadecimal hash string parameters *	are being sent via email to request confirmation of user actions. *	It was found that some mail clients distort this hash, so we take *	special steps to encode it in the way which help to preserve its *	recognition. This routine * *	@param hashstr required hash parameter as received from browser *	@return pure hex string */function html_clean_hash_string($hashstr) {	if (substr($hashstr,0,1)=="_") {		$hashstr = substr($hashstr, 1);	}	if (substr($hashstr, strlen($hashstr)-1, 1)==">") {		$hashstr = substr($hashstr, 0, strlen($hashstr)-1);	}	return $hashstr;}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -