2 if(($sid==NULL)||
($sid!=$
$ck_sid_buffer)) { header("location:invalid-access-warning.php"); exit;}
4 require_once($root_path.'include/inc_config_color.php');
12 $allowedarea="System_Admin";
14 $fileforward="edv-datenbank.php";
15 $thisfile="edv-datenbank-pass.php";
18 if($HTTP_COOKIE_VARS['ck_login_logged'.$sid]&&$HTTP_COOKIE_VARS['ck_login_userid'.$sid])
20 header("location: passcheck-intern.php?sid=$sid&lang=$lang&allowedarea=$allowedarea&fileforward=$fileforward&retfilepath=$thisfile");
23 //setcookie(ck_edv_db_user,"");
25 function validarea($area,$zeile2,$range)
27 for ($i=0;$i<$range;$i++
)
28 if(($zeile2[$i]==$area)or($zeile2[$i]=="alle")) return 1;
32 function logentry($userid,$key,$report,$remark1,$remark2)
34 $logpath="logs/access/".date(Y
)."/";
35 if (file_exists($logpath))
37 $logpath=$logpath.date("Y_m_d").".log";
38 $file=fopen($logpath,"a");
40 { if ($userid=="") $userid="blank";
41 $line=date("d.m.Y").' '.date("H.i").' '.$report.' Username='.$userid.' Password='.$key.' Fileaccess='.$remark1.' Fileforward='.$remark2;
42 fputs($file,$line);fputs($file,"\r\n");
49 if ($versand=="Abschicken")
52 $link=mysql_connect("localhost","httpd","");
54 { if(mysql_select_db($dbname,$link))
55 { $sql='SELECT * FROM mahopass WHERE mahopass_id="'.$userid.'"';
56 $ergebnis=$db->Execute($sql);
58 {$zeile=$ergebnis->FetchRow();
59 if (($zeile[mahopass_password
]==$keyword)&&($zeile[mahopass_id
]==$userid))
61 if (!($zeile[mahopass_lockflag
]))
63 if (validarea($allowedarea,$zeile,mysql_num_fields($ergebnis)))
65 setcookie(ck_edv_db_user
,$zeile[mahopass_name
]);
66 logentry($zeile[mahopass_name
],"*","IP:".$REMOTE_ADDR."EDV DB verwalten Access OK'd",$thisfile,$fileforward);
67 header("Location: $fileforward?sid=$$ck_sid_buffer");
79 { echo "Verbindung zur Datenbank konnte nicht hergestellt werden.<br>"; $passtag=5;}
85 <!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
88 <?php
echo setCharSet(); ?
>
89 <TITLE
>EDV
- Datenbank Verwalten
</TITLE
>
91 <?php
if($cfg['dhtml'])
93 <script language="javascript" src="../js/hilitebu.js">
96 <STYLE TYPE="text/css">
97 A:link {text-decoration: none; color: '.$cfg['body_txtcolor'].';}
98 A:hover {text-decoration: underline; color: '.$cfg['body_hover'].';}
99 A:active {text-decoration: none; color: '.$cfg['body_alink'].';}
100 A:visited {text-decoration: none; color: '.$cfg['body_txtcolor'].';}
101 A:visited:active {text-decoration: none; color: '.$cfg['body_alink'].';}
102 A:visited:hover {text-decoration: underline; color: '.$cfg['body_hover'].';}
109 <BODY
<?php
if (!$nofocus) echo 'onLoad="document.passwindow.userid.focus()"'; echo ' bgcolor='.$cfg['body_bgcolor'];
110 if (!$cfg['dhtml']){ echo ' link='.$cfg['body_txtcolor'].' alink='.$cfg['body_alink'].' vlink='.$cfg['body_txtcolor']; }
114 <FONT SIZE
=-1 FACE
="Arial">
117 <FONT COLOR
=#cc6600 SIZE=5 FACE="verdana"> <b>Datenbank Verwalten</b></font>
119 <table width
=100% border
=0 cellpadding
="0" cellspacing
="0">
121 <td colspan
=3><img src
=../img
/einga
-b
.gif border
=0 width
=130 height
=25><!-- <a href
="op-pflege-logbuch-such-pass.php?sid=<?php echo $$ck_sid_buffer;?>"><img src
="../img/such-gray.gif" border
=0 width
=130 height
=25 <?php
if($cfg['dhtml'])echo'style=filter:alpha(opacity=70) onMouseover=hilite(this,1) onMouseOut=hilite(this,0)>';?
></a
><a href
="op-pflege-logbuch-arch-pass.php?sid=<?php echo $$ck_sid_buffer;?>"><img src
="../img/arch-gray.gif" border
=0 width
=130 height
=25 <?php
if($cfg['dhtml'])echo'style=filter:alpha(opacity=70) onMouseover=hilite(this,1) onMouseOut=hilite(this,0)>';?
></a
> --></td
>
125 <td bgcolor
=#333399 colspan=3>
126 <FONT SIZE
=1 FACE
="Arial"><STRONG
> 
;</STRONG
></FONT
>
130 <tr bgcolor
="#DDE1EC">
131 <td bgcolor
=#333399><font size=1> </td>
139 <?php
if ((($userid!=NULL)||
($keyword!=NULL))&&($passtag!=NULL))
141 echo '<FONT COLOR="red" SIZE=+2 FACE="Arial"><STRONG>';
143 $errbuf="EDV - DB verwalten ";
147 case 1:$errbuf=$errbuf."Falsche Eingabe"; echo '<img src=../img/cat-fe.gif align=left>';break;
148 case 2:$errbuf=$errbuf."Keine Berechtigung"; echo '<img src=../img/cat-noacc.gif align=left>';break;
149 default:$errbuf=$errbuf."Zugang gesperrt"; echo '<img src=../img/warn.gif align=left>';
153 logentry($userid,$keyword,$errbuf,$thisfile,$fileforward);
156 echo '</STRONG></FONT><P>';
161 <table border
=0 cellpadding
=0 cellspacing
=0>
163 <?php
if(!$passtag) echo'
166 <img src="../img/ned2r.gif" border=0 width=100 height=138 >
170 <td bgcolor
="#999999" valign
=top
>
172 <table cellpadding
=1 bgcolor
=#999999 cellspacing=0>
175 <table cellpadding
=20 bgcolor
=#eeeeee >
180 <FORM action
="<?php echo $thisfile; ?>" method
="post" name
="passwindow">
182 <font color
=maroon size
=3>
183 <b
>Passwort ist erforderlich
!</b
></font
><p
>
184 <font face
="Arial,Verdana" color
="#000000" size
=-1>
185 Benutzername eingeben
:<br
></font
>
186 <INPUT type
="text" name
="userid" size
="14" maxlength
="25"> <p
>
187 <font face
="Arial,Verdana" color
="#000000" size
=-1>Passwort eingeben
:</font
><br
>
188 <INPUT type
="password" name
="keyword" size
="14" maxlength
="25">
189 <input type
="hidden" name
="versand" value
="Abschicken">
190 <input type
="hidden" name
="sid" value
="<?php echo $sid; ?>">
191 <input type
="image" src
="../img/abschic.gif" border
=0 width
=110 height
=24>
195 <FORM action
="<?php echo $breakfile;?>" name
=cancelbut
>
196 <input type
="hidden" name
="sid" value
="<?php echo $sid; ?>">
197 <input type
="image" src
="../img/abbrech.gif" border
=0 width
=103 height
=24>
215 <td bgcolor
=#333399><font size=1> </td>
219 <td bgcolor
="#333399" colspan
=3><font size
=1>
228 <img src
="../img/small_help.gif"> <a href
="<?php echo $root_path; ?>main/ucons.php<?php echo URL_APPEND; ?>">Einführung in
die SQL Datenbank
.</a
><br
>
229 <img src
="../img/small_help.gif"> <a href
="<?php echo $root_path; ?>main/ucons.php<?php echo URL_APPEND; ?>">Wie mache ich was hier?
</a
><br
>
234 require($root_path.'include/inc_load_copyrite.php');