12345678910111213141516171819202122232425262728293031 |
- <?php
- // by 请勿倒卖,已申请软著,否则追究法律责任
- namespace app\download;
- use app\index\Base;
- class app extends Base
- {
- function index()
- {
- close_browse();
- $_var_0 = explode(".", @bees_decrypt($this->action));
- $_var_1 = $_var_0[0] ?: 0;
- $_var_2 = $_var_0[1] ?? "app";
- $_var_3 = $_var_0[2] ?? 0;
- $_var_4 = db($_var_2)->where("in_id", $_var_1)->find();
- if (IN_DENIED) {
- if (!$this->userlogined || $_var_3 && $_var_3 < strtotime("-5 minutes")) {
- header("HTTP/1.1 404 NOT FOUND");
- exit("file not exists");
- }
- if (!$_var_3) {
- $_var_0[2] = time();
- header("location:/download/app/" . implode(".", $_var_0));
- }
- downloadFile("data/attachment/" . $_var_4["in_app"], $_var_4["in_originalName"]);
- } else {
- header("location:/data/attachment/" . $_var_4["in_app"]);
- }
- }
- }
|