Ejemplo n.º 1
0
function getTopicStartTest($t_id)
{
    // Wertprüfung
    $t_id = abs(intval($t_id));
    echo '<form action="index.php?site=start_test&amp;action=getQuestions" method="post">';
    $button = Function_getTopic_03;
    $topic = new Topic();
    $topic->getActiveTopic();
    $arrayTopic = $topic->getTopicArray();
    echo " <div id=\"inner_box_top\">\n";
    // In der Mitte der Inhalt
    showForm($t_id, $button, $arrayTopic);
}
Ejemplo n.º 2
0
    <?php 
$score = Sys::model()->getvaluesByType("article_score");
if (Sys::model()->getvaluesByType("article_type") == "0") {
    $hint = "发表一篇文章会奖励" . $score . "个财富值";
} else {
    $hint = "发表一篇文章会花掉" . $score . "个财富值";
}
?>
    <?php 
echo $form->textFieldRow($model, 'subject', array('hint' => $hint, 'style' => 'width:710px'));
?>
    <?php 
echo $form->ckeditorRow($model, 'content', array('options' => array('toolbar' => 'Simple')));
?>
    <?php 
echo $form->select2Row($model, 'topic_ids', array('asDropDownList' => false, 'style' => 'width:710px;', 'options' => array('tags' => Topic::getTopicArray("name", 20), 'tokenSeparators' => array(',', ' '), 'maximumSelectionSize' => 5)));
?>
    <?php 
echo $form->hiddenField($model, 'publish');
?>
    <?php 
echo $form->toggleButtonRow($model, 'anonymity_yn', array('options' => array('enabledLabel' => '是', 'disabledLabel' => '否', 'enabledStyle' => 'success', 'disabledStyle' => 'error')));
?>
    <div class="form-actions">
        <?php 
$this->widget('bootstrap.widgets.TbButton', array('type' => 'info', 'label' => $model->isNewRecord ? '发布' : '保存', 'buttonType' => 'button', 'htmlOptions' => array('style' => 'margin-right:10px;', 'onclick' => '$("#Article_publish").val(1);$("#article-form").submit();')));
if ($model->isNewRecord) {
    $this->widget('bootstrap.widgets.TbButton', array('label' => '存草稿', 'buttonType' => 'button', 'htmlOptions' => array('onclick' => 'margin-right:10px;', 'onclick' => '$("#Article_publish").val(0);$("#article-form").submit();')));
}
?>
    </div>
Ejemplo n.º 3
0
     $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"])) {
         $questionText = htmlspecialchars($_REQUEST["question"]);
     }
     $descriptionText = "";
Ejemplo n.º 4
0
         }
         // Session Variable setzen
         $_SESSION['values']['question']['new'] = 1;
     }
     $question->setType($_SESSION['values']['question']['qt']);
     $question->setTopic($_SESSION['values']['question']['t_id']);
     if ($_SESSION['values']['question']['descriptionText'] == '') {
         $_SESSION['values']['question']['description'] = 0;
     }
     if ($_SESSION['values']['question']['description'] == 0 && $_SESSION['values']['question']['descriptionText'] != '') {
         $_SESSION['values']['question']['descriptionText'] = '';
     }
     $check = $question->checkQuestion();
     if ($check == 1 && $_SESSION['values']['question']['t_id'] != '') {
         $topic->getTopic();
         $topicArray = $topic->getTopicArray();
         $question->setAllTopics($topicArray);
         $question->showQuestionInfos();
         $answer->setQuestionType($_SESSION['values']['question']['qt']);
         $answer->addAnswer();
         $answer->addAnswer();
         $answer->setType();
     } elseif ($check == 2) {
         echo "<meta http-equiv='refresh' content='0; url=index.php?site=collect_question&amp;error=exists' />";
     } elseif ($check == 0) {
         echo "<meta http-equiv='refresh' content='0; url=index.php?site=collect_question&amp;error=missing' />";
     } elseif ($check == 3) {
         echo " <meta http-equiv='refresh' content='0; url=index.php?site=collect_question&amp;error=blank' />";
     }
     break;
 case 'setAnswers':