Пример #1
0
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/i]', '</em>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[ul]', '<ul>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/ul]', '</ul>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[list]', '<ul>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/list]', '</ul>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[li]', '<li>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/li]', '</li>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[center]', '<div style=\"text-align: center;\">')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/center]', '</div>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[php]', '<pre class=\"php\">')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/php]', '</pre>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[code]', '<pre>')";
 $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = REPLACE(artikel, '[/code]', '</pre>')";
 $res = $db->query("SELECT id, lang, content FROM " . SQLPREFIX . "faqdata ORDER BY id, lang");
 if ($db->num_rows($res) > 0) {
     while ($row = $db->fetch_object($res)) {
         $updates[] = array("id" => $row->id, "lang" => $row->lang, "content" => nl2br(parseUBB($row->content)));
     }
     foreach ($updates as $value) {
         $query[] = "UPDATE " . SQLPREFIX . "faqdata SET content = '" . addslashes($value["content"]) . "' WHERE id = " . $value["id"] . " AND lang = '" . $value["lang"] . "'";
     }
 }
 unset($res);
 $res = $db->query("SELECT id, artikel FROM " . SQLPREFIX . "faqnews ORDER BY id, lang");
 if ($db->num_rows($res) > 0) {
     while ($row = $db->fetch_object($res)) {
         $updates[] = array("id" => $row->id, "artikel" => nl2br(parseUBB($row->artikel)));
     }
     foreach ($updates as $value) {
         $query[] = "UPDATE " . SQLPREFIX . "faqnews SET artikel = '" . addslashes($value["artikel"]) . "' WHERE id = " . $value["id"];
     }