Subversion Repositories personal-webbase

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
<?php
2
 
3
if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
4
 
5
if (($aktion == 'new') || ($aktion == 'edit'))
6
{
7
        echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'fserver\').focus();"', $header);
8
 
9
        if ($aktion == 'new') echo '<h1>Neues Confixx-Konto</h1>';
10
        if ($aktion == 'edit') echo '<h1>Confixx-Konto bearbeiten</h1>';
11
 
12
        if ($aktion == 'edit')
13
        {
14
                $res = db_query("SELECT * FROM `".$WBConfig->getMySQLPrefix()."confixx` WHERE `id` = '".db_escape($id)."' AND `user_cnid` = '".$benutzer['id']."'");
15
                if (db_num($res) == 0)
16
                        die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verf&uuml;gbar, oder die Zugriffsberechtigungen sind falsch.'.$footer);
17
                $row = db_fetch($res);
18
 
19
                $auszuwaehlen = (isset($row['folder_cnid'])) ? $row['folder_cnid'] : '';
20
                $fusername = (isset($row['username'])) ? $row['username'] : '';
21
                $fpassword = (isset($row['password'])) ? $row['password'] : '';
22
                $fserver = (isset($row['server'])) ? $row['server'] : '';
23
        }
24
        else
25
        {
26
                $auszuwaehlen = (isset($folder)) ? $folder : '';
27
                $fusername = '';
28
                $fpassword = '';
29
                $fserver = 'https://';
30
        }
31
 
32
echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'">
33
<input type="hidden" name="seite" value="operate">
34
<input type="hidden" name="aktion" value="'.$aktion.'">
35
<input type="hidden" name="modul" value="'.$modul.'">';
36
 
37
if ($aktion == 'edit')
38
        echo '<input type="hidden" name="id" value="'.$id.'">';
39
 
40
echo '<table cellspacing="0" cellpadding="0" border="0">
41
<tr>
42
        <td colspan="2"><b>Allgemeine Informationen</b><br><br></td>
43
</tr>
44
<tr>
45
        <td valign="top">In Ordner:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
46
        <td valign="top">';
47
 
48
        gfx_zeichneordnerbox($modul, 0, 0, $auszuwaehlen);
49
 
50
        if (!isset($danach)) $danach = 'A';
51
 
52
        echo '</td>
53
</tr>
54
<tr>
55
        <td colspan="2"><br><b>Zugangsdaten</b><br><br></td>
56
</tr>
57
<tr>
58
        <td valign="top">Server:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
59
        <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fserver" id="fserver" value="'.$fserver.'" size="50"></td>
60
</tr>
61
<tr>
62
        <td valign="top">Benutzername:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
63
        <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fusername" value="'.$fusername.'" size="50"></td>
64
</tr>
65
<tr>
66
        <td valign="top">Passwort:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
67
        <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fpassword" value="'.$fpassword.'" size="50"></td>
68
</tr>
69
<tr>
70
        <td colspan="2"><br><b>Nach Speicherung</b><br><br></td>
71
</tr>
72
<tr>
73
        <td valign="top">Aktion: </td>
74
        <td><select name="danach">
75
                <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zur&uuml;ck zum Hauptmen&uuml;</option>
76
                <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option>
77
                <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option>
78
        </select></td>
79
</tr>
80
</table><br>
81
<a href="javascript:document.mainform.submit();">';
82
 
83
if ($aktion == 'new') echo 'Eintragung hinzuf&uuml;gen';
84
if ($aktion == 'edit') echo 'Eintragung aktualisieren';
85
 
86
echo '</a>&nbsp;|&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?seite=main&amp;modul='.$modul.'">Zur&uuml;ck</a>
87
 
88
</form>';
89
 
90
        echo $footer;
91
 
92
}
93
 
94
?>