<?php
/*
OpenDataBag - Data Web Interface
Copyright (C) 2004 Nawara
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
header("Content-Type: text/plain;");
$mark_name=get('mark_name');
$mark_x=get('mark_x');
$mark_y=get('mark_y');
if(file_exists(cfg_data_path.'/data/mark_.php'))
include(cfg_data_path.'/data/mark_.php');
$mark_array[$mark_name]='left:'.$mark_x.';top:'.$mark_y.';';
$fp=fopen(cfg_data_path.'/data/mark_.tmp','wb');
if(fwrite($fp,'<'.'?php $mark_array='.var_export($mark_array,true).'; ?'.'>') === FALSE)
{
fclose($fp);
}
else
{
fclose($fp);
if(file_exists(cfg_data_path.'/data/mark_.php'))
unlink(cfg_data_path.'/data/mark_.php');
rename(cfg_data_path.'/data/mark_.tmp',cfg_data_path.'/data/mark_.php');
}
exit;
?>