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

📄 viewoption.php

📁 php+mysql做的调查问卷管理系统php+mysql做的调查问卷管理系统
💻 PHP
字号:
<?
################################################################################
# phpQuestionnaire                           Version 2.2                       #
# Copyright 2003-2005 chumpsoft, inc.        March 28, 2005                    #
################################################################################
#              SCRiPTMAFiA 2005 - THE DiRTY HANDS ON YOUR SCRiPTS              #
################################################################################

#-->> Including Files

require("inc/init.php");
require("inc/mysql.php");
require("inc/functions.php");
require("inc/pfunctions.php");
require("inc/ofunctions.php");

#-->> GET and POST Variables

$varnames = array("sid", "qid", "oid", "tp", "st", "cc", "fa");

SetVars($varnames);

$mqsurvey = mysql_query("select * from phpQSurvey where SID = \"".ProtectMySQL($sid)."\"");
if (!($masurvey = mysql_fetch_array($mqsurvey))) {
	header("Location: error.php");
	exit();
}

#-->> Logging In (if survey results are not public)

$admin = IsAdmin() ? true : false;

if (!$admin) {
	if (!$masurvey["SurveyResults"]) {
		header("Location: admin/index.php");
		exit();
	}
	if ($masurvey["Active"] == 'n') {
		header("Location: fillsurvey.php?sid=".ProtectHTML($sid));
		exit();
	}
}
elseif (!$fa) { $admin = false; }

#-->> Set Language

if ($admin) { SetLanguage('', 'ADMIN'); }
else { SetLanguage($masurvey['Language']); }

#-->> Checking SID

$relocate = false;

$relocate = ($sid) ? false : true;
$relocate = ($qid && ($tp == "t" || ($tp == "o" && $oid))) ? $relocate : true;

if ($relocate) {
	header("Location: error.php");
	exit();
}

$contents =  GrabEntries($sid, $qid, $oid, $masurvey, $tp, $st, $cc, $admin);
if (!$admin) {
	CreatePage("stats", $masurvey, $contents, $admin, "jsstats.php");
	exit;
}
else {
	$templatedata = join('', file("admin/poptemplate.html"));

	$templatedata = str_replace("SRC=\"images/", "SRC=\"admin/images/", $templatedata);
	$templatedata = str_replace("HREF=\"template.css\"", "HREF=\"admin/template.css\"", $templatedata);

	$templatedata = str_replace('::SURVEYNAME::', $phpQlang['AdminTitle'].' :: '.$phpQlang['TextfieldResults'], $templatedata);
	$templatedata = str_replace('::CHARSET::', $phpQlang['CHARSET'], $templatedata);
	$templatedata = str_replace('::CONTENT::', $contents, $templatedata);

	echo $templatedata;
}
?>

⌨️ 快捷键说明

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