| @@ 176-185 (lines=10) @@ | ||
| 173 | ||
| 174 | //make htaccess with allow from all, and file index.html into temp/images |
|
| 175 | $htaccess=api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess'; |
|
| 176 | if (!file_exists($htaccess)) { |
|
| 177 | ||
| 178 | $htaccess_content="order deny,allow\r\nallow from all\r\nOptions -Indexes"; |
|
| 179 | ||
| 180 | $fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess', 'w'); |
|
| 181 | if ($fp) { |
|
| 182 | fwrite($fp, $htaccess_content); |
|
| 183 | fclose($fp); |
|
| 184 | } |
|
| 185 | } |
|
| 186 | ||
| 187 | $html_index=api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html'; |
|
| 188 | if (!file_exists($html_index)) { |
|
| @@ 188-195 (lines=8) @@ | ||
| 185 | } |
|
| 186 | ||
| 187 | $html_index=api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html'; |
|
| 188 | if (!file_exists($html_index)) { |
|
| 189 | $html_index_content="<html><head></head><body></body></html>"; |
|
| 190 | $fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html', 'w'); |
|
| 191 | if ($fp) { |
|
| 192 | fwrite($fp, $html_index_content); |
|
| 193 | fclose($fp); |
|
| 194 | } |
|
| 195 | } |
|
| 196 | ||
| 197 | //encript temp name file |
|
| 198 | $name_crip=sha1(uniqid());//encript |
|
| @@ 4581-4588 (lines=8) @@ | ||
| 4578 | ||
| 4579 | //make htaccess with allow from all, and file index.html into temp/audio |
|
| 4580 | $htaccess = api_get_path(SYS_ARCHIVE_PATH).'temp/audio/.htaccess'; |
|
| 4581 | if (!file_exists($htaccess)) { |
|
| 4582 | $htaccess_content="order deny,allow\r\nallow from all\r\nOptions -Indexes"; |
|
| 4583 | $fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/audio/.htaccess', 'w'); |
|
| 4584 | if ($fp) { |
|
| 4585 | fwrite($fp, $htaccess_content); |
|
| 4586 | fclose($fp); |
|
| 4587 | } |
|
| 4588 | } |
|
| 4589 | ||
| 4590 | //encript temp name file |
|
| 4591 | $name_crip = sha1(uniqid());//encript |
|