* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ $noplugin = true; // flag for ../config/define.php file include_once('../config/define.php'); //////////// Check Inclusion de pages //////////// if (!class_exists('auth')) { include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('dashboard')) ReloadIndex('admin'); //////////// if(! isset($_POST['filename']) || !isset($_POST['svgcontent'])) return false; $filename = $_POST['filename']. '.svg'; $svgcontent = $_POST['svgcontent']; $old = umask(0); SureCreateDir('../tmp/report/', 0777); umask($old); $r = file_put_contents('../tmp/report/'.$filename, $svgcontent); if(is_int($r)) echo 'image saved in ' . '../tmp/report/'.$filename; else 'image not saved :-( ...'; ?>