PageRenderTime 54ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/wp-filemanager/conf/config.inc.php

https://gitlab.com/gentotech/evotennissg
PHP | 263 lines | 223 code | 15 blank | 25 comment | 49 complexity | e637bfede18b03e3f0d0f6f842c401c0 MD5 | raw file
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) )
  3. die();
  4. $wp_root = dirname(dirname(dirname(dirname(dirname(__FILE__)))));
  5. if(file_exists($wp_root . '/wp-load.php')) {
  6. require_once($wp_root . "/wp-load.php");
  7. } else if(file_exists($wp_root . '/wp-config.php')) {
  8. require_once($wp_root . "/wp-config.php");
  9. }else {
  10. //echo "Exiting $wp_root";
  11. exit;
  12. }
  13. $wp_filemanager_path=plugin_dir_path("wp-filemanger");
  14. # Check "docs/configurating.txt" for a more complete description of how you
  15. # set the different settings and what they will do.
  16. # Path from wp-admin to your images directory
  17. # Use forward slashes instead of backslashes and remember a traling slash!
  18. # This path should be RELATIVE to your wp-admin directory
  19. //$home_directory = "../../../";
  20. if ( function_exists('get_option') && get_option('wp_fileman_home') != '')
  21. {
  22. $home_directory = get_option('wp_fileman_home');
  23. }
  24. else
  25. {
  26. $home_directory = plugin_dir_path("wp-filemanger");
  27. }
  28. # Language of PHPFM.
  29. $language = "english";
  30. # Session save_path information
  31. # *NIX systems - set this to "/tmp/";
  32. # WINDOWS systems - set this to "c:/winnt/temp/";
  33. # NB! replace "c:/winnt/" with the path to your windows folder
  34. #
  35. # Uncomment _only_ if you are experiencing errors!
  36. # $session_save_path = "/tmp/";
  37. # Login is handled by Wordpress in this hack
  38. # DO NOT enable phpfm_auth, as it will likely break the script
  39. $phpfm_auth = FALSE;
  40. $username = "";
  41. $password = "";
  42. # Access configuration
  43. # Each variable can be set to either TRUE or FALSE.
  44. if (function_exists('get_option') && get_option('wp_fileman_Allow_Download') == 'checked')
  45. $AllowDownload = TRUE;
  46. else
  47. $AllowDownload = FALSE;
  48. if (function_exists('get_option') && get_option('wp_fileman_Create_File') == 'checked')
  49. $AllowCreateFile = TRUE;
  50. else
  51. $AllowCreateFile = FALSE;
  52. if (function_exists('get_option') && get_option('wp_fileman_Create_Folder') == 'checked')
  53. $AllowCreateFolder = TRUE;
  54. else
  55. $AllowCreateFolder = FALSE;
  56. if (function_exists('get_option') && get_option('wp_fileman_Allow_Rename') == 'checked')
  57. $AllowRename = TRUE;
  58. else
  59. $AllowRename = FALSE;
  60. if (function_exists('get_option') && get_option('wp_fileman_Allow_Upload') == 'checked')
  61. $AllowUpload = TRUE;
  62. else
  63. $AllowUpload = FALSE;
  64. if (function_exists('get_option') && get_option('wp_fileman_Allow_Delete') == 'checked')
  65. $AllowDelete = TRUE;
  66. else
  67. $AllowDelete = FALSE;
  68. if (function_exists('get_option') && get_option('wp_fileman_Allow_View') == 'checked')
  69. $AllowView = TRUE;
  70. else
  71. $AllowView = FALSE;
  72. if (function_exists('get_option') && get_option('wp_fileman_Allow_Edit') == 'checked')
  73. $AllowEdit = TRUE;
  74. else
  75. $AllowEdit = FALSE;
  76. if (function_exists('get_option') && get_option('wp_fileman_Show_Extension') == 'checked')
  77. $ShowExtension = TRUE;
  78. else
  79. $ShowExtension = FALSE;
  80. # Icons for files
  81. $IconArray = array(
  82. "text.gif" => "txt ini xml xsl ini inf cfg log nfo",
  83. "layout.gif" => "html htm shtml htm pdf",
  84. "script.gif" => "php php4 php3 phtml phps conf sh shar csh ksh tcl cgi pl js",
  85. "image2.gif" => "jpeg jpe jpg gif png bmp",
  86. "c.gif" => "c cpp",
  87. "compressed.gif" => "zip tar gz tgz z ace rar arj cab bz2",
  88. "sound2.gif" => "wav mp1 mp2 mp3 mid",
  89. "movie.gif" => "mpeg mpg mov avi rm wmv divx",
  90. "binary.gif" => "exe com dll bin dat rpm deb",
  91. );
  92. # Files that can be edited in PHPFM's text editor
  93. if (trim(function_exists('get_option') && get_option('wp_fileman_editable_ext')) != "")
  94. {
  95. $EditableFiles = get_option('wp_fileman_editable_ext');
  96. }
  97. # Files that can be viewed in PHPFM's image viewer.
  98. if (trim(function_exists('get_option') && get_option('wp_fileman_viewable_ext')) != "")
  99. {
  100. $ViewableFiles = get_option('wp_fileman_viewable_ext');
  101. }
  102. # Format of last modification date
  103. $ModifiedFormat = "Y-m-d H:i";
  104. # Zoom levels for PHPFM's image viewer.
  105. $ZoomArray = array(
  106. 5,
  107. 7,
  108. 10,
  109. 15,
  110. 20,
  111. 30,
  112. 50,
  113. 70,
  114. 100, # Base zoom level (do not change)
  115. 150,
  116. 200,
  117. 300,
  118. 500,
  119. 700,
  120. 1000,
  121. );
  122. # Hidden files and directories
  123. if (function_exists('get_option') && get_option('wp_fileman_hidden_extension') != "")
  124. {
  125. $hide_file_extension = explode(',',get_option('wp_fileman_hidden_extension'));
  126. }
  127. else
  128. {
  129. $hide_file_extension = array(
  130. "foo",
  131. "bar",
  132. );
  133. }
  134. if (function_exists('get_option') && get_option('wp_fileman_hidden_file') != "")
  135. {
  136. $hide_file_string = explode(',',get_option('wp_fileman_hidden_file'));
  137. }
  138. else
  139. {
  140. $hide_file_string = array(
  141. ".htaccess"
  142. );
  143. }
  144. if (function_exists('get_option') && get_option('wp_fileman_hidden_dir') != "")
  145. {
  146. $hide_directory_string = explode(',',get_option('wp_fileman_hidden_dir'));
  147. }
  148. else
  149. {
  150. $hide_directory_string = array(
  151. "secret dir",
  152. );
  153. }
  154. $MIMEtypes = array(
  155. "application/andrew-inset" => "ez",
  156. "application/mac-binhex40" => "hqx",
  157. "application/mac-compactpro" => "cpt",
  158. "application/msword" => "doc",
  159. "application/octet-stream" => "bin dms lha lzh exe class so dll",
  160. "application/oda" => "oda",
  161. "application/pdf" => "pdf",
  162. "application/postscript" => "ai eps ps",
  163. "application/smil" => "smi smil",
  164. "application/vnd.ms-excel" => "xls",
  165. "application/vnd.ms-powerpoint" => "ppt",
  166. "application/vnd.wap.wbxml" => "wbxml",
  167. "application/vnd.wap.wmlc" => "wmlc",
  168. "application/vnd.wap.wmlscriptc" => "wmlsc",
  169. "application/x-bcpio" => "bcpio",
  170. "application/x-cdlink" => "vcd",
  171. "application/x-chess-pgn" => "pgn",
  172. "application/x-cpio" => "cpio",
  173. "application/x-csh" => "csh",
  174. "application/x-director" => "dcr dir dxr",
  175. "application/x-dvi" => "dvi",
  176. "application/x-futuresplash" => "spl",
  177. "application/x-gtar" => "gtar",
  178. "application/x-hdf" => "hdf",
  179. "application/x-javascript" => "js",
  180. "application/x-koan" => "skp skd skt skm",
  181. "application/x-latex" => "latex",
  182. "application/x-netcdf" => "nc cdf",
  183. "application/x-sh" => "sh",
  184. "application/x-shar" => "shar",
  185. "application/x-shockwave-flash" => "swf",
  186. "application/x-stuffit" => "sit",
  187. "application/x-sv4cpio" => "sv4cpio",
  188. "application/x-sv4crc" => "sv4crc",
  189. "application/x-tar" => "tar",
  190. "application/x-tcl" => "tcl",
  191. "application/x-tex" => "tex",
  192. "application/x-texinfo" => "texinfo texi",
  193. "application/x-troff" => "t tr roff",
  194. "application/x-troff-man" => "man",
  195. "application/x-troff-me" => "me",
  196. "application/x-troff-ms" => "ms",
  197. "application/x-ustar" => "ustar",
  198. "application/x-wais-source" => "src",
  199. "application/zip" => "zip",
  200. "audio/basic" => "au snd",
  201. "audio/midi" => "mid midi kar",
  202. "audio/mpeg" => "mpga mp2 mp3",
  203. "audio/x-aiff" => "aif aiff aifc",
  204. "audio/x-mpegurl" => "m3u",
  205. "audio/x-pn-realaudio" => "ram rm",
  206. "audio/x-pn-realaudio-plugin" => "rpm",
  207. "audio/x-realaudio" => "ra",
  208. "audio/x-wav" => "wav",
  209. "chemical/x-pdb" => "pdb",
  210. "chemical/x-xyz" => "xyz",
  211. "image/bmp" => "bmp",
  212. "image/gif" => "gif",
  213. "image/ief" => "ief",
  214. "image/jpeg" => "jpeg jpg jpe",
  215. "image/png" => "png",
  216. "image/tiff" => "tiff tif",
  217. "image/vnd.wap.wbmp" => "wbmp",
  218. "image/x-cmu-raster" => "ras",
  219. "image/x-portable-anymap" => "pnm",
  220. "image/x-portable-bitmap" => "pbm",
  221. "image/x-portable-graymap" => "pgm",
  222. "image/x-portable-pixmap" => "ppm",
  223. "image/x-rgb" => "rgb",
  224. "image/x-xbitmap" => "xbm",
  225. "image/x-xpixmap" => "xpm",
  226. "image/x-xwindowdump" => "xwd",
  227. "model/iges" => "igs iges",
  228. "model/mesh" => "msh mesh silo",
  229. "model/vrml" => "wrl vrml",
  230. "text/css" => "css",
  231. "text/html" => "html htm",
  232. "text/plain" => "asc txt",
  233. "text/richtext" => "rtx",
  234. "text/rtf" => "rtf",
  235. "text/sgml" => "sgml sgm",
  236. "text/tab-separated-values" => "tsv",
  237. "text/vnd.wap.wml" => "wml",
  238. "text/vnd.wap.wmlscript" => "wmls",
  239. "text/x-setext" => "etx",
  240. "text/xml" => "xml xsl",
  241. "video/mpeg" => "mpeg mpg mpe",
  242. "video/quicktime" => "qt mov",
  243. "video/vnd.mpegurl" => "mxu",
  244. "video/x-msvideo" => "avi",
  245. "video/x-sgi-movie" => "movie",
  246. "x-conference/x-cooltalk" => "ice",
  247. );
  248. ?>