Quellcode-Bibliothek
© Kompilation durch diese Firma
[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]
Datei:
Sprache: Unknown
Spracherkennung für: .php vermutete Sprache: Shell {Shell[108] Python[158] Ada[364]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen] <?php
#--------------------------------------------------------------------------
#Class au_uc_0100, ehemals Statuskontrolle Sprecherarchiv
#--------------------------------------------------------------------------
class au_uc_0100{
#---------------------------------Properties
var $counter = array();
var $counter2 = array();
var $log = array();
function au_uc_0100() {
#-------------------------------------------------------------------------------
#Konstructor
#Initialisieren der Properties
#-------------------------------------------------------------------------------
require ("aui_0001.php"); #include für DB-Connect
$this->counter['Sprecher']['gesamt']= 0;
$this->counter['Sprecher']['OK']= 0;
$this->counter['Sprecher']['gelöscht']= 0;
$this->counter['Sprecher']['gesperrt']= 0;
$this->counter['Sprecher']['temp']= 0;
$this->counter['Sprecher']['backup']= 0;
$this->counter['Kunden']['gesamt']= 0;
$this->counter['Kunden']['OK']= 0;
$this->counter['Kunden']['gelöscht']= 0;
$this->counter['Kunden']['gesperrt']= 0;
$this->counter['Kunden']['dummy1']= "";
$this->counter['Kunden']['dummy2']= "";
$this->counter['Kunden']['auftraege']= 0;
$this->counter['Partner']['gesamt']= 0;
$this->counter['Partner']['OK']= 0;
$this->counter['Partner']['gelöscht']= 0;
$this->counter['Partner']['gesperrt']= 0;
$this->counter['Rest(Admin)']['gesamt']= 0;
$this->counter['Rest(Admin)']['OK']= 0;
$this->counter['Rest(Admin)']['gelöscht']= 0;
$this->counter['Rest(Admin)']['gesperrt']= 0;
au_uc_0100::gesamt_user();
} #end Konstructor au_uc_0100
function gesamt_user(){
//-----------------------------------------------------------------------------------------------
// Methode: Statistik über die Anzahl der verschiedenen User und Ihrer Statis im Sprecherarchiv
//-----------------------------------------------------------------------------------------------
require ("aui_0010.php"); #set path_temp_name file
au_uc_0100::gesamt_anzahl();
au_uc_0100::OK_anzahl();
au_uc_0100::gelöscht_anzahl();
au_uc_0100::gesperrt_anzahl();
au_uc_0100::kundenauftrag_in_arbeit();
au_uc_0100::temp_sprachproben($path_temp_file);
au_uc_0100::backup_sprachproben($path_backup_file);
au_uc_0100::sprecher_statistik();
au_uc_0100::last_50_login();
} #end Methode gesamt_user
function gesamt_anzahl(){
//-----------------------------------------------------------------------------------------------
// Methode: Gesamtanzahl User im Sprecherarchiv
//-----------------------------------------------------------------------------------------------
$sql = " Select SQL_SMALL_RESULT substring(User_ID,1,1) as archive_type, count(User_ID) as anzahl ";
$sql .= " from ta_anmeldung ";
$sql .= " group by (substring(User_ID,1,1)) ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_anmeldung für Statuskontrolle (select #2) ");
}else{
while ($row=MYSQL_FETCH_array($result,1)){
switch ($row['archive_type']){
case'S':
$this->counter['Sprecher']['gesamt'] = $row['anzahl'];
break;
case'K':
$this->counter['Kunden']['gesamt'] = $row['anzahl'];
break;
case'P':
$this->counter['Partner']['gesamt'] = $row['anzahl'];
break;
default:
$this->counter['Rest(Admin)']['gesamt'] = $row['anzahl'];
break;
}
}
}
} #end Methode gesamt_anzahl
function OK_anzahl(){
//-----------------------------------------------------------------------------------------------
// Methode: User OK innerhalb der Gesamtanzahl User im Sprecherarchiv
//-----------------------------------------------------------------------------------------------
$sql = " Select SQL_SMALL_RESULT substring(User_ID,1,1) as archive_type, count(User_ID) as anzahl ";
$sql .= " from ta_anmeldung ";
$sql .= " where Status = '7' or Status = '8' ";
$sql .= " group by (substring(User_ID,1,1)) ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_anmeldung für Statuskontrolle (select #2) ");
}else{
while ($row=MYSQL_FETCH_array($result,1)){
switch ($row['archive_type']){
case'S':
$this->counter['Sprecher']['OK'] = $row['anzahl'];
break;
case'K':
$this->counter['Kunden']['OK'] = $row['anzahl'];
break;
case'P':
$this->counter['Partner']['OK'] = $row['anzahl'];
break;
default:
$this->counter['Rest(Admin)']['OK'] = $row['anzahl'];
break;
}
}
}
} #end Methode OK_anzahl
function gelöscht_anzahl(){
//-----------------------------------------------------------------------------------------------
// Methode: logisch gelöschte User im Sprecherarchiv
//-----------------------------------------------------------------------------------------------
$sql = " Select SQL_SMALL_RESULT substring(User_ID,1,1) as archive_type, count(User_ID) as anzahl ";
$sql .= " from ta_anmeldung ";
$sql .= " where Status = '9' ";
$sql .= " group by (substring(User_ID,1,1)) ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_anmeldung für Statuskontrolle (select #2) ");
}else{
while ($row=MYSQL_FETCH_array($result,1)){
switch ($row['archive_type']){
case'S':
$this->counter['Sprecher']['gelöscht'] = $row['anzahl'];
break;
case'K':
$this->counter['Kunden']['gelöscht'] = $row['anzahl'];
break;
case'P':
$this->counter['Partner']['gelöscht'] = $row['anzahl'];
break;
default:
$this->counter['Rest(Admin)']['gelöscht'] = $row['anzahl'];
break;
}
}
}
} #end Methode gelöscht_anzahl
function gesperrt_anzahl(){
//-----------------------------------------------------------------------------------------------
// Methode: Anzahl gesperrter User im Sprecherarchiv
//-----------------------------------------------------------------------------------------------
$sql = " Select SQL_SMALL_RESULT substring(User_ID,1,1) as archive_type, count(User_ID) as anzahl ";
$sql .= " from ta_anmeldung ";
$sql .= " where Status = '6' ";
$sql .= " group by (substring(User_ID,1,1)) ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_anmeldung für Statuskontrolle (select #2) ");
}else{
while ($row=MYSQL_FETCH_array($result,1)){
switch ($row['archive_type']){
case'S':
$this->counter['Sprecher']['gesperrt'] = $row['anzahl'];
break;
case'K':
$this->counter['Kunden']['gesperrt'] = $row['anzahl'];
break;
case'P':
$this->counter['Partner']['gesperrt'] = $row['anzahl'];
break;
default:
$this->counter['Rest(Admin)']['gesperrt'] = $row['anzahl'];
break;
}
}
}
} #end Methode gesperrt_anzahl
function kundenauftrag_in_arbeit(){
//-----------------------------------------------------------------------------------------------
// Methode: Anzahl Aufträge, deren Status < 4 (storniert) ist
//-----------------------------------------------------------------------------------------------
$sql = " Select SQL_SMALL_RESULT count(Status_Bearbeitung) as anzahl ";
$sql .= " from ta_buchungsanfrage ";
$sql .= " where Status_Bearbeitung < 4 ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_buchungsanfrage für Statuskontrolle ");
}else{
$row=MYSQL_FETCH_array($result,1);
$this->counter['Kunden']['auftraege'] = $row['anzahl'];
}
} #end Methode kundenauftrag_in_arbeit
function temp_sprachproben($path_temp_file){
//-----------------------------------------------------------------------------------------------
// Methode: temporäre Sprechproben im Sprecherarchiv (noch freizugeben)
//-----------------------------------------------------------------------------------------------
$path_aktuell = getcwd();
chdir($path_temp_file);
$verzeichnis = dir($path_temp_file);
while ($eintrag=$verzeichnis->read()){
if (filetype($eintrag) != "dir"){
$this->counter['Sprecher']['temp'] ++;
}
}
$verzeichnis->close();
chdir($path_aktuell);
} #end Methode temp_sprachproben
function backup_sprachproben($path_backup_file){
//-----------------------------------------------------------------------------------------------
// Methode: mp3-backup-Files, die gesichert werden müssen
//-----------------------------------------------------------------------------------------------
$path_aktuell = getcwd();
chdir($path_backup_file);
$verzeichnis = dir($path_backup_file);
while ($eintrag=$verzeichnis->read()){
if (filetype($eintrag) != "dir"){
$this->counter['Sprecher']['backup'] ++;
}
}
$verzeichnis->close();
chdir($path_aktuell);
} #end Methode backup_sprachproben
function sprecher_statistik(){
//-------------------------------------------------------------------
//Stati der Sprecher werden gruppiert, gezählt und mit Text angezeigt
//-------------------------------------------------------------------
$gesamt_sprecher = 0;
$sql = " Select SQL_SMALL_RESULT Status, count(Status) as Anzahl ";
$sql .= " from ta_anmeldung ";
$sql .= " WHERE (substring(User_ID,1,1) = 'S')";
$sql .= " group by Status ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_anmeldung für Statuskontrolle (select #1) ");
}else{
while ($row=MYSQL_FETCH_array($result,1)){
$this->counter2[$row['Status']] [$row['Anzahl']] = $row['Anzahl'];
}
}
} #end Methode sprecher_statistik
function last_50_login(){
//-------------------------------------------------------------------
//Es werden die letzten 50 LOGIN angelistet
//-------------------------------------------------------------------
$sql = " Select SQL_SMALL_RESULT MAX(lfdnr) as anzahl ";
$sql .= " from ta_logging ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_logging für Statuskontrolle (select #3) ");
}else{
$row=MYSQL_FETCH_array($result,1);
$anzahl = $row['anzahl'];
}
if ($anzahl <= 50)
$von_lfdnr = 0;
else
$von_lfdnr = $anzahl - 50;
$bis_lfdnr = 99;
$sql = " Select * ";
$sql .= " from ta_logging ";
$sql .= " LIMIT $von_lfdnr,$bis_lfdnr ";
$result=MYSQL_QUERY($sql);
if (!$result) {
echo (" F E H L E R " . $sql . " ");
echo (" " . mysql_error() . " ");
MYSQL_CLOSE();
die ("ABBRUCH: Fehler beim Lesen ta_logging für Statuskontrolle (select #4) ");
}else{
while ($row=MYSQL_FETCH_array($result,1)){
$this->log[]=$row;
}
}
} #end Methode last_50_login
} #end class au_uc_0100
?>
[ Dauer der Verarbeitung: 0.97 Sekunden
]
|
|