function logindata() { global $prefix, $user_prefix; $user = $this->getcookiedetail(); //echo "Data: $user<BR>\n"; //if(!is_array($user)) //{ $usertmp = base64_decode($user); $user = explode(":", $usertmp); $uid = "{$user['0']}"; $pwd = "{$user['2']}"; //echo "UID: $uid<BR>PWD: $pwd<BR><BR>\n"; /*} else { $uid = "$user[0]"; $pwd = "$user[2]"; }*/ if ($uid != "" and $pwd != "") { $result = "select uid, name, pass, uname, email, esc_level_1, esc_level_2, esc_admin from nuke_users where uid='{$uid}' AND pass='******'"; $TRUE = true; $FALSE = false; // echo "Opening DB connection<BR>\n"; $thisData = new mysqldb("localhost", "nuke_aq", "dba", "sql99"); $thisData->setsql($result); if (!$thisData->selectquery()) { echo "ERROR: " . mysql_error() . "<BR>\n"; die("MEGA error!"); } if ($thisData->numberrows == 0) { echo "NO RECORDS FOUND!<BR>\n"; } else { for ($i = 0; $i <= $thisData->numberrows; $i++) { //echo "<PRE>"; print_r($thisData->result[$i]); echo "</PRE>\n"; $this->uid = $thisData->result[0]['uid']; $this->uname = $thisData->result[0]['name']; $this->lname = $thisData->result[0]['uname']; $this->email = $thisData->result[0]['email']; $this->l1 = $thisData->result[0]['esc_level_1']; $this->l2 = $thisData->result[0]['esc_level_2']; $this->admin = $thisData->result[0]['esc_admin']; } } } else { debug("Sad thing, this!"); } }