コード例 #1
0
ファイル: FeedbackAnalysis.php プロジェクト: upa8/Polaris2k16
<?php

require_once '../config/config.php';
require_once 'Polaris.php';
$Polaris = new Polaris();
$query = $Polaris->analysis();
$q1_op1 = 0;
$q1_op2 = 0;
$q1_op3 = 0;
$q1_op4 = 0;
$q2_op1 = 0;
$q2_op2 = 0;
$q2_op3 = 0;
$q2_op4 = 0;
$q3_op1 = 0;
$q3_op2 = 0;
$q3_op3 = 0;
$q3_op4 = 0;
$q4_op1 = 0;
$q4_op2 = 0;
$q4_op3 = 0;
$q4_op4 = 0;
while ($result = $query->fetchObject()) {
    $q1 = $result->quest1;
    switch ($q1) {
        case '4':
            # code...
            $q1_op1 = $q1_op1 + 1;
            break;
        case '3':
            # code...
コード例 #2
0
ファイル: androidApi.php プロジェクト: upa8/Polaris2k16
<?php

// Get the files
require_once '../config/config.php';
require_once '../classes/Polaris.php';
$Polaris = new Polaris();
//echo $Polaris->getTotalEntries();
$response = array();
// Check todays key
// This is single array response
if (isset($_GET['key'])) {
    $key = $_GET['key'];
    if ($key == "mario" || $key == "dave" || $key == "wolf" || $key == "contra" || $key == "roadrash" || $key == "matrix" || $key == "fifa" || $key == "smackdown" || $key == "godofwar" || $key == "pacman" || $key == "pinball" || $key == "superman" || $key == "batman") {
        $response["success"] = 1;
    } else {
        $response["success"] = 0;
    }
}
// This is double array response
/*
	if(isset($_GET['doubleArrayResponse'])){
		$start = 5;
		while ( $start>0) {
			# code...
		$response['success'] = 1;
		$response['new'] = array();
		$new = array();
		$new["first"] = "first";
		$new["first"] = "second";
		array_push($response['new'], $new);
		//echo json_encode($response);