| @@ 180-189 (lines=10) @@ | ||
| 177 | ||
| 178 | //make htaccess with allow from all, and file index.html into temp/images |
|
| 179 | $htaccess=api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess'; |
|
| 180 | if (!file_exists($htaccess)) { |
|
| 181 | ||
| 182 | $htaccess_content="order deny,allow\r\nallow from all\r\nOptions -Indexes"; |
|
| 183 | ||
| 184 | $fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess', 'w'); |
|
| 185 | if ($fp) { |
|
| 186 | fwrite($fp, $htaccess_content); |
|
| 187 | fclose($fp); |
|
| 188 | } |
|
| 189 | } |
|
| 190 | ||
| 191 | $html_index=api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html'; |
|
| 192 | if (!file_exists($html_index)) { |
|
| @@ 192-199 (lines=8) @@ | ||
| 189 | } |
|
| 190 | ||
| 191 | $html_index=api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html'; |
|
| 192 | if (!file_exists($html_index)) { |
|
| 193 | $html_index_content="<html><head></head><body></body></html>"; |
|
| 194 | $fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html', 'w'); |
|
| 195 | if ($fp) { |
|
| 196 | fwrite($fp, $html_index_content); |
|
| 197 | fclose($fp); |
|
| 198 | } |
|
| 199 | } |
|
| 200 | ||
| 201 | //encript temp name file |
|
| 202 | $name_crip=sha1(uniqid());//encript |
|
| @@ 4648-4655 (lines=8) @@ | ||
| 4645 | ||
| 4646 | //make htaccess with allow from all, and file index.html into temp/audio |
|
| 4647 | $htaccess = api_get_path(SYS_ARCHIVE_PATH).'temp/audio/.htaccess'; |
|
| 4648 | if (!file_exists($htaccess)) { |
|
| 4649 | $htaccess_content="order deny,allow\r\nallow from all\r\nOptions -Indexes"; |
|
| 4650 | $fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/audio/.htaccess', 'w'); |
|
| 4651 | if ($fp) { |
|
| 4652 | fwrite($fp, $htaccess_content); |
|
| 4653 | fclose($fp); |
|
| 4654 | } |
|
| 4655 | } |
|
| 4656 | ||
| 4657 | //encript temp name file |
|
| 4658 | $name_crip = sha1(uniqid());//encript |
|