{"id":360,"date":"2008-05-22T23:05:04","date_gmt":"2008-05-22T23:05:04","guid":{"rendered":"http:\/\/6teen.ru\/?p=61"},"modified":"2008-05-22T23:05:04","modified_gmt":"2008-05-22T23:05:04","slug":"7431","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=360","title":{"rendered":"\u0410\u0440\u0445\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0431\u0430\u0437\u044b \u0410\u043a\u0441\u0435\u0441\u0441"},"content":{"rendered":"<p>\u0410\u0440\u0445\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0431\u0430\u0437\u044b \u0410\u043a\u0441\u0435\u0441\u0441<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u0410\u0440\u0445\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0431\u0430\u0437\u044b \u0410\u043a\u0441\u0435\u0441\u0441\n\n\u041f\u0440\u0438 \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u0430 \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0431\u0430\u0437\u0430 Access \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u043b\u0430. \u041f\u0440\u0438 \u0447\u0435\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f 5 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.\n\u0421\u0430\u043c\u044b\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f. \u0412\u044b\u0431\u043e\u0440 \u0444\u0430\u043b\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c\u0438 \u043a\u043e\u043f\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043c\u0430\u0441\u043a\u0435..\n\nprocedure LookDir(StartDir, Mask : String; List : TStringList);\nvar\nSearchRec : TSearchRec;\nbegin\nif Mask = '' then Mask := '*.*';\nif StartDir[Length(StartDir)] <> '' then StartDir := StartDir + '\\';\nif FindFirst(StartDir+Mask, faAnyFile, SearchRec) = 0 then\nbegin\nrepeat\nif (SearchRec.Attr and faDirectory) <> faDirectory then\nbegin\nList.Add(StartDir+SearchRec.Name);\nend\nelse\nif (SearchRec.Name <> '..') and (SearchRec.Name <> '.') then LookDir(StartDir + SearchRec.Name + '', Mask, List);\nuntil FindNext(SearchRec) <> 0;\nFindClose(SearchRec);\nend;\nend;\n\nprocedure BackUpBD;\nvar\npath1,path2,fname:string;\ni,colfiles:integer;\nlst:tstringlist;\nbegin\ncolfiles:=5;\/\/\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0444\u0430\u0439\u043b\u0430\npath1:=extractfilepath(application.ExeName);\npath2:=extractfilepath(application.ExeName)+'BackUpBD\\';\nif not DirectoryExists(path2) then MkDir(path2);\nfname:=path2+formatdatetime('yyyy-mm-dd hh-nn-ss',now)+'-BD.mdb.back';\n\/\/BD.mdb - \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u0430\u0448\u0435\u0439 \u0411\u0414\nif copyfile(PChar(path1+'BD.mdb'),PChar(fname),false) = true then\nbegin\nlst := TStringList.Create;\nLookDir(path2, '*.back', lst);\n\nif Lst.Count>colfiles then\nfor i:= 0 to Lst.Count - colfiles-1 do deletefile(lst.Strings[i]);\n\nlst.Free;\nend\nelse\nshowmessage('\u0424\u0430\u0439\u043b \u0441 \u0411\u0414 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d!');\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0410\u0440\u0445\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0431\u0430\u0437\u044b \u0410\u043a\u0441\u0435\u0441\u0441<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[417,434],"tags":[612,616,187,818],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/360"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}