Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
    //include "Online-Shop/connect2.php";
3
    require_once  "connect2.php";
4
    require_once  "webs.php";
5
?>
6
<html>
7
<head>
8
<title>Content-Management-System - Webagentur Niewerth</title>
9
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
10
<link rel=stylesheet type="text/css" href="buttons.css">
11
<style type="text/css"><MM:BeginLock translatorClass="MM_SSI" type="ssi" orig="%3C? require_once %22buttons.css%22; ?%3E" fileRef="buttons.css" depFiles="file:///L|/content-management/buttons.css">span {text-decoration:underline; color:#000000}
12
p {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000}
13
p.error {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold}
14
span {font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
15
span.blue {font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; background-color:#0000A0; font-size: 10pt}
16
span.small {font-family: Arial, Helvetica, sans-serif; font-size: 8pt; text-decoration: none}
17
td {font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
18
td.timeout {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000;}
19
td.small {font-family: Arial, Helvetica, sans-serif; font-size: 8pt}
20
td.headline {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FFFFFF; font-weight: bold}
21
td.haupt {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold}
22
input {font-family: Arial, Helvetica, sans-serif; font-size: 8pt}
23
select {font-family: Arial, Helvetica, sans-serif; font-size: 8pt}
24
textarea {font-family: Arial, Helvetica, sans-serif; font-size: 8pt}a {  text-decoration: none}
25
<MM:EndLock></style>
26
</head>
27
<body bgcolor="#FFFFFF" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10">
28
<?php
29
    require_once  'File.php';
30
 
31
    // Hole bisherige Emails und EmailCode
32
    include "/usr/share/php/module/Email_Safe/emailconfig.default.inc.php";
33
    foreach ( $GLOBALS['email_config'] as $key => $value )
34
    {
35
        if ( !@in_array($value, $_POST['check']) )
36
        {
37
            $code[] = $key;
38
            $email[] = $value;
39
        }
40
    }
41
 
42
    if ( isset($_POST['neue_email']) )
43
    {
44
        $code[] = md5( $_POST['neue_email'] );
45
        $email[] = $_POST['neue_email'];
46
    }
47
 
48
    $text = "<?php \n";
49
    for ( $i = 0; $i < sizeof($code); $i++ )
50
    {
51
        $text .= '$GLOBALS["email_config"]["' . $code[$i] . '"] = "' . $email[$i] .
52
            '";' . "\n";
53
    }
54
    $text .= "?>";
55
 
56
    $file = '/usr/share/php/module/Email_Safe/emailconfig.default.inc.php';
57
    $e = File::write( $file, $text, FILE_MODE_WRITE );
58
    if ( PEAR::isError($e) )
59
    {
60
        echo 'Could not write to file : ' . $e->getMessage();
61
    }
62
    else
63
    {
64
        $cmd = "sudo svn status $file";
65
        exec( $cmd, $out, $ret );
66
        $status = substr( $out[0], 0, 1 );
67
        unset( $out );
68
        if ( $status == "?" )
69
        {
70
            $cmd = "sudo svn add $file";
71
            exec( $cmd, $out, $ret );
72
            $add = true;
73
        } elseif ( $status == "A" )
74
        {
75
            $add = true;
76
        }
77
        unset( $out );
78
        $status = ( $add ) ? "hinzugefuegt" : "geaendert";
79
        unset( $out );
80
        $msg = "\"Sachbearbeiter: " . $_SERVER["PHP_AUTH_USER"] . "\n";
81
        $msg .= "Konfiguration $file $status\"";
82
        $cmd = "sudo svn ci $file -m $msg --username www-data --password NcC2010";
83
        exec( $cmd, $out, $ret );
84
        unset( $out );
85
        $cmd = "sudo svn up /usr/share/php/module/Email_Safe/";
86
        exec( $cmd, $out, $ret );
87
        unset( $out );
88
    }
89
 
90
 
91
?>
92
	<form method="post" action="#" name="formname1" enctype="multipart/form-data">
93
		<table width="662" border="0" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
94
			<tr bgcolor="#000099">
95
				<td colspan="4" bgcolor="#<? echo $webs[bgcolor_links] ?>"><font color="#<? echo
96
    $webs[font_color_links] ?>"><strong>Mail Schutz: Bearbeiten</strong></font></td>
97
			</tr>
98
			<tr>
99
				<td width="300" bgcolor="#<? echo $webs[bgcolor_links] ?>"><font color="#<? echo
100
        $webs[font_color_links] ?>">Neue Email-Adresse hinzuf&uuml;gen</font></td>
101
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><input type="text" size="40" name="neue_email" /></td>
102
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><input type="submit" name="neuer_eintrag" value="Email hinzuf&uuml;gen" /></td>
103
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"></td>
104
			</tr>
105
			<tr>
106
				<td bgcolor="#<? echo $webs[bgcolor_links] ?>"></td>
107
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><font color="#<? echo $webs[font_color_rechts] ?>">EMail</font></td>
108
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><font color="#<? echo $webs[font_color_rechts] ?>">Code</font></td>
109
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"></td>
110
	</form>
111
	<form method="post" action="#" name="formname2" enctype="multipart/form-data">
112
<?php
113
    for ( $i = 0; $i < sizeof($code); $i++ )
114
    {
115
?>
116
			<tr>
117
					<td bgcolor="#<? echo $webs[bgcolor_links] ?>">&nbsp;</td>
118
					<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><?= $email[$i] ?></td>
119
					<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><?= $code[$i] ?></td>
120
					<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><input type="checkbox" name="check[]" value="<?= $email[$i] ?>" /></td>
121
			</tr>
122
<?php
123
    }
124
?>
125
			<tr>
126
				<td bgcolor="#<? echo $webs[bgcolor_links] ?>"></td>
127
				<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"colspan="3" bgcolor="#<? echo
128
    $webs[bgcolor_links] ?>"><div align="right"><input type="submit" name="delete" value="Eintrag l&ouml;schen" /></div></td>
129
			</tr>
130
		</table>
131
	</form>
132
</body>
133
</html>