Esempio n. 1
0
function enl_utf8Urldecode($value)
{
    if (is_array($value)) {
        foreach ($value as $key => $val) {
            $value[$key] = utf8Urldecode($val);
        }
    } else {
        $value = preg_replace('/%([0-9a-f]{2})/ie', 'chr(hexdec($1))', (string) $value);
    }
    return $value;
}
Esempio n. 2
0
function utf8Urldecode($value)
{
    if (is_array($value)) {
        foreach ($key as $val) {
            $value[$key] = utf8Urldecode($val);
        }
    } else {
        $value = urldecode($value);
    }
    return $value;
}
Esempio n. 3
0
 function sbmt_upd_jxtext()
 {
     global $go;
     header('Content-type: text/html; charset=utf-8');
     load_module_helper('files', $go['a']);
     $clean['id'] = (int) $_POST['id'];
     $_POST['content'] = $_POST['v'] === '' ? '' : utf8Urldecode($_POST['v']);
     //$_POST['content'] = ($_POST['v'] === '') ? '' : $_POST['v'];
     //echo $_POST['content']; exit;
     // we need $clean['id'] on processing
     $rs = $this->db->fetchRecord("SELECT process\n            FROM " . PX . "objects\n            WHERE id = '{$clean['id']}'");
     $processor =& load_class('processor', true, 'lib');
     load_helper('textprocess');
     $clean['content'] = $processor->process('content', array('nophp'));
     $clean['content'] = textProcess($clean['content'], $rs['process']);
     $clean['udate'] = getNow();
     $clean['object'] = OBJECT;
     $this->db->updateArray('object', $clean, "id={$clean['id']}");
     header('Content-type: text/html; charset=utf-8');
     echo "<span class='notify'>" . $this->lang->word('updating') . "</span>";
     exit;
 }