//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
Čau lidi, může mě někdo nakopnout? Neukládá se mi Inline editace v CKEditoru, viz. kód.
<head><script src="ckeditor/ckeditor.js"></script></head>
<body>
<?php
if (!function_exists('file_put_contents')) { function file_put_contents($filename, $data) { $f = @fopen($filename, 'w'); if (!$f) { return false; } else { $bytes = fwrite($f, $data); fclose($f); return $bytes; } } }
if (!function_exists('file_get_contents')) { function file_get_contents($filename) { $fhandle = fopen($filename, "r"); $fcontents = fread($fhandle, filesize($filename)); fclose($fhandle); return $fcontents; } }
function showForm($data = '') { ?>
<form method="post" action="index.php"> <div contenteditable="true" id="uprava"><?php echo htmlspecialchars($data, ENT_QUOTES); ?></div> <input type="submit" value="ulož"></form>
<script> CKEDITOR.inline( 'uprava' ); </script>
<?php } if (!isset($_POST['index'])) { showForm(file_get_contents('data/index.inc')); } else { if (get_magic_quotes_gpc()) { $_POST['index'] = stripslashes($_POST['index']); } @unlink('.temp.html'); file_put_contents('data/temp.html', $_POST['index']); unlink('data/index.inc'); rename('data/temp.html', 'data/index.inc'); showForm(file_get_contents('data/index.inc')); } ?>
</body>
</body></html>
Zobrazeno 1 zpráv z 1.