当前位置: 首页>>代码示例>>PHP>>正文


PHP Question::loadQuestion方法代码示例

本文整理汇总了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>";
    }
}
开发者ID:eruedin,项目名称:cats,代码行数:19,代码来源:statisticFunctions.php

示例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{
开发者ID:theborland,项目名称:myhoot,代码行数:31,代码来源:userScreenWorldTime.php

示例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"])) {
开发者ID:eruedin,项目名称:cats,代码行数:31,代码来源:topic.php


注:本文中的Question::loadQuestion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。