authenticate("U_Username,U_Email,U_Language"); $Username = $user['U_Username']; $Useremail = $user['U_Email']; $Useragent = find_environmental("HTTP_USER_AGENT"); $IPAddress = find_environmental ("REMOTE_ADDR"); // ----------------- // Figure out what language FAQ they should be shown $faqlanguage = $user['U_Language']; if (!$faqlanguage) { $faqlanguage = $config['language']; } // ------------------ // What type of line breaks $newline = "\n"; if (stristr(PHP_OS,"win")) { $newline = "\r\n"; } //------------------- // If we have a username, let's list it, otherwise let them fill it in if ($Username) { $UsernameInput = "$Username"; } else { $UsernameInput = ""; } // ----------------- // Set up the query if ($sendtoall == "1") { $select = "WHERE U_STATUS = \"Administrator\""; } else { if (($sendto == "") || ($sendto == "0")) { $sendto = "2"; } $select = "WHERE U_NUMBER in ($sendto)"; } $query = " SELECT U_EMAIL FROM {$config['tbprefix']}Users $select "; $sth = $dbh -> do_query($query); while ( list($Email) = $dbh -> fetch_array($sth)) { if (strcmp($Email,"") != 0) { $ToEmail .= "$Email,"; } } $dbh -> finish_sth($sth); if (!$ToEmail) { $ToEmail = "{$config['emailaddy']}"; } // --------------------- // Send the page to them $html = new html; $html -> send_header("{$ubbt_lang['CONTACT']}",$Cat,0,$user); // --------------------- // Grab the tablewrapper list($tbopen,$tbclose) = $html -> table_wrapper(); if (!$debug) { include("$thispath/templates/$tempstyle/contactus.tmpl"); } // ------------- // Send a footer $html -> send_footer();