function nozlib($msg = "") { global $adminmail, $PHP_SELF; saveerror("No zLib", "class.zip.php", __LINE__, 0); $message = "Error: Ein notwendiges Modul konnte nicht gefunden werden: <b>zlib</b><br>"; $message .= "Date: " . date("d.m.Y @ H:i") . "\n<br>"; $message .= "Script: " . getenv("REQUEST_URI") . "\n<br>"; $message .= "Referer: " . getenv("HTTP_REFERER") . "\n<br><hr width=20%>"; $message .= "Administrator: <a href=\"mailto:{$adminmail}\">{$adminmail}</a>\n<br><br>"; $message .= "Administrator: <a href=\"mailto:{$adminmail}\">{$adminmail}</a>\n"; eval("\$message = \"" . gettemplate("error") . "\";"); die($message); exit; }
function domailing($failed = 1) { global $smtp, $config; if (!$this->use_smtp) { $mailed = @mail($this->mail_target, $this->mail_subject, $this->mail_body, $this->mail_header); } else { $smtp->connect($config[smtp_host], $config[smtp_user], $config[smtp_pass]); $mailed = $smtp->mail($this->mail_target, $this->mail_subject, $this->mail_body, $this->mail_header); } if (!$mailed) { saveerror("Mail not sent -- {$this->mail_target} -- \r\n -- {$this->mail_subject} -- \r\n -- {$this->mail_body} -- \r\n", __FILE__, __LINE__, 0, 1); if ($failed) { $this->failedsending(); } } $this->reset(); }
function erroroutput($msg = "") { global $adminmail; $this->errordesc = mysql_error(); $this->errorcode = mysql_errno(); $message = "Database error in {$this->appname}: {$msg}\n"; $message .= "mysql error:<b> {$this->errordesc}\n</b>"; $message .= "mysql error number: {$this->errorcode}\n"; $message .= "Date: " . date("d.m.Y @ H:i") . "\n"; $message .= "Script: " . getenv("REQUEST_URI") . "\n"; $message .= "Referer: " . getenv("HTTP_REFERER") . "\n<hr width=20%>"; saveerror($message, __FILE__, __LINE__, 0, 0); $message .= "Administrator: <a href=\"mailto:{$adminmail}\">{$adminmail}</a>\n"; eval("\$message = \"" . gettemplate("error", 0) . "\";"); die($message); exit; }
function erroroutput($msg = "") { global $adminmail; if ($this->socket) { $this->disconnect(); } $message = "Smtp Error in {$this->appname}: {$msg}\n<br>"; $message .= "SMTP error:<b> {$this->errdesc}\n</b><br>"; $message .= "SMTP error number: {$this->errno}\n<br>"; $message .= "Date: " . date("d.m.Y @ H:i") . "\n<br>"; $message .= "Script: " . getenv("REQUEST_URI") . "\n<br>"; $message .= "Referer: " . getenv("HTTP_REFERER") . "\n<br><hr width=20%>"; saveerror($message, __FILE__, __LINE__, 0, 1); $message .= "Administrator: <a href=\"mailto:{$adminmail}\">{$adminmail}</a>\n<br><br>"; eval("\$message = \"" . gettemplate("error") . "\";"); die($message); exit; }
function checkuser($logout = "0") { global $tab, $db, $loginform, $dothelogin; foreach ($loginform as $a => $b) { $loginform[$a] = trim($b); } if ($logout) { session_unset(loginsession); setcookie("cookie_user_id", "", -1); setcookie("cookie_user_password", "", -1); return 5; } ################################################## ## Version 1.1 // transmitted pwd is md5 encoded ################################################## $checkpassword = $db->query("SELECT * FROM {$tab['user']} WHERE (user_login='******'username']}' OR user_name='{$loginform['username']}') AND user_password='******'userpassword']}'"); /* * ################################################## * ### VERSION 1.0 // trasmitted pwd was not encoded * ################################################## * if($loginform[md5]) { * $checkpassword = $db->query("SELECT * FROM $tab[user] WHERE (user_login='******' OR user_name='$loginform[username]') AND user_password='******'"); * } else { * if($checkuser[md5]) { * $checkpassword = $db->query("SELECT * FROM $tab[user] WHERE (user_login='******' OR user_name='$loginform[username]') AND user_password='******'"); * } else { * $checkpassword = $db->query("SELECT * FROM $tab[user] WHERE (user_login='******' OR user_name='$loginform[username]') AND user_password=PASSWORD('$loginform[userpassword]')"); * if($checkuser) { $db->query_str("UPDATE $tab[user] SET user_password='******',md5='1' WHERE id='$checkuser[id]'");} * } * } */ if (!$checkpassword) { $checkuser = $db->query("SELECT * FROM {$tab['user']} WHERE user_login='******'username']}' OR user_name='{$loginform['username']}'"); if (!$checkuser) { return 1; } if ($checkuser[blocked]) { return 2; } if (!$checkuser[activated]) { return 4; } return 3; } else { $checkuser = $checkpassword; } if ($dothelogin) { $queryplus = ", logins=logins+1"; } $UPDATE = $db->query_str("UPDATE {$tab['user']} SET\n\t\t\t\tlast_activ='" . time() . "'{$queryplus}\n\t\t\t\tWHERE id='{$checkuser['id']}'"); #################################################### ### Insert UserOptions #################################################### if ($tab[useroption]) { $tmp = $db->query_str("SELECT * FROM {$tab['useroption']} WHERE userid='{$checkuser['id']}'"); while ($option = $db->fetch_array($tmp)) { $checkuser["{$option['name']}"] = $option[value]; } } else { saveerror("Update auf 1.5 durchführen.", __FILE__, __LINE__); } return $checkuser; }
} else { $db->query_str("UPDATE {$tab['loader']} SET loads=loads+1 WHERE id='{$load['id']}'"); //if(($load[file][0]=="/")) {$load[file] = substr($load[file],1,strlen($load[file]));} if ($load[mode] == 1) { // Weiterleitung header("LOCATION: {$load['file']}"); } elseif ($load[mode] == 2) { // lokale Datei Anhängen if (is_file($load[file])) { $inc[action] = implode("", file($load[file])); } else { saveerror("Loader: Link ungültig", __FILE__, __LINE__); eval("\$inc[action] = \"" . gettemplate("fail.access.noaccess") . "\";"); } } elseif ($load[mode] == 3) { // URL if ($fp = fopen($load[file], "r")) { while (feof($fp) == 0) { $inc[action] .= fgets($fp, 1024); } fclose($fp); } else { saveerror("Loader: Link ungültig", __FILE__, __LINE__); eval("\$inc[action] = \"" . gettemplate("fail.access.noaccess") . "\";"); } } } } else { eval("\$inc[action] = \"" . gettemplate("fail.access.noaccess") . "\";"); } ///////////////////
function getuser($userid, $new = 0) { global $tab, $db, $getuserpuffer; static $getuserpuffer; if ($new) { return $db->query("SELECT * FROM {$tab['user']} WHERE id='{$userid}'"); } if (!is_array($getuserpuffer)) { $return = $db->query("SELECT * FROM {$tab['user']} WHERE id='{$userid}'"); $getuserpuffer[] = $return; } else { foreach ($getuserpuffer as $a => $b) { if ($b[id] == $userid) { $return = $b; $found = 1; break; } } if (!$found) { $return = $db->query("SELECT * FROM {$tab['user']} WHERE id='{$userid}'"); $getuserpuffer[] = $return; } } if ($tab[useroption]) { $tmp = $db->query_str("SELECT * FROM {$tab['useroption']} WHERE userid='{$userid}'"); while ($option = $db->fetch_array($tmp)) { $return["{$option['name']}"] = $return[value]; } } else { saveerror("UPDATE ausführen. Siehe Admin", __FILE__, __LINE__); } return $return; }