|
From: <tre...@us...> - 2003-03-13 14:17:45
|
Update of /cvsroot/yawcs/yawcs/cgi-bin
In directory sc8-pr-cvs1:/tmp/cvs-serv29893/cgi-bin
Modified Files:
kis.cgi
Log Message:
Inserted User Config
Index: kis.cgi
===================================================================
RCS file: /cvsroot/yawcs/yawcs/cgi-bin/kis.cgi,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** kis.cgi 22 Dec 2002 13:39:31 -0000 1.1.1.1
--- kis.cgi 13 Mar 2003 14:17:41 -0000 1.2
***************
*** 10,57 ****
my $cgi = new CGI;
$stdmenu="Home,Kontakt,Angebote,Servicebereich,Info";
$stdurl=(",,,http://ks.mediaweb-it.net,");
&parse_input;
! if($in{'action'} eq "login"){&check_pwd;&print_kismenue;exit;}
! if($in{'action'} eq "chpwd"){&check_pwd;&print_chpwd;exit;}
! if($in{'action'} eq "domains"){&check_pwd;&print_domain;exit;}
! if($in{'action'} eq "dom_sub"){&check_pwd;&print_subdomain;exit;}
! if($in{'action'} eq "dom_sub_neu"){&check_pwd;&print_dom_sub_neu;exit;}
! if($in{'action'} eq "sub_prop"){&check_pwd;&print_dom_sub_prop;exit;}
! if($in{'action'} eq "dom_redir"){&check_pwd;&print_domainredir;exit;}
! if($in{'action'} eq "ch_redir"){&check_pwd;&print_redir_change;exit;}
! if($in{'action'} eq "traffic"){&check_pwd;&print_traffic;exit;}
! if($in{'action'} eq "stats"){&check_pwd;&print_stats;exit;}
! if($in{'action'} eq "show_stats"){&check_pwd;&print_show_stats("index.html");exit;}
! if($in{'action'} eq "statpic"){&print_stats_picture;exit;}
! if($in{'action'} eq "file_stat"){&print_show_stats($in{'file'});exit;}
! if($in{'action'} eq "logfiles"){&check_pwd;&print_logfiles;exit;}
! if($in{'action'} eq "mysql"){&check_pwd;&print_mysql;exit;}
! if($in{'action'} eq "mysql_pwd"){&check_pwd;&print_mysql_pwd;exit;}
! if($in{'action'} eq "mysql_db"){&check_pwd;&print_mysql_edit;exit;}
! if($in{'action'} eq "mail"){&check_pwd;&print_mail;exit;}
! if($in{'action'} eq "mail_pop3"){&check_pwd;&print_mail_pop3;exit;}
! if($in{'action'} eq "mail_pop_new"){&check_pwd;&print_mail_pop3new;exit;}
! if($in{'action'} eq "mail_pop_chpwd"){&check_pwd;&print_mail_pop3chpwd;exit;}
! if($in{'action'} eq "mail_sendmail"){&check_pwd;&print_mail_sendmail;exit;}
! if($in{'action'} eq "mail_sendmail_new"){&check_pwd;&print_mail_sendmailnew;exit;}
! if($in{'action'} eq "mail_sendmail_prop"){&check_pwd;&print_mail_sendmailprop;exit;}
! if($in{'action'} eq "webmail"){&check_pwd;&print_webmail;exit;}
! if($in{'action'} eq "ftp"){&check_pwd;&print_ftp;exit;}
! if($in{'action'} eq "kontakt"){&check_pwd;&print_kontakt;exit;}
! if($in{'action'} eq "sv_chpwd"){&check_pwd;&save_chpwd;exit;}
! if($in{'action'} eq "sv_chsqlpwd"){&check_pwd;&save_chsqlpwd;exit;}
! if($in{'action'} eq "savesub_neu"){&check_pwd;&save_sub_neu;exit;}
! if($in{'action'} eq "savesub_prop"){&check_pwd;&save_sub_prop;exit;}
! if($in{'action'} eq "del_sub"){&check_pwd;&save_del_sub;exit;}
! if($in{'action'} eq "save_redir"){&check_pwd;&save_redir;exit;}
! if($in{'action'} eq "save_pop_new"){&check_pwd;&save_newpop;exit;}
! if($in{'action'} eq "save_pop_chpwd"){&check_pwd;&save_popchpwd;exit;}
! if($in{'action'} eq "save_sendmail_new"){&check_pwd;&save_newmail;exit;}
! if($in{'action'} eq "save_sendmail_edit"){&check_pwd;&save_editmail;exit;}
! if($in{'action'} eq "del_mail"){&check_pwd;&save_del_mail;exit;}
&print_login;
--- 10,65 ----
my $cgi = new CGI;
+ %config=(
+ DB=> 'webconf',
+ DB_USER=> 'webconf',
+ DB_PASS=> 'yourpassword',
+ crypt=> 'MW',
+ );
+
+
$stdmenu="Home,Kontakt,Angebote,Servicebereich,Info";
$stdurl=(",,,http://ks.mediaweb-it.net,");
&parse_input;
! if($in{action} eq "login"){&check_pwd;&print_kismenue;exit;}
! if($in{action} eq "chpwd"){&check_pwd;&print_chpwd;exit;}
! if($in{action} eq "domains"){&check_pwd;&print_domain;exit;}
! if($in{action} eq "dom_sub"){&check_pwd;&print_subdomain;exit;}
! if($in{action} eq "dom_sub_neu"){&check_pwd;&print_dom_sub_neu;exit;}
! if($in{action} eq "sub_prop"){&check_pwd;&print_dom_sub_prop;exit;}
! if($in{action} eq "dom_redir"){&check_pwd;&print_domainredir;exit;}
! if($in{action} eq "ch_redir"){&check_pwd;&print_redir_change;exit;}
! if($in{action} eq "traffic"){&check_pwd;&print_traffic;exit;}
! if($in{action} eq "stats"){&check_pwd;&print_stats;exit;}
! if($in{action} eq "show_stats"){&check_pwd;&print_show_stats("index.html");exit;}
! if($in{action} eq "statpic"){&print_stats_picture;exit;}
! if($in{action} eq "file_stat"){&print_show_stats($in{'file'});exit;}
! if($in{action} eq "logfiles"){&check_pwd;&print_logfiles;exit;}
! if($in{action} eq "mysql"){&check_pwd;&print_mysql;exit;}
! if($in{action} eq "mysql_pwd"){&check_pwd;&print_mysql_pwd;exit;}
! if($in{action} eq "mysql_db"){&check_pwd;&print_mysql_edit;exit;}
! if($in{action} eq "mail"){&check_pwd;&print_mail;exit;}
! if($in{action} eq "mail_pop3"){&check_pwd;&print_mail_pop3;exit;}
! if($in{action} eq "mail_pop_new"){&check_pwd;&print_mail_pop3new;exit;}
! if($in{action} eq "mail_pop_chpwd"){&check_pwd;&print_mail_pop3chpwd;exit;}
! if($in{action} eq "mail_sendmail"){&check_pwd;&print_mail_sendmail;exit;}
! if($in{action} eq "mail_sendmail_new"){&check_pwd;&print_mail_sendmailnew;exit;}
! if($in{action} eq "mail_sendmail_prop"){&check_pwd;&print_mail_sendmailprop;exit;}
! if($in{action} eq "webmail"){&check_pwd;&print_webmail;exit;}
! if($in{action} eq "ftp"){&check_pwd;&print_ftp;exit;}
! if($in{action} eq "kontakt"){&check_pwd;&print_kontakt;exit;}
! if($in{action} eq "sv_chpwd"){&check_pwd;&save_chpwd;exit;}
! if($in{action} eq "sv_chsqlpwd"){&check_pwd;&save_chsqlpwd;exit;}
! if($in{action} eq "savesub_neu"){&check_pwd;&save_sub_neu;exit;}
! if($in{action} eq "savesub_prop"){&check_pwd;&save_sub_prop;exit;}
! if($in{action} eq "del_sub"){&check_pwd;&save_del_sub;exit;}
! if($in{action} eq "save_redir"){&check_pwd;&save_redir;exit;}
! if($in{action} eq "save_pop_new"){&check_pwd;&save_newpop;exit;}
! if($in{action} eq "save_pop_chpwd"){&check_pwd;&save_popchpwd;exit;}
! if($in{action} eq "save_sendmail_new"){&check_pwd;&save_newmail;exit;}
! if($in{action} eq "save_sendmail_edit"){&check_pwd;&save_editmail;exit;}
! if($in{action} eq "del_mail"){&check_pwd;&save_del_mail;exit;}
&print_login;
***************
*** 63,94 ****
sub check_pwd{
&db_open;
! my $sql = qq[SELECT passwort, name, firma, anschrift, plzort, telefon, fax, mail, kdnr, ddns, ssl, noapache FROM kunden WHERE kunde='$in{'usr'}'];
$cursor = $dbh->prepare($sql) or &err("Show failed: $sql");
$anzahl=$cursor->execute() or &err($cursor->errstr);
$pwd=$cursor->fetch;
! if(!$in{'cpwd'}){$in{'cpwd'}=crypt($in{'pwd'},"MW");}
! unless(crypt($pwd->[0],"MW") eq $in{'cpwd'} && $anzahl == 1){
$page="<br><center><font Color=red>Die eingegebene Benutzername/Passwort Kombination ist falsch !!</font></center>";
&print_login;
exit;
}
-
- $kd{'name'}=$pwd->[1];
- $kd{'firma'}=$pwd->[2];
- $kd{'anschr'}=$pwd->[3];
- $kd{'plzort'}=$pwd->[4];
- $kd{'tel'}=$pwd->[5];
- $kd{'fax'}=$pwd->[6];
- $kd{'mail'}=$pwd->[7];
- $kd{'kdnr'}=$pwd->[8];
-
- $kd{'perm_ddns'}=$pwd->[9];
- $kd{'perm_ssl'}=$pwd->[10];
- $kd{'perm_noapache'}=$pwd->[11];
-
$cursor->finish;
&db_close;
}
--- 71,103 ----
sub check_pwd{
&db_open;
! my $sql = qq[SELECT passwort, name, firma, anschrift, plzort, telefon, fax, mail, kdnr, ddns, feat_ssl, noapache FROM kunden WHERE kunde='$in{usr}'];
$cursor = $dbh->prepare($sql) or &err("Show failed: $sql");
$anzahl=$cursor->execute() or &err($cursor->errstr);
$pwd=$cursor->fetch;
! if(!$in{cpwd}){$in{cpwd}=crypt($in{pwd},$config{crypt});}
! unless(crypt($pwd->[0],$config{crypt}) eq $in{cpwd} && $anzahl == 1){
$page="<br><center><font Color=red>Die eingegebene Benutzername/Passwort Kombination ist falsch !!</font></center>";
&print_login;
exit;
}
$cursor->finish;
&db_close;
+
+ %kd=(
+ name=> $pwd->[1],
+ firma=> $pwd->[2],
+ anschr=> $pwd->[3],
+ plzort=> $pwd->[4],
+ tel=> $pwd->[5],
+ fax=> $pwd->[6],
+ mail=> $pwd->[7],
+ kdnr=> $pwd->[8],
+
+ perm_ddns=> $pwd->[9],
+ perm_ssl=> $pwd->[10],
+ perm_noapache=> $pwd->[11],
+ );
}
***************
*** 96,100 ****
sub db_open
{
! $dbh = DBI->connect("DBI:mysql:database=webconf", "webconf", "107248182") or &err("Fehler bei Datenbankverbindung: ".$!);
}
--- 105,110 ----
sub db_open
{
! $dbh = DBI->connect("DBI:mysql:database=$config{DB}", $config{DB_USER}, $config{DB_PASS}) or &err("Fehler bei der Datenbankverbindung: ".$!);
!
}
***************
*** 106,110 ****
sub db_open_self
{
! $dbh = DBI->connect("DBI:mysql:database=mysql", "webconf", "107248182") or &err("Fehler bei Datenbankverbindung: ".$!);
}
--- 116,120 ----
sub db_open_self
{
! $dbh = DBI->connect("DBI:mysql:database=$config{DB}", $config{DB_USER}, $config{DB_PASS}) or &err("Fehler bei Datenbankverbindung: ".$!);
}
|