17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 |
22 | function smarty_modifiercompiler_lower($params, $compiler)
23 | {
24 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
25 | return 'mb_strtolower(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;
26 | }
27 | // no MBString fallback
28 | return 'strtolower(' . $params[0] . ')';
29 | }
30 |
31 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.noprint.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: noprint
14 | * Purpose: return an empty string
15 | *
16 | * @author Uwe Tews
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 | function smarty_modifiercompiler_noprint($params, $compiler)
21 | {
22 | return "''";
23 | }
24 |
25 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.string_format.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: string_format
14 | * Purpose: format strings via sprintf
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_string_format($params, $compiler)
22 | {
23 | return 'sprintf(' . $params[1] . ',' . $params[0] . ')';
24 | }
25 |
26 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.strip.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: strip
14 | * Purpose: Replace all repeated spaces, newlines, tabs
15 | * with a single space or supplied replacement string.
16 | * Example: {$var|strip} {$var|strip:" "}
17 | * Date: September 25th, 2002
18 | *
19 | * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
20 | * @author Uwe Tews
21 | * @param array $params parameters
22 | * @return string with compiled code
23 | */
24 |
25 | function smarty_modifiercompiler_strip($params, $compiler)
26 | {
27 | if (!isset($params[1])) {
28 | $params[1] = "' '";
29 | }
30 | return "preg_replace('!\s+!u', {$params[1]},{$params[0]})";
31 | }
32 |
33 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.strip_tags.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: strip_tags
14 | * Purpose: strip html tags from text
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_strip_tags($params, $compiler)
22 | {
23 | if (!isset($params[1])) {
24 | $params[1] = true;
25 | }
26 | if ($params[1] === true) {
27 | return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
28 | } else {
29 | return 'strip_tags(' . $params[0] . ')';
30 | }
31 | }
32 |
33 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.to_charset.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: to_charset
14 | * Purpose: convert character encoding from internal encoding to $charset
15 | *
16 | * @author Rodney Rehm
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 | function smarty_modifiercompiler_to_charset($params, $compiler)
21 | {
22 | if (!SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
23 | // FIXME: (rodneyrehm) shouldn't this throw an error?
24 | return $params[0];
25 | }
26 |
27 | if (!isset($params[1])) {
28 | $params[1] = '"ISO-8859-1"';
29 | }
30 |
31 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', SMARTY_RESOURCE_CHAR_SET)';
32 | }
33 |
34 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.upper.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: lower
14 | * Purpose: convert string to uppercase
15 | *
16 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_upper($params, $compiler)
22 | {
23 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
24 | return 'mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;
25 | }
26 | // no MBString fallback
27 | return 'strtoupper(' . $params[0] . ')';
28 | }
29 |
30 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/plugins/variablefilter.htmlspecialchars.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_get_include_path.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_resource_recompiled.php:
--------------------------------------------------------------------------------
1 | filepath = false;
30 | $compiled->timestamp = false;
31 | $compiled->exists = false;
32 | }
33 |
34 | }
35 |
36 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/TemplateLite/internal/template.build_dir.php:
--------------------------------------------------------------------------------
1 | _get_dir($dir);
15 | }
16 | $_result = $object->_get_dir($dir);
17 | foreach($_args as $value)
18 | {
19 | $_result .= $value.DIRECTORY_SEPARATOR;
20 | if (!is_dir($_result))
21 | {
22 | @mkdir($_result, 0777);
23 | }
24 | }
25 | return $_result;
26 | }
27 |
28 | ?>
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/CREDITS:
--------------------------------------------------------------------------------
1 | XXTEA PHP extension
2 | Ma Bingyao (andot@coolcode.cn)
3 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/README:
--------------------------------------------------------------------------------
1 | XXTEA PHP extension
2 |
3 | What is it?
4 | -----------------------------------------------
5 | This extension based on xxtea library, which provides a set of functions
6 | for encrypt or decrypt data with XXTEA algorithm.
7 |
8 |
9 |
10 | How to install it?
11 | -----------------------------------------------
12 | See INSTALL for installation instructions.
13 |
14 |
15 |
16 | How to use it?
17 | -----------------------------------------------
18 | string xxtea_encrypt(string data, string key)
19 |
20 | Encrypt data using XXTEA algorithm. The key is a 16 bytes(128 bits) string.
21 |
22 | string xxtea_decrypt(string data, string key)
23 |
24 | Decrypt data using XXTEA algorithm. The key is a 16 bytes(128 bits) string.
25 |
26 | string xxtea_info()
27 |
28 | Get the version information.
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/config.m4:
--------------------------------------------------------------------------------
1 | PHP_ARG_ENABLE(xxtea, xxtea module,
2 | [ --enable-xxtea Enable xxtea module.])
3 |
4 | if test "$PHP_XXTEA" != "no"; then
5 | PHP_NEW_EXTENSION(xxtea, php_xxtea.c xxtea.c, $ext_shared)
6 | AC_DEFINE(HAVE_XXTEA, 1, [Have XXTEA library])
7 | fi
8 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/config.w32:
--------------------------------------------------------------------------------
1 | ARG_ENABLE("xxtea", "xxtea module", "no");
2 |
3 | if (PHP_XXTEA != "no") {
4 | EXTENSION("xxtea", "php_xxtea.c xxtea.c");
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/test/test.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/README.md:
--------------------------------------------------------------------------------
1 | **Spyc** is a YAML loader/dumper written in pure PHP. Given a YAML document, Spyc will return an array that
2 | you can use however you see fit. Given an array, Spyc will return a string which contains a YAML document
3 | built from your data.
4 |
5 | **YAML** is an amazingly human friendly and strikingly versatile data serialization language which can be used
6 | for log files, config files, custom protocols, the works. For more information, see http://www.yaml.org.
7 |
8 | Spyc supports YAML 1.0 specification.
9 |
10 | ## Using Spyc
11 |
12 | Using Spyc is trivial:
13 |
14 | ```
15 | =5.3.1"
18 | },
19 | "autoload": {
20 | "files": [ "Spyc.php" ]
21 | },
22 | "extra": {
23 | "branch-alias": {
24 | "dev-master": "0.5.x-dev"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/examples/yaml-dump.php:
--------------------------------------------------------------------------------
1 | 'A sequence','second' => 'of mapped values');
18 | $array['Mapped'] = array('A sequence','which is mapped');
19 | $array['A Note'] = 'What if your text is too long?';
20 | $array['Another Note'] = 'If that is the case, the dumper will probably fold your text by using a block. Kinda like this.';
21 | $array['The trick?'] = 'The trick is that we overrode the default indent, 2, to 4 and the default wordwrap, 40, to 60.';
22 | $array['Old Dog'] = "And if you want\n to preserve line breaks, \ngo ahead!";
23 | $array['key:withcolon'] = "Should support this to";
24 |
25 | $yaml = Spyc::YAMLDump($array,4,60);
26 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/examples/yaml-load.php:
--------------------------------------------------------------------------------
1 | spyc.yaml loaded into PHP:
';
15 | print_r($array);
16 | echo '';
17 |
18 |
19 | echo 'YAML Data dumped back:
';
20 | echo Spyc::YAMLDump($array);
21 | echo '
';
22 |
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/php4/5to4.php:
--------------------------------------------------------------------------------
1 | ', $code);
13 | $f = fopen ($dest, 'w');
14 | fwrite($f, $code);
15 | fclose ($f);
16 | print "Written to $dest.\n";
17 | }
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/tests/comments.yaml:
--------------------------------------------------------------------------------
1 | foo: 'bar' #Comment
2 | arr: ['x', 'y', 'z'] # Comment here
3 | bar: kittens
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/tests/failing1.yaml:
--------------------------------------------------------------------------------
1 | MyObject:
2 | Prop1: {key1:val1}
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/Library/Vendor/spyc/tests/quotes.yaml:
--------------------------------------------------------------------------------
1 | html_tags:
2 | -
3 | -
4 | html_content:
5 | -
hello world
6 | - hello
world
7 | text_content:
8 | - hello world
--------------------------------------------------------------------------------
/入门篇/ThinkPHP/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/normal-coder/YunShiPei_Base_AmazeUI/a87ca625e6aa2bc80fe907bc865c0a98920585a9/入门篇/ThinkPHP/logo.png
--------------------------------------------------------------------------------
/入门篇/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "topthink/thinkphp",
3 | "description": "the ThinkPHP Framework",
4 | "type": "framework",
5 | "keywords": ["framework","thinkphp","ORM"],
6 | "homepage": "http://thinkphp.cn/",
7 | "license": "Apache2",
8 | "authors": [
9 | {
10 | "name": "liu21st",
11 | "email": "liu21st@gmail.com"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.3.0"
16 | },
17 | "minimum-stability": "dev"
18 | }
19 |
--------------------------------------------------------------------------------
/入门篇/index.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // 应用入口文件
13 |
14 | // 检测PHP环境
15 | if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
16 |
17 | // 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
18 | define('APP_DEBUG',True);
19 |
20 | // 定义应用目录
21 | define('APP_PATH','./Application/');
22 |
23 | // 引入ThinkPHP入口文件
24 | require './ThinkPHP/ThinkPHP.php';
25 |
26 | // 亲^_^ 后面不需要任何代码了 就是如此简单
--------------------------------------------------------------------------------
/截图.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/normal-coder/YunShiPei_Base_AmazeUI/a87ca625e6aa2bc80fe907bc865c0a98920585a9/截图.png
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Common/function.php:
--------------------------------------------------------------------------------
1 | 启用";
7 | break;
8 | case 0:
9 | return " 禁用
";
10 | break;
11 | default:
12 | return "未知";
13 | break;
14 | }
15 | }
16 | ?>
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Conf/config.php:
--------------------------------------------------------------------------------
1 | '配置值'
4 | );
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Controller/BaseController.class.php:
--------------------------------------------------------------------------------
1 | redirect('Public/login');
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Controller/IndexController.class.php:
--------------------------------------------------------------------------------
1 | assign('mess',$mess);
8 | $this->display();
9 | }
10 | }
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Controller/SiteController.class.php:
--------------------------------------------------------------------------------
1 | display();
7 | }
8 |
9 | public function config()
10 | {
11 | if($_SERVER['REQUEST_METHOD']=="POST") {
12 | $data['sitename']=I('post.sitename');
13 | $data['discript']=I('post.discript');
14 | $data['keywords']=I('post.keywords');
15 | $data['title']=I('post.title');
16 | $data['copyright']=I('post.copyright');
17 | $data['icp']=I('post.icp');
18 | $where['id']=1;
19 | $savedata=M('siteconfig')->where($where)->save($data);
20 | if ($savedata) {
21 | $this->success('保存成功');
22 | }else{
23 | $this->error('保存失败');
24 | }
25 | }else{
26 | $where['id']=1;
27 | $sitemess=M('siteconfig')->where($where)->find();
28 | $this->assign('sitemess',$sitemess);
29 | $this->display();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Controller/index.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/normal-coder/YunShiPei_Base_AmazeUI/a87ca625e6aa2bc80fe907bc865c0a98920585a9/进阶篇/Application/Admin/Controller/index.html
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/Model/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/View/Public/common.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/View/Public/content.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/normal-coder/YunShiPei_Base_AmazeUI/a87ca625e6aa2bc80fe907bc865c0a98920585a9/进阶篇/Application/Admin/View/Public/content.html
--------------------------------------------------------------------------------
/进阶篇/Application/Admin/View/Public/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
15 |
16 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |