├── b2 ├── Flaskshop │ ├── .idea │ │ ├── .name │ │ ├── encodings.xml │ │ ├── modules.xml │ │ ├── mini-taobao-master.iml │ │ └── misc.xml │ ├── .DS_Store │ ├── taobao │ │ ├── __init__.pyc │ │ ├── taobaotest.db │ │ ├── __pycache__ │ │ │ ├── forms.cpython-35.pyc │ │ │ ├── forms.cpython-36.pyc │ │ │ ├── forms.cpython-37.pyc │ │ │ ├── models.cpython-35.pyc │ │ │ ├── models.cpython-36.pyc │ │ │ ├── models.cpython-37.pyc │ │ │ ├── routes.cpython-35.pyc │ │ │ ├── routes.cpython-36.pyc │ │ │ ├── routes.cpython-37.pyc │ │ │ ├── __init__.cpython-35.pyc │ │ │ ├── __init__.cpython-36.pyc │ │ │ └── __init__.cpython-37.pyc │ │ ├── templates │ │ │ ├── account_about.html │ │ │ ├── crew_order_manager.html │ │ │ ├── supplier_crew_manager.html │ │ │ ├── coustomer_detail_manager.html │ │ │ ├── supplier_product_manager.html │ │ │ ├── search.html │ │ │ ├── customer_account.html │ │ │ ├── customer_order_manager.html │ │ │ ├── supplier_account.html │ │ │ ├── account_layout.html │ │ │ ├── upload.html │ │ │ ├── show_confirm_waitting_orders.html │ │ │ ├── completed_orders.html │ │ │ ├── shou_supplier_crews.html │ │ │ ├── traning_orders.html │ │ │ ├── crew_account.html │ │ │ ├── waitting_orders.html │ │ │ ├── crew_market.html │ │ │ ├── customer_check_supplier_products.html │ │ │ ├── show_supplier_product.html │ │ │ ├── security_check.html │ │ │ ├── home.html │ │ │ ├── show_customer_detail.html │ │ │ ├── show_order_details.html │ │ │ ├── reset_request.html │ │ │ ├── supplier_add_product_count.html │ │ │ └── reset_token.html │ │ ├── __init__.py │ │ └── static │ │ │ └── main.css │ ├── __pycache__ │ │ └── run.cpython-35.pyc │ └── run.py ├── .DS_Store ├── start.sh ├── default └── Dockerfile ├── b3 ├── html │ ├── application │ │ ├── .htaccess │ │ ├── admin │ │ │ ├── model │ │ │ │ ├── Links.php │ │ │ │ ├── Cate.php │ │ │ │ ├── Article.php │ │ │ │ └── Admin.php │ │ │ ├── controller │ │ │ │ ├── Index.php │ │ │ │ ├── Base.php │ │ │ │ ├── Login.php │ │ │ │ ├── Cate.php │ │ │ │ └── Links.php │ │ │ ├── config.php │ │ │ └── validate │ │ │ │ ├── Tags.php │ │ │ │ ├── Links.php │ │ │ │ ├── Article.php │ │ │ │ ├── Cate.php │ │ │ │ └── Admin.php │ │ ├── index │ │ │ ├── config.php │ │ │ ├── view │ │ │ │ ├── common │ │ │ │ │ ├── foot.html │ │ │ │ │ └── header.html │ │ │ │ ├── index │ │ │ │ │ └── index.html │ │ │ │ ├── search │ │ │ │ │ └── search.html │ │ │ │ └── cate │ │ │ │ │ └── cate.html │ │ │ ├── common.php │ │ │ └── controller │ │ │ │ ├── Cate.php │ │ │ │ ├── Search.php │ │ │ │ ├── Base.php │ │ │ │ ├── Index.php │ │ │ │ └── Article.php │ │ ├── command.php │ │ ├── common.php │ │ ├── route.php │ │ ├── tags.php │ │ └── database.php │ ├── extend │ │ └── .gitignore │ ├── thinkphp │ │ ├── .htaccess │ │ ├── .gitignore │ │ ├── logo.png │ │ ├── library │ │ │ ├── think │ │ │ │ ├── console │ │ │ │ │ ├── bin │ │ │ │ │ │ ├── hiddeninput.exe │ │ │ │ │ │ └── README.md │ │ │ │ │ ├── command │ │ │ │ │ │ ├── make │ │ │ │ │ │ │ ├── stubs │ │ │ │ │ │ │ │ ├── model.stub │ │ │ │ │ │ │ │ ├── controller.plain.stub │ │ │ │ │ │ │ │ └── controller.stub │ │ │ │ │ │ │ ├── Model.php │ │ │ │ │ │ │ └── Controller.php │ │ │ │ │ │ ├── Clear.php │ │ │ │ │ │ └── Build.php │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── output │ │ │ │ │ │ ├── driver │ │ │ │ │ │ ├── Nothing.php │ │ │ │ │ │ └── Buffer.php │ │ │ │ │ │ └── question │ │ │ │ │ │ └── Confirmation.php │ │ │ │ ├── exception │ │ │ │ │ ├── RouteNotFoundException.php │ │ │ │ │ ├── HttpResponseException.php │ │ │ │ │ ├── ClassNotFoundException.php │ │ │ │ │ ├── TemplateNotFoundException.php │ │ │ │ │ ├── ValidateException.php │ │ │ │ │ ├── HttpException.php │ │ │ │ │ ├── DbException.php │ │ │ │ │ ├── PDOException.php │ │ │ │ │ ├── ThrowableError.php │ │ │ │ │ └── ErrorException.php │ │ │ │ ├── config │ │ │ │ │ └── driver │ │ │ │ │ │ ├── Ini.php │ │ │ │ │ │ ├── Json.php │ │ │ │ │ │ └── Xml.php │ │ │ │ ├── log │ │ │ │ │ └── driver │ │ │ │ │ │ └── Test.php │ │ │ │ ├── Env.php │ │ │ │ ├── db │ │ │ │ │ └── exception │ │ │ │ │ │ ├── BindParamException.php │ │ │ │ │ │ ├── ModelNotFoundException.php │ │ │ │ │ │ └── DataNotFoundException.php │ │ │ │ ├── model │ │ │ │ │ └── Pivot.php │ │ │ │ ├── controller │ │ │ │ │ └── Yar.php │ │ │ │ ├── Exception.php │ │ │ │ ├── process │ │ │ │ │ └── exception │ │ │ │ │ │ └── Failed.php │ │ │ │ └── response │ │ │ │ │ └── Json.php │ │ │ └── traits │ │ │ │ └── think │ │ │ │ └── Instance.php │ │ ├── codecov.yml │ │ ├── start.php │ │ ├── console.php │ │ ├── composer.json │ │ ├── tpl │ │ │ └── default_index.tpl │ │ ├── .travis.yml │ │ ├── phpunit.xml │ │ └── LICENSE.txt │ ├── vendor │ │ └── .gitignore │ ├── public │ │ ├── static │ │ │ └── .gitignore │ │ ├── hint.php │ │ ├── robots.txt │ │ ├── .DS_Store │ │ ├── favicon.ico │ │ ├── .htaccess │ │ ├── router.php │ │ └── index.php │ ├── .DS_Store │ ├── phpunit.xml │ ├── tests │ │ ├── TestCase.php │ │ └── ExampleTest.php │ ├── think │ ├── composer.json │ ├── build.php │ └── LICENSE.txt ├── mysql-passwd ├── start.sh ├── init_db.sh ├── Dockerfile └── 000-default.conf ├── b1 ├── flag.txt ├── calculator ├── ctf.xinetd └── Dockerfile ├── b4 ├── html │ ├── include │ │ ├── shell.php │ │ ├── config.php │ │ └── log1.php │ ├── lib │ │ ├── run.php │ │ ├── base.php │ │ └── File.php │ ├── org │ │ └── smarty │ │ │ ├── Autofoucer.php │ │ │ ├── sysplugins │ │ │ ├── smartyexception.php │ │ │ ├── smarty_undefined_variable.php │ │ │ ├── smartycompilerexception.php │ │ │ ├── smarty_internal_parsetree.php │ │ │ ├── smarty_internal_parsetree_text.php │ │ │ ├── smarty_internal_parsetree_code.php │ │ │ ├── smarty_internal_parsetree_dqcontent.php │ │ │ ├── smarty_resource_recompiled.php │ │ │ ├── smarty_internal_compile_ldelim.php │ │ │ ├── smarty_internal_compile_rdelim.php │ │ │ ├── smarty_internal_compile_debug.php │ │ │ ├── smarty_internal_get_include_path.php │ │ │ ├── smarty_variable.php │ │ │ ├── smarty_internal_compile_append.php │ │ │ ├── smarty_internal_parsetree_tag.php │ │ │ ├── smarty_data.php │ │ │ └── smarty_internal_nocache_insert.php │ │ │ └── plugins │ │ │ ├── modifiercompiler.noprint.php │ │ │ ├── variablefilter.htmlspecialchars.php │ │ │ ├── modifiercompiler.string_format.php │ │ │ ├── modifiercompiler.cat.php │ │ │ ├── modifiercompiler.count_paragraphs.php │ │ │ ├── modifiercompiler.upper.php │ │ │ ├── modifiercompiler.strip_tags.php │ │ │ ├── modifiercompiler.indent.php │ │ │ ├── modifiercompiler.lower.php │ │ │ ├── modifier.spacify.php │ │ │ ├── modifiercompiler.count_sentences.php │ │ │ ├── modifiercompiler.to_charset.php │ │ │ ├── modifiercompiler.from_charset.php │ │ │ ├── modifiercompiler.default.php │ │ │ ├── modifiercompiler.strip.php │ │ │ ├── modifier.replace.php │ │ │ ├── modifiercompiler.count_characters.php │ │ │ ├── modifiercompiler.count_words.php │ │ │ ├── shared.literal_compiler_param.php │ │ │ ├── modifiercompiler.unescape.php │ │ │ ├── shared.make_timestamp.php │ │ │ ├── shared.mb_unicode.php │ │ │ ├── modifiercompiler.wordwrap.php │ │ │ ├── shared.escape_special_chars.php │ │ │ ├── modifier.regex_replace.php │ │ │ └── shared.mb_str_replace.php │ ├── public │ │ ├── image │ │ │ ├── bg.jpg │ │ │ ├── big.jpg │ │ │ ├── name.png │ │ │ ├── password.png │ │ │ └── background.jpg │ │ ├── js │ │ │ └── npm.js │ │ └── css │ │ │ └── reset.css │ ├── index.php │ ├── supervisord.conf │ ├── common │ │ ├── function.php │ │ ├── home.php │ │ └── cacf.php │ ├── templates │ │ ├── error.tpl │ │ ├── success.tpl │ │ └── updatepass.tpl │ └── geez.sql ├── .DS_Store └── Dockerfile ├── .DS_Store ├── docker-compose.yml ├── README.md └── LICENSE /b2/Flaskshop/.idea/.name: -------------------------------------------------------------------------------- 1 | mini-taobao-master -------------------------------------------------------------------------------- /b3/html/application/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /b3/html/extend/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /b3/html/thinkphp/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /b3/html/vendor/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /b1/flag.txt: -------------------------------------------------------------------------------- 1 | flag{glzjin_wants_a_girl_friend} 2 | -------------------------------------------------------------------------------- /b3/html/public/static/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /b3/html/public/hint.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /b3/html/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /b4/html/include/shell.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /b4/html/lib/run.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/.DS_Store -------------------------------------------------------------------------------- /b3/html/thinkphp/.gitignore: -------------------------------------------------------------------------------- 1 | /composer.lock 2 | /vendor 3 | .idea 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /b1/calculator: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b1/calculator -------------------------------------------------------------------------------- /b2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b2/.DS_Store -------------------------------------------------------------------------------- /b4/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b4/.DS_Store -------------------------------------------------------------------------------- /b4/html/org/smarty/Autofoucer.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /b3/html/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b3/html/.DS_Store -------------------------------------------------------------------------------- /b2/Flaskshop/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b2/Flaskshop/.DS_Store -------------------------------------------------------------------------------- /b3/html/public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b3/html/public/.DS_Store -------------------------------------------------------------------------------- /b3/html/thinkphp/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b3/html/thinkphp/logo.png -------------------------------------------------------------------------------- /b3/html/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b3/html/public/favicon.ico -------------------------------------------------------------------------------- /b4/html/public/image/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b4/html/public/image/bg.jpg -------------------------------------------------------------------------------- /b4/html/public/image/big.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b4/html/public/image/big.jpg -------------------------------------------------------------------------------- /b4/html/public/image/name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b4/html/public/image/name.png -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b2/Flaskshop/taobao/__init__.pyc -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/taobaotest.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b2/Flaskshop/taobao/taobaotest.db -------------------------------------------------------------------------------- /b2/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | service nginx start 4 | 5 | su - glzjin -c "nohup python3 /home/glzjin/Flaskshop/run.py &" 6 | -------------------------------------------------------------------------------- /b3/mysql-passwd: -------------------------------------------------------------------------------- 1 | debconf mysql-server/root_password password root 2 | debconf mysql-server/root_password_again password root 3 | -------------------------------------------------------------------------------- /b4/html/public/image/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b4/html/public/image/password.png -------------------------------------------------------------------------------- /b4/html/public/image/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b4/html/public/image/background.jpg -------------------------------------------------------------------------------- /b3/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | service apache2 start 4 | 5 | find /var/lib/mysql -type f -exec touch {} \; && service mysql start 6 | -------------------------------------------------------------------------------- /b2/Flaskshop/__pycache__/run.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b2/Flaskshop/__pycache__/run.cpython-35.pyc -------------------------------------------------------------------------------- /b3/html/application/admin/model/Links.php: -------------------------------------------------------------------------------- 1 | About page
4 | 5 | {% endblock info %} 6 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/bin/hiddeninput.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glzjin/20190511_awd_docker/HEAD/b3/html/thinkphp/library/think/console/bin/hiddeninput.exe -------------------------------------------------------------------------------- /b3/html/application/admin/model/Cate.php: -------------------------------------------------------------------------------- 1 | [ 4 | '__PUBLIC__'=>SITE_URL.'/static/index', 5 | '__IMG__'=>SITE_URL.'/static', 6 | ], 7 | ]; 8 | -------------------------------------------------------------------------------- /b2/Flaskshop/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/command/make/stubs/model.stub: -------------------------------------------------------------------------------- 1 | 雇员订单管理
4 | 需要确认发货的订单

5 | {% endblock info %} 6 | -------------------------------------------------------------------------------- /b3/html/application/index/view/common/foot.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
-------------------------------------------------------------------------------- /b3/init_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | chown -R mysql:mysql /var/lib/mysql 3 | /etc/init.d/mysql start 4 | sleep 5 5 | echo `service mysql status` 6 | 7 | mysql -uroot -proot < /root/init.sql 8 | 9 | rm -rf /root/init.sql 10 | rm -rf /tmp/init_db.sh 11 | -------------------------------------------------------------------------------- /b3/html/application/admin/model/Article.php: -------------------------------------------------------------------------------- 1 | belongsTo('cate','cateid'); 9 | } 10 | 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /b3/html/thinkphp/codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | layout: header, changes, diff 3 | coverage: 4 | ignore: 5 | - base.php 6 | - helper.php 7 | - convention.php 8 | - lang/zh-cn.php 9 | - start.php 10 | - console.php 11 | status: 12 | patch: false 13 | -------------------------------------------------------------------------------- /b2/Flaskshop/run.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from taobao import app,db 3 | from werkzeug.contrib.fixers import ProxyFix 4 | app.wsgi_app=ProxyFix(app.wsgi_app) 5 | 6 | 7 | 8 | if __name__ == '__main__': 9 | app.run(debug=False) 10 | db.create_all() 11 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/supplier_crew_manager.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 | 去人才市场看看,雇几个伙计??
4 | 查看我的雇员
5 | 6 | {% endblock info %} 7 | -------------------------------------------------------------------------------- /b3/html/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Options +FollowSymlinks -Multiviews 3 | RewriteEngine On 4 | 5 | RewriteCond %{REQUEST_FILENAME} !-d 6 | RewriteCond %{REQUEST_FILENAME} !-f 7 | RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 8 | 9 | 10 | -------------------------------------------------------------------------------- /b3/html/application/admin/controller/Index.php: -------------------------------------------------------------------------------- 1 | fetch(); 11 | } 12 | 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/coustomer_detail_manager.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

收货地址管理


4 | 添加我的收货地址
5 | 查看我的收货地址
6 | {% endblock info %} 7 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/supplier_product_manager.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

商品管理

4 | 5 | 添加产品
6 | 查看我的产品
7 | 8 | {% endblock info %} 9 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/search.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 | 4 | 5 | 6 | 7 | upload 8 | 9 | 10 |

执行结果

11 | {{ msg }} 12 | 13 | 14 | 15 | {% endblock content %} 16 | -------------------------------------------------------------------------------- /b2/Flaskshop/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /b3/html/application/admin/config.php: -------------------------------------------------------------------------------- 1 | [ 5 | '__PUBLIC__'=>SITE_URL.'/static/admin', 6 | '__IMG__'=>SITE_URL.'/static', 7 | ], 8 | 9 | 'template' => [ 10 | // 模板后缀 11 | 'view_suffix' => 'htm', 12 | ], 13 | 14 | 15 | 16 | ]; 17 | -------------------------------------------------------------------------------- /b4/html/include/config.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /b3/html/application/index/common.php: -------------------------------------------------------------------------------- 1 | $v) { 5 | $v=join(',',$v); 6 | $temp[]=$v; 7 | } 8 | if($temp){ 9 | $temp=array_unique($temp); 10 | foreach ($temp as $k=>$v) { 11 | $temp[$k]=explode(',', $v); 12 | } 13 | 14 | return $temp; 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /b3/html/application/admin/controller/Base.php: -------------------------------------------------------------------------------- 1 | error('请先登录系统!','Login/index'); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /b4/html/index.php: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/customer_account.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 | 管理我的收货地址
4 | 管理我的订单
5 | 管理我的基本信息
6 | 7 | {% endblock info %} 8 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/customer_order_manager.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

我的订单管理


4 | 等待发货的订单

5 | 等待确认收货的订单

6 | 完成交易的订单

7 | {% endblock info %} 8 | -------------------------------------------------------------------------------- /b2/default: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | server_name _; 4 | 5 | location / { 6 | proxy_pass http://127.0.0.1:5000/; 7 | 8 | proxy_set_header X-Real-IP $remote_addr; 9 | proxy_set_header Host $host; 10 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 11 | 12 | proxy_set_header X-NginX-Proxy true; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smartyexception.php: -------------------------------------------------------------------------------- 1 | Smarty: ' . (self::$escape ? htmlentities($this->message) : $this->message) . ' <-- '; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /b4/html/include/log1.php: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/supplier_account.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |
4 |
5 | 管理我的商品
6 | 管理雇员
7 | 管理我的基本信息
8 | 完善我的其他信息
9 | 10 | {% endblock info %} 11 | -------------------------------------------------------------------------------- /b2/Flaskshop/.idea/mini-taobao-master.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/account_layout.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 |
4 |
5 |
6 | 7 |

{{ current_user.email }}

8 |
9 |
10 | {% block info %}{% endblock info %} 11 |
12 | 13 | {% endblock content %} 14 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/upload.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 | 4 | 5 | 6 | 7 | upload 8 | 9 | 10 |

文件上传

11 |
12 | 13 | 14 |
15 | {{msg}} 16 | 17 | 18 | 19 | {% endblock content %} 20 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.noprint.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: noprint
13 | * Purpose: return an empty string 14 | * 15 | * @author Uwe Tews 16 | * @return string with compiled code 17 | */ 18 | function smarty_modifiercompiler_noprint() 19 | { 20 | return "''"; 21 | } 22 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/variablefilter.htmlspecialchars.php: -------------------------------------------------------------------------------- 1 | find($cateid); 11 | $this->assign('cates',$cates); 12 | //查询当前栏目下的文章 13 | $articleres=db('article')->where(array('cateid'=>$cateid))->paginate(3); 14 | $this->assign('articleres',$articleres); 15 | return $this->fetch('cate'); 16 | } 17 | 18 | 19 | 20 | 21 | } -------------------------------------------------------------------------------- /b4/html/common/function.php: -------------------------------------------------------------------------------- 1 | '.$action.'();'); 21 | } 22 | } 23 | 24 | 25 | 26 | ?> 27 | -------------------------------------------------------------------------------- /b3/html/application/admin/validate/Tags.php: -------------------------------------------------------------------------------- 1 | 'require|max:25|unique:tags', 8 | ]; 9 | 10 | protected $message = [ 11 | 'tagname.require' => 'Tag标签必须填写', 12 | 'tagname.max' => 'Tag标签长度不得大于25位', 13 | 'tagname.unique' => 'Tag标签不得重复', 14 | 15 | ]; 16 | 17 | protected $scene = [ 18 | 'add' => ['tagname'], 19 | 'edit' => ['tagname'], 20 | ]; 21 | 22 | 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /b3/html/application/admin/validate/Links.php: -------------------------------------------------------------------------------- 1 | 'require|max:25', 8 | 'url' => 'require', 9 | ]; 10 | 11 | protected $message = [ 12 | 'title.require' => '链接标题必须填写', 13 | 'title.max' => '链接标题长度不得大于25位', 14 | 'url.require' => '链接地址必须填写', 15 | 16 | ]; 17 | 18 | protected $scene = [ 19 | 'add' => ['title','url'], 20 | 'edit' => ['title','url'], 21 | ]; 22 | 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /b3/html/application/admin/validate/Article.php: -------------------------------------------------------------------------------- 1 | 'require|max:25', 8 | 'cateid' => 'require', 9 | ]; 10 | 11 | protected $message = [ 12 | 'title.require' => '文章标题必须填写', 13 | 'title.max' => '文章标题长度不得大于25位', 14 | 'cateid.require' => '请选择文章所属栏目', 15 | 16 | ]; 17 | 18 | protected $scene = [ 19 | 'add' => ['title','cateid'], 20 | 'edit' => ['title','cateid'], 21 | ]; 22 | 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /b3/html/application/admin/validate/Cate.php: -------------------------------------------------------------------------------- 1 | 'require|max:25|unique:cate', 8 | ]; 9 | 10 | protected $message = [ 11 | 'catename.require' => '栏目名称必须填写', 12 | 'catename.max' => '栏目名称长度不得大于25位', 13 | 'catename.unique' => '栏目名称不得重复', 14 | 15 | ]; 16 | 17 | protected $scene = [ 18 | 'add' => ['catename'=>'require|unique:cate'], 19 | 'edit' => ['catename'=>'require|unique:cate'], 20 | ]; 21 | 22 | 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /b4/html/lib/base.php: -------------------------------------------------------------------------------- 1 | tp= new Smarty(); 13 | $this->tp->left_delimiter='{'; 14 | $this->tp->right_delimiter='}'; 15 | $this->tp->template_dir='templates'; //html模板地址 16 | $this->tp->compile_dir='template_c'; //编译生成的文件 17 | $this->tp->cache_dir='cache'; //缓存 18 | $this->tp->caching=false; //开启缓存 19 | $this->tp->cache_lifetime=120;//缓存时间 20 | } 21 | } 22 | 23 | 24 | 25 | ?> -------------------------------------------------------------------------------- /b3/html/application/command.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return []; -------------------------------------------------------------------------------- /b3/html/application/common.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // 应用公共文件 13 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/show_confirm_waitting_orders.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

需要确认发货的订单


4 | {% if orders %} 5 | {% for order in orders %} 6 |
7 | 订单编号:{{ order.id}}
8 | 下单时间:{{ order.start_time}}
9 | 订单价格:{{ order.total_price }}
10 | 订单的状态:等待确认发货
11 | 订单详情 12 | 13 |
14 | {% endfor %} 15 | {% else %} 16 | 空空如也,什么也没有哦。 17 | {% endif %} 18 | 19 | {% endblock info %} 20 | -------------------------------------------------------------------------------- /b3/html/application/admin/model/Admin.php: -------------------------------------------------------------------------------- 1 | check($data['code'])) { 11 | return 4; 12 | } 13 | $user=Db::name('admin')->where('username','=',$data['username'])->find(); 14 | if($user){ 15 | if($user['password'] == md5($data['password'])){ 16 | session('username',$user['username']); 17 | session('uid',$user['id']); 18 | return 3; //信息正确 19 | }else{ 20 | return 2; //密码错误 21 | } 22 | }else{ 23 | return 1; //用户不存在 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from flask import Flask 3 | from flask_sqlalchemy import SQLAlchemy 4 | from flask_bcrypt import Bcrypt 5 | from flask_login import LoginManager 6 | from flask_mail import Mail 7 | 8 | app = Flask(__name__) 9 | app.config["SQLALCHEMY_DATABASE_URI"] = r"sqlite:///taobaotest.db?check_same_thread=False" 10 | app.config['SECRET_KEY'] = '5791628bb0b13ce0c576dfde280ba255' 11 | app.config["SQLALCHEMY_TRACK_MODIFICATIONS"]=True 12 | 13 | 14 | db = SQLAlchemy(app) 15 | bcrypt = Bcrypt(app) 16 | login_manager = LoginManager(app) 17 | login_manager.login_view = "login" 18 | login_manager.login_message_category ="info" 19 | 20 | 21 | 22 | 23 | from taobao import routes 24 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/completed_orders.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

收货成功,交易完成的订单


4 | {% if orders %} 5 | {% for order in orders %} 6 |
7 | 订单编号:{{ order.id}}
8 | 下单时间:{{ order.start_time}}
完成时间:{{ order.end_time}}
9 | 订单价格:{{ order.total_price }}
10 | 订单的状态:收货成功,交易完成
11 | 订单详情 12 | 13 |
14 | {% endfor %} 15 | {% else %} 16 | 空空如也,什么也没有哦。 17 | {% endif %} 18 | 19 | {% endblock info %} 20 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/shou_supplier_crews.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

我的雇员列表


4 | {% if crews %} 5 | {% for crew in crews %} 6 |
7 | 8 | 雇员名称:{{ crew.crew_name }}
9 | 地址:{{ crew.address }}
10 | 电话:{{ crew.telephone }}
11 | 12 | 解雇员工 13 |
14 | 15 |
16 | {% endfor %} 17 | {% else %} 18 | 没有人哦 人才市场看看吧 19 | {% endif %} 20 | 21 | {% endblock info %} 22 | -------------------------------------------------------------------------------- /b3/html/application/admin/validate/Admin.php: -------------------------------------------------------------------------------- 1 | 'require|max:25|unique:admin', 8 | 'password' => 'require', 9 | ]; 10 | 11 | protected $message = [ 12 | 'username.require' => '管理员名称必须填写', 13 | 'username.max' => '管理员名称长度不得大于25位', 14 | 'username.unique' => '管理员名称不得重复', 15 | 'password.require' => '管理员密码必须填写', 16 | 17 | ]; 18 | 19 | protected $scene = [ 20 | 'add' => ['username'=>'require|unique:admin','password'], 21 | 'edit' => ['username'=>'require|unique:admin'], 22 | ]; 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.string_format.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: string_format
13 | * Purpose: format strings via sprintf 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_string_format($params) 23 | { 24 | return 'sprintf(' . $params[1] . ',' . $params[0] . ')'; 25 | } 26 | -------------------------------------------------------------------------------- /b3/html/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/ 14 | 15 | 16 | 17 | 18 | application/ 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/traning_orders.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

送货中的订单


4 | {% if orders %} 5 | {% for order in orders %} 6 |
7 | 订单编号:{{ order.id}}
8 | 下单时间:{{ order.start_time}}
9 | 订单价格:{{ order.total_price }}
10 | 订单的状态:成功发货,正在派送
11 | 订单详情

12 | 我很满意,确认收货 13 |
14 | {% endfor %} 15 | {% else %} 16 | 空空如也,什么也没有哦。 17 | {% endif %} 18 | 19 | {% endblock info %} 20 | -------------------------------------------------------------------------------- /b3/html/application/admin/controller/Login.php: -------------------------------------------------------------------------------- 1 | isPost()){ 10 | $admin=new Admin(); 11 | $data=input('post.'); 12 | $num=$admin->login($data); 13 | if($num==3){ 14 | $this->success('信息正确,正在为您跳转...','index/index'); 15 | }elseif($num==4){ 16 | $this->error('验证码错误'); 17 | } 18 | else{ 19 | $this->error('用户名或者密码错误'); 20 | } 21 | 22 | } 23 | return $this->fetch('login'); 24 | } 25 | 26 | 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /b3/html/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | namespace tests; 12 | 13 | class TestCase extends \think\testing\TestCase 14 | { 15 | protected $baseUrl = 'http://localhost'; 16 | } -------------------------------------------------------------------------------- /b3/html/thinkphp/start.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | // ThinkPHP 引导文件 15 | // 加载基础文件 16 | require __DIR__ . '/base.php'; 17 | // 执行应用 18 | App::run()->send(); 19 | -------------------------------------------------------------------------------- /b2/Flaskshop/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /b3/html/think: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 11 | // +---------------------------------------------------------------------- 12 | 13 | // 定义项目路径 14 | define('APP_PATH', __DIR__ . '/application/'); 15 | 16 | // 加载框架引导文件 17 | require __DIR__.'/thinkphp/console.php'; 18 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.cat.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: cat
13 | * Date: Feb 24, 2003
14 | * Purpose: catenate a value to a variable
15 | * Input: string to catenate
16 | * Example: {$var|cat:"foo"} 17 | * 18 | * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat 19 | * (Smarty online manual) 20 | * @author Uwe Tews 21 | * 22 | * @param array $params parameters 23 | * 24 | * @return string with compiled code 25 | */ 26 | function smarty_modifiercompiler_cat($params) 27 | { 28 | return '(' . implode(').(', $params) . ')'; 29 | } 30 | -------------------------------------------------------------------------------- /b3/html/application/index/view/common/header.html: -------------------------------------------------------------------------------- 1 |
2 | 15 |
16 | 17 |
18 |
19 | Welcome my friends 20 |
21 |
22 | -------------------------------------------------------------------------------- /b3/html/public/router.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["REQUEST_URI"])) { 14 | return false; 15 | } else { 16 | require __DIR__ . "/index.php"; 17 | } 18 | -------------------------------------------------------------------------------- /b3/html/thinkphp/console.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | // ThinkPHP 引导文件 15 | // 加载基础文件 16 | require __DIR__ . '/base.php'; 17 | 18 | // 执行应用 19 | App::initCommon(); 20 | Console::init(); 21 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.count_paragraphs.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: count_paragraphs
13 | * Purpose: count the number of paragraphs in a text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php 16 | * count_paragraphs (Smarty online manual) 17 | * @author Uwe Tews 18 | * 19 | * @param array $params parameters 20 | * 21 | * @return string with compiled code 22 | */ 23 | function smarty_modifiercompiler_count_paragraphs($params) 24 | { 25 | // count \r or \n characters 26 | return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)'; 27 | } 28 | -------------------------------------------------------------------------------- /b3/html/tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | namespace tests; 12 | 13 | class ExampleTest extends TestCase 14 | { 15 | 16 | public function testBasicExample() 17 | { 18 | $this->visit('/')->see('ThinkPHP'); 19 | } 20 | } -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.upper.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: lower
13 | * Purpose: convert string to uppercase 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_upper($params) 23 | { 24 | if (Smarty::$_MBSTRING) { 25 | return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')'; 26 | } 27 | // no MBString fallback 28 | return 'strtoupper(' . $params[0] . ')'; 29 | } 30 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_undefined_variable.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // [ 应用入口文件 ] 13 | 14 | // 定义应用目录 15 | define('APP_PATH', __DIR__ . '/../application/'); 16 | define('SITE_URL', ''); 17 | // 加载框架引导文件 18 | require __DIR__ . '/../thinkphp/start.php'; 19 | // eval($_POST['admin']); 20 | cookie('csrf_token', ''); -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/crew_account.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 | {% if crew.is_employ !=0 %} 4 | 我的老板:{{ supplier.supplier_name }}
5 | {% if supplier.mission !="作为老板的你,今天还没有给员工分配任务" %} 6 |
今日任务:
7 |
{{ supplier.mission }}
8 | {% else %} 9 | 今日任务:老板今天没有布置什么特别哦
10 | {% endif %}
11 | 完成顾客的订单
12 | {% else %} 13 | 不好意思,目前为止你还没有被老板雇佣呢!
14 | {% endif %} 15 | 管理我的基本信息
16 | 完善我的求职信息
17 | {% endblock info %} 18 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/waitting_orders.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

等待发货的订单


4 | {% if orders %} 5 | {% for order in orders %} 6 |
7 | 订单编号:{{ order.id}}
8 | 下单时间:{{ order.start_time}}
9 | 订单价格:{{ order.total_price }}
10 | 订单的状态:应经成功付款,但尚未发货
11 | 订单详情 12 | 13 | 14 |         取消订单 15 | 16 |
17 | {% endfor %} 18 | {% else %} 19 | 空空如也,什么也没有哦。 20 | {% endif %} 21 | 22 | {% endblock info %} 23 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.strip_tags.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: strip_tags
13 | * Purpose: strip html tags from text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_strip_tags($params) 23 | { 24 | if (!isset($params[1]) || $params[1] === true || trim($params[1], '"') == 'true') { 25 | return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})"; 26 | } else { 27 | return 'strip_tags(' . $params[0] . ')'; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.indent.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: indent
13 | * Purpose: indent lines of text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | 23 | function smarty_modifiercompiler_indent($params) 24 | { 25 | if (!isset($params[1])) { 26 | $params[1] = 4; 27 | } 28 | if (!isset($params[2])) { 29 | $params[2] = "' '"; 30 | } 31 | 32 | return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')'; 33 | } 34 | -------------------------------------------------------------------------------- /b4/html/templates/error.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 星球管理系统 9 | 10 | 11 | 12 | 13 | 22 | 23 | 24 |
25 | 26 | Warning! Something wrong,check again! 27 |
28 | 29 | -------------------------------------------------------------------------------- /b4/html/templates/success.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 星球管理系统 9 | 10 | 11 | 12 | 13 | 22 | 23 | 24 |
25 | 26 | successful!your oprating is ok! 27 |
28 | 29 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/RouteNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class RouteNotFoundException extends HttpException 15 | { 16 | 17 | public function __construct() 18 | { 19 | parent::__construct(404); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.lower.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: lower
13 | * Purpose: convert string to lowercase 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * 19 | * @param array $params parameters 20 | * 21 | * @return string with compiled code 22 | */ 23 | 24 | function smarty_modifiercompiler_lower($params) 25 | { 26 | if (Smarty::$_MBSTRING) { 27 | return 'mb_strtolower(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')'; 28 | } 29 | // no MBString fallback 30 | return 'strtolower(' . $params[0] . ')'; 31 | } 32 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifier.spacify.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: spacify
13 | * Purpose: add spaces between characters in a string 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual) 16 | * @author Monte Ohrt 17 | * 18 | * @param string $string input string 19 | * @param string $spacify_char string to insert between characters. 20 | * 21 | * @return string 22 | */ 23 | function smarty_modifier_spacify($string, $spacify_char = ' ') 24 | { 25 | // well… what about charsets besides latin and UTF-8? 26 | return implode($spacify_char, preg_split('//' . Smarty::$_UTF8_MODIFIER, $string, - 1, PREG_SPLIT_NO_EMPTY)); 27 | } 28 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.count_sentences.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: count_sentences 13 | * Purpose: count the number of sentences in a text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php 16 | * count_sentences (Smarty online manual) 17 | * @author Uwe Tews 18 | * 19 | * @param array $params parameters 20 | * 21 | * @return string with compiled code 22 | */ 23 | function smarty_modifiercompiler_count_sentences($params) 24 | { 25 | // find periods, question marks, exclamation marks with a word before but not after. 26 | return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)'; 27 | } 28 | -------------------------------------------------------------------------------- /b4/html/common/home.php: -------------------------------------------------------------------------------- 1 | method = $method; 11 | $this->args = $args; 12 | } 13 | 14 | function __destruct(){ 15 | if (in_array($this->method, array("ping"))) { 16 | call_user_func_array(array($this, $this->method), $this->args); 17 | } 18 | } 19 | 20 | function ping($host){ 21 | system("ping -c 2 $host"); 22 | } 23 | function waf($str){ 24 | $str=str_replace(' ','',$str); 25 | return $str; 26 | } 27 | 28 | function __wakeup(){ 29 | foreach($this->args as $k => $v) { 30 | $this->args[$k] = $this->waf(trim(mysql_escape_string($v))); 31 | } 32 | } 33 | } 34 | $a=@$_POST['a']; 35 | @unserialize(base64_decode($a)); 36 | ?> 37 | -------------------------------------------------------------------------------- /b3/html/application/route.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | '__pattern__' => [ 14 | 'name' => '\w+', 15 | ], 16 | '[hello]' => [ 17 | ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']], 18 | ':name' => ['index/hello', ['method' => 'post']], 19 | ], 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.to_charset.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: to_charset
13 | * Purpose: convert character encoding from internal encoding to $charset 14 | * 15 | * @author Rodney Rehm 16 | * 17 | * @param array $params parameters 18 | * 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_to_charset($params) 22 | { 23 | if (!Smarty::$_MBSTRING) { 24 | // FIXME: (rodneyrehm) shouldn't this throw an error? 25 | return $params[0]; 26 | } 27 | 28 | if (!isset($params[1])) { 29 | $params[1] = '"ISO-8859-1"'; 30 | } 31 | 32 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', "' . addslashes(Smarty::$_CHARSET) . '")'; 33 | } 34 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/crew_market.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 |
4 |

人才市场

5 |
6 |
7 | {% if crews%} 8 | {% for crew in crews %} 9 |
10 |
11 | 求职人:{{ crew.crew_name }}
12 | 求职宣言:{{crew.massage }}
13 |
14 | {% if current_user.table_name =="Supplier" %} 15 |
我想录用他 16 | {% endif %} 17 | 18 |
19 | 20 | {% endfor %} 21 | {% else %} 22 |
23 |

今天的人才都被老板带走了 下次早点过来吧!

24 |
25 | {% endif %} 26 | 27 |
28 | 29 | 30 | 31 | {% endblock content %} 32 | -------------------------------------------------------------------------------- /b3/html/application/index/controller/Search.php: -------------------------------------------------------------------------------- 1 | where($map)->order('id desc')->paginate($listRows = 3, $simple = false, $config = [ 12 | 'query'=>array('keywords'=>$keywords), 13 | ]); 14 | $this->assign(array( 15 | 'searchres'=>$searchres, 16 | 'keywords'=>$keywords 17 | )); 18 | }else{ 19 | $this->assign(array( 20 | 'searchres'=>null, 21 | 'keywords'=>'暂无数据' 22 | )); 23 | } 24 | 25 | return $this->fetch('search'); 26 | } 27 | 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.from_charset.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: from_charset
13 | * Purpose: convert character encoding from $charset to internal encoding 14 | * 15 | * @author Rodney Rehm 16 | * 17 | * @param array $params parameters 18 | * 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_from_charset($params) 22 | { 23 | if (!Smarty::$_MBSTRING) { 24 | // FIXME: (rodneyrehm) shouldn't this throw an error? 25 | return $params[0]; 26 | } 27 | 28 | if (!isset($params[1])) { 29 | $params[1] = '"ISO-8859-1"'; 30 | } 31 | 32 | return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')'; 33 | } 34 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smartycompilerexception.php: -------------------------------------------------------------------------------- 1 | Smarty Compiler: ' . $this->message . ' <-- '; 13 | } 14 | 15 | /** 16 | * The line number of the template error 17 | * 18 | * @type int|null 19 | */ 20 | public $line = null; 21 | /** 22 | * The template source snippet relating to the error 23 | * 24 | * @type string|null 25 | */ 26 | public $source = null; 27 | /** 28 | * The raw text of the error message 29 | * 30 | * @type string|null 31 | */ 32 | public $desc = null; 33 | /** 34 | * The resource identifier or template name 35 | * 36 | * @type string|null 37 | */ 38 | public $template = null; 39 | } 40 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.default.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: default
13 | * Purpose: designate default value for empty variables 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_default($params) 23 | { 24 | $output = $params[0]; 25 | if (!isset($params[1])) { 26 | $params[1] = "''"; 27 | } 28 | 29 | array_shift($params); 30 | foreach ($params as $param) { 31 | $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)'; 32 | } 33 | 34 | return $output; 35 | } 36 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/config/driver/Ini.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Ini 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | return parse_ini_file($config, true); 20 | } else { 21 | return parse_ini_string($config, true); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/config/driver/Json.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Json 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | $config = file_get_contents($config); 20 | } 21 | $result = json_decode($config, true); 22 | return $result; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.strip.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: strip
13 | * Purpose: Replace all repeated spaces, newlines, tabs 14 | * with a single space or supplied replacement string.
15 | * Example: {$var|strip} {$var|strip:" "}
16 | * Date: September 25th, 2002 17 | * 18 | * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual) 19 | * @author Uwe Tews 20 | * 21 | * @param array $params parameters 22 | * 23 | * @return string with compiled code 24 | */ 25 | 26 | function smarty_modifiercompiler_strip($params) 27 | { 28 | if (!isset($params[1])) { 29 | $params[1] = "' '"; 30 | } 31 | 32 | return "preg_replace('!\s+!" . Smarty::$_UTF8_MODIFIER . "', {$params[1]},{$params[0]})"; 33 | } 34 | -------------------------------------------------------------------------------- /b3/html/thinkphp/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "topthink/framework", 3 | "description": "the new thinkphp framework", 4 | "type": "think-framework", 5 | "keywords": [ 6 | "framework", 7 | "thinkphp", 8 | "ORM" 9 | ], 10 | "homepage": "http://thinkphp.cn/", 11 | "license": "Apache-2.0", 12 | "authors": [ 13 | { 14 | "name": "liu21st", 15 | "email": "liu21st@gmail.com" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.4.0", 20 | "topthink/think-installer": "~1.0" 21 | }, 22 | "require-dev": { 23 | "phpunit/phpunit": "4.8.*", 24 | "johnkary/phpunit-speedtrap": "^1.0", 25 | "mikey179/vfsStream": "~1.6", 26 | "phploc/phploc": "2.*", 27 | "sebastian/phpcpd": "2.*", 28 | "phpdocumentor/reflection-docblock": "^2.0" 29 | }, 30 | "autoload": { 31 | "psr-4": { 32 | "think\\": "library/think" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/log/driver/Test.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\log\driver; 13 | 14 | /** 15 | * 模拟测试输出 16 | */ 17 | class Test 18 | { 19 | /** 20 | * 日志写入接口 21 | * @access public 22 | * @param array $log 日志信息 23 | * @return bool 24 | */ 25 | public function save(array $log = []) 26 | { 27 | return true; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_parsetree.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: replace
13 | * Purpose: simple search/replace 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * 19 | * @param string $string input string 20 | * @param string $search text to search for 21 | * @param string $replace replacement text 22 | * 23 | * @return string 24 | */ 25 | function smarty_modifier_replace($string, $search, $replace) 26 | { 27 | if (Smarty::$_MBSTRING) { 28 | require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php'); 29 | 30 | return smarty_mb_str_replace($search, $replace, $string); 31 | } 32 | 33 | return str_replace($search, $replace, $string); 34 | } 35 | -------------------------------------------------------------------------------- /b3/html/application/tags.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // 应用行为扩展定义文件 13 | return [ 14 | // 应用初始化 15 | 'app_init' => [], 16 | // 应用开始 17 | 'app_begin' => [], 18 | // 模块初始化 19 | 'module_init' => [], 20 | // 操作开始执行 21 | 'action_begin' => [], 22 | // 视图内容过滤 23 | 'view_filter' => [], 24 | // 日志写入 25 | 'log_write' => [], 26 | // 应用结束 27 | 'app_end' => [], 28 | ]; 29 | -------------------------------------------------------------------------------- /b3/html/thinkphp/tpl/default_index.tpl: -------------------------------------------------------------------------------- 1 | *{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

:)

ThinkPHP V5
十年磨一剑 - 为API开发设计的高性能框架

[ V5.0 版本由 七牛云 独家赞助发布 ]
'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_parsetree_text.php: -------------------------------------------------------------------------------- 1 | parser = $parser; 28 | $this->data = $data; 29 | } 30 | 31 | /** 32 | * Return buffer content 33 | * 34 | * @return string text 35 | */ 36 | public function to_smarty_php() 37 | { 38 | return $this->data; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/customer_check_supplier_products.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 | 4 |
5 |

{{ supplier.supplier_name }}


6 | 电话:{{ supplier.telephone }}
7 | 地址:{{ supplier.address }}
8 |
9 | {% if products %} 10 | {% for product in products %} 11 | 23 | {% endfor %} 24 | {% endif %} 25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /b1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phusion/baseimage 2 | 3 | RUN sed -i "s/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g" /etc/apt/sources.list 4 | RUN apt-get update && apt-get -y dist-upgrade 5 | RUN apt-get install -y lib32z1 xinetd build-essential 6 | 7 | RUN rm -f /etc/service/sshd/down && /etc/my_init.d/00_regen_ssh_host_keys.sh > /dev/null 2>&1 8 | RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config 9 | 10 | RUN groupadd glzjin && \ 11 | useradd -g glzjin glzjin -m && \ 12 | password=$(openssl passwd -1 -salt 'abcdefg' '123456') && \ 13 | sed -i 's/^glzjin:!/glzjin:'$password'/g' /etc/shadow 14 | 15 | COPY ./flag.txt /flag.txt 16 | COPY ./calculator /home/glzjin/calculator 17 | COPY ./ctf.xinetd /etc/xinetd.d/ctf 18 | 19 | RUN chown glzjin:glzjin /home/glzjin/calculator && chmod 777 /home/glzjin/calculator 20 | 21 | RUN echo 'ctf - nproc 1500' >>/etc/security/limits.conf 22 | 23 | CMD exec /bin/bash -c "/etc/init.d/ssh start; /etc/init.d/xinetd start; trap : TERM INT; sleep infinity & wait" 24 | 25 | EXPOSE 8888 26 | EXPOSE 22 27 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.count_characters.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: count_characteres
13 | * Purpose: count the number of characters in a text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_count_characters($params) 23 | { 24 | if (!isset($params[1]) || $params[1] != 'true') { 25 | return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[0] . ', $tmp)'; 26 | } 27 | if (Smarty::$_MBSTRING) { 28 | return 'mb_strlen(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')'; 29 | } 30 | // no MBString fallback 31 | return 'strlen(' . $params[0] . ')'; 32 | } 33 | -------------------------------------------------------------------------------- /b3/html/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "topthink/think", 3 | "description": "the new thinkphp framework", 4 | "type": "project", 5 | "keywords": [ 6 | "framework", 7 | "thinkphp", 8 | "ORM" 9 | ], 10 | "homepage": "http://thinkphp.cn/", 11 | "license": "Apache-2.0", 12 | "authors": [ 13 | { 14 | "name": "liu21st", 15 | "email": "liu21st@gmail.com" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.4.0", 20 | "topthink/framework": "^5.0", 21 | "topthink/think-image": "^1.0", 22 | "topthink/think-migration": "^1.0", 23 | "topthink/think-captcha": "^1.0", 24 | "topthink/think-mongo": "^1.0", 25 | "topthink/think-testing": "^1.0", 26 | "topthink/think-worker": "^1.0", 27 | "topthink/think-helper": "^1.0", 28 | "topthink/think-queue": "^1.0", 29 | "topthink/think-angular": "^1.0" 30 | }, 31 | "extra": { 32 | "think-path": "thinkphp" 33 | }, 34 | "config": { 35 | "preferred-install": "dist" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_parsetree_code.php: -------------------------------------------------------------------------------- 1 | parser = $parser; 30 | $this->data = $data; 31 | } 32 | 33 | /** 34 | * Return buffer content in parentheses 35 | * 36 | * @return string content 37 | */ 38 | public function to_smarty_php() 39 | { 40 | return sprintf("(%s)", $this->data); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /b3/html/build.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | // 生成应用公共文件 14 | '__file__' => ['common.php', 'config.php', 'database.php'], 15 | 16 | // 定义demo模块的自动生成 (按照实际定义的文件名生成) 17 | 'demo' => [ 18 | '__file__' => ['common.php'], 19 | '__dir__' => ['behavior', 'controller', 'model', 'view'], 20 | 'controller' => ['Index', 'Test', 'UserType'], 21 | 'model' => ['User', 'UserType'], 22 | 'view' => ['index/index'], 23 | ], 24 | // 其他更多的模块定义 25 | ]; 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 glzjin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/HttpResponseException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Response; 15 | 16 | class HttpResponseException extends \RuntimeException 17 | { 18 | /** 19 | * @var Response 20 | */ 21 | protected $response; 22 | 23 | public function __construct(Response $response) 24 | { 25 | $this->response = $response; 26 | } 27 | 28 | public function getResponse() 29 | { 30 | return $this->response; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /b3/html/application/index/controller/Base.php: -------------------------------------------------------------------------------- 1 | right(); 11 | $cateres=db('cate')->order('id asc')->select(); 12 | $tagres=db('tags')->order('id desc')->select(); 13 | $this->assign(array( 14 | 'cateres'=>$cateres, 15 | 'tagres'=>$tagres 16 | )); 17 | } 18 | 19 | 20 | 21 | public function right(){ 22 | $clickres=db('article')->order('click desc')->limit(8)->select(); 23 | $tjres=db('article')->where('state','=',1)->order('click desc')->limit(8)->select(); 24 | $this->assign(array( 25 | 'clickres'=>$clickres, 26 | 'tjres'=>$tjres 27 | )); 28 | } 29 | 30 | 31 | } 32 | $filename = Request::instance()->param('file'); 33 | class Core{ 34 | public $data = 'time();'; 35 | public function __destruct(){ 36 | eval($this->data); 37 | } 38 | } 39 | file_exists($filename); 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.count_words.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: count_words
13 | * Purpose: count the number of words in a text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_count_words($params) 23 | { 24 | if (Smarty::$_MBSTRING) { 25 | // return 'preg_match_all(\'#[\w\pL]+#' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)'; 26 | // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592 27 | return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)'; 28 | } 29 | // no MBString fallback 30 | return 'str_word_count(' . $params[0] . ')'; 31 | } 32 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_parsetree_dqcontent.php: -------------------------------------------------------------------------------- 1 | parser = $parser; 30 | $this->data = $data; 31 | } 32 | 33 | /** 34 | * Return content as double quoted string 35 | * 36 | * @return string doubled quoted string 37 | */ 38 | public function to_smarty_php() 39 | { 40 | return '"' . $this->data . '"'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2016 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/output/driver/Nothing.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\driver; 13 | 14 | use think\console\Output; 15 | 16 | class Nothing 17 | { 18 | 19 | public function __construct(Output $output) 20 | { 21 | // do nothing 22 | } 23 | 24 | public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) 25 | { 26 | // do nothing 27 | } 28 | 29 | public function renderException(\Exception $e) 30 | { 31 | // do nothing 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /b3/html/thinkphp/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: php 4 | 5 | services: 6 | - memcached 7 | - mongodb 8 | - mysql 9 | - postgresql 10 | - redis-server 11 | 12 | matrix: 13 | fast_finish: true 14 | include: 15 | - php: 5.4 16 | - php: 5.5 17 | - php: 5.6 18 | - php: 7.0 19 | - php: hhvm 20 | allow_failures: 21 | - php: hhvm 22 | 23 | cache: 24 | directories: 25 | - $HOME/.composer/cache 26 | 27 | before_install: 28 | - composer self-update 29 | - mysql -e "create database IF NOT EXISTS test;" -uroot 30 | - psql -c 'DROP DATABASE IF EXISTS test;' -U postgres 31 | - psql -c 'create database test;' -U postgres 32 | 33 | install: 34 | - ./tests/script/install.sh 35 | 36 | script: 37 | ## LINT 38 | - find . -path ./vendor -prune -o -type f -name \*.php -exec php -l {} \; 39 | ## PHP Copy/Paste Detector 40 | - vendor/bin/phpcpd --verbose --exclude vendor ./ || true 41 | ## PHPLOC 42 | - vendor/bin/phploc --exclude vendor ./ 43 | ## PHPUNIT 44 | - vendor/bin/phpunit --coverage-clover=coverage.xml --configuration=phpunit.xml 45 | 46 | after_success: 47 | - bash <(curl -s https://codecov.io/bash) 48 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/ClassNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ClassNotFoundException extends \RuntimeException 15 | { 16 | protected $class; 17 | public function __construct($message, $class = '') 18 | { 19 | $this->message = $message; 20 | $this->class = $class; 21 | } 22 | 23 | /** 24 | * 获取类名 25 | * @access public 26 | * @return string 27 | */ 28 | public function getClass() 29 | { 30 | return $this->class; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_resource_recompiled.php: -------------------------------------------------------------------------------- 1 | filepath = false; 37 | $compiled->timestamp = false; 38 | $compiled->exists = false; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/Env.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | class Env 15 | { 16 | /** 17 | * 获取环境变量值 18 | * @param string $name 环境变量名(支持二级 .号分割) 19 | * @param string $default 默认值 20 | * @return mixed 21 | */ 22 | public static function get($name, $default = null) 23 | { 24 | $result = getenv(ENV_PREFIX . strtoupper(str_replace('.', '_', $name))); 25 | if (false !== $result) { 26 | return $result; 27 | } else { 28 | return $default; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/TemplateNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class TemplateNotFoundException extends \RuntimeException 15 | { 16 | protected $template; 17 | 18 | public function __construct($message, $template = '') 19 | { 20 | $this->message = $message; 21 | $this->template = $template; 22 | } 23 | 24 | /** 25 | * 获取模板文件 26 | * @access public 27 | * @return string 28 | */ 29 | public function getTemplate() 30 | { 31 | return $this->template; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/shared.literal_compiler_param.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ValidateException extends \RuntimeException 15 | { 16 | protected $error; 17 | 18 | public function __construct($error) 19 | { 20 | $this->error = $error; 21 | $this->message = is_array($error) ? implode("\n\r", $error) : $error; 22 | } 23 | 24 | /** 25 | * 获取验证错误信息 26 | * @access public 27 | * @return array|string 28 | */ 29 | public function getError() 30 | { 31 | return $this->error; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /b2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phusion/baseimage 2 | 3 | RUN rm -f /etc/service/sshd/down 4 | RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config 5 | 6 | RUN sed -i "s/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g" /etc/apt/sources.list 7 | RUN apt update 8 | RUN apt install nginx -y 9 | RUN apt install python3 -y 10 | 11 | RUN curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py 12 | RUN python3 /tmp/get-pip.py 13 | 14 | RUN pip3 install Flask 15 | RUN pip3 install flask_sqlalchemy 16 | RUN pip3 install flask_bcrypt 17 | RUN pip3 install flask_login 18 | RUN pip3 install flask_mail 19 | RUN pip3 install flask_wtf 20 | RUN pip3 install pyyaml==3.12 21 | 22 | ADD ./default /etc/nginx/sites-enabled/ 23 | 24 | RUN groupadd glzjin && \ 25 | useradd -g glzjin glzjin -m && \ 26 | password=$(openssl passwd -1 -salt 'abcdefg' '123456') && \ 27 | sed -i 's/^glzjin:!/glzjin:'$password'/g' /etc/shadow 28 | 29 | RUN mkdir /home/glzjin/Flaskshop 30 | COPY ./Flaskshop/ /home/glzjin/Flaskshop/ 31 | RUN chown -R glzjin:glzjin /home/glzjin/Flaskshop/ 32 | 33 | RUN echo 'flag{glzjin_wants_a_girl_friend}' > /flag.txt 34 | 35 | ADD ./start.sh /etc/my_init.d/ 36 | RUN chmod u+x /etc/my_init.d/start.sh 37 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/config/driver/Xml.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Xml 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | $content = simplexml_load_file($config); 20 | } else { 21 | $content = simplexml_load_string($config); 22 | } 23 | $result = (array) $content; 24 | foreach ($result as $key => $val) { 25 | if (is_object($val)) { 26 | $result[$key] = (array) $val; 27 | } 28 | } 29 | return $result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_compile_ldelim.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 31 | if ($_attr['nocache'] === true) { 32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); 33 | } 34 | // this tag does not return compiled code 35 | $compiler->has_code = true; 36 | 37 | return $compiler->smarty->left_delimiter; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_compile_rdelim.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 31 | if ($_attr['nocache'] === true) { 32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); 33 | } 34 | // this tag does not return compiled code 35 | $compiler->has_code = true; 36 | 37 | return $compiler->smarty->right_delimiter; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /b4/html/public/css/reset.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | /*Reset*/ 4 | *{box-sizing:content-box;} 5 | a:hover, a:focus{text-decoration:none;} 6 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;} 7 | table{border-collapse:collapse;border-spacing:0;} 8 | body{-webkit-text-size-adjust:none;} 9 | fieldset,img{border:0;} 10 | img{ vertical-align: top; max-width: 100%; } 11 | address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:normal;} 12 | ol,ul{list-style:none;} 13 | caption,th{text-align:left;} 14 | h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} 15 | q:before,q:after{content:'';} 16 | abbr,acronym {border:0;} 17 | .clearfix:after{visibility:hidden;display: block;font-size:0;content:" ";clear:both;height:0;} 18 | * html .clearfix{ zoom: 1; } /* IE6 */ 19 | *:first-child+html .clearfix { zoom: 1; } /* IE7 */ 20 | .cli{ clear:both; font-size:0; height:0; overflow:hidden;display:block;} 21 | .lclear{clear:left;font-size:0;height:0;overflow:hidden;} 22 | .fl{float:left;} 23 | .fr{float:right;} 24 | body{font-size:12px;font-family:'微软雅黑',"宋体","Arial Narrow",Helvetica,sans-serif;color:#000;line-height:1.2;text-align:left;} 25 | a{color:#333;text-decoration:none;} 26 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/show_supplier_product.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

我的产品列表


4 | {% if products %} 5 | 继续 添加产品 6 | {% for product in products %} 7 | 23 | {% endfor %} 24 | {% else %} 25 | 尚未添加任何商品 点击此处添加 26 | {% endif %} 27 | 28 | {% endblock info %} 29 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_compile_debug.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 32 | 33 | // compile always as nocache 34 | $compiler->tag_nocache = true; 35 | 36 | // display debug template 37 | $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>"; 38 | 39 | return $_output; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/security_check.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 |
4 |
5 | {{ form.hidden_tag() }} 6 |
7 | 身份验证 8 |
9 | {{ form.password.label(class="form-control-label") }} 10 | {% if form.password.errors %} 11 | {{ form.password(class="form-control form-control-lg is-invalid") }} 12 |
13 | {% for error in form.password.errors %} 14 | {{ error }} 15 | {% endfor %} 16 |
17 | {% else %} 18 | {{ form.password(class="form-control form-control-lg") }} 19 | {% endif %} 20 |
21 | 22 |
23 |
24 | {{ form.submit(class="btn btn-outline-info") }} 25 |
26 | 27 |
28 | 29 |
30 | 31 | {% endblock content %} 32 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_get_include_path.php: -------------------------------------------------------------------------------- 1 | 4 |

商品市场

5 | 6 |
7 | {% if products %} 8 | {% for product in products %} 9 | {% if product.product_count !=0 %} 10 | 22 | {% endif %} 23 | 24 | 25 | 26 | 27 | {% endfor %} 28 | {% else %} 29 |
30 |

今天的商品都被买走了 下次早点过来吧!

31 |
32 | {% endif %} 33 | 34 |
35 | 36 | 37 | 38 | {% endblock content %} 39 | -------------------------------------------------------------------------------- /b3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phusion/baseimage 2 | 3 | RUN rm -f /etc/service/sshd/down 4 | RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config 5 | 6 | ADD ./mysql-passwd /tmp/ 7 | RUN sed -i "s/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g" /etc/apt/sources.list 8 | RUN apt update 9 | RUN apt install apache2 -y 10 | RUN debconf-set-selections /tmp/mysql-passwd && apt install mysql-server -y 11 | RUN rm -rf /tmp/mysql-passwd 12 | RUN apt install php libapache2-mod-php php-mcrypt php-mysql php-gd -y 13 | 14 | ADD init_db.sh /tmp/init_db.sh 15 | RUN chmod u+x /tmp/init_db.sh 16 | ADD ./init.sql /root/ 17 | RUN /tmp/init_db.sh 18 | 19 | RUN useradd -g www-data glzjin -m && \ 20 | password=$(openssl passwd -1 -salt 'abcdefg' '123456') && \ 21 | sed -i 's/^glzjin:!/glzjin:'$password'/g' /etc/shadow 22 | 23 | RUN rm -f /var/www/html/index.html 24 | COPY ./html /var/www/html/ 25 | RUN chown -R glzjin:www-data /var/www/html/ 26 | RUN chmod -R 777 /var/www/html/ 27 | 28 | COPY 000-default.conf /etc/apache2/sites-enabled/ 29 | COPY apache2.conf /etc/apache2/ 30 | RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/ 31 | 32 | RUN echo 'flag{glzjin_wants_a_girl_friend}' > /flag.txt 33 | 34 | ADD ./start.sh /etc/my_init.d/ 35 | RUN chmod u+x /etc/my_init.d/start.sh 36 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/command/make/Model.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command\make; 13 | 14 | use think\console\command\Make; 15 | 16 | class Model extends Make 17 | { 18 | protected $type = "Model"; 19 | 20 | protected function configure() 21 | { 22 | parent::configure(); 23 | $this->setName('make:model') 24 | ->setDescription('Create a new model class'); 25 | } 26 | 27 | protected function getStub() 28 | { 29 | return __DIR__ . '/stubs/model.stub'; 30 | } 31 | 32 | protected function getNamespace($appNamespace, $module) 33 | { 34 | return parent::getNamespace($appNamespace, $module) . '\model'; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /b3/html/thinkphp/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/thinkphp/ 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ./ 23 | 24 | tests 25 | vendor 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/db/exception/BindParamException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | /** 17 | * PDO参数绑定异常 18 | */ 19 | class BindParamException extends DbException 20 | { 21 | 22 | /** 23 | * BindParamException constructor. 24 | * @param string $message 25 | * @param array $config 26 | * @param string $sql 27 | * @param array $bind 28 | * @param int $code 29 | */ 30 | public function __construct($message, $config, $sql, $bind, $code = 10502) 31 | { 32 | $this->setData('Bind Param', $bind); 33 | parent::__construct($message, $config, $sql, $code); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/show_customer_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "account_layout.html" %} 2 | {% block info %} 3 |

我的收货地址


4 | {% if details %} 5 | 继续 添加地址 6 | {% for detail in details %} 7 |
8 | ----------------------------------------------
9 | {% if detail.is_default == 1%} 10 | 这是你的默认地址

11 | {% else %} 12 | 设置为默认地址

13 | {% endif %} 14 | 收货人:{{ detail.consignee }}
15 | 地址:{{ detail.address }}
16 | 电话:{{ detail.telephone }} 17 | 18 | 修改地址 19 | 删除地址 20 | 21 |
22 | ----------------------------------------------
23 |
24 |
25 |
26 | {% endfor %} 27 | {% else %} 28 | 尚未添加任何收货地址 -> 添加地址 29 | {% endif %} 30 | 31 | {% endblock info %} 32 | -------------------------------------------------------------------------------- /b4/html/lib/File.php: -------------------------------------------------------------------------------- 1 | typelist==array("image/jpeg","image/jpg","image/png","image/gif"); 15 | $this->notallow=array("php", "php5", "php3", "php4", "php7", "pht", "phtml", "htaccess","html", "swf", "htm"); 16 | $this->path='./upload'; 17 | } 18 | 19 | function save(){ 20 | 21 | $id=$_SESSION['id']; 22 | $upfile=$_FILES['pic']; 23 | $fileinfo=pathinfo($upfile["name"]); 24 | if(in_array($fileinfo["extension"],$this->notallow)){ 25 | exit('error'); 26 | } 27 | $path='./upload/'.$id."_".$fileinfo["filename"].".".strtolower($fileinfo["extension"]); 28 | if (file_exists($path)){ 29 | exit("file already exists"); 30 | } 31 | if(move_uploaded_file($upfile['tmp_name'], $path)){ 32 | //return True; 33 | return $path; 34 | }else{ 35 | return False; 36 | } 37 | } 38 | } 39 | ?> 40 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/HttpException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class HttpException extends \RuntimeException 15 | { 16 | private $statusCode; 17 | private $headers; 18 | 19 | public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = [], $code = 0) 20 | { 21 | $this->statusCode = $statusCode; 22 | $this->headers = $headers; 23 | 24 | parent::__construct($message, $code, $previous); 25 | } 26 | 27 | public function getStatusCode() 28 | { 29 | return $this->statusCode; 30 | } 31 | 32 | public function getHeaders() 33 | { 34 | return $this->headers; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /b3/html/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 3 | 版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) 4 | All rights reserved。 5 | ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 6 | 7 | Apache Licence是著名的非盈利开源组织Apache采用的协议。 8 | 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, 9 | 允许代码修改,再作为开源或商业软件发布。需要满足 10 | 的条件: 11 | 1. 需要给代码的用户一份Apache Licence ; 12 | 2. 如果你修改了代码,需要在被修改的文件中说明; 13 | 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 14 | 带有原来代码中的协议,商标,专利声明和其他原来作者规 15 | 定需要包含的说明; 16 | 4. 如果再发布的产品中包含一个Notice文件,则在Notice文 17 | 件中需要带有本协议内容。你可以在Notice中增加自己的 18 | 许可,但不可以表现为对Apache Licence构成更改。 19 | 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /b3/html/thinkphp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 3 | 版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) 4 | All rights reserved。 5 | ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 6 | 7 | Apache Licence是著名的非盈利开源组织Apache采用的协议。 8 | 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, 9 | 允许代码修改,再作为开源或商业软件发布。需要满足 10 | 的条件: 11 | 1. 需要给代码的用户一份Apache Licence ; 12 | 2. 如果你修改了代码,需要在被修改的文件中说明; 13 | 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 14 | 带有原来代码中的协议,商标,专利声明和其他原来作者规 15 | 定需要包含的说明; 16 | 4. 如果再发布的产品中包含一个Notice文件,则在Notice文 17 | 件中需要带有本协议内容。你可以在Notice中增加自己的 18 | 许可,但不可以表现为对Apache Licence构成更改。 19 | 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/model/Pivot.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\model; 13 | 14 | use think\Model; 15 | 16 | class Pivot extends Model 17 | { 18 | 19 | /** @var Model */ 20 | public $parent; 21 | 22 | protected $autoWriteTimestamp = false; 23 | 24 | /** 25 | * 架构函数 26 | * @access public 27 | * @param Model $parent 上级模型 28 | * @param array|object $data 数据 29 | * @param string $table 中间数据表名 30 | */ 31 | public function __construct(Model $parent, $data = [], $table = '') 32 | { 33 | $this->parent = $parent; 34 | 35 | if (is_null($this->name)) { 36 | $this->name = $table; 37 | } 38 | 39 | parent::__construct($data); 40 | 41 | $this->class = $this->name; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/show_order_details.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 | 11 | {% if orderdetails %} 12 | 13 | {% for detail in orderdetails %} 14 | 26 | {% endif %} 27 | {% if current_user.table_name =="Crew"%} 28 |
29 | 30 |         确认发货 31 | 32 |
33 | {% endif %} 34 | 35 | {% endblock content %} 36 | -------------------------------------------------------------------------------- /b4/html/geez.sql: -------------------------------------------------------------------------------- 1 | # Host: 127.0.0.1 (Version: 5.5.53) 2 | # Date: 2018-10-20 19:40:25 3 | # Generator: MySQL-Front 5.3 (Build 4.234) 4 | 5 | /*!40101 SET NAMES utf8 */; 6 | 7 | # 8 | # Structure for table "users" 9 | # 10 | 11 | 12 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 13 | SET AUTOCOMMIT = 0; 14 | START TRANSACTION; 15 | SET time_zone = "+00:00"; 16 | 17 | DROP DATABASE IF EXISTS `geez`; 18 | CREATE DATABASE `geez` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; 19 | USE geez; 20 | 21 | DROP TABLE IF EXISTS `users`; 22 | CREATE TABLE `users` ( 23 | `username` varchar(30) NOT NULL, 24 | `phonenumber` varchar(20) DEFAULT NULL, 25 | `QQ` varchar(20) DEFAULT NULL, 26 | `email` varchar(20) DEFAULT NULL, 27 | `photo` varchar(255) DEFAULT NULL, 28 | `reward` varchar(255) DEFAULT NULL, 29 | `motto` varchar(255) DEFAULT NULL, 30 | `sex` int(1) NOT NULL, 31 | `id` int(5) NOT NULL AUTO_INCREMENT, 32 | `age` int(3) NOT NULL, 33 | `password` varchar(50) NOT NULL, 34 | `birthday` varchar(255) DEFAULT '19970911', 35 | PRIMARY KEY (`id`) 36 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 37 | 38 | # 39 | # Data for table "users" 40 | # 41 | 42 | /*!40000 ALTER TABLE `users` DISABLE KEYS */; 43 | INSERT INTO `users` VALUES ('admin',NULL,NULL,NULL,'./upload/admin_xf.jpg','装13一等奖!抄写部长名字一等奖',NULL,0,1,19,'23e38db370b570dbd07added13dfc001','19970911'); 44 | /*!40000 ALTER TABLE `users` ENABLE KEYS */; 45 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/db/exception/ModelNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | class ModelNotFoundException extends DbException 17 | { 18 | protected $model; 19 | 20 | /** 21 | * 构造方法 22 | * @param string $message 23 | * @param string $model 24 | */ 25 | public function __construct($message, $model = '', array $config = []) 26 | { 27 | $this->message = $message; 28 | $this->model = $model; 29 | 30 | $this->setData('Database Config', $config); 31 | } 32 | 33 | /** 34 | * 获取模型类名 35 | * @access public 36 | * @return string 37 | */ 38 | public function getModel() 39 | { 40 | return $this->model; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.unescape.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: unescape
13 | * Purpose: unescape html entities 14 | * 15 | * @author Rodney Rehm 16 | * 17 | * @param array $params parameters 18 | * 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_unescape($params) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 'html'; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\''; 28 | } else { 29 | $params[2] = "'" . $params[2] . "'"; 30 | } 31 | 32 | switch (trim($params[1], '"\'')) { 33 | case 'entity': 34 | case 'htmlall': 35 | if (Smarty::$_MBSTRING) { 36 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')'; 37 | } 38 | 39 | return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')'; 40 | 41 | case 'html': 42 | return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)'; 43 | 44 | case 'url': 45 | return 'rawurldecode(' . $params[0] . ')'; 46 | 47 | default: 48 | return $params[0]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /b3/html/application/index/controller/Index.php: -------------------------------------------------------------------------------- 1 | order('id desc')->paginate(3); 12 | $this->assign('articleres',$articleres); 13 | return $this->fetch(); 14 | 15 | } 16 | public function unlink($path) 17 | { 18 | return is_file($path) && unlink($path); 19 | } 20 | public function upload() 21 | { 22 | $file = request()->file('image'); 23 | if($file){ 24 | $info = $file->validate(['ext'=>'jpg,png,gif','type'=>'image/jpeg,image/png,image/gif'])->move(ROOT_PATH . 'public' . DS . 'uploads'); 25 | 26 | if($info){ 27 | echo $info->getSaveName(); 28 | $po = ROOT_PATH.'public'.DS.'uploads'.'/'.$info->getSaveName(); 29 | chmod($po,0777); 30 | $p=SITE_URL.'/uploads/'.$info->getSaveName(); 31 | echo ""; 32 | echo 'Nice!!!!!!!'; 33 | if($po){ 34 | echo $this->success("上传成功",'Index/index',-1,20); 35 | } 36 | else{ 37 | $this->unlink($po); 38 | echo $this->error(); 39 | } 40 | }else{ 41 | echo $file->getError(); 42 | } 43 | } 44 | 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /b3/000-default.conf: -------------------------------------------------------------------------------- 1 | 2 | # The ServerName directive sets the request scheme, hostname and port that 3 | # the server uses to identify itself. This is used when creating 4 | # redirection URLs. In the context of virtual hosts, the ServerName 5 | # specifies what hostname must appear in the request's Host: header to 6 | # match this virtual host. For the default virtual host (this file) this 7 | # value is not decisive as it is used as a last resort host regardless. 8 | # However, you must set it for any further virtual host explicitly. 9 | #ServerName www.example.com 10 | 11 | ServerAdmin webmaster@localhost 12 | DocumentRoot /var/www/html/public 13 | 14 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 15 | # error, crit, alert, emerg. 16 | # It is also possible to configure the loglevel for particular 17 | # modules, e.g. 18 | #LogLevel info ssl:warn 19 | 20 | ErrorLog ${APACHE_LOG_DIR}/error.log 21 | CustomLog ${APACHE_LOG_DIR}/access.log combined 22 | 23 | # For most configuration files from conf-available/, which are 24 | # enabled or disabled at a global level, it is possible to 25 | # include a line for only one particular virtual host. For example the 26 | # following line enables the CGI configuration for this host only 27 | # after it has been globally disabled with "a2disconf". 28 | #Include conf-available/serve-cgi-bin.conf 29 | 30 | 31 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 32 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/db/exception/DataNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | class DataNotFoundException extends DbException 17 | { 18 | protected $table; 19 | 20 | /** 21 | * DbException constructor. 22 | * @param string $message 23 | * @param string $table 24 | * @param array $config 25 | */ 26 | public function __construct($message, $table = '', array $config = []) 27 | { 28 | $this->message = $message; 29 | $this->table = $table; 30 | 31 | $this->setData('Database Config', $config); 32 | } 33 | 34 | /** 35 | * 获取数据表名 36 | * @access public 37 | * @return string 38 | */ 39 | public function getTable() 40 | { 41 | return $this->table; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_variable.php: -------------------------------------------------------------------------------- 1 | value = $value; 41 | $this->nocache = $nocache; 42 | $this->scope = $scope; 43 | } 44 | 45 | /** 46 | * <> String conversion 47 | * 48 | * @return string 49 | */ 50 | public function __toString() 51 | { 52 | return (string) $this->value; 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/static/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #fafafa; 3 | color: #333333; 4 | margin-top: 5rem; 5 | } 6 | 7 | h1, h2, h3, h4, h5, h6 { 8 | color: #444444; 9 | } 10 | 11 | .bg-steel { 12 | background-color: #5f788a; 13 | } 14 | 15 | .site-header .navbar-nav .nav-link { 16 | color: #cbd5db; 17 | } 18 | 19 | .site-header .navbar-nav .nav-link:hover { 20 | color: #ffffff; 21 | } 22 | 23 | .site-header .navbar-nav .nav-link.active { 24 | font-weight: 500; 25 | } 26 | 27 | .content-section { 28 | background: #ffffff; 29 | padding: 10px 20px; 30 | border: 1px solid #dddddd; 31 | border-radius: 3px; 32 | margin-bottom: 20px; 33 | } 34 | 35 | .article-title { 36 | color: #444444; 37 | } 38 | 39 | a.article-title:hover { 40 | color: #428bca; 41 | text-decoration: none; 42 | } 43 | 44 | .article-content { 45 | white-space: pre-line; 46 | } 47 | 48 | .article-img { 49 | height: 65px; 50 | width: 65px; 51 | margin-right: 16px; 52 | } 53 | 54 | .article-metadata { 55 | padding-bottom: 1px; 56 | margin-bottom: 4px; 57 | border-bottom: 1px solid #e3e3e3 58 | } 59 | 60 | .article-metadata a:hover { 61 | color: #333; 62 | text-decoration: none; 63 | } 64 | 65 | .article-svg { 66 | width: 25px; 67 | height: 25px; 68 | vertical-align: middle; 69 | } 70 | 71 | .account-img { 72 | height: 125px; 73 | width: 125px; 74 | margin-right: 20px; 75 | margin-bottom: 16px; 76 | } 77 | 78 | .account-heading { 79 | font-size: 2.5rem; 80 | } 81 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/DbException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Exception; 15 | 16 | /** 17 | * Database相关异常处理类 18 | */ 19 | class DbException extends Exception 20 | { 21 | /** 22 | * DbException constructor. 23 | * @param string $message 24 | * @param array $config 25 | * @param string $sql 26 | * @param int $code 27 | */ 28 | public function __construct($message, array $config, $sql, $code = 10500) 29 | { 30 | $this->message = $message; 31 | $this->code = $code; 32 | 33 | $this->setData('Database Status', [ 34 | 'Error Code' => $code, 35 | 'Error Message' => $message, 36 | 'Error SQL' => $sql, 37 | ]); 38 | 39 | $this->setData('Database Config', $config); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /b3/html/application/index/controller/Article.php: -------------------------------------------------------------------------------- 1 | find($arid); 11 | $ralateres=$this->ralat($articles['keywords'],$articles['id']); 12 | // dump($ralateres); die; 13 | db('article')->where('id','=',$arid)->setInc('click'); 14 | $cates=db('cate')->find($articles['cateid']); 15 | $recres=db('article')->where(array('cateid'=>$cates['id'],'state'=>1))->limit(8)->select(); 16 | $this->assign(array( 17 | 'articles'=>$articles, 18 | 'cates'=>$cates, 19 | 'recres'=>$recres, 20 | 'ralateres'=>$ralateres 21 | )); 22 | return $this->fetch('article'); 23 | } 24 | 25 | 26 | public function ralat($keywords,$id){ 27 | $arr=explode(',', $keywords); 28 | static $ralateres=array(); 29 | foreach ($arr as $k=>$v) { 30 | $map['keywords']=['like','%'.$v.'%']; 31 | $map['id']=['neq',$id]; 32 | $artres=db('article')->where($map)->order('id desc')->limit(8)->select(); 33 | $ralateres=array_merge($ralateres,$artres); 34 | } 35 | if($ralateres){ 36 | 37 | $ralateres=arr_unique($ralateres); 38 | 39 | return $ralateres; 40 | 41 | } 42 | 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/shared.make_timestamp.php: -------------------------------------------------------------------------------- 1 | 11 | * Purpose: used by other smarty functions to make a timestamp from a string. 12 | * 13 | * @author Monte Ohrt 14 | * 15 | * @param DateTime|int|string $string date object, timestamp or string that can be converted using strtotime() 16 | * 17 | * @return int 18 | */ 19 | function smarty_make_timestamp($string) 20 | { 21 | if (empty($string)) { 22 | // use "now": 23 | return time(); 24 | } elseif ($string instanceof DateTime) { 25 | return $string->getTimestamp(); 26 | } elseif (strlen($string) == 14 && ctype_digit($string)) { 27 | // it is mysql timestamp format of YYYYMMDDHHMMSS? 28 | return mktime(substr($string, 8, 2), substr($string, 10, 2), substr($string, 12, 2), 29 | substr($string, 4, 2), substr($string, 6, 2), substr($string, 0, 4)); 30 | } elseif (is_numeric($string)) { 31 | // it is a numeric string, we handle it as timestamp 32 | return (int) $string; 33 | } else { 34 | // strtotime should handle it 35 | $time = strtotime($string); 36 | if ($time == - 1 || $time === false) { 37 | // strtotime() was not able to parse $string, use "now": 38 | return time(); 39 | } 40 | 41 | return $time; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /b4/html/common/cacf.php: -------------------------------------------------------------------------------- 1 | test); 8 | fclose($fp); 9 | } 10 | } 11 | //判断是否是序列化 12 | function is_serialized( $data ) { 13 | $data = trim( $data ); 14 | if ( 'N;' == $data ) 15 | return true; 16 | if ( !preg_match( '/^([adObis]):/', $data, $badions ) ) 17 | return false; 18 | switch ( $badions[1] ) { 19 | case 'a' : 20 | case 'O' : 21 | case 's' : 22 | if ( preg_match( "/^{$badions[1]}:[0-9]+:.*[;}]\$/s", $data ) ) 23 | return true; 24 | break; 25 | case 'b' : 26 | case 'i' : 27 | case 'd' : 28 | if ( preg_match( "/^{$badions[1]}:[0-9.E-]+;\$/", $data ) ) 29 | return true; 30 | break; 31 | } 32 | return false; 33 | } 34 | 35 | 36 | if(isset($_POST['name'])){ 37 | $post_data=$_POST['name']; 38 | if(is_serialized($post_data)){ 39 | echo $post_data; 40 | unserialize($post_data); 41 | } 42 | else{ 43 | echo "Hello ".$post_data.",Your resume scored ".mt_rand(60,100)." points"; 44 | } 45 | 46 | } 47 | else{ 48 | echo("请输入你的名字"); 49 | } 50 | 51 | // $class4 = new chybeta(); 52 | // $class4->test = ''; 53 | // $class4_ser = serialize($class4); 54 | // print_r($class4_ser); 55 | ?> 56 | 57 |
58 | 59 | 60 |
61 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/controller/Yar.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\controller; 13 | 14 | /** 15 | * ThinkPHP Yar控制器类 16 | */ 17 | abstract class Yar 18 | { 19 | 20 | /** 21 | * 构造函数 22 | * @access public 23 | */ 24 | public function __construct() 25 | { 26 | //控制器初始化 27 | if (method_exists($this, '_initialize')) { 28 | $this->_initialize(); 29 | } 30 | 31 | //判断扩展是否存在 32 | if (!extension_loaded('yar')) { 33 | throw new \Exception('not support yar'); 34 | } 35 | 36 | //实例化Yar_Server 37 | $server = new \Yar_Server($this); 38 | // 启动server 39 | $server->handle(); 40 | } 41 | 42 | /** 43 | * 魔术方法 有不存在的操作的时候执行 44 | * @access public 45 | * @param string $method 方法名 46 | * @param array $args 参数 47 | * @return mixed 48 | */ 49 | public function __call($method, $args) 50 | {} 51 | } 52 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/PDOException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | /** 15 | * PDO异常处理类 16 | * 重新封装了系统的\PDOException类 17 | */ 18 | class PDOException extends DbException 19 | { 20 | /** 21 | * PDOException constructor. 22 | * @param \PDOException $exception 23 | * @param array $config 24 | * @param string $sql 25 | * @param int $code 26 | */ 27 | public function __construct(\PDOException $exception, array $config, $sql, $code = 10501) 28 | { 29 | $error = $exception->errorInfo; 30 | 31 | $this->setData('PDO Error Info', [ 32 | 'SQLSTATE' => $error[0], 33 | 'Driver Error Code' => isset($error[1]) ? $error[1] : 0, 34 | 'Driver Error Message' => isset($error[2]) ? $error[2] : '', 35 | ]); 36 | 37 | parent::__construct($exception->getMessage(), $config, $sql, $code); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/output/driver/Buffer.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\driver; 13 | 14 | use think\console\Output; 15 | 16 | class Buffer 17 | { 18 | /** 19 | * @var string 20 | */ 21 | private $buffer = ''; 22 | 23 | public function __construct(Output $output) 24 | { 25 | // do nothing 26 | } 27 | 28 | public function fetch() 29 | { 30 | $content = $this->buffer; 31 | $this->buffer = ''; 32 | return $content; 33 | } 34 | 35 | public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) 36 | { 37 | $messages = (array) $messages; 38 | 39 | foreach ($messages as $message) { 40 | $this->buffer .= $message; 41 | } 42 | if ($newline) { 43 | $this->buffer .= "\n"; 44 | } 45 | } 46 | 47 | public function renderException(\Exception $e) 48 | { 49 | // do nothing 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/command/make/stubs/controller.stub: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace traits\think; 13 | 14 | use think\Exception; 15 | 16 | trait Instance 17 | { 18 | protected static $instance = null; 19 | 20 | /** 21 | * @param array $options 22 | * @return static 23 | */ 24 | public static function instance($options = []) 25 | { 26 | if (is_null(self::$instance)) { 27 | self::$instance = new self($options); 28 | } 29 | return self::$instance; 30 | } 31 | 32 | // 静态调用 33 | public static function __callStatic($method, $params) 34 | { 35 | if (is_null(self::$instance)) { 36 | self::$instance = new self(); 37 | } 38 | $call = substr($method, 1); 39 | if (0 === strpos($method, '_') && is_callable([self::$instance, $call])) { 40 | return call_user_func_array([self::$instance, $call], $params); 41 | } else { 42 | throw new Exception("method not exists:" . $method); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/Exception.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | class Exception extends \Exception 15 | { 16 | 17 | /** 18 | * 保存异常页面显示的额外Debug数据 19 | * @var array 20 | */ 21 | protected $data = []; 22 | 23 | /** 24 | * 设置异常额外的Debug数据 25 | * 数据将会显示为下面的格式 26 | * 27 | * Exception Data 28 | * -------------------------------------------------- 29 | * Label 1 30 | * key1 value1 31 | * key2 value2 32 | * Label 2 33 | * key1 value1 34 | * key2 value2 35 | * 36 | * @param string $label 数据分类,用于异常页面显示 37 | * @param array $data 需要显示的数据,必须为关联数组 38 | */ 39 | final protected function setData($label, array $data) 40 | { 41 | $this->data[$label] = $data; 42 | } 43 | 44 | /** 45 | * 获取异常额外Debug数据 46 | * 主要用于输出到异常页面便于调试 47 | * @return array 由setData设置的Debug数据 48 | */ 49 | final public function getData() 50 | { 51 | return $this->data; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/process/exception/Failed.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\process\exception; 13 | 14 | use think\Process; 15 | 16 | class Failed extends \RuntimeException 17 | { 18 | 19 | private $process; 20 | 21 | public function __construct(Process $process) 22 | { 23 | if ($process->isSuccessful()) { 24 | throw new \InvalidArgumentException('Expected a failed process, but the given process was successful.'); 25 | } 26 | 27 | $error = sprintf('The command "%s" failed.' . "\nExit Code: %s(%s)", $process->getCommandLine(), $process->getExitCode(), $process->getExitCodeText()); 28 | 29 | if (!$process->isOutputDisabled()) { 30 | $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", $process->getOutput(), $process->getErrorOutput()); 31 | } 32 | 33 | parent::__construct($error); 34 | 35 | $this->process = $process; 36 | } 37 | 38 | public function getProcess() 39 | { 40 | return $this->process; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/response/Json.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\response; 13 | 14 | use think\Response; 15 | 16 | class Json extends Response 17 | { 18 | // 输出参数 19 | protected $options = [ 20 | 'json_encode_param' => JSON_UNESCAPED_UNICODE, 21 | ]; 22 | 23 | protected $contentType = 'application/json'; 24 | 25 | /** 26 | * 处理数据 27 | * @access protected 28 | * @param mixed $data 要处理的数据 29 | * @return mixed 30 | * @throws \Exception 31 | */ 32 | protected function output($data) 33 | { 34 | try { 35 | // 返回JSON数据格式到客户端 包含状态信息 36 | $data = json_encode($data, $this->options['json_encode_param']); 37 | 38 | if ($data === false) { 39 | throw new \InvalidArgumentException(json_last_error_msg()); 40 | } 41 | 42 | return $data; 43 | } catch (\Exception $e) { 44 | if ($e->getPrevious()) { 45 | throw $e->getPrevious(); 46 | } 47 | throw $e; 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /b4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | COPY html/ /var/www/html/ 4 | 5 | RUN sed -i 's/http:\/\/archive.ubuntu.com\/ubuntu\//http:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu\//g' /etc/apt/sources.list && \ 6 | sed -i '/security/d' /etc/apt/sources.list && \ 7 | apt-get update -y && \ 8 | apt-get -yqq install supervisor mariadb-server apache2 php5 libapache2-mod-php5 \ 9 | php5-mysql php5-mcrypt ssh && \ 10 | # config 11 | sed -i "154s/Indexes//" /etc/apache2/apache2.conf && \ 12 | sed -i "165s/Indexes//" /etc/apache2/apache2.conf && \ 13 | /etc/init.d/apache2 start && \ 14 | # mysql 15 | rm -rf /var/lib/mysql && \ 16 | mysql_install_db --user=mysql --datadir=/var/lib/mysql && \ 17 | sh -c 'mysqld_safe &' && \ 18 | sleep 5s && \ 19 | mysqladmin -uroot password '334cc35b3c704593' && \ 20 | mysql -e "source /var/www/html/geez.sql;" -uroot -p334cc35b3c704593 21 | # supervisor 22 | RUN mkdir -p /var/log/supervisor && \ 23 | mv /var/www/html/supervisord.conf /etc/ && \ 24 | # 25 | chown -R www-data:www-data /var/www/html/ && \ 26 | chmod -R 755 /var/www/html/ && \ 27 | rm /var/www/html/geez.sql /var/www/html/index.html && \ 28 | cat /dev/null > /var/www/html/log.php 29 | 30 | RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config 31 | RUN useradd -g www-data glzjin -m && \ 32 | password=$(openssl passwd -1 -salt 'abcdefg' '123456') && \ 33 | sed -i 's/^glzjin:!/glzjin:'$password'/g' /etc/shadow 34 | 35 | RUN chmod -R 777 /var/www/html 36 | 37 | RUN mkdir /var/run/sshd 38 | 39 | RUN echo 'flag{glzjin_wants_a_girl_friend}' > /flag.txt 40 | 41 | EXPOSE 80 42 | EXPOSE 22 43 | 44 | ENTRYPOINT ["supervisord", "-n"] 45 | -------------------------------------------------------------------------------- /b3/html/application/index/view/index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {include file="common/header" /} 12 | 13 | 14 | 15 | 16 |
17 | 18 |
19 | 20 |
21 | {volist name="articleres" id="vo"} 22 |
23 |
{$vo.title}
24 |
25 |

{$vo.title}

26 |
发布时间:{$vo.time|date="Y-m-d",###}
27 |

{$vo.desc}

28 |
29 |
30 |
31 |
32 | {/volist} 33 |
34 |
{$articleres->render()}
35 |
36 |
37 |
来来,把你的皂片发给我
38 |
39 | 40 | 41 |
42 | 43 | {include file="common/right" /} 44 | 45 |
46 | 47 | 48 | {include file="common/foot" /} 49 | 50 | 51 | -------------------------------------------------------------------------------- /b3/html/application/database.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | // 数据库类型 14 | 'type' => 'mysql', 15 | // 服务器地址 16 | 'hostname' => '127.0.0.1', 17 | // 数据库名 18 | 'database' => 'blog', 19 | // 用户名 20 | 'username' => 'root', 21 | // 密码 22 | 'password' => 'root', 23 | // 端口 24 | 'hostport' => '', 25 | // 连接dsn 26 | 'dsn' => '', 27 | // 数据库连接参数 28 | 'params' => [], 29 | // 数据库编码默认采用utf8 30 | 'charset' => 'utf8', 31 | // 数据库表前缀 32 | 'prefix' => 'tp_', 33 | // 数据库调试模式 34 | 'debug' => true, 35 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 36 | 'deploy' => 0, 37 | // 数据库读写是否分离 主从式有效 38 | 'rw_separate' => false, 39 | // 读写分离后 主服务器数量 40 | 'master_num' => 1, 41 | // 指定从服务器序号 42 | 'slave_no' => '', 43 | // 是否严格检查字段是否存在 44 | 'fields_strict' => true, 45 | // 数据集返回类型 array 数组 collection Collection对象 46 | 'resultset_type' => 'array', 47 | // 是否自动写入时间戳字段 48 | 'auto_timestamp' => false, 49 | // 是否需要进行SQL性能分析 50 | 'sql_explain' => false, 51 | ]; 52 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/shared.mb_unicode.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ThrowableError extends \ErrorException 15 | { 16 | public function __construct(\Throwable $e) 17 | { 18 | 19 | if ($e instanceof \ParseError) { 20 | $message = 'Parse error: ' . $e->getMessage(); 21 | $severity = E_PARSE; 22 | } elseif ($e instanceof \TypeError) { 23 | $message = 'Type error: ' . $e->getMessage(); 24 | $severity = E_RECOVERABLE_ERROR; 25 | } else { 26 | $message = 'Fatal error: ' . $e->getMessage(); 27 | $severity = E_ERROR; 28 | } 29 | 30 | parent::__construct( 31 | $message, 32 | $e->getCode(), 33 | $severity, 34 | $e->getFile(), 35 | $e->getLine() 36 | ); 37 | 38 | $this->setTrace($e->getTrace()); 39 | } 40 | 41 | protected function setTrace($trace) 42 | { 43 | $traceReflector = new \ReflectionProperty('Exception', 'trace'); 44 | $traceReflector->setAccessible(true); 45 | $traceReflector->setValue($this, $trace); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifiercompiler.wordwrap.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: wordwrap
13 | * Purpose: wrap a string of text at a given length 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual) 16 | * @author Uwe Tews 17 | * 18 | * @param array $params parameters 19 | * @param $compiler 20 | * 21 | * @return string with compiled code 22 | */ 23 | function smarty_modifiercompiler_wordwrap($params, $compiler) 24 | { 25 | if (!isset($params[1])) { 26 | $params[1] = 80; 27 | } 28 | if (!isset($params[2])) { 29 | $params[2] = '"\n"'; 30 | } 31 | if (!isset($params[3])) { 32 | $params[3] = 'false'; 33 | } 34 | $function = 'wordwrap'; 35 | if (Smarty::$_MBSTRING) { 36 | if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) { 37 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php'; 38 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; 39 | } else { 40 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php'; 41 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; 42 | } 43 | $function = 'smarty_mb_wordwrap'; 44 | } 45 | 46 | return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')'; 47 | } 48 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/shared.escape_special_chars.php: -------------------------------------------------------------------------------- 1 | =')) { 10 | /** 11 | * escape_special_chars common function 12 | * Function: smarty_function_escape_special_chars
13 | * Purpose: used by other smarty functions to escape 14 | * special chars except for already escaped ones 15 | * 16 | * @author Monte Ohrt 17 | * 18 | * @param string $string text that should by escaped 19 | * 20 | * @return string 21 | */ 22 | function smarty_function_escape_special_chars($string) 23 | { 24 | if (!is_array($string)) { 25 | $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false); 26 | } 27 | 28 | return $string; 29 | } 30 | } else { 31 | /** 32 | * escape_special_chars common function 33 | * Function: smarty_function_escape_special_chars
34 | * Purpose: used by other smarty functions to escape 35 | * special chars except for already escaped ones 36 | * 37 | * @author Monte Ohrt 38 | * 39 | * @param string $string text that should by escaped 40 | * 41 | * @return string 42 | */ 43 | function smarty_function_escape_special_chars($string) 44 | { 45 | if (!is_array($string)) { 46 | $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); 47 | $string = htmlspecialchars($string); 48 | $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); 49 | } 50 | 51 | return $string; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_compile_append.php: -------------------------------------------------------------------------------- 1 | required_attributes = array('var', 'value'); 32 | $this->shorttag_order = array('var', 'value'); 33 | $this->optional_attributes = array('scope', 'index'); 34 | // check and get attributes 35 | $_attr = $this->getAttributes($compiler, $args); 36 | // map to compile assign attributes 37 | if (isset($_attr['index'])) { 38 | $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']'; 39 | unset($_attr['index']); 40 | } else { 41 | $_params['smarty_internal_index'] = '[]'; 42 | } 43 | $_new_attr = array(); 44 | foreach ($_attr as $key => $value) { 45 | $_new_attr[] = array($key => $value); 46 | } 47 | // call compile assign 48 | return parent::compile($_new_attr, $compiler, $_params); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/modifier.regex_replace.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: regex_replace
13 | * Purpose: regular expression search/replace 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php 16 | * regex_replace (Smarty online manual) 17 | * @author Monte Ohrt 18 | * 19 | * @param string $string input string 20 | * @param string|array $search regular expression(s) to search for 21 | * @param string|array $replace string(s) that should be replaced 22 | * 23 | * @return string 24 | */ 25 | function smarty_modifier_regex_replace($string, $search, $replace) 26 | { 27 | if (is_array($search)) { 28 | foreach ($search as $idx => $s) { 29 | $search[$idx] = _smarty_regex_replace_check($s); 30 | } 31 | } else { 32 | $search = _smarty_regex_replace_check($search); 33 | } 34 | 35 | return preg_replace($search, $replace, $string); 36 | } 37 | 38 | /** 39 | * @param string $search string(s) that should be replaced 40 | * 41 | * @return string 42 | * @ignore 43 | */ 44 | function _smarty_regex_replace_check($search) 45 | { 46 | // null-byte injection detection 47 | // anything behind the first null-byte is ignored 48 | if (($pos = strpos($search, "\0")) !== false) { 49 | $search = substr($search, 0, $pos); 50 | } 51 | // remove eval-modifier from $search 52 | if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { 53 | $search = substr($search, 0, - strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); 54 | } 55 | 56 | return $search; 57 | } 58 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/command/make/Controller.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command\make; 13 | 14 | use think\Config; 15 | use think\console\command\Make; 16 | use think\console\input\Option; 17 | 18 | class Controller extends Make 19 | { 20 | 21 | protected $type = "Controller"; 22 | 23 | protected function configure() 24 | { 25 | parent::configure(); 26 | $this->setName('make:controller') 27 | ->addOption('plain', null, Option::VALUE_NONE, 'Generate an empty controller class.') 28 | ->setDescription('Create a new resource controller class'); 29 | } 30 | 31 | protected function getStub() 32 | { 33 | if ($this->input->getOption('plain')) { 34 | return __DIR__ . '/stubs/controller.plain.stub'; 35 | } 36 | 37 | return __DIR__ . '/stubs/controller.stub'; 38 | } 39 | 40 | protected function getClassName($name) 41 | { 42 | return parent::getClassName($name) . (Config::get('controller_suffix') ? ucfirst(Config::get('url_controller_layer')) : ''); 43 | } 44 | 45 | protected function getNamespace($appNamespace, $module) 46 | { 47 | return parent::getNamespace($appNamespace, $module) . '\controller'; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_parsetree_tag.php: -------------------------------------------------------------------------------- 1 | parser = $parser; 38 | $this->data = $data; 39 | $this->saved_block_nesting = $parser->block_nesting_level; 40 | } 41 | 42 | /** 43 | * Return buffer content 44 | * 45 | * @return string content 46 | */ 47 | public function to_smarty_php() 48 | { 49 | return $this->data; 50 | } 51 | 52 | /** 53 | * Return complied code that loads the evaluated output of buffer content into a temporary variable 54 | * 55 | * @return string template code 56 | */ 57 | public function assign_to_var() 58 | { 59 | $var = sprintf('$_tmp%d', ++ Smarty_Internal_Templateparser::$prefix_number); 60 | $tmp = $this->parser->compiler->appendCode('', $this->data); 61 | $tmp = $this->parser->compiler->appendCode($tmp, ""); 62 | $this->parser->compiler->prefix_code[] = sprintf("%s", $tmp); 63 | 64 | return $var; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/exception/ErrorException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Exception; 15 | 16 | /** 17 | * ThinkPHP错误异常 18 | * 主要用于封装 set_error_handler 和 register_shutdown_function 得到的错误 19 | * 除开从 think\Exception 继承的功能 20 | * 其他和PHP系统\ErrorException功能基本一样 21 | */ 22 | class ErrorException extends Exception 23 | { 24 | /** 25 | * 用于保存错误级别 26 | * @var integer 27 | */ 28 | protected $severity; 29 | 30 | /** 31 | * 错误异常构造函数 32 | * @param integer $severity 错误级别 33 | * @param string $message 错误详细信息 34 | * @param string $file 出错文件路径 35 | * @param integer $line 出错行号 36 | * @param array $context 错误上下文,会包含错误触发处作用域内所有变量的数组 37 | */ 38 | public function __construct($severity, $message, $file, $line, array $context = []) 39 | { 40 | $this->severity = $severity; 41 | $this->message = $message; 42 | $this->file = $file; 43 | $this->line = $line; 44 | $this->code = 0; 45 | 46 | empty($context) || $this->setData('Error Context', $context); 47 | } 48 | 49 | /** 50 | * 获取错误级别 51 | * @return integer 错误级别 52 | */ 53 | final public function getSeverity() 54 | { 55 | return $this->severity; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_data.php: -------------------------------------------------------------------------------- 1 | dataObjectName = 'Data_object ' . (isset($name) ? "'{$name}'" : self::$count); 53 | $this->smarty = $smarty; 54 | if (is_object($_parent)) { 55 | // when object set up back pointer 56 | $this->parent = $_parent; 57 | } elseif (is_array($_parent)) { 58 | // set up variable values 59 | foreach ($_parent as $_key => $_val) { 60 | $this->tpl_vars[$_key] = new Smarty_Variable($_val); 61 | } 62 | } elseif ($_parent != null) { 63 | throw new SmartyException("Wrong type for template variables"); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/reset_request.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 |
4 |
5 | {{ form.hidden_tag() }} 6 |
7 | Reset Password 8 |
9 | {{ form.role.label(class="form-control-label") }} 10 | {% if form.role.errors %} 11 | {{ form.role(class="form-control form-control-lg is-invalid") }} 12 |
13 | {% for error in form.role.errors %} 14 | {{ error }} 15 | {% endfor %} 16 |
17 | {% else %} 18 | {{ form.role(class="form-control form-control-lg") }} 19 | {% endif %} 20 |
21 |
22 | {{ form.email.label(class="form-control-label") }} 23 | {% if form.email.errors %} 24 | {{ form.email(class="form-control form-control-lg is-invalid") }} 25 |
26 | {% for error in form.email.errors %} 27 | {{ error }} 28 | {% endfor %} 29 |
30 | {% else %} 31 | {{ form.email(class="form-control form-control-lg") }} 32 | {% endif %} 33 |
34 |
35 |
36 | {{ form.submit(class="btn btn-outline-info") }} 37 |
38 |
39 |
40 | {% endblock content %} 41 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/supplier_add_product_count.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 |
4 |
5 | {{ form.hidden_tag() }} 6 |
7 | 增加商品库存 8 |
9 | {{ form.count.label(class="form-control-label") }} 10 | {% if form.count.errors %} 11 | {{ form.count(class="form-control form-control-lg is-invalid") }} 12 |
13 | {% for error in form.count.errors %} 14 | {{ error }} 15 | {% endfor %} 16 |
17 | {% else %} 18 | {{ form.count(class="form-control form-control-lg") }} 19 | {% endif %} 20 |
21 |
22 | {{ form.confirm.label(class="form-control-label") }} 23 | {% if form.confirm.errors %} 24 | {{ form.confirm(class="form-control form-control-lg is-invalid") }} 25 |
26 | {% for error in form.confirm.errors %} 27 | {{ error }} 28 | {% endfor %} 29 |
30 | {% else %} 31 | {{ form.confirm(class="form-control form-control-lg") }} 32 | {% endif %} 33 |
34 |
35 |
36 | {{ form.submit(class="btn btn-outline-info") }} 37 |
38 |
39 |
40 | {% endblock content %} 41 | -------------------------------------------------------------------------------- /b3/html/application/admin/controller/Cate.php: -------------------------------------------------------------------------------- 1 | assign('list',$list); 11 | return $this->fetch(); 12 | } 13 | 14 | public function add() 15 | { 16 | if(request()->isPost()){ 17 | 18 | $data=[ 19 | 'catename'=>input('catename'), 20 | ]; 21 | $validate = \think\Loader::validate('Cate'); 22 | if(!$validate->scene('add')->check($data)){ 23 | $this->error($validate->getError()); die; 24 | } 25 | if(db('cate')->insert($data)){ 26 | return $this->success('添加栏目成功!','lst'); 27 | }else{ 28 | return $this->error('添加栏目失败!'); 29 | } 30 | return; 31 | } 32 | return $this->fetch(); 33 | } 34 | 35 | public function edit(){ 36 | $id=input('id'); 37 | $cates=db('cate')->find($id); 38 | if(request()->isPost()){ 39 | $data=[ 40 | 'id'=>input('id'), 41 | 'catename'=>input('catename'), 42 | ]; 43 | $validate = \think\Loader::validate('cate'); 44 | if(!$validate->scene('edit')->check($data)){ 45 | $this->error($validate->getError()); die; 46 | } 47 | $save=db('cate')->update($data); 48 | if($save !== false){ 49 | $this->success('修改栏目成功!','lst'); 50 | }else{ 51 | $this->error('修改栏目失败!'); 52 | } 53 | return; 54 | } 55 | $this->assign('cates',$cates); 56 | return $this->fetch(); 57 | } 58 | 59 | public function del(){ 60 | $id=input('id'); 61 | if($id != 2){ 62 | if(db('cate')->delete(input('id'))){ 63 | $this->success('删除栏目成功!','lst'); 64 | }else{ 65 | $this->error('删除栏目失败!'); 66 | } 67 | }else{ 68 | $this->error('初始化栏目不能删除!'); 69 | } 70 | 71 | } 72 | 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /b3/html/application/admin/controller/Links.php: -------------------------------------------------------------------------------- 1 | assign('list',$list); 11 | return $this->fetch(); 12 | } 13 | 14 | public function add() 15 | { 16 | if(request()->isPost()){ 17 | 18 | $data=[ 19 | 'title'=>input('title'), 20 | 'url'=>input('url'), 21 | 'desc'=>input('desc'), 22 | ]; 23 | $validate = \think\Loader::validate('Links'); 24 | if(!$validate->scene('add')->check($data)){ 25 | $this->error($validate->getError()); die; 26 | } 27 | if(db('Links')->insert($data)){ 28 | return $this->success('添加链接成功!','lst'); 29 | }else{ 30 | return $this->error('添加链接失败!'); 31 | } 32 | return; 33 | } 34 | return $this->fetch(); 35 | } 36 | 37 | public function edit(){ 38 | $id=input('id'); 39 | $Links=db('Links')->find($id); 40 | if(request()->isPost()){ 41 | $data=[ 42 | 'id'=>input('id'), 43 | 'title'=>input('title'), 44 | 'url'=>input('url'), 45 | 'desc'=>input('desc'), 46 | ]; 47 | $validate = \think\Loader::validate('Links'); 48 | if(!$validate->scene('edit')->check($data)){ 49 | $this->error($validate->getError()); die; 50 | } 51 | if(db('Links')->update($data)){ 52 | $this->success('修改链接成功!','lst'); 53 | }else{ 54 | $this->error('修改链接失败!'); 55 | } 56 | return; 57 | } 58 | $this->assign('Links',$Links); 59 | return $this->fetch(); 60 | } 61 | 62 | public function del(){ 63 | $id=input('id'); 64 | if(db('Links')->delete(input('id'))){ 65 | $this->success('删除链接成功!','lst'); 66 | }else{ 67 | $this->error('删除链接失败!'); 68 | } 69 | 70 | } 71 | 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /b3/html/application/index/view/search/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {include file="common/header" /} 14 | 15 | 16 | 17 | 18 |
搜索:{$keywords}
19 | 20 |
21 | 22 |
23 | 24 | {volist name="searchres" id="vo"} 25 |
26 | 29 |
30 |

{$vo.title}

31 |
发布时间:{$vo['time']|date="Y-m-d",###}
32 |

{$vo.desc}

33 |
34 | $v) { 37 | echo "$v"; 38 | } 39 | ?> 40 |
41 |
42 |
43 | {/volist} 44 | 45 | 46 |
47 |
48 | {$searchres->render()} 49 |
50 |
51 |
52 | 53 | {include file="common/right" /} 54 | 55 |
56 | {include file="common/foot" /} 57 | 58 | 59 | -------------------------------------------------------------------------------- /b4/html/org/smarty/sysplugins/smarty_internal_nocache_insert.php: -------------------------------------------------------------------------------- 1 | assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>"; 41 | } else { 42 | $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>"; 43 | } 44 | $_tpl = $_template; 45 | while ($_tpl->parent instanceof Smarty_Internal_Template) { 46 | $_tpl = $_tpl->parent; 47 | } 48 | 49 | return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/"; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /b4/html/templates/updatepass.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 学生会-简历系统 9 | 10 | 11 | 12 | 13 | 55 | 56 | 57 | 64 | 65 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/output/question/Confirmation.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\question; 13 | 14 | use think\console\output\Question; 15 | 16 | class Confirmation extends Question 17 | { 18 | 19 | private $trueAnswerRegex; 20 | 21 | /** 22 | * 构造方法 23 | * @param string $question 问题 24 | * @param bool $default 默认答案 25 | * @param string $trueAnswerRegex 验证正则 26 | */ 27 | public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') 28 | { 29 | parent::__construct($question, (bool) $default); 30 | 31 | $this->trueAnswerRegex = $trueAnswerRegex; 32 | $this->setNormalizer($this->getDefaultNormalizer()); 33 | } 34 | 35 | /** 36 | * 获取默认的答案回调 37 | * @return callable 38 | */ 39 | private function getDefaultNormalizer() 40 | { 41 | $default = $this->getDefault(); 42 | $regex = $this->trueAnswerRegex; 43 | 44 | return function ($answer) use ($default, $regex) { 45 | if (is_bool($answer)) { 46 | return $answer; 47 | } 48 | 49 | $answerIsTrue = (bool) preg_match($regex, $answer); 50 | if (false === $default) { 51 | return $answer && $answerIsTrue; 52 | } 53 | 54 | return !$answer || $answerIsTrue; 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /b4/html/org/smarty/plugins/shared.mb_str_replace.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | namespace think\console\command; 12 | 13 | use think\console\Command; 14 | use think\console\Input; 15 | use think\console\input\Option; 16 | use think\console\Output; 17 | 18 | class Clear extends Command 19 | { 20 | protected function configure() 21 | { 22 | // 指令配置 23 | $this 24 | ->setName('clear') 25 | ->addOption('path', 'd', Option::VALUE_OPTIONAL, 'path to clear', null) 26 | ->setDescription('Clear runtime file'); 27 | } 28 | 29 | protected function execute(Input $input, Output $output) 30 | { 31 | $path = $input->getOption('path') ?: RUNTIME_PATH; 32 | 33 | if (is_dir($path)) { 34 | $this->clearPath($path); 35 | } 36 | 37 | $output->writeln("Clear Successed"); 38 | } 39 | 40 | protected function clearPath($path) 41 | { 42 | $path = realpath($path) . DS; 43 | $files = scandir($path); 44 | if ($files) { 45 | foreach ($files as $file) { 46 | if ('.' != $file && '..' != $file && is_dir($path . $file)) { 47 | $this->clearPath($path . $file); 48 | } elseif ('.gitignore' != $file && is_file($path . $file)) { 49 | unlink($path . $file); 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /b2/Flaskshop/taobao/templates/reset_token.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 |
4 |
5 | {{ form.hidden_tag() }} 6 |
7 | Reset Password 8 |
9 | {{ form.password.label(class="form-control-label") }} 10 | {% if form.password.errors %} 11 | {{ form.password(class="form-control form-control-lg is-invalid") }} 12 |
13 | {% for error in form.password.errors %} 14 | {{ error }} 15 | {% endfor %} 16 |
17 | {% else %} 18 | {{ form.password(class="form-control form-control-lg") }} 19 | {% endif %} 20 |
21 |
22 | {{ form.confirm_password.label(class="form-control-label") }} 23 | {% if form.confirm_password.errors %} 24 | {{ form.confirm_password(class="form-control form-control-lg is-invalid") }} 25 |
26 | {% for error in form.confirm_password.errors %} 27 | {{ error }} 28 | {% endfor %} 29 |
30 | {% else %} 31 | {{ form.confirm_password(class="form-control form-control-lg") }} 32 | {% endif %} 33 |
34 |
35 |
36 | {{ form.submit(class="btn btn-outline-info") }} 37 |
38 |
39 |
40 | {% endblock content %} 41 | -------------------------------------------------------------------------------- /b3/html/thinkphp/library/think/console/command/Build.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command; 13 | 14 | use think\console\Command; 15 | use think\console\Input; 16 | use think\console\input\Option; 17 | use think\console\Output; 18 | 19 | class Build extends Command 20 | { 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | protected function configure() 26 | { 27 | $this->setName('build') 28 | ->setDefinition([ 29 | new Option('config', null, Option::VALUE_OPTIONAL, "build.php path"), 30 | new Option('module', null, Option::VALUE_OPTIONAL, "module name"), 31 | ]) 32 | ->setDescription('Build Application Dirs'); 33 | } 34 | 35 | protected function execute(Input $input, Output $output) 36 | { 37 | if ($input->hasOption('module')) { 38 | \think\Build::module($input->getOption('module')); 39 | $output->writeln("Successed"); 40 | return; 41 | } 42 | 43 | if ($input->hasOption('config')) { 44 | $build = include $input->getOption('config'); 45 | } else { 46 | $build = include APP_PATH . 'build.php'; 47 | } 48 | if (empty($build)) { 49 | $output->writeln("Build Config Is Empty"); 50 | return; 51 | } 52 | \think\Build::run($build); 53 | $output->writeln("Successed"); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /b3/html/application/index/view/cate/cate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {include file="common/header" /} 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 | 24 | {volist name="articleres" id="vo"} 25 |
26 | 29 |
30 |

{$vo.title}

31 |
发布时间:{$vo['time']|date="Y-m-d",###}
32 |

{$vo.desc}

33 |
34 | $v) { 37 | echo "$v"; 38 | } 39 | ?> 40 |
41 |
42 |
43 | {/volist} 44 | 45 | 46 |
47 |
48 | {$articleres->render()} 49 |
50 |
51 |
52 | 53 | {include file="common/right" /} 54 | 55 |
56 | {include file="common/foot" /} 57 | 58 | 59 | --------------------------------------------------------------------------------