function fail()
{
    global $quest_user, $char, $owner_id;
    the_text(23, $quest_user, $owner_id);
    ///*echo '<BR><BR>';
    //QuoteTable('open');
    echo '<font color=#F0F0F0><a href ="?done=1">1) Тьфу на вас. </a><br>';
    //QuoteTable('close');
    echo '</tr></td>';
    //удалим запись о квесте
    myquery("DELETE FROM quest_engine_users WHERE user_id=" . $char['user_id'] . " AND quest_owner_id=" . $owner_id . " ");
}
 function the_question()
 {
     global $post;
     $hint = get_post_meta($post->ID, 'vibe_question_hint', true);
     $type = get_post_meta(get_the_ID(), 'vibe_question_type', true);
     echo '<div id="question" data-ques="' . get_the_ID() . '">';
     echo '<div class="question ' . $type . '">';
     if (get_field('comp_quest')) {
         echo '<div class="passage">';
         echo get_field('comp_question_here');
         echo '</div>';
         the_content();
     } else {
         the_content();
     }
     if (isset($hint) && strlen($hint) > 5) {
         echo '<a class="show_hint tip" tip="' . __('SHOW HINT', 'vibe') . '"><span></span></a>';
         echo '<p class="hint"><i>' . __('HINT', 'vibe') . ' : ' . $hint . '</i></p>';
     }
     echo '</div>';
     switch ($type) {
         case 'truefalse':
             the_options('truefalse');
             break;
         case 'single':
             the_options('single');
             break;
         case 'multiple':
             the_options('multiple');
             break;
         case 'match':
             the_options('match');
             break;
         case 'sort':
             the_options('sort');
             break;
         case 'fillblank':
             the_fillblank();
             break;
         case 'select':
             the_selectdropdown();
             break;
         case 'smalltext':
             the_text();
             break;
         case 'largetext':
             the_textarea();
             break;
     }
     echo '</div><div id="ajaxloader" class="disabled"></div>';
 }
 function the_question($id = null)
 {
     if (!empty($id)) {
         $post = get_post($id);
     }
     global $post;
     $hint = get_post_meta($post->ID, 'vibe_question_hint', true);
     $type = get_post_meta(get_the_ID(), 'vibe_question_type', true);
     echo '<div id="question" data-ques="' . get_the_ID() . '">';
     echo '<div class="question ' . $type . '">';
     the_content();
     if (isset($hint) && strlen($hint) > 5) {
         echo '<a class="show_hint tip" tip="' . __('SHOW HINT', 'vibe') . '"><span></span></a>';
         echo '<div class="hint"><i><span class="left">' . __('HINT', 'vibe') . ' : </span>' . do_shortcode(apply_filters('the_content', $hint)) . '</i></div>';
     }
     echo '</div>';
     switch ($type) {
         case 'truefalse':
             the_options('truefalse');
             break;
         case 'single':
             the_options('single');
             break;
         case 'multiple':
             the_options('multiple');
             break;
         case 'match':
             the_options('match');
             break;
         case 'sort':
             the_options('sort');
             break;
         case 'smalltext':
             the_text();
             break;
         case 'largetext':
             the_textarea();
             break;
         case 'fillblank':
         case 'select':
             break;
     }
     the_marked_question_answer();
     echo '</div><div id="ajaxloader" class="disabled"></div>';
 }