INSERT INTO `Modules` VALUES ('', 'vbull', 'global $mods;\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[''vbull''][''ModuleDirectory''] = ''forum/'';\r\n\r\n\r\n// Miscelleneous settings\r\n\r\n/** \r\n* ''CookieMember''\r\n* Whether or not to send cookies when login\r\n* (boolean)\r\n*/\r\n$mods[''vbull''][''CookieMember''] = false;\r\n\r\n/** \r\n* ''RedirectMethod''\r\n* Defines method of redirecting after login procedure.\r\n* (enum)\r\n* Possible values:\r\n* ''SendHeader'' - fast redirect, thru sending ''Location...'' header\r\n* ''SubmitForm'' - redirect thru submitting of the form. Greeting message is displayed\r\n*/\r\n$mods[''vbull''][''RedirectMethod''] = ''SubmitForm'';\r\n\r\n/**\r\n* ''ShowEMail''\r\n* Whether or not to show e-mails to all members. By default depends on aeDating ''Anonymous mode'' global setting.\r\n* (boolean)\r\n*/\r\n$mods[''vbull''][''ShowEMail''] = ! (bool)getParam(''anon_mode'');\r\n\r\n/**\r\n* ''ReceiveMailFromAdmin''\r\n* Whether or not to force members receive e-mails from forum administrator\r\n* (boolean)\r\n*/\r\n$mods[''vbull''][''ReceiveMailFromAdmin''] = 1;\r\n\r\n \r\n// The following is the default member data: data that cannot be extracted from aeDating profile and will be set only\r\n// once: on member registration. During further updates this data will not be changed to prevent member own data loss. \r\n\r\n/** \r\n* ''ShowBirthday''\r\n* Whether or not to show member birthday to all members\r\n* (boolean)\r\n*/\r\n$mods[''vbull''][''ShowBirthday''] = 1;\r\n\r\n/**\r\n* ''DSTMode''\r\n* Defines Daylight Saving Time mode\r\n* (enum)\r\n* Possible values:\r\n* 0 - DST corrections always off\r\n* 1 - DST corrections always on\r\n* 2 - Automatically detect DST settings\r\n*/\r\n$mods[''vbull''][''DSTMode''] = 2;\r\n\r\n/**\r\n* ''TimeZoneOffset''\r\n* Defines time zone offset\r\n* (enum)\r\n* Possible values:\r\n* -12 - GMT -12:00\r\n* ...\r\n* 0 - GMT \r\n* ...\r\n* 12 - GMT +12:00\r\n*/\r\n$mods[''vbull''][''TimeZoneOffset''] = 0;', '/**\n* FuncAdd procedure for vBulletin module\n* \n* @param string $UserIdentifier member ID or admin name (depend on $IsAdmin parameter)\n* \n* @param boolean $IsAdmin Defines whether user is a simple member or admin\n*/\n\n/* If you modify this function, do not forget to modify FuncUpdate in same way (these functions are almost equal) */\n\nglobal $dir;\nglobal $mods;\nglobal $site;\nglobal $PHPBIN;\n\n$CommandLineArgs = new CCommandLineArgs;\n\n$CommandLineArgs->AddArgument(''add''); // Action\n$CommandLineArgs->AddArgument((int)$IsAdmin);\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` = ''".$UserIdentifier."''");\n\n if (! $AdminInfo)\n {\n modules_err("FuncAdd error: Unknown admin ID [{$UserIdentifier}]");\n }\n\n $CommandLineArgs->AddArgument($AdminInfo[''Name'']);\n $CommandLineArgs->AddArgument($AdminInfo[''Password'']);\n $CommandLineArgs->AddArgument($site[''email'']);\n\n // Fill dummy data\n $CommandLineArgs->AddArgument(2000); // BirthYear\n $CommandLineArgs->AddArgument(1); // BirthMonth\n $CommandLineArgs->AddArgument(1); // BirthDay\n $CommandLineArgs->AddArgument(''''); // AvatarImagePath (no avatar)\n $CommandLineArgs->AddArgument(_t(''_Dolphin Administrator''));\n}\nelse \n{\n // $UserIdentifier is interpreted as a profile ID\n $UserIdentifier = (int)$UserIdentifier;\n \n $UserInfo = db_arr("SELECT `NickName`, \n `Password`, \n `Email`, \n YEAR(`DateOfBirth`) AS `BirthYear`, \n MONTH(`DateOfBirth`) AS `BirthMonth`, \n DAYOFMONTH(`DateOfBirth`) AS `BirthDay`,\n `Pic_0_addon` AS `AvatarImagePath`\n FROM Profiles\n WHERE `ID` = {$UserIdentifier}");\n\n if (! $UserInfo)\n modules_err("FuncAdd error: Unknown user ID [{$UserIdentifier}]");\n\n $CommandLineArgs->AddArgument($UserInfo[''NickName'']);\n $CommandLineArgs->AddArgument($UserInfo[''Password'']);\n $CommandLineArgs->AddArgument($UserInfo[''Email'']);\n $CommandLineArgs->AddArgument($UserInfo[''BirthYear'']);\n $CommandLineArgs->AddArgument($UserInfo[''BirthMonth'']);\n $CommandLineArgs->AddArgument($UserInfo[''BirthDay'']);\n $CommandLineArgs->AddArgument($UserInfo[''AvatarImagePath'']);\n\n // Set membership name as user group title\n $MembershipInfo = getMemberMembershipInfo($UserIdentifier);\n $CommandLineArgs->AddArgument($MembershipInfo[''Name'']); \n}\n\n$CommandLineArgs->AddArgument($mods[''vbull''][''ShowEMail'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''ReceiveMailFromAdmin'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''ShowBirthday'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''DSTMode'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''TimeZoneOffset'']);\n\nif (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory'']))\n{\n $scriptReturnValue = ''value was not set'';\n exec("{$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue);\n if ($scriptReturnValue !== 0)\n {\n echo "--- script output dump ---
\\n";\n foreach ($scriptOutput as $outputLine)\n {\n echo $outputLine.''
'';\n } \n echo "--- end ---
\\n";\n modules_err("FuncAdd(): exec({$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue);\n } \n}\nelse \n{\n modules_err("FuncAdd(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']} returned false");\n}', '/** * FuncDel procedure for vBulletin module * * @param string $UserIdentifier member ID */ global $dir; global $mods; global $PHPBIN; $CommandLineArgs = new CCommandLineArgs; $CommandLineArgs->AddArgument(''delete''); // Action $CommandLineArgs->AddArgument((int)$IsAdmin); if ($IsAdmin) { // $UserIdentifier is interpreted as an admin name $AdminInfo = db_arr("SELECT * FROM `Admins` WHERE `Name` = ''{$UserIdentifier}''"); if (! $AdminInfo) modules_err("FuncDel error: Unknown admin (''{$UserIdentifier}'')"); $CommandLineArgs->AddArgument($UserIdentifier); } else { // $UserIdentifier is interpreted as a profile ID $UserIdentifier = (int)$UserIdentifier; $UserInfo = db_arr("SELECT `NickName` FROM `Profiles` WHERE `ID` = ''{$UserIdentifier}''"); if (! $UserInfo) modules_err("FuncDel error: Unknown user ID [{$UserIdentifier}]"); $CommandLineArgs->AddArgument($UserInfo[''NickName'']); } if (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory''])) { $scriptReturnValue = ''value was not set''; exec("{$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue); if ($scriptReturnValue !== 0) { echo "--- script output dump ---
\\n"; foreach ($scriptOutput as $outputLine) { echo $outputLine.''
''; } echo "--- end ---
\\n"; modules_err("FuncDel(): exec({$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue); } } else { modules_err("FuncDel(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']} returned false"); } ', '\n/**\n* FuncUpdate procedure for vBulletin module\n* \n* @param string $UserIdentifier member ID or admin name (depend on $IsAdmin parameter)\n* \n* @param boolean $IsAdmin Defines whether user is a simple member or admin\n*/\n\n/* If you modify this function, do not forget to modify FuncAdd in same way (these functions are almost equal) */\n\nglobal $dir;\nglobal $mods;\nglobal $site;\nglobal $PHPBIN;\n\n$CommandLineArgs = new CCommandLineArgs;\n\n$CommandLineArgs->AddArgument(''update''); // Action\n$CommandLineArgs->AddArgument((int)$IsAdmin);\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` = ''".$UserIdentifier."''");\n\n if (! $AdminInfo)\n {\n modules_err("FuncUpdate error: Unknown admin ID [{$UserIdentifier}]");\n }\n\n $CommandLineArgs->AddArgument($AdminInfo[''Name'']);\n $CommandLineArgs->AddArgument($AdminInfo[''Password'']);\n $CommandLineArgs->AddArgument($site[''email'']);\n\n // Fill dummy data\n $CommandLineArgs->AddArgument(2000); // BirthYear\n $CommandLineArgs->AddArgument(1); // BirthMonth\n $CommandLineArgs->AddArgument(1); // BirthDay\n $CommandLineArgs->AddArgument(''''); // AvatarImagePath (no avatar)\n $CommandLineArgs->AddArgument(_t(''_aeDating Administrator''));\n}\nelse \n{\n // $UserIdentifier is interpreted as a profile ID\n $UserIdentifier = (int)$UserIdentifier;\n \n $UserInfo = db_arr("SELECT `NickName`, \n `Password`, \n `Email`, \n YEAR(`DateOfBirth`) AS `BirthYear`, \n MONTH(`DateOfBirth`) AS `BirthMonth`, \n DAYOFMONTH(`DateOfBirth`) AS `BirthDay`,\n `Pic_0_addon` AS `AvatarImagePath`\n FROM Profiles\n WHERE `ID` = {$UserIdentifier}");\n\n if (! $UserInfo)\n modules_err("FuncUpdate error: Unknown user ID [{$UserIdentifier}]");\n\n $CommandLineArgs->AddArgument($UserInfo[''NickName'']);\n $CommandLineArgs->AddArgument($UserInfo[''Password'']);\n $CommandLineArgs->AddArgument($UserInfo[''Email'']);\n $CommandLineArgs->AddArgument($UserInfo[''BirthYear'']);\n $CommandLineArgs->AddArgument($UserInfo[''BirthMonth'']);\n $CommandLineArgs->AddArgument($UserInfo[''BirthDay'']);\n $CommandLineArgs->AddArgument($UserInfo[''AvatarImagePath'']);\n\n // Set membership name as user group title\n $MembershipInfo = getMemberMembershipInfo($UserIdentifier);\n $CommandLineArgs->AddArgument($MembershipInfo[''Name'']); \n}\n\n$CommandLineArgs->AddArgument($mods[''vbull''][''ShowEMail'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''ReceiveMailFromAdmin'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''ShowBirthday'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''DSTMode'']);\n$CommandLineArgs->AddArgument($mods[''vbull''][''TimeZoneOffset'']);\n\nif (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory'']))\n{\n $scriptReturnValue = ''value was not set'';\n exec("{$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue);\n if ($scriptReturnValue !== 0)\n {\n echo "--- script output dump ---
\\n";\n foreach ($scriptOutput as $outputLine)\n {\n echo $outputLine.''
'';\n } \n echo "--- end ---
\\n";\n modules_err("FuncUpdate(): exec({$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue);\n } \n}\nelse \n{\n modules_err("FuncUpdate(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']} returned false");\n}', '/**\n* FuncBlock procedure for vBulletin module\n* \n* @param string $UserIdentifier member ID\n*/\n\nglobal $mods;\nglobal $dir;\nglobal $PHPBIN;\n\n$CommandLineArgs = new CCommandLineArgs;\n\n$CommandLineArgs->AddArgument(''block''); // Action\n\n$UserInfo = db_arr("SELECT `NickName`\n FROM Profiles\n WHERE `ID` = ".(int)$UserIdentifier);\nif (! $UserInfo)\n{\n modules_err("FuncBlock error: Unknown user ID [{$UserIdentifier}]");\n}\n\n$CommandLineArgs->AddArgument($UserInfo[''NickName'']); \n\n$CommandLineArgs->AddArgument(_t(''_You have been blocked by aeDating'')); // Reason of blocking\n$CommandLineArgs->AddArgument(_t(''_Blocked by aeDating'')); // Usergroup title\n\nif (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory'']))\n{\n $scriptReturnValue = ''value was not set'';\n exec("{$PHPBIN} -f vbblock.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue);\n if ($scriptReturnValue !== 0)\n {\n echo "--- script output dump ---
\\n";\n foreach ($scriptOutput as $outputLine)\n {\n echo $outputLine.''
'';\n } \n echo "--- end ---
\\n";\n modules_err("FuncBlock(): exec({$PHPBIN} -f vbblock.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue);\n } \n}\nelse \n{\n modules_err("FuncBlock(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']} returned false");\n}', '/**\n* FuncUnblock procedure for vBulletin module\n* \n* @param string $UserIdentifier member ID\n*/\n\nglobal $mods;\nglobal $dir;\nglobal $PHPBIN;\n\n$CommandLineArgs = new CCommandLineArgs;\n\n$CommandLineArgs->AddArgument(''unblock''); // Action\n\n$UserInfo = db_arr("SELECT `NickName`\n FROM Profiles\n WHERE `ID` = ".(int)$UserIdentifier);\nif (! $UserInfo)\n{\n modules_err("FuncUnblock error: Unknown user ID [{$UserIdentifier}]");\n}\n\n$CommandLineArgs->AddArgument($UserInfo[''NickName'']);\n\nif (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory'']))\n{\n $scriptReturnValue = ''value was not set'';\n exec("{$PHPBIN} -f vbblock.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue);\n if ($scriptReturnValue !== 0)\n { \n echo "--- script output dump ---
\\n";\n foreach ($scriptOutput as $outputLine)\n {\n echo $outputLine.''
'';\n } \n echo "--- end ---
\\n";\n modules_err("FuncUnblock(): exec({$PHPBIN} -f vbblock.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue);\n }\n}\nelse \n{\n modules_err("FuncUnblock(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']}) returned false");\n}', '', '\n/**\n* FuncLogin procedure for vBulletin module\n* \n* @param string $UserIdentifier member ID or admin name (depend on $IsAdmin parameter)\n* \n* @param boolean $IsAdmin Defines whether user is a simple member or admin\n*/\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 FROM `Admins`\n WHERE `Name` = ''{$UserIdentifier}''");\n if (! $AdminInfo)\n modules_err("FuncAdd error: Unknown admin ID [{$UserIdentifier}]");\n $POSTParams[''UserIdentifier''] = $AdminInfo[''Name''];\n}\nelse \n{\n // $UserIdentifier is interpreted as a profile ID\n $UserInfo = db_arr("SELECT `NickName` \n FROM Profiles\n WHERE `ID` = ".$UserIdentifier);\n if (! $UserInfo)\n modules_err("FuncAdd error: Unknown user ID [{$UserIdentifier}]");\n $POSTParams[''UserIdentifier''] = $UserInfo[''NickName''];\n}\n\n$POSTParams[''LoginMessage''] = _t("_logged in forum as");\n$POSTParams[''Config''] = $mods[''vbull''];\n\nRedirect($mods[''vbull''][''ModuleDirectory''].''vblogin.php'', $POSTParams, "post");\n', 'forum', 'vBulletin');