void file_del()
        {
            var id = Request.QueryString["id"];

            SqlExec se = new SqlExec();

            se.update("up6_folders"
                      , new SqlParam[] { new SqlParam("f_deleted", true) }
                      , new SqlParam[] {
                new SqlParam("f_id", id)
                , new SqlParam("f_pid", id)
                , new SqlParam("f_pidRoot", id)
            }
                      , "or"
                      );
            se.update("up6_files"
                      , new SqlParam[] { new SqlParam("f_deleted", true) }
                      , new SqlParam[] {
                new SqlParam("f_id", id)
                , new SqlParam("f_pid", id)
                , new SqlParam("f_pidRoot", id)
            }
                      , "or"
                      );

            PageTool.to_content(new JObject {
                { "ret", 1 }
            });
        }
Exemple #2
0
        public void rename_folder(string name, string id, string pid)
        {
            DBConfig cfg = new DBConfig();
            SqlExec  se  = cfg.se();

            se.update("up6_folders"
                      , new SqlParam[] { new SqlParam("f_nameLoc", name) }
                      , new SqlParam[] { new SqlParam("f_id", id) });
        }
        void folder_complete()
        {
            string id  = Request.QueryString["id"];
            string uid = Request.QueryString["uid"];
            string cak = Request.QueryString["callback"];
            int    ret = 0;

            if (string.IsNullOrEmpty(id) ||
                uid.Length < 1)
            {
            }
            else
            {
                FileInf inf = new FileInf();
                DBFile  db  = new DBFile();
                db.read(id, ref inf);
                string root = inf.pathSvr;

                //上传完毕
                DBFile.fd_complete(id, uid);

                //扫描文件夹结构,
                fd_scan sa = new fd_scan();
                sa.root = inf;//
                sa.scan(inf, root);

                //更新扫描状态
                SqlExec se = new SqlExec();
                se.update("up6_folders", new SqlParam[] {
                    new SqlParam("f_scan", true)
                }, new SqlParam[] {
                    new SqlParam("f_id", id)
                    , new SqlParam("f_uid", uid)
                });

                up6_biz_event.folder_post_complete(id);

                ret = 1;
            }
            PageTool.to_content(cak + "(" + ret + ")");
        }