No modules available
Configure | Delete  


Refresh all modules after settings were changed:
Compare databases (for phpBB module only):
Upload new module:

  Configure module:
Edit text carefully

lines that begin with "#" are comments
Could not open file with sql instructions: $tmp_file "; unlink($tmp_file); return 0; } // run mysql inctructions while ( $s = fgets ( $f, 10240) ) { $s = trim ($s); if ( $s[0] == '#' ) continue; if ( !strlen($s) ) continue; if ( $s[strlen($s)-1] == ';' ) { $s_sql .= $s; } else { $s_sql .= $s; continue; } $res = db_res ( $s_sql, 0 ); if ( !$res ) { $result.="Error
".mysql_error()."

"; } $s_sql = ""; } fclose($f); unlink($tmp_file); if ( strlen($result) ) return 0; return 1; } else return 0; } function ModuleConfigure() { global $demo_mode; if ( $demo_mode ) return 0; $_POST['CONF_ID'] = (int)$_POST['CONF_ID']; $res = db_res( "UPDATE Modules SET `Conf`='". process_db_input($_POST['text'], 1). "' WHERE ID = {$_POST['CONF_ID']}" ); return $res; } /** * Compares profile tables of Dolphin and phpBB. Shows result of comparison * * @return int * 0 - Tables compared successfully, No difference found. * 1 - Tables compared successfully, there have been found profiles that are not in phpBB users table. * - An error occured while comparing. */ function ModuleCompareDatabases() { function debugPrintProfileInfo($ID, $nickname, $email, $registeredEmail, $status) { global $bottom_result; global $site; static $ColoredRow = false; $ColoredRow = !$ColoredRow; $HTMLcode = " [{$ID}] [".addslashes(htmlspecialchars($nickname))."] [".addslashes(htmlspecialchars($email))."] [".addslashes(htmlspecialchars($registeredEmail))."] ".addslashes(htmlspecialchars($status))." "; $bottom_result .= $HTMLcode; } global $mods; global $bottom_result; global $site; $bottom_result .= ''; $mysqlLink = mysql_pconnect($mods['phpbb']['Database']['Host'], $mods['phpbb']['Database']['Username'], $mods['phpbb']['Database']['Password']); if (! $mysqlLink) modules_err("ModuleCompareDatabases error:\n mysql_pconnect\n\n".mysql_error($mysqlLink)); mysql_select_db($mods['phpbb']['Database']['Name'], $mysqlLink) or modules_err("ModuleCompareDatabases error:\n mysql_select_db({$mods['phpbb']['Database']['Name']}\n\n)".mysql_error($mysqlLink)); $queryGetAllUsers = "SELECT `username`, `user_email` FROM {$mods['phpbb']['Database']['TablePrefix']}users"; $dbresult = mysql_query($queryGetAllUsers, $mysqlLink) or modules_err("ModuleCompareDatabases error: mysql_query({$queryGetAllUsers})\n\n".mysql_error($mysqlLink)); if (! $dbresult) modules_err("ModuleCompareDatabases() error:\n empty result on query {$queryGetAllUsers} \n\n".mysql_error($mysqlLink)); $phpBBUsers = array(); while ($row = mysql_fetch_assoc($dbresult)) { $phpBBUsers[strtolower($row['username'])] = $row['user_email']; } $dbresult = db_res("SELECT `Status`, `ID`, `NickName`, `Email` FROM `Profiles`"); $missedProfiles = array(); while ($profileInfo = mysql_fetch_assoc($dbresult)) { if (! array_key_exists(strtolower($profileInfo['NickName']), $phpBBUsers) || $profileInfo['Email'] != $phpBBUsers[strtolower($profileInfo['NickName'])]) { $profileInfo['RegisteredEMail'] = $phpBBUsers[strtolower($profileInfo['NickName'])]; $missedProfiles[] = $profileInfo; } } sort($missedProfiles); foreach ($missedProfiles as $profile) { debugPrintProfileInfo($profile['ID'], $profile['NickName'], $profile['Email'], $profile['RegisteredEMail'], $profile['Status']); } $bottom_result .= "
List of profiles not included into module database:
ID Password Email Email of nickname owner Status

"; return (count($missedProfiles) > 0) ? 1 : 0; } /* Output */ ContentBlockHead(""); $result = ''; if ( $_POST['MODULE_UPLOAD'] == "YES" && $_FILES['file_module']['name'] ) { if ( ModuleUpload() ) $result .= "Module was uploaded"; else $result .= "Module upload failed"; } if ( $_POST['MODULES_REFRESH'] == "YES" ) { modulesRefresh(); $result .= "All profiles were updated."; } if ( (int)$_POST['CONF_ID'] != 0 && $_POST['text'] ) { if ( ModuleConfigure() ) $result .= "Module was configured"; else $result .= "Module configuration failed"; } if ( ((int)($_GET['delete_id'])) != 0 ) { if ( ModuleDelete() ) $result .= "Module was deleted"; else $result .= "Module deletion failed"; } if (strlen($result)) { ?>