本文整理汇总了PHP中Question::loadQuestion方法的典型用法代码示例。如果您正苦于以下问题:PHP Question::loadQuestion方法的具体用法?PHP Question::loadQuestion怎么用?PHP Question::loadQuestion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question::loadQuestion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getData
function getData($limit, $quest)
{
for ($i = 0; $i < $limit; $i++) {
$j = $i + 1;
$qu = new Question();
$topics = new Topic();
$qu->setID($quest[$i]['q_id']);
$qu->loadQuestion();
$qu_text = $qu->getQuestion();
echo "<tr>";
echo "<td class='td'>{$j}</td>";
echo "<td class='td'>" . $quest[$i]['q_id'] . "</td>";
echo "<td class='td'>" . stripslashes($qu_text) . "</td>";
// array Werte ausgeben
echo "<td class='td'> " . $quest[$i]['count'] . "</td>";
echo "<td class='td' > " . $quest[$i]['percentagCorrect'] . "%</td>";
echo "</tr>";
}
}
示例2: session_start
<?php
session_start();
$whitelist = array('region');
require '../controller/dbsettings.php';
if (isset($_GET["question"])) {
if (Answer::checkUserSubmitted($_GET["question"], $_SESSION["user_id"])) {
header("Location: waitingScreen.php?message=" . urlencode("Come on - you can't submit twice..."));
}
}
$_SESSION["questionNumber"] = Game::questionStatusRedirect();
$theQuestion = Question::loadQuestion();
?>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../style/global.css">
<link rel="stylesheet" href="../style/getQuestion.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<link href="../style/nouislider.min.css" rel="stylesheet">
<link rel="stylesheet" href="../style/inputSlider.css">
<script src="../scripts/socketScripts.js"></script>
<style>
html, body {
height: 100%;
margin: 0px;
padding: 0px
background: #4C3D91; /* fallback for old browsers */
}
#overlayWrap{
示例3:
case 'setQuestionActive':
//Aktivieren einer Frage
$question->setID($q_id);
$question->setActive();
echo " <meta http-equiv='refresh' content='0; url=?{$site}'>";
break;
case 'showDetails':
// Anzeigen der Fragedetails
if ($q_id != 0) {
$_SESSION['values']['question']['q_id'] = $q_id;
}
if ($error == 'conflict') {
echo "<h5>" . Topic_01 . " <br /></h5>";
}
$question->setID($_SESSION['values']['question']['q_id']);
$question->loadQuestion();
$type = $question->getType();
$topics->getTopic();
$topicArray = $topics->getTopicArray();
$question->setAllTopics($topicArray);
$question->showQuestionDetails();
$answer->setQuestionID($_SESSION['values']['question']['q_id']);
$answer->setAnswerType($_SESSION['values']['question']['qt']);
$answer->getAnswers();
$answer->showAnswers();
break;
case 'updateQuestion':
// Question updaten
// Wertzuweisung
$questionText = "";
if (isset($_REQUEST["question"])) {