function good_rech($rch = '') { $ret = $rch ? $rch : ajx(urldecode($_GET['search']), 1); if (!$ret) { return; } $ret = str_replace('’', "'", $ret); $ret = utflatindecode($ret); $ret = clean_acc($ret); $ret = strip_tags($ret); stripslashes($ret); $ret = trim($ret); return $ret; }
function post_treat_batch($v, $t, $p) { $todo = explode('|', $p); //admin/edit_msql_j foreach ($todo as $ka => $va) { list($act, $pb) = split_one(':', $va, 0); //global if ($act == 'deltables' && $v) { $v = del_tables($v); } elseif ($act == 'delblocks' && $v) { $v = correct_txt($v, ':q', 'correct'); } elseif ($act == 'stripconn' && $v) { $v = correct_txt($v, 'stripconn', 'correct'); } elseif ($act == 'striplink' && $v) { $v = correct_txt($v, 'striplink', 'correct'); } elseif ($act == 'delconn' && $pb && $v) { $v = correct_txt($v, ':' . $pb, 'correct'); } elseif ($act == 'cleanmail' && $v) { $v = convertmail($v); } elseif ($act == 'delqmark' && $v) { $v = del_qmark($v); } elseif ($act == '-??') { $v = str_replace('-??', '-', $v); } elseif ($act == '???') { $v = mb_ereg_replace("[?]{2,}", "", $v); } } $r = explode("\n", $v); $nbr = count($r); foreach ($r as $k => $v) { $cur = true; //by_lines foreach ($todo as $ka => $va) { list($act, $pb) = split_right(':', $va, 0); if ($cur != false) { if ($act == 'line' && $k == $pb - 1) { $cur = false; } elseif ($act == 'del') { if ($pb == 'title') { $pb = $t; } $cur = str_replace($pb, '', $v); } elseif ($act == 'line' && $pb == 'last' && $k == $nbr) { $cur = false; } elseif ($act == 'linewith' && strpos($v, $pb) !== false) { $cur = false; } elseif ($act == 'boldline' && $k == $pb - 1 && $v) { $cur = '[' . $v . ':b]'; } elseif ($act == 'line' && $pb == 'title' && $t) { $vb = clean_title(pre_clean(trim($v))); $tb = $t; if (strpos($vb, $tb) !== false) { $cur = false; } else { $cur = $v; } } elseif ($act == 'del-link' && strpos($v, $pb) !== false) { $cur = embed_detect($v, '§', ']'); } elseif ($act == 'linenolink' && $k == $pb - 1) { list($no, $cur) = explode("§", substr($v, 0, -1)); } else { $cur = $v; } } } $ret .= $cur . "\n"; } $ret = clean_br($ret); $ret = repair_tags($ret); $ret = utflatindecode($ret); return trim($ret); }
function receive_xmsg($d) { $d = ajx($d, 1); $d = str_replace(array(':space:', ':line:'), array(' ', "\n"), $d); return convhtml_c(utflatindecode($d)); }