コード例 #1
0
/**
 * Converts tcecode text to simple string for XHTML title attribute.
 * @param $str (string) text to process
 * return string
 */
function F_tcecodeToTitle($str)
{
    require_once '../config/tce_config.php';
    global $l;
    $str = F_remove_tcecode($str);
    $str = F_compact_string($str);
    $str = htmlspecialchars($str, ENT_COMPAT, $l['a_meta_charset']);
    return $str;
}
コード例 #2
0
    $sql .= 'question_description';
}
if ($r = F_db_query($sql, $db)) {
    $countitem = 1;
    while ($m = F_db_fetch_array($r)) {
        echo '<option value="' . $m['question_id'] . '"';
        if ($m['question_id'] == $question_id) {
            echo ' selected="selected"';
        }
        echo '>' . $countitem . '. ';
        if (!F_getBoolean($m['question_enabled'])) {
            echo '-';
        } else {
            echo $qtype[$m['question_type'] - 1];
        }
        echo ' ' . htmlspecialchars(F_substr_utf8(F_remove_tcecode($m['question_description']), 0, K_SELECT_SUBSTRING), ENT_NOQUOTES, $l['a_meta_charset']) . '</option>' . K_NEWLINE;
        $countitem++;
    }
    if ($countitem == 1) {
        echo '<option value="0">&nbsp;</option>' . K_NEWLINE;
    }
} else {
    echo '</select></span></div>' . K_NEWLINE;
    F_display_db_error();
}
echo '</select>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormNoscriptSelect('selectrecord');
echo '<div class="row"><hr /></div>' . K_NEWLINE;
echo '<div class="row">' . K_NEWLINE;