stats.php

来自「调查问卷系统源码。想下的就下吧。不要条件」· PHP 代码 · 共 68 行

PHP
68
字号
<?
################################################################################
# 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/sfunctions.php");

#-->> GET and POST Variables

$varnames = array("st", "vw", "sid", "cq", "qcount", "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();
	}
	elseif ($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 $st

if (!$st) { $st = 'a'; }
if ($st != 'v' && $st != 'u' && $st != 'a') {
	header("Location: choose.php");
	exit();
}

#-->> Results

$vw = ($vw=="a" || $vw=="p" || substr($vw,0,1) == "q") ? $vw : "n";
$contents = CreateStats($masurvey, $st, $vw, $admin);

#-->> Output Page

CreatePage("stats", $masurvey, $contents, $admin, "jsstats.php");

?>

⌨️ 快捷键说明

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