91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 11.3MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-26
  • 語言: PHP
  • 標簽: thinkphp5??hui??

資源簡介

tpadmin 是一個基于 ThinkPHP5.0 正式版和 Hui.admin v2.5 的管理后臺,簡化管理后臺的開發流程,簡化代碼的編寫,提高代碼復用率,同時集成完整的權限管理和其他管理后臺中常用的功能

資源截圖

代碼片段和文件信息

#?-*-?coding:?utf-8?-*-
#
#?jQuery?File?Upload?Plugin?GAE?Python?Example
#?https://github.com/blueimp/jQuery-File-Upload
#
#?Copyright?2011?Sebastian?Tschan
#?https://blueimp.net
#
#?Licensed?under?the?MIT?license:
#?http://www.opensource.org/licenses/MIT
#

from?google.appengine.api?import?memcache?images
import?json
import?os
import?re
import?urllib
import?webapp2

DEBUG=os.environ.get(‘SERVER_SOFTWARE‘?‘‘).startswith(‘Dev‘)
WEBSITE?=?‘https://blueimp.github.io/jQuery-File-Upload/‘
MIN_FILE_SIZE?=?1??#?bytes
#?Max?file?size?is?memcache?limit?(1MB)?minus?key?size?minus?overhead:
MAX_FILE_SIZE?=?999000??#?bytes
IMAGE_TYPES?=?re.compile(‘image/(gif|p?jpeg|(x-)?png)‘)
ACCEPT_FILE_TYPES?=?IMAGE_TYPES
THUMB_MAX_WIDTH?=?80
THUMB_MAX_HEIGHT?=?80
THUMB_SUFFIX?=?‘.‘+str(THUMB_MAX_WIDTH)+‘x‘+str(THUMB_MAX_HEIGHT)+‘.png‘
EXPIRATION_TIME?=?300??#?seconds
#?If?set?to?None?only?allow?redirects?to?the?referer?protocol+host.
#?Set?to?a?regexp?for?custom?pattern?matching?against?the?redirect?value:
REDIRECT_ALLOW_TARGET?=?None

class?CORSHandler(webapp2.RequestHandler):
????def?cors(self):
????????headers?=?self.response.headers
????????headers[‘Access-Control-Allow-Origin‘]?=?‘*‘
????????headers[‘Access-Control-Allow-Methods‘]?=\
????????????‘OPTIONS?HEAD?GET?POST?DELETE‘
????????headers[‘Access-Control-Allow-Headers‘]?=\
????????????‘Content-Type?Content-Range?Content-Disposition‘

????def?initialize(self?request?response):
????????super(CORSHandler?self).initialize(request?response)
????????self.cors()

????def?json_stringify(self?obj):
????????return?json.dumps(obj?separators=(‘‘?‘:‘))

????def?options(self?*args?**kwargs):
????????pass

class?UploadHandler(CORSHandler):
????def?validate(self?file):
????????if?file[‘size‘]?????????????file[‘error‘]?=?‘File?is?too?small‘
????????elif?file[‘size‘]?>?MAX_FILE_SIZE:
????????????file[‘error‘]?=?‘File?is?too?big‘
????????elif?not?ACCEPT_FILE_TYPES.match(file[‘type‘]):
????????????file[‘error‘]?=?‘Filetype?not?allowed‘
????????else:
????????????return?True
????????return?False

????def?validate_redirect(self?redirect):
????????if?redirect:
????????????if?REDIRECT_ALLOW_TARGET:
????????????????return?REDIRECT_ALLOW_TARGET.match(redirect)
????????????referer?=?self.request.headers[‘referer‘]
????????????if?referer:
????????????????from?urlparse?import?urlparse
????????????????parts?=?urlparse(referer)
????????????????redirect_allow_target?=?‘^‘?+?re.escape(
????????????????????parts.scheme?+?‘://‘?+?parts.netloc?+?‘/‘
????????????????)
????????????return?re.match(redirect_allow_target?redirect)
????????return?False

????def?get_file_size(self?file):
????????file.seek(0?2)??#?Seek?to?the?end?of?the?file
????????size?=?file.tell()??#?Get?the?position?of?EOF
????????file.seek(0)??#?Reset?the?file?position?to?the?beginning
????????return?size

????def?write_blob(self?data?info):
????????key?=?urllib.quote(info[‘type‘].encode(‘utf-8‘)?‘‘)?+\
????????????‘/‘?+?str(hash(data))?+\

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-03-08?07:13??tpAdmin-master\
?????文件??????????84??2017-03-08?07:13??tpAdmin-master\.gitattributes
?????文件???????????5??2017-03-08?07:13??tpAdmin-master\.gitignore
?????文件???????11357??2017-03-08?07:13??tpAdmin-master\LICENSE
?????文件????????2660??2017-03-08?07:13??tpAdmin-master\README.md
?????目錄???????????0??2017-03-08?07:13??tpAdmin-master\application\
?????文件???????????0??2017-03-08?07:13??tpAdmin-master\application\.gitignore
?????文件??????????13??2017-03-08?07:13??tpAdmin-master\application\.htaccess
?????目錄???????????0??2017-03-08?07:13??tpAdmin-master\application\admin\
?????文件???????????0??2017-03-08?07:13??tpAdmin-master\application\admin\.gitignore
?????文件???????13303??2017-03-08?07:13??tpAdmin-master\application\admin\Controller.php
?????文件???????13777??2017-03-08?07:13??tpAdmin-master\application\admin\common.php
?????文件????????1225??2017-03-08?07:13??tpAdmin-master\application\admin\config.php
?????目錄???????????0??2017-03-08?07:13??tpAdmin-master\application\admin\controller\
?????文件???????????9??2017-03-08?07:13??tpAdmin-master\application\admin\controller\.gitignore
?????文件????????1406??2017-03-08?07:13??tpAdmin-master\application\admin\controller\AdminGroup.php
?????文件???????10487??2017-03-08?07:13??tpAdmin-master\application\admin\controller\AdminNode.php
?????文件?????????997??2017-03-08?07:13??tpAdmin-master\application\admin\controller\AdminNodeLoad.php
?????文件????????3457??2017-03-08?07:13??tpAdmin-master\application\admin\controller\AdminRole.php
?????文件????????2570??2017-03-08?07:13??tpAdmin-master\application\admin\controller\AdminUser.php
?????文件????????4641??2017-03-08?07:13??tpAdmin-master\application\admin\controller\Demo.php
?????文件????????2411??2017-03-08?07:13??tpAdmin-master\application\admin\controller\Generate.php
?????文件????????2636??2017-03-08?07:13??tpAdmin-master\application\admin\controller\Index.php
?????文件????????1693??2017-03-08?07:13??tpAdmin-master\application\admin\controller\LoginLog.php
?????文件????????1390??2017-03-08?07:13??tpAdmin-master\application\admin\controller\NodeMap.php
?????文件????????6733??2017-03-08?07:13??tpAdmin-master\application\admin\controller\Pub.php
?????文件????????8049??2017-03-08?07:13??tpAdmin-master\application\admin\controller\Ueditor.php
?????文件????????2057??2017-03-08?07:13??tpAdmin-master\application\admin\controller\Upload.php
?????文件????????5294??2017-03-08?07:13??tpAdmin-master\application\admin\controller\WebLog.php
?????目錄???????????0??2017-03-08?07:13??tpAdmin-master\application\admin\controller\one\
?????目錄???????????0??2017-03-08?07:13??tpAdmin-master\application\admin\controller\one\two\
............此處省略3179個文件信息

評論

共有 條評論