Esempio n. 1
0
 $docdata = getDOCvorlage($_POST["did"]);
 if ($docdata["document"]["applikation"] == "O") {
     include 'inc/phpOpenOffice.php';
     $doc = new phpOpenOffice();
 } else {
     if ($docdata["document"]["applikation"] == "R") {
         include 'inc/phpRtf.php';
         $doc = new phpRTF();
     } else {
         if ($docdata["document"]["applikation"] == "T") {
             include 'inc/phpTex.php';
             $doc = new phpTex();
         } else {
             if ($docdata["document"]["applikation"] == "B") {
                 require 'inc/phpBIN.php';
                 $doc = new phpBIN();
             }
         }
     }
 }
 $fname = $docdata["document"]["file"];
 $doc->loadDocument("./vorlage/" . $docdata["document"]["file"]);
 $vars = array();
 if ($docdata["felder"]) {
     foreach ($docdata["felder"] as $zeile) {
         $value = $zeile["platzhalter"];
         $name = strtoupper($value);
         if (ini_get("default_charset") == 'utf-8') {
             $vars[$name] = utf8_decode($_POST[$value]);
         } else {
             $vars[$name] = $_POST[$value];
Esempio n. 2
0
     $doc = new phpOpenOffice();
 } else {
     if ($ext == 'rtf') {
         $_POST["applikation"] = "R";
         include 'inc/phpRtf.php';
         $doc = new phpRTF();
     } else {
         if ($ext == 'tex') {
             $_POST["applikation"] = "T";
             include 'inc/phpTex.php';
             $doc = new phpTex();
         } else {
             if ($ext == 'xls') {
                 $_POST["applikation"] = "B";
                 require 'inc/phpBIN.php';
                 $doc = new phpBIN();
             }
         }
     }
 }
 if ($doc) {
     $did = saveDocVorlage($_POST, $_FILES);
     if ($_POST['did'] != $did) {
         $doc->loadDocument("vorlage/" . $_FILES['file']['name']);
         $vars = $doc->getTags();
         if ($ext == 'rtf') {
             $doc->savefile("vorlage/" . $_FILES['file']['name']);
         }
         $data['beschreibung'] = '';
         $data['zeichen'] = '.';
         $data['laenge'] = 25;