gnopaste

Sorry for this ugly message. We are searching for some translators.
Please take a look here
Thanks to all translators, you're doing a great job!

Name
func
Scriptlanguage
PHP
Tabwidth
4
Date
03/01/2010 05:02:29 pm
IP
79.222.42.87

hauptdatei

<?php

$tmpfile = "tmp.php";

include("func.php");

$inputs = addedinputs($tmpfile);
$uniqueinputs = array_unique($inputs);
array_shift($uniqueinputs);

include("editform.php");
include("createform.php");
include("tools.php");

if(is_file("form.php")){
$sbv = "Formular &auml;ndern";
}else{
$sbv = "Formular erstellen";
}

$inputs = addedinputs($tmpfile);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Kontaktformular-Generator</title>
<meta name="robots" content="noindex,nofollow"/>
<link rel="stylesheet" type="text/css" href="style.css" />
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<script type="text/javascript" src="ajax.js"></script>

</head>
<body <?php if(isset($_GET["type"])){echo 'onload="addinput(\''.$_GET["type"].'\')"';}elseif(isset($_GET["edit"]) && $_GET["edit"] != 'edit' && isset($_GET["id"])){echo 'onload="fademsg()"';}?>>

<div id="message" style="display: none;" onclick="closepopup('message')">
    <span><?php echo $msg; ?></span>
    <a href="javascript:closepopup('message')">Meldung ausblenden</a>
</div>

<div id="createformpopup" style="display: none;">
<div id="formoptions">
<form method="post" action="index.php?action=createform">
    <br/>
    <a href="javascript:Klapptext('formoptions')" class="formoptions"><img src="images/plus.gif" id="image_formoptions" alt="+" title="Aus/Ein-klappen" border="0">&nbsp;Optionale Einstellungen f&uuml;r das Formular:</a><br/>
    <div id="layer_formoptions" style="display: none;">
        <input type="checkbox" value="checked" name="antispam" checked="checked"/>&nbsp;Anti-Spam aktivieren&nbsp;<span>(empfohlen)</span><br/>
    </div>
    <br/>
    <a href="javascript:closepopup('createformpopup')" class="abortcreateform">Abbrechen</a><input type="submit" name="submitcreateform" value="<?php echo $sbv; ?>" class="submitcreateform"/>
</form>
</div>
</div>

<div id="toolbox">
    <a href="index.php?action=preview"><img src="images/preview.gif" width="12" height="12" alt="" border="0" />&nbsp;Vorschau</a>
    <a href="index.php?action=load"><img src="images/load.gif" width="12" height="12" alt="" border="0" />&nbsp;Formular laden</a>
    <a href="index.php?action=save"><img src="images/save.gif" width="12" height="12" alt="" border="0" />&nbsp;Formular speichern</a>
    <a href="javascript:delform()"><img src="images/delete.gif" width="12" height="12" alt="" border="0" />&nbsp;Formular l&ouml;schen</a>
</div>

<div id="wrap">
<noscript>Bitte aktivieren Sie Javaskript, um diese Funktion nutzen zu k&ouml;nnen!</noscript>
<div id="selecttype">
<span>Art des Eigabefelds:</span>
<a href="javascript:addinput('txt')"><img src="images/plus.gif" width="" height="" alt="+" border="0"/>&nbsp;Textfeld</a>
<a href="javascript:addinput('select')"><img src="images/plus.gif" width="" height="" alt="+" border="0"/>&nbsp;Auswahlfeld</a>
<a href="javascript:addinput('radio')"><img src="images/plus.gif" width="" height="" alt="+" border="0"/>&nbsp;Radio-Buttons</a>
<a href="javascript:addinput('checkbox')"><img src="images/plus.gif" width="" height="" alt="+" border="0"/>&nbsp;Checkbox</a>
<a href="javascript:addinput('txtarea')"><img src="images/plus.gif" width="" height="" alt="+" border="0"/>&nbsp;gro&szlig;es Textfeld</a>
</div>
<!--<input type="hidden" name="addedinputs" value="0" id="addedinputs"/>-->
<div id="inputs">
<?php
    $addedinputs = array_unique($inputs); // 'none' Werte im 0-Schluessel zusammenfassen
    if(count($addedinputs) == '1'){
        echo '<div style="padding: 5px 0px; font-weight: bold; text-align: center;">Erstellen Sie bitte Ihr Formular!</div>';
    }else{
        ksort($addedinputs);
        array_shift($addedinputs); // 0-Schluessel entfernen
        foreach($addedinputs AS $addedinput){
            $values = explode('[#]', $addedinput);
            $id = $values['0'];
            $type = $values['1'];
            $output = $type; ### Erweitern!
            echo '<div class="input">';
            echo $output;
            echo '<a href="index.php?edit=delete&amp;id='.$id.'" class="delete" title="Eingabefeld l&ouml;schen">&nbsp;</a><a href="index.php?edit=edit&amp;id='.$id.'" class="edit" title="Eingabefeld &uuml;berarbeiten">&nbsp;</a><a href="index.php?edit=down&amp;id='.$id.'" class="down" title="Eingabefeld eine Position nach unten verschieben">&nbsp;</a><a href="index.php?edit=up&amp;id='.$id.'" class="up" title="Eingabefeld eine Position nach oben verschieben">&nbsp;</a></div>';
            
        }
    }
?>
</div>
<br/>
<div id="addinputbox">
<div id="default" style="display: block;">
    Bitte w&auml;hlen Sie rechts das hinzuzuf&uuml;gende Eingabefeld.
</div>
<div id="txt" style="display: none;">
    <form method="post" action="index.php?type=txt">
    <fieldset>
    <input type="hidden" name="txt" value="0" id="txt_hidden"/>
    <label for="txt_label">Bezeichnung:&nbsp;</label><input type="text" name="label" value="" id="txt_label"/><br/>
    <label for="txt_req">Pflichtfeld:&nbsp;</label><input type="checkbox" name="req" value="1" id="txt_req"/><br/>
    <br/><input type="submit" name="addtxt" value="Eingabefeld hinzuf&uuml;gen" class="addinput"/>
    </fieldset>
    </form>
</div>
<div id="select" style="display: none;">
    <form method="post" action="index.php?type=select">
    <fieldset>
    <input type="hidden" name="select" value="0" id="select_hidden"/>
    <label for="select_label">Bezeichnung:&nbsp;</label><input type="text" name="label" value="" id="select_label"/><br/>
    <label for="select_req">Pflichtfeld:&nbsp;</label><input type="checkbox" name="req" value="1" id="select_req"/><br/>
    <br/><input type="submit" name="addselect" value="Auswahlfeld hinzuf&uuml;gen" class="addinput"/>
    </fieldset>
    </form>
</div>
<div id="radio" style="display: none;">
    <form method="post" action="index.php?type=radio">
    <fieldset>
    <input type="hidden" name="radio" value="0" id="radio_hidden"/>
    <label for="radio_label">Bezeichnung:&nbsp;</label><input type="text" name="label" value="" id="radio_label"/><br/>
    <label for="radio_req">Pflichtfeld:&nbsp;</label><input type="checkbox" name="req" value="1" id="radio_req"/><br/>
    <br/><input type="submit" name="addradio" value="Radio-Button hinzuf&uuml;gen" class="addinput"/>
    </fieldset>
    </form>
</div>
<div id="checkbox" style="display: none;">
    <form method="post" action="index.php?type=checkbox">
    <fieldset>
    <input type="hidden" name="checkbox" value="0" id="checkbox_hidden"/>
    <label for="checkbox_label">Bezeichnung:&nbsp;</label><input type="text" name="label" value="" id="checkbox_label"/><br/>
    <label for="checkbox_req">Pflichtfeld:&nbsp;</label><input type="checkbox" name="req" value="1" id="checkbox_req"/><br/>
    <br/><input type="submit" name="addcheckbox" value="Checkbox hinzuf&uuml;gen" class="addinput"/>
    </fieldset>
    </form>
</div>
<div id="txtarea" style="display: none;">
    <form method="post" action="index.php?type=txtarea">
    <fieldset>
    <input type="hidden" name="txtarea" value="0" id="txtarea_hidden"/>
    <label for="txtarea_label">Bezeichnung:&nbsp;</label><input type="text" name="label" value="" id="txtarea_label"/><br/>
    <label for="txtarea_req">Pflichtfeld:&nbsp;</label><input type="checkbox" name="req" value="1" id="txtarea_req"/><br/>
    <br/><input type="submit" name="addtxtarea" value="gro&szlig;es Eingabefeld hinzuf&uuml;gen" class="addinput"/>
    </fieldset>
    </form>
</div>

</div>
</form>
<br/>
<a href="javascript:openpopup('createformpopup')" class="createform">Formular erstellen</a>
</div>
<div id="developmentoutput">
    <b>$inputs</b> = <?php print_r($inputs); ?>
    <br/><br/>
    <b>$addedinputs</b> = <?php print_r($addedinputs); ?>
    <br/><br/>
    <b>$uniqueinputs</b> = <?php print_r($uniqueinputs); ?>
</div>
</body>
</html>

submitter » gnopaster | imprint « imprint     
» Terms of use «