Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL & ~E_NOTICE);
- $bannedgroups = array(1, 3, 4, 35, 41);
- require_once('./global.php');
- require_once(DIR . '/includes/functions_forumdisplay.php');
- if($_GET['message'] == "")
- {
- die('');
- }
- if (!empty($blockgroups))
- {
- if (is_member_of($vbulletin->userinfo, $blockgroups))
- {
- die("Authentication Failed");
- }
- }
- $usr_userid = $_COOKIE['dv_userid'];
- $sv_name = "localhost";
- $username = "USERNAME";
- $password = "Pa$$w0rd";
- $db_name = "DATABASE_NAME";
- $table_name = "vb_user";
- $con = mysql_connect($sv_name, $username, $password) or die(mysql_error());
- mysql_select_db($db_name, $con) or die(mysql_error());
- $query = "SELECT * FROM " . $table_name . " WHERE userid='" . $usr_userid . "'";
- $result = mysql_query($query, $con) or die(mysql_error());
- $row = mysql_fetch_array($result);
- mysql_close($con);
- if($row['username'] == "")
- {
- die('Authentication Failed');
- }
- for($i=0; $i<count($bannedgroups); $i++)
- {
- if($row['usergroupid'] == $bannedgroups[$i])
- {
- die('Authentication Failed');
- }
- }
- $fh = fopen("/tmp/sendlog.txt", "a");
- fwrite($fh, str_replace(" ", "^", $row['username']) . " " . str_replace(array(" ", "\n"), "%%^%", $_GET['message']) . "\n");
- fclose($fh);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement