$this->in_page() ) || array( 'page' => $this->in_page(), 'subpage' => 'emails_settings' ) */ public function show_system_notices( $page_arr ) { if ( ! in_array( $page_arr, array( 'opsd-files', 'opsd', 'opsd-settings' ) ) ) return false; /////////////////////////////////////////////////////////// $notice_id = 'opsd_system_notice_nginix'; /////////////////////////////////////////////////////////// if ( ( isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ) && ( stristr( $_SERVER[ 'SERVER_SOFTWARE' ], 'nginx' ) !== false ) && ( ! opsd_section_is_dismissed( $notice_id ) ) //|| true ) { // Rules for NGINX $opsd_upload = opsd_upload(); $upload_path = $opsd_upload->get_protected_dir(); if ( isset( $_SERVER[ 'DOCUMENT_ROOT' ] ) ) $upload_path = str_replace( $_SERVER[ 'DOCUMENT_ROOT' ], '', $upload_path ); // replace document root because nginx uses path from document root $nx_rules = "location " . $upload_path . " {\n deny all; \n return 403;\n}"; // echo '
'; ?>
' . __( 'Warning!', 'secure-downloads' ) . ' '; printf( __( 'Your download files are not protected with .htaccess file, because your server is running on NGINX. To protect these files, you must add the following rules to your nginx config to disable direct file access: %s', 'secure-downloads' ) , '
' . $nx_rules . '
' ); //FixIn:1.1.1 printf( __( 'By default the file is named %s and placed in the %s directory. (For the open source NGINX product, the location depends on the package system used to install NGINX and the operating system. It is typically one of %s)', 'secure-downloads' ) , 'nginx.conf' , '/etc/nginx' , '/usr/local/nginx/conf, /etc/nginx, /usr/local/etc/nginx.' ); echo ' '; printf( __( 'Please contact your server administrator or support of hosting company about more details of your server configuration.', 'secure-downloads' ) ); ?>
get_protected_dir(); // if ( isset( $_SERVER[ 'DOCUMENT_ROOT' ] ) ) // $upload_path = str_replace( $_SERVER[ 'DOCUMENT_ROOT' ], '', $upload_path ); // replace document root because nginx uses path from document root // $nx_rules = "location " . $upload_path . " {\n deny all; \n return 403;\n}"; // echo '
'; ?>
get_protected_dir(); if ( isset( $_SERVER[ 'DOCUMENT_ROOT' ] ) ) $upload_path2 = str_replace( $_SERVER[ 'DOCUMENT_ROOT' ], '', $upload_path2 ); // replace document root because nginx uses path from document root $nx_rules = "location " . $upload_path2 . " {\n deny all; \n return 403;\n}"; echo '' . __( 'Note!', 'secure-downloads' ) . ' '; printf( __( 'If your server is running on NGINX or your server use NGINX as proxy server for managing static content like images or zip files, then some or all your download files are not protected with .htaccess file.', 'secure-downloads' ) , '
' . $nx_rules . '
' ); echo '
'; printf( __( 'Please contact your server administrator or support of hosting company about more details of your server configuration.', 'secure-downloads' ) ); ?>
' . __( 'Warning!', 'secure-downloads' ) . ' '; printf( __( 'Probabaly you updated your paid version of Secure Downloads by free version or update process failed. You can request the new update of your paid version at %1sthis page%2s.', 'secure-downloads' ) , '', '' ); ?>
'font-size:1.5em;margin-top:-0.8em;' ) ); ?>

:

  • ' . '' . 'Secure Downloads > ' . __( 'Files', 'secure-downloads' ) . '' . '' ); ?>
  • ', '' ); ?>
  • ', '' ); ?>

.

  • ' . '' . __( 'Secure Links', 'secure-downloads' ) . '' . '' , '', '' , '', '.' ); ?>
  • ', '' ); ?>
  • ', '' ); ?>

  • ' . '' . __( 'Sortable List', 'secure-downloads' ) . '' . '' ); ?>
  • ' . __( 'Note', 'secure-downloads' ) . '. ' . __( 'You can use line with simple text without CSV separators for definition of sections in file list.', 'secure-downloads') ; ?>
  • ', '' ); ?>
  • ', '' ); ?>
', '' ); ?>