INSERT INTO `Modules` VALUES ('', 'phpbb', 'global $mods;\r\nglobal $db;\r\n\r\n/**\r\n* ''ModuleDirectory''\r\n* Specifies name of directory, where forum is located\r\n* (string)\r\n*/\r\n\r\n$mods[''phpbb''][''ModuleDirectory''] = ''forum/'';\r\n\r\n/**\r\n* ''DatabaseSettings''\r\n* Database connection data\r\n* (array)\r\n* Elements:\r\n*\r\n* ''TablePrefix'' \r\n* Defines prefix of phpBB tables, that was used in current phpBB installation\r\n* (string)\r\n*\r\n* ''Host'', ''Name'', ''Username'', ''Password''\r\n* Database settings. By default extracted from header.inc.php\r\n* (string)\r\n*/\r\n\r\n$mods[''phpbb''][''Database''][''TablePrefix''] = ''phpbb_'';\r\n$mods[''phpbb''][''Database''][''Host''] = $db[''host''];\r\n$mods[''phpbb''][''Database''][''Name''] = $db[''db''];\r\n$mods[''phpbb''][''Database''][''Username''] = $db[''user''];\r\n$mods[''phpbb''][''Database''][''Password''] = $db[''passwd''];', 'global $mods;\r\nglobal $site;\r\n\r\n/* aeDating part */\r\n\r\nif (! $IsAdmin)\r\n{\r\n $UserIdentifier = (int)$UserIdentifier;\r\n\r\n $arrUserInfo = db_arr("SELECT `NickName`, \r\n `Password`,\r\n `Email`,\r\n `LastReg` AS `RegistrationDate`\r\n FROM `Profiles`\r\n WHERE `ID` = {$UserIdentifier}");\r\n\r\n if (! $arrUserInfo)\r\n modules_err("phpbb FuncAdd error:\\n No member with ID [{$UserIdentifier}]");\r\n}\r\nelse\r\n{\r\n $arrUserInfo = db_arr("SELECT `Name` AS `NickName`,\r\n `Password`\r\n FROM `Admins`\r\n WHERE `Name` = ''".addslashes($UserIdentifier)."''");\r\n if (! $arrUserInfo)\r\n modules_err("phpbb FuncAdd error:\\n No admin with name ''{$UserIdentifier}''");\r\n \r\n $arrUserInfo[''Email''] = $site[''email''];\r\n \r\n // Retrive join date of first member and set admin join date as this date\r\n list($earliestDate) = db_arr("SELECT Max(`LastReg`) \r\n FROM `Profiles`");\r\n \r\n $arrUserInfo[''RegistrationDate''] = $earliestDate;\r\n}\r\n\r\n/* phpBB part */\r\n\r\n$mysqlLink = mysql_pconnect($mods[''phpbb''][''Database''][''Host''], \r\n $mods[''phpbb''][''Database''][''Username''], \r\n $mods[''phpbb''][''Database''][''Password'']);\r\n\r\nif (! $mysqlLink)\r\n modules_err("phpbb FuncAdd error:\\n mysql_pconnect\\n\\n".mysql_error($mysqlLink));\r\n\r\nmysql_select_db($mods[''phpbb''][''Database''][''Name''], $mysqlLink) or \r\n modules_err("phpbb FuncAdd error:\\n mysql_select_db({$mods[''phpbb''][''Database''][''Name'']}\\n\\n)".mysql_error($mysqlLink));\r\n\r\n$clauseSet = "SET `user_active` = 1,\r\n `username` = ''".addslashes($arrUserInfo[''NickName''])."'',\r\n `user_password` = MD5(''".addslashes($arrUserInfo[''Password''])."''), \r\n `user_level` = ".(($IsAdmin) ? 1 : 0).",\r\n `user_rank` = ".(($IsAdmin) ? 1 : 0).",\r\n `user_email` = ''".addslashes($arrUserInfo[''Email''])."'',\r\n `user_regdate` = UNIX_TIMESTAMP(''{$arrUserInfo[''RegistrationDate'']}'')";\r\n\r\n// Check user existance\r\n$searchableNickname = (strlen(trim($PreviousNickname)) > 0) ? $PreviousNickname : $arrUserInfo[''NickName''];\r\n$queryCheckExistance = "SELECT `user_id`\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users\r\n WHERE `username` = ''".addslashes($searchableNickname)."''";\r\n$result = mysql_query($queryCheckExistance, $mysqlLink) or modules_err("phpbb FuncAdd error: mysql_query({$queryCheckExistance})\\n\\n".mysql_error($mysqlLink));\r\nif (! $result)\r\n modules_err("phpbb FuncAdd error:\\n empty result on query {$queryCheckExistance} \\n\\n".mysql_error($mysqlLink));\r\n$arrUserID = mysql_fetch_assoc($result);\r\n\r\n\r\nif (! $arrUserID) // If user does not exist\r\n{ \r\n // Set data, that is cannot be retreived from aeDating profile info and therefore we set it only once, for initialization.\r\n $clauseSet .= ",\r\n `user_style` = 1,\r\n `user_lang` = ''english'', \r\n `user_dateformat` = ''D M d, Y g:i a'',\r\n `user_attachsig` = 1,\r\n `user_allowbbcode` = 1,\r\n `user_allowsmile` = 1,\r\n `user_allowavatar` = 1,\r\n `user_allow_viewonline` = 1";\r\n\r\n // Get ID of new member (user_id is not auto incremented)\r\n $queryGetNewID = "SELECT MAX(user_id) AS MaxID\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users";\r\n $result = mysql_query($queryGetNewID, $mysqlLink) or modules_err("phpbb FuncAdd error: mysql_query({$queryGetNewID})\\n\\n".mysql_error($mysqlLink));\r\n if (! $result)\r\n modules_err("phpbb FuncAdd error:\\n empty result on query {$queryGetNewID} \\n\\n".mysql_error($mysqlLink));\r\n \r\n $arrMaxID = mysql_fetch_assoc($result);\r\n if (! $arrMaxID)\r\n modules_err("phpbb FuncAdd error:\\n mysql_fetch_assoc({$queryGetNewID})\\n\\n".mysql_error($mysqlLink));\r\n $phpbbUserID = $arrMaxID[''MaxID''] + 1;\r\n \r\n $query = "INSERT INTO {$mods[''phpbb''][''Database''][''TablePrefix'']}users \r\n {$clauseSet},\r\n `user_id` = {$phpbbUserID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncAdd error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n $query = "INSERT INTO {$mods[''phpbb''][''Database''][''TablePrefix'']}groups \r\n (group_name, \r\n group_description, \r\n group_single_user, \r\n group_moderator)\r\n VALUES \r\n ('''', \r\n ''Personal User'', \r\n 1, \r\n 0)"; \r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncAdd error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n\r\n $groupID = mysql_insert_id($mysqlLink);\r\n\r\n $query = "INSERT INTO {$mods[''phpbb''][''Database''][''TablePrefix'']}user_group \r\n (user_id, \r\n group_id, \r\n user_pending)\r\n VALUES \r\n ({$phpbbUserID}, \r\n {$groupID}, \r\n 0)"; \r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncAdd error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n}\r\nelse \r\n{\r\n $phpbbUserID = $arrUserID[''user_id''];\r\n\r\n $queryUpdateUser = "UPDATE {$mods[''phpbb''][''Database''][''TablePrefix'']}users \r\n {$clauseSet}\r\n WHERE `user_id` = {$phpbbUserID}"; \r\n mysql_query($queryUpdateUser, $mysqlLink) or modules_err("phpbb FuncUpdate error: mysql_query({$queryUpdateUser})\\n\\n".mysql_error($mysqlLink));\r\n}', 'global $mods;\r\n\r\nif (! $IsAdmin)\r\n{ \r\n $UserIdentifier = (int)$UserIdentifier;\r\n\r\n $arrUserInfo = db_arr("SELECT `NickName` \r\n FROM `Profiles`\r\n WHERE `ID` = {$UserIdentifier}");\r\n\r\n if (! $arrUserInfo)\r\n modules_err("phpbb FuncDel error:\\n No member with ID [{$UserIdentifier}]");\r\n}\r\nelse \r\n{\r\n $arrUserInfo = db_arr("SELECT `Name` AS `NickName`\r\n FROM `Admins`\r\n WHERE `Name` = ''".addslashes($UserIdentifier)."''");\r\n\r\n if (! $arrUserInfo)\r\n modules_err("phpbb FuncDel error:\\n No admin with name ''{$UserIdentifier}''");\r\n}\r\n \r\n$mysqlLink = mysql_pconnect($mods[''phpbb''][''Database''][''Host''], \r\n $mods[''phpbb''][''Database''][''Username''], \r\n $mods[''phpbb''][''Database''][''Password'']);\r\n\r\nif (! $mysqlLink) \r\n modules_err("phpbb FuncDel error:\\n\\n mysql_pconnect\\n\\n".mysql_error($mysqlLink));\r\n\r\nmysql_select_db($mods[''phpbb''][''Database''][''Name''], $mysqlLink) or \r\n modules_err("phpbb FuncDel error:\\n\\n".mysql_error($mysqlLink));\r\n \r\n$queryFindUser = "SELECT user_id\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users\r\n WHERE username = ''".addslashes($arrUserInfo[''NickName''])."'' AND user_id <> -1";\r\n$result = mysql_query($queryFindUser, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$queryFindUser})\\n\\n".mysql_error($mysqlLink));\r\nif (! $result)\r\n modules_err("phpbb FuncDel error:\\n\\n empty result on query {$queryFindUser}\\n\\n".mysql_error($mysqlLink));\r\n\r\n$arrPhpbbUser = mysql_fetch_assoc($result);\r\nif ($arrPhpbbUser) // If user still not deleted\r\n{\r\n $userID = $arrPhpbbUser[''user_id''];\r\n \r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users \r\n WHERE `user_id` = {$userID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}banlist \r\n WHERE `ban_userid` = {$userID}"; \r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}sessions \r\n WHERE `session_user_id` = {$userID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}sessions_keys \r\n WHERE `user_id` = {$userID}"; \r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n $query = "SELECT `group_id`\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}user_group\r\n WHERE `user_id` = {$userID}";\r\n $result = mysql_query($query, $mysqlLink);\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n if ($result)\r\n {\r\n $arrGroup = mysql_fetch_assoc($result);\r\n if ($arrGroup)\r\n {\r\n $groupID = $arrGroup[''group_id'']; \r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}groups\r\n WHERE `group_id` = {$groupID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n }\r\n } \r\n \r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}user_group \r\n WHERE `user_id` = {$userID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncDel error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n}', 'global $mods;\r\nglobal $site;\r\n\r\n/* aeDating part */\r\n\r\nif (! $IsAdmin)\r\n{\r\n $UserIdentifier = (int)$UserIdentifier;\r\n\r\n $arrUserInfo = db_arr("SELECT `NickName`, \r\n `Password`,\r\n `Email`,\r\n `LastReg` AS `RegistrationDate`\r\n FROM `Profiles`\r\n WHERE `ID` = {$UserIdentifier}");\r\n\r\n if (! $arrUserInfo)\r\n modules_err("phpbb FuncUpdate error:\\n No member with ID [{$UserIdentifier}]");\r\n}\r\nelse\r\n{\r\n $arrUserInfo = db_arr("SELECT `Name` AS `NickName`,\r\n `Password`\r\n FROM `Admins`\r\n WHERE `Name` = ''".addslashes($UserIdentifier)."''");\r\n if (! $arrUserInfo)\r\n modules_err("phpbb FuncUpdate error:\\n No admin with name ''{$UserIdentifier}''");\r\n \r\n $arrUserInfo[''Email''] = $site[''email''];\r\n \r\n // Retrive join date of first member and set admin join date as this date\r\n list($earliestDate) = db_arr("SELECT Max(`LastReg`) \r\n FROM `Profiles`");\r\n \r\n $arrUserInfo[''RegistrationDate''] = $earliestDate;\r\n}\r\n\r\n/* phpBB part */\r\n\r\n$mysqlLink = mysql_pconnect($mods[''phpbb''][''Database''][''Host''], \r\n $mods[''phpbb''][''Database''][''Username''], \r\n $mods[''phpbb''][''Database''][''Password'']);\r\n\r\nif (! $mysqlLink)\r\n modules_err("phpbb FuncUpdate error:\\n mysql_pconnect\\n\\n".mysql_error($mysqlLink));\r\n\r\nmysql_select_db($mods[''phpbb''][''Database''][''Name''], $mysqlLink) or \r\n modules_err("phpbb FuncUpdate error:\\n mysql_select_db({$mods[''phpbb''][''Database''][''Name'']}\\n\\n)".mysql_error($mysqlLink));\r\n\r\n$clauseSet = "SET `user_active` = 1,\r\n `username` = ''".addslashes($arrUserInfo[''NickName''])."'',\r\n `user_password` = MD5(''".addslashes($arrUserInfo[''Password''])."''), \r\n `user_level` = ".(($IsAdmin) ? 1 : 0).",\r\n `user_rank` = ".(($IsAdmin) ? 1 : 0).",\r\n `user_email` = ''".addslashes($arrUserInfo[''Email''])."'',\r\n `user_regdate` = UNIX_TIMESTAMP(''{$arrUserInfo[''RegistrationDate'']}'')";\r\n\r\n// Check user existance\r\n$searchableNickname = (strlen(trim($PreviousNickname)) > 0) ? $PreviousNickname : $arrUserInfo[''NickName''];\r\n$queryCheckExistance = "SELECT `user_id`\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users\r\n WHERE `username` = ''".addslashes($searchableNickname)."''";\r\n$result = mysql_query($queryCheckExistance, $mysqlLink) or modules_err("phpbb FuncUpdate error: mysql_query({$queryCheckExistance})\\n\\n".mysql_error($mysqlLink));\r\nif (! $result)\r\n modules_err("phpbb FuncUpdate error:\\n empty result on query {$queryCheckExistance} \\n\\n".mysql_error($mysqlLink));\r\n$arrUserID = mysql_fetch_assoc($result);\r\n\r\n\r\nif (! $arrUserID) // If user does not exist\r\n{ \r\n // Set data, that is cannot be retreived from aeDating profile info and therefore we set it only once, for initialization.\r\n $clauseSet .= ",\r\n `user_style` = 1,\r\n `user_lang` = ''english'', \r\n `user_dateformat` = ''D M d, Y g:i a'',\r\n `user_attachsig` = 1,\r\n `user_allowbbcode` = 1,\r\n `user_allowsmile` = 1,\r\n `user_allowavatar` = 1,\r\n `user_allow_viewonline` = 1";\r\n\r\n // Get ID of new member (user_id is not auto incremented)\r\n $queryGetNewID = "SELECT MAX(user_id) AS MaxID\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users";\r\n $result = mysql_query($queryGetNewID, $mysqlLink) or modules_err("phpbb FuncUpdate error: mysql_query({$queryGetNewID})\\n\\n".mysql_error($mysqlLink));\r\n if (! $result)\r\n modules_err("phpbb FuncUpdate error:\\n empty result on query {$queryGetNewID} \\n\\n".mysql_error($mysqlLink));\r\n \r\n $arrMaxID = mysql_fetch_assoc($result);\r\n if (! $arrMaxID)\r\n modules_err("phpbb FuncUpdate error:\\n mysql_fetch_assoc({$queryGetNewID})\\n\\n".mysql_error($mysqlLink));\r\n $phpbbUserID = $arrMaxID[''MaxID''] + 1;\r\n \r\n $query = "INSERT INTO {$mods[''phpbb''][''Database''][''TablePrefix'']}users \r\n {$clauseSet},\r\n `user_id` = {$phpbbUserID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncUpdate error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n \r\n $query = "INSERT INTO {$mods[''phpbb''][''Database''][''TablePrefix'']}groups \r\n (group_name, \r\n group_description, \r\n group_single_user, \r\n group_moderator)\r\n VALUES \r\n ('''', \r\n ''Personal User'', \r\n 1, \r\n 0)"; \r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncUpdate error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n\r\n $groupID = mysql_insert_id($mysqlLink);\r\n\r\n $query = "INSERT INTO {$mods[''phpbb''][''Database''][''TablePrefix'']}user_group \r\n (user_id, \r\n group_id, \r\n user_pending)\r\n VALUES \r\n ({$phpbbUserID}, \r\n {$groupID}, \r\n 0)"; \r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncAdd error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n}\r\nelse \r\n{\r\n $phpbbUserID = $arrUserID[''user_id''];\r\n\r\n $queryUpdateUser = "UPDATE {$mods[''phpbb''][''Database''][''TablePrefix'']}users \r\n {$clauseSet}\r\n WHERE `user_id` = {$phpbbUserID}"; \r\n mysql_query($queryUpdateUser, $mysqlLink) or modules_err("phpbb FuncUpdate error: mysql_query({$queryUpdateUser})\\n\\n".mysql_error($mysqlLink));\r\n}', 'global $mods;\n\n$UserIdentifier = (int)$UserIdentifier;\n\n$arrMember = db_arr("SELECT `NickName` \n FROM `Profiles`\n WHERE `ID` = {$UserIdentifier}"); \n\nif (! $arrMember)\n{\n modules_err("phpbb FuncBlock error:\\n\\n No member with ID [{$UserIdentifier}]");\n}\n\n$mysqlLink = mysql_pconnect($mods[''phpbb''][''Database''][''Host''],\n $mods[''phpbb''][''Database''][''Username''],\n $mods[''phpbb''][''Database''][''Password'']);\n\nif (! $mysqlLink)\n{\n modules_err("phpbb FuncBlock error:\\n\\n mysql_pconnect \\n\\n".mysql_error($mysqlLink));\n}\n\nmysql_select_db($mods[''phpbb''][''Database''][''Name''], $mysqlLink) or\n modules_err("phpbb FuncBlock error:\\n\\n mysql_select_db \\n\\n".mysql_error($mysqlLink));\n \n$queryFindUser = "SELECT `user_id`\n FROM `{$mods[''phpbb''][''Database''][''TablePrefix'']}users`\n WHERE `username` = ''".addslashes($arrMember[''NickName''])."'' AND `user_id` <> -1";\n$resPhpbbUser = mysql_query($queryFindUser, $mysqlLink) or \n modules_err("phpbb FuncBlock error: mysql_query({$queryFindUser})\\n\\n".mysql_error($mysqlLink));;\n\n$arrPhpbbUser = mysql_fetch_assoc($resPhpbbUser);\nif ($arrPhpbbUser)\n{\n $userID = (int)$arrPhpbbUser[''user_id''];\n\n // Check if user is banned already\n $queryBannedCount = "SELECT * FROM `{$mods[''phpbb''][''Database''][''TablePrefix'']}banlist` \n WHERE `ban_userid` = {$userID}";\n $resBannedCount = mysql_query($queryBannedCount) or \n modules_err("phpbb FuncBlock error: mysql_query({$queryBannedCount})\\n\\n".mysql_error($mysqlLink));\n \n if (mysql_num_rows($resBannedCount) == 0)\n {\n // Ban user\n $queryBlockUser = "INSERT INTO `{$mods[''phpbb''][''Database''][''TablePrefix'']}banlist`\n SET `ban_userid` = {$userID}";\n mysql_query($queryBlockUser, $mysqlLink) or \n modules_err("phpbb FuncBlock error: mysql_query({$queryBlockUser})\\n\\n".mysql_error($mysqlLink)); \n }\n} ', 'global $mods;\r\n\r\n$UserIdentifier = (int)$UserIdentifier;\r\n\r\n$arrMember = db_arr("SELECT `NickName` \r\n FROM `Profiles`\r\n WHERE `ID` = {$UserIdentifier}"); \r\n\r\nif (! $arrMember)\r\n modules_err("phpbb FuncUnblock error:\\n No member with ID [{$UserIdentifier}]");\r\n\r\n$mysqlLink = mysql_pconnect($mods[''phpbb''][''Database''][''Host''],\r\n $mods[''phpbb''][''Database''][''Username''],\r\n $mods[''phpbb''][''Database''][''Password'']);\r\n\r\nif (! $mysqlLink)\r\n modules_err("phpbb FuncUnblock error:\\n mysql_pconnect\\n\\n".mysql_error($mysqlLink));\r\n\r\nmysql_select_db($mods[''phpbb''][''Database''][''Name''], $mysqlLink) or\r\n modules_err("phpbb FuncUnblock error:\\n mysql_select_db\\n\\n".mysql_error($mysqlLink));\r\n\r\n$queryFindUser = "SELECT `user_id`\r\n FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}users\r\n WHERE username = ''".addslashes($arrMember[''NickName''])."'' AND `user_id` <> -1";\r\n$resPhpbbUser = mysql_query($queryFindUser, $mysqlLink);\r\n/* Do not send to admin this notification, because it is not an technical error, but user info correctness \r\n* criteria of aeDating and phpBB mismatch.\r\n*/\r\n//if (! $resPhpbbUser)\r\n// modules_err("phpbb FuncUnblock error:\\n empty result on query {$queryFindUser}\\n\\n".mysql_error($mysqlLink));\r\n\r\n$arrPhpbbUser = mysql_fetch_assoc($resPhpbbUser);\r\nif ($arrPhpbbUser)\r\n{\r\n $userID = $arrPhpbbUser[''user_id''];\r\n $query = "DELETE FROM {$mods[''phpbb''][''Database''][''TablePrefix'']}banlist\r\n WHERE `ban_userid` = {$userID}";\r\n mysql_query($query, $mysqlLink) or modules_err("phpbb FuncUnblock error: mysql_query({$query})\\n\\n".mysql_error($mysqlLink));\r\n}\r\nelse \r\n{\r\n// Turn off this warning\r\n// modules_err("phpbb FuncUnblock error:\\n mysql_fetch_assoc({$queryFindUser})\\n\\n");\r\n}', '', '\nglobal $mods;\n\n$POSTParams = array();\n\nif ($IsAdmin)\n{\n // $UserIdentifier is interpreted as an admin name\n $AdminInfo = db_arr("SELECT `Name`, \n `Password`\n FROM `Admins`\n WHERE `Name` = ''".addslashes($UserIdentifier)."''");\n if (! $AdminInfo)\n modules_err("FuncLogin error: Unknown admin name ''{$UserIdentifier}''");\n $POSTParams[''username''] = $AdminInfo[''Name''];\n $POSTParams[''password''] = $AdminInfo[''Password''];\n}\nelse \n{\n // $UserIdentifier is interpreted as a profile ID\n $UserInfo = db_arr("SELECT `NickName`,\n `Password`\n FROM `Profiles`\n WHERE `ID` = ".(int)$UserIdentifier);\n if (! $UserInfo)\n modules_err("FuncLogin error: Unknown user ID [{$UserIdentifier}]");\n $POSTParams[''username''] = $UserInfo[''NickName''];\n $POSTParams[''password''] = $UserInfo[''Password''];\n}\n\n$POSTParams[''redirect''] = '''';\n$POSTParams[''login''] = '' Log in'';\n$POSTParams[''autologin''] = '''';\n\nRedirect($mods[''phpbb''][''ModuleDirectory''].''login.php'', $POSTParams, "post");\n', 'forum', 'phpBB');