$fileforward = "technik.php"; $thisfile = "technik-repabot-pass.php"; $breakfile = "technik.php"; require $root_path . "include/inc_passcheck_f2f.php"; // loads the validarea and logentry functions if ($versand == "Abschicken") { $link = mysql_connect("localhost", "httpd", ""); if ($link) { if (mysql_select_db($dbname, $link)) { $sql = 'SELECT * FROM mahopass WHERE mahopass_id="' . $userid . '"'; $ergebnis = $db->Execute($sql); if ($ergebnis) { $zeile = $ergebnis->FetchRow(); if ($zeile[mahopass_password] == $keyword && $zeile[mahopass_id] == $userid) { if (!$zeile[mahopass_lockflag]) { if (validarea($allowedarea, $zeile, mysql_num_fields($ergebnis))) { setcookie(ck_technik_repabot_user, $zeile[mahopass_name]); setcookie(ck_technik_repabot_src, "repabotpass"); logentry($zeile[mahopass_name], "*", "IP:" . $REMOTE_ADDR . "Technik Repabot Launch OK'd", $thisfile, $fileforward); header("location: {$fileforward}?sid={$sid}&stb=1"); exit; } else { $passtag = 2; } } else { $passtag = 3; } } else { $passtag = 1; } } else {
if($dblink_ok) {*/ $sql = 'SELECT name, login_id, password, permission, lockflag FROM care_users WHERE login_id=\'' . addslashes($userid) . '\''; if ($ergebnis = $db->Execute($sql)) { $zeile = $ergebnis->FetchRow(); if (isset($checkintern) && $checkintern) { $dec_login = new Crypt_HCEMD5($key_login, ''); //$keyword = $dec_login->DecodeMimeSelfRand($HTTP_COOKIE_VARS['ck_login_pw'.$sid]); $keyword = $dec_login->DecodeMimeSelfRand($HTTP_SESSION_VARS['sess_login_pw']); } else { $checkintern = false; } if ($zeile['password'] == md5($keyword) && $zeile['login_id'] == $userid) { if (!$zeile['lockflag']) { if (isset($screenall) && $screenall || validarea($zeile['permission'])) { if (empty($zeile['name'])) { $zeile['name'] = ' '; } logentry($userid, $zeile['name'], "IP:" . $REMOTE_ADDR . " {$lognote} ", $thisfile, $fileforward); /** * Init crypt to use 2nd level key and encrypt the sid. * Store to cookie the "$ck_2level_sid.$sid" * There is no need to call another include of the inc_init_crypt.php since it is already included at the start * of the script that called this script. */ $enc_2level = new Crypt_HCEMD5($key_2level, makeRand()); $ciphersid = $enc_2level->encodeMimeSelfRand($sid); //setcookie('ck_2level_sid'.$sid,$ciphersid,time()+3600,'/'); //setcookie($userck.$sid,$zeile['name'],time()+3600,'/'); setcookie('ck_2level_sid' . $sid, $ciphersid, 0, '/');