$fcopy = fopen($pathFile, "w");
fwrite($fcopy, $copy);
fclose($fcopy);
/* End Comment */
//Removes any other CURRENT_DYNAFORM that could be pending because of a page refresh or a failure
unset($_SESSION['CURRENT_DYNAFORM']);
define('DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml');
define('DB_XMLDB_USER', '');
define('DB_XMLDB_PASS', '');
define('DB_XMLDB_NAME', '');
define('DB_XMLDB_TYPE', 'myxml');
$title = $process->Fields['PRO_TITLE'] . ' : ' . $dynaform->Fields['DYN_TITLE'];
$Parameters = array('SYS_LANG' => SYS_LANG, 'URL' => G::encrypt($file, URL_KEY), 'DYN_UID' => $dynaform->Fields['DYN_UID'], 'DYNAFORM_NAME' => $title);
$openDoc = new Xml_Document();
$openDoc->parseXmlFile(PATH_DYNAFORM . $file . '.xml');
$XmlEditor = array('URL' => G::encrypt($file, URL_KEY), 'XML' => $openDoc->getXml());
$form = new Form($file, PATH_DYNAFORM, SYS_LANG, true);
$HtmlEditor = array('URL' => G::encrypt($file, URL_KEY), 'HTML' => $form->printTemplate($form->template, $script));
$JSEditor = array('URL' => G::encrypt($file, URL_KEY), 'HTML' => $form->printTemplate($form->template, $script));
/* Block : Loads the Editor configuration */
$defaultConfig = array('Editor' => array('left' => '0', 'top' => '0', 'width' => 'document.body.clientWidth-4', 'height' => 'document.body.clientHeight-2'), 'Toolbar' => array('left' => 'document.body.clientWidth-2-toolbar.clientWidth-24-3+7', 'top' => '52'), 'FieldsList' => array('left' => '4+toolbar.clientWidth+24', 'top' => 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))', 'width' => 268 - 24, 'height' => 400));
/*$configuration = new Configuration($dbc);
  $configuration->load( array('CFG_UID'=>'DynaformEditor') );
  if ($configuration->is_new) {
    $config = $defaultConfig;
    $configuration->Fields['CFG_UID']='DynaformEditor';
    $configuration->Fields['CFG_VALUE']=serialize( $config );
    //$configuration->Save();
  } else {
    $config = unserialize( $configuration->Fields['CFG_VALUE'] );
    $config = G::array_merges( $defaultConfig , $config );