Pradinis
Pagalba
Užsisakyk!
- Reklamą
- Hostingą
- El. pašto dėžutę
Užsisakyk!
Įrankiai
Pasidalink
- Visos temos
<?php
// LT to <span style="border-bottom: 1px dotted black;">HTML</span> encoded characters transform function
function lt2html_parse($text) {
$search = array(
"Ą", "Č", "Ę", "Ė", "Į", "Š", "Ų", "Ū", "Ž",
"ą", "č", "ę", "ė", "į", "š", "ų", "ū", "ž");
$replace = array(
"Ą", "Č", "Ę", "Ė", "Į", "Š", "Ų", "Ū", "Ž",
"ą", "č", "ę", "ė", "į", "š", "ų", "ū", "ž");
$text = str_replace($search, $replace, $text);
return $text;
}
$results = array();
$results[] = array("table" => DB_COMMENTS, "fields" => array("comment_message"));
$results[] = array("table" => DB_MESSAGES, "fields" => array("message_subject","message_message"));
$results[] = array("table" => DB_POSTS, "fields" => array("post_message"));
$results[] = array("table" => DB_SHOUTBOX, "fields" => array("shout_message"));
$results[] = array("table" => DB_THREADS, "fields" => array("thread_subject"));
foreach($results AS $result) {
$t = $result['table']; $f = $result['fields'];
$query = dbquery("SELECT ".implode(", ",$f)." FROM $t");
while($data = dbarray($query)) {
$f_upd = "";
foreach($f AS $f_el) $f_upd .= "$f_el='".lt2html_parse($data[$f_el])."'";
dbquery("UPDATE $t SET $f_upd");
}
}
?>
foreach($_GET as $key => $value) {
$_GET[$key] = htmlspecialchars($value, ENT_QUOTES);
}