// page basics
 // ***
 if (count($HTTP_POST_VARS) == 0) {
     $sql = "SELECT *\n                      FROM " . $cfg["bloged"]["db"]["bloged"]["entries"] . "\n                     WHERE " . $cfg["bloged"]["db"]["bloged"]["key"] . "='" . $environment["parameter"][1] . "'";
     if ($debugging["sql_enable"]) {
         $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"];
     }
     $result = $db->query($sql);
     $form_values = $db->fetch_array($result, 1);
 } else {
     $form_values = $HTTP_POST_VARS;
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["bloged"]["db"]["bloged"]["entries"], $form_values);
 // form elemente erweitern
 $element["extension1"] = "<input name=\"extension1\" type=\"text\" maxlength=\"5\" size=\"5\">";
 $element["extension2"] = "<input name=\"extension2\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // +++
 // page basics
 // funktions bereich fuer erweiterungen
 // ***
 ### put your code here ###
 // +++
 // funktions bereich fuer erweiterungen
 // page basics
 // ***
 // fehlermeldungen
 $ausgaben["form_error"] = "";
 // navigation erstellen
    86343 Königsbrunn

    URL: http://www.chaos.de
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Suchmaske anzeigen
//
if ($environment["kategorie"] == "mask") {
    #$form_values = $HTTP_POST_VARS;
    $position = $environment["parameter"][1] + 0;
    // form options holen
    $form_options = form_options(crc32($environment["ebene"]) . "." . $environment["kategorie"]);
    // form elememte bauen
    $element = form_elements($cfg["db"]["entries"], $nop);
    // dropdown Kategorie erstellen (schae 1504)
    // ***
    $sql = "SELECT DISTINCT adkate FROM db_adrd ORDER BY adkate";
    $result = $db->query($sql);
    $formularobject = "<select class=\"" . $form_defaults["class"]["dropdown"] . "\" name=\"adkate\">\n";
    $formularobject .= "<option value=\"\"></option>\n";
    while ($data = $db->fetch_array($result, $nop)) {
        if ($form_values["adkate"] == $data["adkate"]) {
            $selected = " selected";
        } else {
            $selected = "";
        }
        $formularobject .= "<option value=\"" . $data["adkate"] . "\"" . $selected . ">" . $data["adkate"] . "</option>\n";
    }
    foreach ($element as $name => $value) {
 $positionArray["nop"] = "nop";
 $_SESSION["menued_id"] = $environment["parameter"][1];
 locate($_SESSION["menued_id"]);
 // page basics
 // ***
 if (count($HTTP_POST_VARS) == 0) {
     $sql = "SELECT * FROM " . $cfg["menued"]["db"]["menu"]["entries"] . " WHERE " . $cfg["menued"]["db"]["menu"]["key"] . "='" . $environment["parameter"][2] . "'";
     $result = $db->query($sql);
     $form_values = $db->fetch_array($result, 1);
 } else {
     $form_values = $HTTP_POST_VARS;
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["menued"]["db"]["menu"]["entries"], $form_values);
 // form elemente erweitern
 #$element["new_lang"] = "<input name=\"new_lang\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // +++
 // page basics
 #if ( $_GET["id"] != "" ) {
 #    locate($HTTP_GET_VARS["id"]);
 #} else {
 #    $positionArray[] = "nop";
 #}
 $ausgaben["show_menu"] .= sitemap(0, "menued", "select", "");
 // page basics
 // ***
 // design
 $ausgaben["design"] = "";
 // fehlermeldungen
Ejemplo n.º 4
0
 // page basics
 // ***
 if (count($HTTP_POST_VARS) == 0) {
     $sql = "SELECT *\n                      FROM " . $cfg["db"]["leer"]["entries"] . "\n                     WHERE " . $cfg["db"]["leer"]["key"] . "='" . $environment["parameter"][1] . "'";
     if ($debugging["sql_enable"]) {
         $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"];
     }
     $result = $db->query($sql);
     $form_values = $db->fetch_array($result, 1);
 } else {
     $form_values = $HTTP_POST_VARS;
 }
 // form options holen
 $form_options = form_options(crc32($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["db"]["leer"]["entries"], $form_values);
 // form elemente erweitern
 $element["extension1"] = "<input name=\"extension1\" type=\"text\" maxlength=\"5\" size=\"5\">";
 $element["extension2"] = "<input name=\"extension2\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // +++
 // page basics
 // funktions bereich fuer erweiterungen
 // ***
 ### put your code here ###
 // +++
 // funktions bereich fuer erweiterungen
 // page basics
 // ***
 // fehlermeldungen
 $ausgaben["form_error"] = "";
 // navigation erstellen
     $debugging["ausgabe"] .= "Warnung: register_globals in der php.ini steht auf on, evtl werden interne Variablen ueberschrieben!" . $debugging["char"];
 }
 // path fuer die schaltflaechen anpassen
 if ($cfg["autoform"]["iconpath"] == "") {
     $cfg["autoform"]["iconpath"] = "/images/default/";
 }
 // label bearbeitung aktivieren
 if (isset($HTTP_GET_VARS["edit"])) {
     $specialvars["editlock"] = 0;
 } else {
     $specialvars["editlock"] = -1;
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["autoform"]["location"][$environment["ebene"]]["db"], $_POST);
 // +++
 // page basics
 // funktions bereich
 // ***
 // captcha - bild erzeugen
 if ($cfg["autoform"]["location"][$environment["ebene"]]["captcha"]) {
     // zufaellige zeichen erzeugen
     $captcha_text = captcha_randomize($cfg["autoform"]["captcha"]["length"], $cfg["autoform"]["captcha"]);
     // bild erzeugen
     captcha_create($captcha_text, $cfg["autoform"]["captcha"]);
     // captcha-info erzeugen
     $captcha_crc = crc32($captcha_text . $cfg["autoform"]["captcha"]["randomize"]);
     $captcha_name = "captcha-" . $captcha_crc . ".png";
     $captcha_path_web = $cfg["file"]["base"]["webdir"] . $cfg["file"]["base"]["new"];
     $captcha_path_srv = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"];
Ejemplo n.º 6
0
             header("Location: " . $ausgaben["form_referer"]);
             #header("Location: ".$environment["basis"]."/list.html");
         }
     }
 } elseif ($environment["parameter"][1] == "edit") {
     if (count($HTTP_POST_VARS) == 0) {
         $sql = "SELECT * FROM " . $db_entries . " WHERE " . $db_entries_key . "='" . $environment["parameter"][2] . "'";
         $result = $db->query($sql);
         $form_values = $db->fetch_array($result, $nop);
     } else {
         $form_values = $HTTP_POST_VARS;
     }
     // form otions holen
     $form_options = form_options(crc32($environment["ebene"]) . "." . $environment["kategorie"]);
     // form elememte bauen
     $element = form_elements($db_entries, $form_values);
     // was anzeigen
     $mapping["main"] = crc32($environment["ebene"]) . ".modify";
     // wohin schicken
     $ausgaben["form_error"] = "";
     $ausgaben["form_aktion"] = $environment["basis"] . "/modify,edit," . $environment["parameter"][2] . ",verify.html";
     // referer im form mit hidden element mitschleppen
     if ($HTTP_POST_VARS["form_referer"] == "") {
         $ausgaben["form_referer"] = $_SERVER["HTTP_REFERER"];
         $ausgaben["form_break"] = $ausgaben["form_referer"];
     } else {
         $ausgaben["form_referer"] = $HTTP_POST_VARS["form_referer"];
         $ausgaben["form_break"] = $ausgaben["form_referer"];
     }
     if ($environment["parameter"][3] == "verify") {
         // form eigaben prüfen
     $cfg["kontakt"]["iconpath"] = "/images/default/";
 }
 // label bearbeitung aktivieren
 if (isset($HTTP_GET_VARS["edit"])) {
     $specialvars["editlock"] = 0;
 } else {
     $specialvars["editlock"] = -1;
 }
 if (count($HTTP_POST_VARS) == 0) {
 } else {
     $form_values = $HTTP_POST_VARS;
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["register"]["db"][$environment["kategorie"]]["entries"], $form_values);
 $hidedata["form"] = array();
 // +++
 // page basics
 // funktions bereich
 // ***
 if (is_array($cfg["register"]["captcha"])) {
     // zufaellige zeichen erzeugen
     $captcha_text = captcha_randomize($cfg["register"]["captcha"]["length"], $cfg["register"]["captcha"]);
     // bild erzeugen
     captcha_create($captcha_text, $cfg["register"]["captcha"]);
     // captcha-info erzeugen
     $captcha_crc = crc32($captcha_text . $cfg["register"]["captcha"]["randomize"]);
     $captcha_name = "captcha-" . $captcha_crc . ".png";
     $captcha_path_web = $cfg["file"]["base"]["webdir"] . $cfg["file"]["base"]["new"];
     $captcha_path_srv = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"];
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($cfg["fileed"]["right"] == "" || $rechte[$cfg["fileed"]["right"]] == -1) {
    $ausgaben["thumbnail"] = thumbnail();
    if ($ausgaben["thumbnail"] == "") {
        header("Location: " . $cfg["fileed"]["basis"] . "/list.html");
    }
    // page basics
    // ***
    #if ( count($HTTP_POST_VARS) == 0 ) {
    #} else {
    $form_values = $HTTP_POST_VARS;
    #}
    // form options holen
    $form_options = form_options(eCRC($environment["ebene"]) . ".modify");
    // form elememte bauen
    $element = form_elements($cfg["fileed"]["db"]["file"]["entries"], $form_values);
    // form elemente erweitern
    #$element["extension1"] = "";
    #$element["extension2"] = "";
    $element["upload"] = "";
    $element["fid"] = "";
    $element["ffname"] = str_replace("ffname\"", "ffname\" value=\"" . str_replace($_SESSION["uid"] . "_", "", $file) . "\"", $element["ffname"]);
    // +++
    // page basics
    // funktions bereich fuer erweiterungen
    // ***
    ### put your code here ###
    // +++
    // funktions bereich fuer erweiterungen
    // page basics
    // ***
Ejemplo n.º 9
0
function const_champs($modules_name, $tables_module_table, $tables_name, $tables_champs, $language, $champs_param_display_form = 0, $champs_param_elements = 0, $champs_param_required_field = 0, $option = 0)
{
    //print_r($champs_param_display_form);
    $text = '';
    //Compte le nombre de champs
    $champs = explode("|", $tables_champs);
    $nb_champs = count($champs);
    //Recupere les donnees
    if ($option == 0) {
        //Creation du constructor
        for ($i = 0; $i < $nb_champs; $i++) {
            $structure = explode(":", $champs[$i]);
            if ($structure[1] == 'int' || $structure[1] == 'tinyint' || $structure[1] == 'smallint' || $structure[1] == 'decimal') {
                $text .= '$this->initVar("' . $structure[0] . '",XOBJ_DTYPE_INT,null,false,' . $structure[2] . ');
			';
            } elseif ($structure[1] == 'varchar') {
                $text .= '$this->initVar("' . $structure[0] . '",XOBJ_DTYPE_TXTBOX,null,false);
			';
            } elseif ($structure[1] == 'text' || $structure[1] == 'longtext') {
                $text .= ' $this->initVar("' . $structure[0] . '",XOBJ_DTYPE_TXTAREA, null, false);
			';
            }
        }
    } else {
        if ($option == 1) {
            //Creation formulaire
            for ($i = 0; $i < $nb_champs; $i++) {
                if ($i != 0) {
                    $structure = explode(":", $champs[$i]);
                    $language_form = '' . $language . strtoupper($structure[0]) . '';
                    $form = form_elements($i, $modules_name, $tables_module_table, $tables_name, $champs_param_elements, $champs_param_required_field, $language_form, $structure[0]);
                    $text .= '' . $form . '';
                }
            }
        } else {
            if ($option == 2) {
                //Creation du fichier mysql.sql
                $text .= '#
# Table structure for table `' . strtolower($tables_module_table) . '`
#
		
CREATE TABLE  `' . strtolower($tables_module_table) . '` (
';
                $j = 0;
                for ($i = 0; $i < $nb_champs; $i++) {
                    $structure = explode(":", $champs[$i]);
                    //Probleme avec le type text (pas de valeur)
                    if ($structure[1] != 'text') {
                        $type = '' . $structure[1] . ' (' . $structure[2] . ')';
                    } else {
                        $type = '' . $structure[1] . '';
                    }
                    //Debut
                    if ($structure[0] != ' ') {
                        if (empty($structure[5])) {
                            $default = "default '" . $structure[5] . "'";
                        } else {
                            $default = "";
                        }
                        if ($i == 0) {
                            $virgule[$j] = 'PRIMARY KEY (`' . $structure[0] . '`)';
                            $j++;
                            $text .= '`' . $structure[0] . '` ' . $type . ' ' . $structure[3] . ' ' . $structure[4] . '  auto_increment,
';
                        } else {
                            if ($structure[6] == 'unique' || $structure[6] == 'index' || $structure[6] == 'fulltext') {
                                if ($structure[6] == 'unique') {
                                    $text .= '`' . $structure[0] . '` ' . $type . ' ' . $structure[3] . ' ' . $structure[4] . ' ' . $default . ',
';
                                    $virgule[$j] = 'KEY `' . $structure[0] . '` (`' . $structure[0] . '`)';
                                } else {
                                    if ($structure[6] == 'index') {
                                        $text .= '`' . $structure[0] . '` ' . $type . ' ' . $structure[3] . ' ' . $structure[4] . ' ' . $default . ',
';
                                        $virgule[$j] = 'INDEX (`' . $structure[0] . '`)';
                                    } else {
                                        if ($structure[6] == 'fulltext') {
                                            $text .= '`' . $structure[0] . '` ' . $type . ' ' . $structure[3] . ' ' . $structure[4] . ' ' . $default . ',
';
                                            $virgule[$j] = 'FULLTEXT KEY `' . $structure[0] . '` (`' . $structure[0] . '`)';
                                        }
                                    }
                                }
                                $j++;
                            } else {
                                $text .= '`' . $structure[0] . '` ' . $type . ' ' . $structure[3] . ' ' . $structure[4] . ' ' . $default . ',
';
                            }
                        }
                    }
                }
                //Probleme virgule
                $key = '';
                for ($i = 0; $i < $j; $i++) {
                    if ($i != $j - 1) {
                        $key .= '' . $virgule[$i] . ',
';
                    } else {
                        $key .= '' . $virgule[$i] . '
';
                    }
                }
                $text .= $key;
                $text .= ') ENGINE=MyISAM;

';
            }
        }
    }
    return $text;
}
     $ausgaben["inaccessible"] .= "# (error_result) #(error_result)<br />";
     $ausgaben["inaccessible"] .= "# (error_dupe) #(error_dupe)<br />";
 } else {
     $ausgaben["inaccessible"] = "";
 }
 // form options holen
 $form_options = form_options(eCRC("/admin/menued") . ".add");
 // fehlermeldungen
 $ausgaben["form_error"] = $_SESSION["form_error"]["desc"];
 if (strstr($_SERVER["HTTP_REFERER"], "auth/login")) {
     $ausgaben["form_referer"] = "/auth/login.html";
 } else {
     $ausgaben["form_referer"] = $_SERVER["HTTP_REFERER"];
 }
 // form elememte bauen
 $element = array_merge(form_elements("site_menu", $form_values), form_elements("site_menu_lang", $form_values));
 // freigabe-test
 if ($specialvars["content_release"] == -1) {
     $hidedata["add_menu"]["hide"] = -1;
 } else {
     $hidedata["add_menu"]["hide"] = "";
 }
 //wohin schicken
 $ausgaben["form_aktion"] = $pathvars["virtual"] . "/wizard/delete,devel0," . $environment["parameter"][2] . ",inhalt.html";
 $ausgaben["refid"] = $point["mid"];
 $url = $pathvars["virtual"] . tname2path($environment["parameter"][2]);
 $sql = "SELECT *\n                FROM " . SITETEXT . "\n                WHERE lang = '" . $environment["language"] . "'\n                AND label ='" . $environment["parameter"][3] . "'\n                AND tname ='" . $environment["parameter"][2] . "'\n            ORDER BY version ASC";
 $result = $db->query($sql);
 $security = "";
 while ($data = $db->fetch_array($result, 0)) {
     if ($data["status"] == -2) {
Ejemplo n.º 11
0
             #}
             header("Location: " . $environment[basis] . ".html");
         }
     }
 } elseif ($environment[parameter][1] == "edit") {
     if (count($HTTP_POST_VARS) == 0) {
         $sql = "SELECT * FROM " . $logbuch_entries . " WHERE lid='" . $environment[parameter][2] . "'";
         $result = $db->query($sql);
         $form_values = $db->fetch_array($result, $nop);
     } else {
         $form_values = $HTTP_POST_VARS;
     }
     // form otions holen
     $form_options = form_options(crc32($environment[ebene]) . "." . $environment[kategorie]);
     // form elememte bauen
     $element = form_elements($logbuch_entries, $form_values);
     // was anzeigen
     $mapping[main] = crc32($environment[ebene]) . ".modify";
     // wohin schicken
     $ausgaben[form_error] = "";
     $ausgaben[form_aktion] = $environment[basis] . "/modify,edit," . $environment[parameter][2] . ",verify.html";
     $ausgaben[form_break] = $_SERVER["HTTP_REFERER"];
     if ($environment[parameter][3] == "verify") {
         // form eigaben prüfen
         form_errors($form_options, $HTTP_POST_VARS);
         // ohne fehler sql bauen und ausfuehren
         if ($ausgaben[form_error] == "") {
             $kick = array("PHPSESSID", "ldate", "submit");
             foreach ($HTTP_POST_VARS as $name => $value) {
                 if (!in_array($name, $kick)) {
                     if ($sqla != "") {
Ejemplo n.º 12
0
                }
            }
            if ($errorcode == 0) {
                header("Location: " . $environment[basis] . ".html");
            }
        }
    }
    //
    // datei verarbeitung
    //
} elseif ($environment[kategorie] == "file") {
    if ($environment[parameter][1] == "new") {
        // form otions holen
        $form_options = form_options(crc32($environment[ebene]) . "." . $environment[kategorie]);
        // form elememte bauen
        $element = form_elements($data_entries_file, $HTTP_POST_VARS);
        // form elemente erweitern
        if ($HTTP_POST_VARS[frefid] == "") {
            $element[frefid] = str_replace("frefid\" ", "frefid\" value=\"" . $environment[parameter][2] . "\"", $element[frefid]);
        }
        // was anzeigen
        $mapping[main] = crc32($environment[ebene]) . ".file";
        // wohin schicken
        $ausgaben[form_error] = "";
        $ausgaben[form_aktion] = $environment[basis] . "/file,new,verify.html";
        $ausgaben[form_break] = $_SERVER["HTTP_REFERER"];
        if ($environment[parameter][2] == "verify") {
            // datei verwaltung/save begin
            // ***
            $valid = array("zip", "pdf");
            $file = file_verarbeitung($file_path, "ffname", 4000000, $valid);
Ejemplo n.º 13
0
     $form_values = $HTTP_POST_VARS;
 }
 // form otions holen
 $form_options = form_options(crc32($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($db_entries, $form_values);
 // form elemente erweitern
 $element["new_lang"] = "<input name=\"new_lang\" type=\"text\" maxlength=\"3\" size=\"3\">";
 // lang management form elemente begin
 // ***
 $ausgaben["langtabelle"] = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
 $ausgaben["langtabelle"] .= "<tr><td>#-(lang)</td><td>#-(label)</td><td>#-(exturl)</td><td>&nbsp;</td></tr>\n";
 $sql = "SELECT * FROM " . $db_entries_lang . " where mid=" . $environment["parameter"][2] . " ORDER by lang";
 $result = $db->query($sql);
 while ($lang = $db->fetch_array($result, 1)) {
     $element_lang = form_elements($db_entries_lang, $lang);
     $ausgaben["langtabelle"] .= "<tr>";
     $ausgaben["langtabelle"] .= "<td>" . str_replace("name=\"", "name=\"" . $lang["mlid"] . ")", $element_lang["lang"]) . "</td>";
     $ausgaben["langtabelle"] .= "<td>" . str_replace("name=\"", "name=\"" . $lang["mlid"] . ")", $element_lang["label"]) . "</td>";
     $ausgaben["langtabelle"] .= "<td>" . str_replace("name=\"", "name=\"" . $lang["mlid"] . ")", $element_lang["exturl"]) . "</td>";
     $ausgaben["langtabelle"] .= "<td>";
     $ausgaben["langtabelle"] .= "<input name=\"edit\" type=\"image\" src=\"" . $pathvars["images"] . "edit.png\" width=\"24\" height=\"18\" border=\"0\" value=\"" . $lang["mlid"] . "\">";
     $ausgaben["langtabelle"] .= "<input name=\"delete\" type=\"image\" src=\"" . $pathvars["images"] . "delete.png\" width=\"24\" height=\"18\" border=\"0\" value=\"" . $lang["mlid"] . "\">";
     $ausgaben["langtabelle"] .= "</td></tr>";
 }
 $ausgaben["langtabelle"] .= "</table>";
 // +++
 // lang management form elemente end
 // was anzeigen
 $mapping["main"] = crc32($environment["ebene"]) . ".modify";
 // wohin schicken
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($cfg["menued"]["modify"]["add"][2] == "" || priv_check(make_ebene($environment["parameter"][1]), $cfg["menued"]["modify"]["add"][2]) || $cfg["auth"]["menu"]["menued"][2] == -1 && priv_check('', $cfg["menued"]["modify"]["add"][2], $specialvars["dyndb"])) {
    // page basics
    // ***
    #if ( count($_POST) == 0 ) {
    #    $sql = "SELECT * FROM ".$cfg["menued"]["db"]["menu"]["entries"]." WHERE ".$cfg["menued"]["db"]["menu"]["key"]."='".$environment["parameter"][2]."'";            $result = $db -> query($sql);
    #    $form_values = $db -> fetch_array($result,1);
    #} else {
    $form_values = $_POST;
    #}
    // form options holen
    $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
    // form elememte bauen
    $element = form_elements($cfg["menued"]["db"]["menu"]["entries"], $form_values);
    // form elemente erweitern
    $element = array_merge($element, form_elements($cfg["menued"]["db"]["lang"]["entries"], $form_values));
    if ($_POST["refid"] == "") {
        $value = $environment["parameter"][1];
    } else {
        $value = $_POST["refid"];
    }
    $element["refid"] = str_replace("refid\"", "refid\" value=\"" . $value . "\" readonly", $element["refid"]);
    $element["new_lang"] = "<input name=\"new_lang\" type=\"text\" maxlength=\"5\" size=\"3\" value=\"n/a\" readonly>";
    // +++
    // page basics
    /*
    // lang management form elemente begin
    // ***
    $element_lang = form_elements( $cfg["menued"]["db"]["lang"]["entries"], $_POST );
    $element_lang["lang"] = str_replace("lang\"","lang\" value=\"".$environment["language"]."\"",$element_lang["lang"]);
    
     #echo $sql;
     $result = $db->query($sql);
     while ($ans = $db->fetch_array($result, 1)) {
         $element_ans[$ans["kaid"]] = form_elements($cfg["db"]["entries_ans"], $ans);
     }
 } else {
     foreach ($form_values as $key => $value) {
         if (strstr($key, ")")) {
             $felder = explode(")", $key, 2);
             $ans[$felder[0]][$felder[1]] = $value;
         }
     }
     if (is_array($ans)) {
         foreach ($ans as $key => $value) {
             $form_options[$key . ")kaemail"] = $form_options["akemail"];
             $element_ans[$key] = form_elements($cfg["db"]["entries_ans"], $value);
         }
     }
 }
 $ausgaben["ansprechpartner"] = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
 if (is_array($element_ans)) {
     $ausgaben["ansprechpartner"] .= "<tr class=\"hervorgehoben\"><td>Abteilung</td><td>Name Vorname</td><td>Telefon</td><td>E-Mail</td></tr>";
     $ausgaben["ansprechpartner"] .= "<tr><td colspan=\"4\"><img src=\"" . $pathvars["images"] . "/kart-linie.gif\" width=\"600\" height=\"11\"></td></tr>\n";
     foreach ($element_ans as $key => $value) {
         $ausgaben["ansprechpartner"] .= "<tr><td>" . str_replace("name=\"", "name=\"" . $key . ")", $value["kanam"]) . "</td>";
         $ausgaben["ansprechpartner"] .= "<td>" . str_replace("name=\"", "name=\"" . $key . ")", $value["kavor"]) . "</td>";
         $ausgaben["ansprechpartner"] .= "<td>" . str_replace("name=\"", "name=\"" . $key . ")", $value["katel"]) . "</td>";
         $ausgaben["ansprechpartner"] .= "<td>" . str_replace("name=\"", "name=\"" . $key . ")", $value["kaemail"]) . "</td><td></td><td></td><td></td>";
         #$ausgaben["ansprechpartner"] .= "<input name=\"edit\" type=\"image\" src=\"".$pathvars["images"]."/edit.gif\" width=\"24\" height=\"18\" border=\"0\" value=\"".$ans["kaid"]."\">";
         $ausgaben["ansprechpartner"] .= "<td align=\"right\"><input name=\"delete\" type=\"image\" src=\"" . $pathvars["images"] . "delete.png\" width=\"24\" height=\"18\" border=\"0\" value=\"" . $key . "\"></td></tr>";
         #$ausgaben["ansprechpartner"] .= "<tr>$counter</tr>";
    86343 Königsbrunn

    URL: http://www.chaos.de
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// suchmaske anzeigen
//
if ($environment[kategorie] == "mask") {
    $position = $environment["parameter"][1] + 0;
    $form_values = $HTTP_POST_VARS;
    // form options holen
    $form_options = form_options(crc32($environment[ebene]) . "." . $environment[kategorie]);
    // form elememte bauen
    $element = form_elements($cfg["db"]["entries"], $HTTP_POST_VARS);
    // dropdown amtsbezeichnung aus db erstellen (wach 0304)
    // ***
    $sql = "SELECT abamtbez_id, abamtbezkurz FROM db_adrb_amtbez ORDER by abamtbez_sort";
    $result = $db->query($sql);
    $formularobject[1] = "<select class=\"" . $form_defaults["class"]["dropdown"] . "\" name=\"abamtbez\">\n";
    $formularobject[1] .= "<option value=\"\">Bitte auswählen</option>\n";
    while ($field = $db->fetch_row($result, $nop)) {
        $formularobject[1] .= "<option value=\"" . $field[0] . "\"" . $selected . ">" . $field[1] . "</option>\n";
    }
    $formularobject[1] .= "</select>\n";
    // +++
    // dropdown amtsbezeichnung aus db erstellen
    // dropdown dienstposten aus db erstellen (wach 0404)
    // ***
    $sql = "SELECT abdienst_id, abdienst FROM db_adrb_dienst ORDER by abdienst_sort";
 // ***
 //        if ( count($_POST) == 0 ) {
 //            $sql = "SELECT *
 //                      FROM ".$cfg["bannered"]["db"]["banner"]["entries"]."
 //                     WHERE ".$cfg["bannered"]["db"]["banner"]["key"]."='".$environment["parameter"][1]."'";
 //            if ( $debugging["sql_enable"] ) $debugging["ausgabe"] .= "sql: ".$sql.$debugging["char"];
 //            $result = $db -> query($sql);
 //            $form_values = $db -> fetch_array($result,1);
 //        } else {
 $form_values = $_POST;
 //        }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 $form_options = form_options("bannered-edit");
 // form elememte bauen
 $element = form_elements($cfg["bannered"]["db"]["banner"]["entries"], $form_values);
 // form elemente erweitern
 $element["extension1"] = "<input name=\"extension1\" type=\"text\" maxlength=\"5\" size=\"5\">";
 $element["extension2"] = "<input name=\"extension2\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // +++
 // page basics
 // funktions bereich fuer erweiterungen
 // ***
 // kategorien
 if (is_array($cfg["bannered"]["kategorien"])) {
     foreach ($cfg["bannered"]["kategorien"] as $key => $value) {
         $sel = "";
         if (is_array($form_values["kat"])) {
             if (in_array($key, $form_values["kat"])) {
                 $sel = " selected=\"true\"";
             }
     $result = $db->query($sql);
     while ($all = $db->fetch_array($result, 1)) {
         if ($all["gid"] == $environment["parameter"][1]) {
             $_SESSION["chosen_user"][] = $all["uid"];
             $dataloop["actual"][] = array("value" => $all["uid"], "username" => $all["username"], "name" => $all["nachname"], "vorname" => $all["vorname"]);
         } else {
             $dataloop["avail"][] = array("value" => $all["uid"], "username" => $all["username"], "name" => $all["nachname"], "vorname" => $all["vorname"]);
         }
     }
 } else {
     $form_values = $_POST;
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["grouped"]["db"]["group"]["entries"], $form_values);
 // fehlermeldungen
 $ausgaben["form_error"] = "";
 // navigation erstellen
 $ausgaben["form_aktion"] = $cfg["grouped"]["basis"] . "/edit," . $environment["parameter"][1] . ",verify.html";
 $ausgaben["form_break"] = $cfg["grouped"]["basis"] . "/list.html";
 // hidden values
 $ausgaben["form_hidden"] .= "";
 // was anzeigen
 $mapping["main"] = eCRC($environment["ebene"]) . ".modify";
 #$mapping["navi"] = "leer";
 // unzugaengliche #(marken) sichtbar machen
 if (isset($_GET["edit"])) {
     $ausgaben["inaccessible"] = "inaccessible values:<br />";
     $ausgaben["inaccessible"] .= "# (error_result) #(error_result)<br />";
     $ausgaben["inaccessible"] .= "# (error_dupe) #(error_dupe)<br />";
                 }
             }
             if (is_array($info_value["del"])) {
                 if (preg_match("/" . $rights_value . ",/", $info_value["del"][$group_value])) {
                     $background = $cfg["righted"]["button"]["del"]["color"];
                     $name = "del";
                 }
             }
         }
         $dataloop["infos"][$counter]["info"] .= "<input name=\"" . $name . "#" . $group_key . "\" value=\"" . $rights_value . "\" style=width:35px;background:" . $background . " type=\"submit\"></input>";
     }
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
 // form elememte bauen
 $element = form_elements($cfg["righted"]["db"]["content"]["entries"], $form_values);
 // form elemente erweitern
 $element["extension1"] = "<input name=\"extension1\" type=\"text\" maxlength=\"5\" size=\"5\">";
 $element["extension2"] = "<input name=\"extension2\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // fehlermeldungen
 $ausgaben["form_error"] = "";
 // navigation erstellen
 $ausgaben["form_aktion"] = $cfg["righted"]["basis"] . "/edit," . $environment["parameter"][1] . "," . $environment["parameter"][2] . ",verify.html";
 $sql = "SELECT refid FROM site_menu WHERE mid=" . $environment["parameter"][1];
 $result = $db->query($sql);
 $data = $db->fetch_array($result, 1);
 $ausgaben["form_break"] = $pathvars["virtual"] . "/admin/menued/list," . $data["refid"] . ".html";
 // hidden values
 $ausgaben["form_hidden"] .= "";
 // was anzeigen
 $mapping["main"] = eCRC($environment["ebene"]) . ".modify";
 $hidedata["send_button"]["on"] = "on";
 $ausgaben["priv"] = "";
 if (count($HTTP_POST_VARS) == 0) {
     $sql = "SELECT *\n                      FROM " . $cfg["prived"]["db"]["priv"]["entries"] . "\n                     WHERE " . $cfg["prived"]["db"]["priv"]["key"] . "='" . $environment["parameter"][1] . "'";
     if ($debugging["sql_enable"]) {
         $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"];
     }
     $result = $db->query($sql);
     $form_values = $db->fetch_array($result, 1);
 } else {
     $form_values = $HTTP_POST_VARS;
 }
 // form options holen
 $form_options = form_options(eCRC($environment["ebene"]) . ".modify");
 // form elememte bauen
 $element = form_elements($cfg["prived"]["db"]["priv"]["entries"], $form_values);
 // form elemente erweitern
 $element["extension1"] = "<input name=\"extension1\" type=\"text\" maxlength=\"5\" size=\"5\">";
 $element["extension2"] = "<input name=\"extension2\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // +++
 // page basics
 // funktions bereich fuer erweiterungen
 // ***
 ### put your code here ###
 // +++
 // funktions bereich fuer erweiterungen
 // page basics
 // ***
 // fehlermeldungen
 $ausgaben["form_error"] = "";
 // navigation erstellen
             // elemente array erweitern
             $element = array_merge($element, $ext_element);
         }
         $art = "-multi";
     }
 } else {
     // nur eine sprache?
     if (count($HTTP_POST_VARS["lang"]) <= 1) {
         $array = array("lang" => $HTTP_POST_VARS["lang"], "label" => $HTTP_POST_VARS["label"], "exturl" => $HTTP_POST_VARS["exturl"]);
         $element = array_merge($element, form_elements($cfg["menued"]["db"]["lang"]["entries"], $array));
         $art = "-single";
     } else {
         foreach ($HTTP_POST_VARS["lang"] as $key => $value) {
             $array = array("lang" => $value, "label" => $HTTP_POST_VARS["label"][$key], "exturl" => $HTTP_POST_VARS["exturl"][$key]);
             // element erweiterung aus zeile bauen (form options bereits geholt)
             $ext_element = form_elements($cfg["menued"]["db"]["lang"]["entries"], $array, "[" . $key . "]");
             $ext_element = array_slice($ext_element, 2);
             // elemente array erweitern
             $element = array_merge($element, $ext_element);
         }
         $art = "-multi";
     }
 }
 if ($element["extend"] != "") {
     $hidedata["extend"] = array();
 }
 // langtabelle ausgabe
 // ***
 //elemente aussortieren
 foreach ($element as $name => $value) {
     if (strstr($name, "[")) {
Ejemplo n.º 22
0
    86343 K�nigsbrunn

    URL: http://www.chaos.de
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($rechte[$cfg["kontakt"]["right"]] == "" || $rechte[$cfg["kontakt"]["right"]] == -1) {
    // page basics
    // ***
    #if ( count($HTTP_POST_VARS) == 0 ) {
    #} else {
    $form_values = $HTTP_POST_VARS;
    #}
    // form options holen
    $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]);
    // form elememte bauen
    $element = form_elements($cfg["kontakt"]["db"]["entries"], $form_values);
    $hidedata["form"] = array();
    // +++
    // page basics
    // funktions bereich fuer erweiterungen
    // ***
    if (is_array($cfg["kontakt"]["captcha"])) {
        // zufaellige zeichen erzeugen
        $captcha_text = captcha_randomize($cfg["kontakt"]["captcha"]["length"], $cfg["kontakt"]["captcha"]);
        // bild erzeugen
        captcha_create($captcha_text, $cfg["kontakt"]["captcha"]);
        // captcha-info erzeugen
        $captcha_crc = crc32($captcha_text . $cfg["kontakt"]["captcha"]["randomize"]);
        $captcha_name = "captcha-" . $captcha_crc . ".png";
        $captcha_path_web = $cfg["file"]["base"]["webdir"] . $cfg["file"]["base"]["new"];
        $captcha_path_srv = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"];
     if ($debugging["sql_enable"]) {
         $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"];
     }
     $result = $db->query($sql);
     $form_values = $db->fetch_array($result, 1);
 } else {
     $form_values = $_POST;
 }
 if (is_array($_SESSION["file_memo"])) {
     $form_values[$cfg["wening"]["db"]["produkte"]["pic"]] = current($_SESSION["file_memo"]);
     unset($_SESSION["file_memo"]);
 }
 // form options holen
 $form_options = form_options("wening-edit");
 // form elememte bauen
 $element = form_elements($cfg["wening"]["db"]["produkte"]["entries"], $form_values);
 foreach ($cfg["wening"]["db"]["produkte"] as $key => $value) {
     if ($element[$value] != "") {
         $element[$key] = $element[$value];
     }
 }
 // form elemente erweitern
 $element["extension1"] = "<input name=\"extension1\" type=\"text\" maxlength=\"5\" size=\"5\">";
 $element["extension2"] = "<input name=\"extension2\" type=\"text\" maxlength=\"5\" size=\"5\">";
 // +++
 // page basics
 // funktions bereich fuer erweiterungen
 // ***
 // bild holen
 if ($form_values[$cfg["wening"]["db"]["produkte"]["pic"]] != "") {
     $sql = "SELECT *\n                        FROM site_file\n                        WHERE fid=" . $form_values[$cfg["wening"]["db"]["produkte"]["pic"]];