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

📄 vfunctions.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

function recreatesurvey( $sid, $uid, $tablewidth, $masurvey, $print )
{
	global $phpQlang;
	$cq = $cq ? $cq : 1;
	$mqinfo = mysql_query( "select * from phpQUser where SID = \"".protectmysql( $sid )."\" and UID = \"".protectmysql( $uid )."\"" );
	if ( $mainfo = mysql_fetch_array( $mqinfo ) )
	{
		$ipaddr = $mainfo['IPAddr'] ? $mainfo['IPAddr'] : $phpQlang['unavailable'];
		$contents = "<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH={$tablewidth}>\n";
		$contents .= "<TR><TD ><B>".$phpQlang['Date'].":</B>&nbsp;</TD><TD>".$mainfo['CompleteDate']."</TD></TR>\n";
		$contents .= "<TR><TD ><B>".$phpQlang['IPAddress'].":</B>&nbsp;</TD><TD>{$ipaddr}</TD></TR>\n";
		if ( !$print )
		{
			$contents .= "<TR><TD width=15%><B>".$phpQlang['ResultsView'].":</B>&nbsp;</TD><TD>";
			$contents .= "<B>".$phpQlang['HTMLResults']."</B> | <A HREF=\"view.php?sid={$sid}&uid={$uid}&print=1\">".$phpQlang['PrinterResults']."</A>";
			$contents .= "</TD></TR>\n";
		}
		$restrictions = array( );
		if ( substr( $mainfo['CheckType'], 0, 1 ) )
		{
			$restrictions[] = $phpQlang['UniqueIPAddress'];
		}
		if ( substr( $mainfo['CheckType'], 1, 1 ) )
		{
			$restrictions[] = $phpQlang['Cookies'];
		}
		if ( substr( $mainfo['CheckType'], 2, 1 ) )
		{
			$email = $mainfo['Email'] ? $mainfo['Email'] : $phpQlang['notentered'];
			if ( $mainfo['Email'] )
			{
				$email .= $mainfo['EmailConfirm'] == "y" ? " ".$phpQlang['confirmed'] : " ".$phpQlang['unconfirmed'];
			}
			$email = protecthtml( $email );
			if ( !$print || $mainfo['Email'] )
			{
				$contents .= "<TR><TD ><B>".$phpQlang['Email'].":</B>&nbsp;</TD><TD>{$email}</TD></TR>\n";
			}
			$restrictions[] = $phpQlang['VerifiedEmailAddress'];
		}
		if ( count( $restrictions ) && !$print )
		{
			$contents .= "<TR><TD ><B>".$phpQlang['UserRestrictions'].":</B>&nbsp;</TD><TD>".join( ", ", $restrictions )."</TD></TR>\n";
		}
		$contents .= "</TABLE>\n";
	}
	$contents .= "<BR>\n";
	$contents .= "<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH={$tablewidth}>\n";
	if ( !$print )
	{
		$contents .= "<FORM>\n";
	}
	$mqquestion = mysql_query( "select * from phpQQuestion where SID = \"".protectmysql( $sid )."\" and SortOrder >= \"".protectmysql( $cq )."\" order by SortOrder" );
	while ( $maquestion = mysql_fetch_array( $mqquestion ) )
	{
		if ( $maquestion['Type'] != "pagebreak" && ( !$print || $maquestion['Type'] != "htmlcontent" ) )
		{
			$qstring = "select * from phpQAnswer where SID = \"".protectmysql( $sid )."\" ";
			$qstring .= "and QID = \"".protectmysql( $maquestion['QID'] )."\" and UID = \"".protectmysql( $uid )."\"";
			$mquidanswer = mysql_query( $qstring );
			$uidanswer = ( $mauidanswer = mysql_fetch_array( $mquidanswer ) ) ? $mauidanswer['Answer'] : "";
			$contents .= printquestion( $maquestion, $masurvey );
			$contents .= printanswers( $maquestion, $masurvey, $uidanswer, $print );
		}
		else
		{
			if ( !$print )
			{
				$next = true;
				break;
			}
		}
		++$cq;
	}
	if ( !$print )
	{
		$buttontext = $next ? $phpQlang['Next'] : $phpQlang['Close'];
		$contents .= printnextbutton( $sid, $buttontext );
		$contents .= "<INPUT TYPE=hidden NAME=sid VALUE=\"{$sid}\">\n";
		$contents .= "<INPUT TYPE=hidden NAME=uid VALUE=\"{$uid}\">\n";
		$contents .= ( "<INPUT TYPE=hidden NAME=cq VALUE=\"".( $cq + 1 ) )."\">\n";
		$contents .= "</FORM>\n";
	}
	$contents .= "</TABLE>\n";
	return $contents;
}

function printnextbutton( $sid, $buttontext )
{
	global $phpQlang;
	$condition = $buttontext == $phpQlang['Close'] ? true : false;
	$submittype = $condition ? "button" : "submit";
	$clickjs = $condition ? "ONCLICK=\"window.close()\"" : "";
	$contents = "<TR><TD ALIGN=center>\n";
	$contents .= "<TABLE CELLPADDING=2 CELLSPACING=0 BORDER=0><TR>\n";
	$contents .= "<TD><INPUT TYPE={$submittype} {$clickjs} VALUE=\"{$buttontext}\"></TD>\n";
	$contents .= "</TR></TABLE>\n";
	$contents .= "</TD></TR>\n";
	return $contents;
}

?>

⌨️ 快捷键说明

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