Exemple #1
0
function freetype_answers($parent_id, $anz_nutzer)
{
    global $fo_file, $pattern, $replace;
    $query = "SELECT `text`\n              FROM evalanswer\n              INNER JOIN evalanswer_user USING(evalanswer_id)\n              WHERE parent_id = ? AND `text` != ''\n              ORDER BY position";
    $statement = DBManager::get()->prepare($query);
    $statement->execute(array($parent_id));
    while ($answer = $statement->fetchColumn()) {
        $counter++;
        fputs($fo_file, "                <fo:table-row>\n");
        fputs($fo_file, "                  <fo:table-cell ><fo:block linefeed-treatment=\"preserve\" font-size=\"8pt\">" . $counter . ". " . preg_replace($pattern, $replace, smile(xml_escape($answer))) . "</fo:block></fo:table-cell>\n");
        fputs($fo_file, "                </fo:table-row>\n");
    }
    fputs($fo_file, "                <fo:table-row>\n");
    fputs($fo_file, "                  <fo:table-cell ><fo:block font-size=\"8pt\">" . _("Anzahl der Teilnehmer") . ": " . $anz_nutzer . "</fo:block></fo:table-cell>\n");
    fputs($fo_file, "                </fo:table-row>\n");
}
Exemple #2
0
        ?>
" align="top" alt="" /></a>
  
      <a href="javascript: Pophistory()">
      <img src="images/quote.gif" border="0" class="form" title="<?php 
        echo $language['HISTORY'];
        ?>
/Moderate" align="top" alt="" /></a>

      <br />
      <?php 
        shoutfun('chatForm', 'chatbarText');
        ?>
<br>
      <?php 
        smile();
        ?>
<div style="display: none;" id="sextra"><br><?php 
        sextra();
        ?>
</div>
      
    </form>

 </div>
<script language="JavaScript">

function show_hide(sextra)
{
  if(document.getElementById(sextra))
  {
Exemple #3
0
        $sql = "SELECT poster_id, topic_id FROM " . $NPDS_Prefix . "posts WHERE (post_id = '{$post_id}')";
        $result = sql_query($sql);
        if (!$result) {
            forumerror('0022');
        }
        $row2 = sql_fetch_assoc($result);
        $userdata['uid'] = $row2['poster_id'];
        // IF we made it this far we are allowed to edit this message
        settype($forum, "integer");
        $myrow2 = sql_fetch_assoc(sql_query("SELECT forum_type FROM " . $NPDS_Prefix . "forums WHERE (forum_id = '{$forum}')"));
        $forum_type = $myrow2['forum_type'];
        if ($allow_html == 0 || isset($html)) {
            $messageP = htmlspecialchars($messageP, ENT_COMPAT | ENT_HTML401, cur_charset);
        }
        if ($allow_bbcode and $forum_type != 6 and $forum_type != 5) {
            $messageP = smile($messageP);
        }
        if ($forum_type != 6 and $forum_type != 5) {
            $messageP = aff_code($messageP);
            $messageP = str_replace("\n", '<br />', removeHack($messageP));
            $messageP .= "<br /><p>" . translate("This message was edited by") . ' : ' . $userdata['uname'] . "</p>";
            if ($allow_bbcode) {
                $messageP = aff_video_yt($messageP);
            }
        } else {
            $messageP .= "\n\n" . translate("This message was edited by") . ' : ' . $userdata['uname'];
        }
        $messageP = addslashes($messageP);
        break;
}
$theposterdata = get_userdata_from_id($userdatat[0]);
Exemple #4
0
         forumerror("0025");
     }
 }
 settype($submitP, 'string');
 if ($submitP) {
     $acc = "editpost";
     $title = stripslashes($subject);
     $message = stripslashes(make_clickable($message));
     include "preview.php";
 } else {
     $image_subject = $myrow['image'];
     $title = stripslashes($title);
     $message = $myrow['post_text'];
     if ($forum_type != 6 and $forum_type != 5) {
         $message = str_replace("<br />", "\n", $message);
         $message = smile($message);
         $message = undo_htmlspecialchars($message, ENT_COMPAT | ENT_HTML401, cur_charset);
     } else {
         $message = htmlspecialchars($message, ENT_COMPAT | ENT_HTML401, cur_charset);
     }
     $message = stripslashes($message);
 }
 if (($Mmod or $userdata[0] == $myrow['uid']) and $forum_access != 9) {
     echo '
   <h4>' . translate("Editing Post") . ' de ' . $myrow['uname'] . '</h4>';
     echo '<form action="editpost.php" method="post" name="coolsus">';
     if ($Mmod) {
         echo '
      <div class="form-group row">
         <div class="col-sm-3">
            <label class="form-control-label" for="subject">' . translate("Title") . '</label>
Exemple #5
0
 echo '<div class="col-sm-2">
   <label class="control-label">';
 echo '<b>' . translate("Message: ") . '</b><br />';
 echo 'HTML : ';
 if ($allow_html == 1) {
     echo translate("On") . '<br />';
     echo HTML_Add(false);
 } else {
     echo translate("Off") . "<br />";
 }
 if (isset($citation) && !isset($submitP)) {
     $sql = "SELECT p.post_text, p.post_time, u.uname FROM " . $NPDS_Prefix . "posts p, " . $NPDS_Prefix . "users u WHERE post_id='{$post}' AND p.poster_id = u.uid";
     if ($r = sql_query($sql)) {
         $m = sql_fetch_assoc($r);
         $text = $m['post_text'];
         $text = smile($text);
         $text = str_replace("<br />", "\n", $text);
         $text = stripslashes($text);
         if ($m['post_time'] != "" && $m['uname'] != "") {
             $reply = '<div class="quote">' . translate("Quote") . ' : <b>' . $m['uname'] . '</b>&nbsp;' . $text . '&nbsp;</div>';
         } else {
             $reply = $text . "\n";
         }
     } else {
         $reply = translate("Error Connecting to DB") . "\n";
     }
 }
 if (!isset($reply)) {
     $reply = $message;
 }
 echo '
Exemple #6
0
 /**
  * Apply markup rules on plain text.
  *
  * @param TextFormat $markup  Markup rules applied on marked-up text.
  * @param string     $text    Marked-up text on which rules are applied.
  *
  * @return string  HTML code computed from marked-up text.
  */
 private static function markupText($markup, $text)
 {
     return symbol(smile($markup->format($text), false));
 }
Exemple #7
0
        <div class="card-header">';
 if ($allow_html == 1) {
     echo '<span class="text-success pull-right" title="HTML ' . translate("On") . '" data-toggle="tooltip"><i class="fa fa-code fa-lg"></i></span>' . HTML_Add();
     //echo HTML_Add(false);
 } else {
     echo '<span class="text-danger pull-right" title="HTML ' . translate("Off") . '" data-toggle="tooltip"><i class="fa fa-code fa-lg"></i></span>';
 }
 echo '
     </div>
     <div class="card-block">';
 if ($reply and $message == "") {
     $sql = "SELECT p.msg_text, p.msg_time, u.uname FROM " . $NPDS_Prefix . "priv_msgs p, " . $NPDS_Prefix . "users u ";
     $sql .= "WHERE (p.msg_id='{$msg_id}') AND (p.from_userid=u.uid) AND (p.type_msg='0')";
     if ($result = sql_query($sql)) {
         $row = sql_fetch_assoc($result);
         $text = smile($row['msg_text']);
         $text = str_replace("<br />", "\n", $text);
         $text = str_replace("<BR />", "\n", $text);
         $text = str_replace("<BR>", "\n", $text);
         $text = stripslashes($text);
         if ($row['msg_time'] != "" && $row['uname'] != "") {
             $Xreply = $row['msg_time'] . ", " . $row['uname'] . " " . translate("wrote:") . "\n{$text}\n";
         } else {
             $Xreply = $text;
         }
         $Xreply = '
        <div class="blockquote">
        ' . $Xreply . '
        </div>';
     } else {
         $Xreply = translate("Could not connect to the forums database.") . "\n";