Skip to content

Commit 3540e10

Browse files
committed
-
0 parents  commit 3540e10

File tree

1,120 files changed

+213542
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,120 files changed

+213542
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.git/
2+
.idea/
3+
/Runtime

.htaccess

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<IfModule mod_rewrite.c>
2+
Options +FollowSymlinks
3+
RewriteEngine On
4+
5+
RewriteCond %{REQUEST_FILENAME} !-d
6+
RewriteCond %{REQUEST_FILENAME} !-f
7+
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8+
</IfModule>

5.php

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
function getTimeWeek($time, $i = 0) {
4+
$week_array = array("","", "", "", "", "", "");
5+
$oneDay = 24 * 60 * 60;
6+
return $week = "" . $week_array[date("w", $time + $oneDay * $i)];
7+
}
8+
$time=time();
9+
echo getTimeWeek($time);
10+
?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
namespace Home\Controller;
3+
use Think\Controller;
4+
class CommonController extends Controller{
5+
public function __construct()
6+
{
7+
//加载被覆盖的基类构造器
8+
parent::__construct();
9+
// 验证用户是否登录
10+
if (!session('loginkey'))
11+
{
12+
return $this->error('请先登录!', url('admin/index/login'));
13+
}
14+
}
15+
}

Application/Admin/Common/function.php

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: ju
5+
* Date: 2017/1/6
6+
* Time: 10:07
7+
*/
8+
9+
/**
10+
* 根据地址ID获取地址名称
11+
* @param $ids
12+
* @return bool|mixed
13+
*/
14+
function getDetails($ids){
15+
$map['code'] = array('in',$ids);
16+
$result = M('daili_address')->where($map)->select();
17+
if(!empty($result)){
18+
return $result;
19+
}else{
20+
return false;
21+
}
22+
23+
}
24+
function addFlow($data){
25+
$cashFlow = D("CashFlow");
26+
$addFlow = $cashFlow->addFlow($data['pay_id'],$data['rec_id'],$data['type'],$data['money'],$data['remarks'],$data['fee']);
27+
if ($addFlow){
28+
return true;
29+
}else{
30+
return false;
31+
}
32+
}
33+
/**
34+
* 获取星期几信息
35+
* @param $time
36+
* @param int $i
37+
* @return string
38+
*/
39+
function getTimeWeek($time, $i = 0) {
40+
$week_array = array("", "", "", "", "", "", "");
41+
$oneDay = 24 * 60 * 60;
42+
return $week = "" . $week_array[date("w", $time + $oneDay * $i)];
43+
}
44+
//$time=time();
45+
//echo getTimeWeek($tiem);
46+
47+
/**
48+
* print_r()函数简化
49+
*/
50+
function p($str){
51+
echo '<div style="border: 1px solid bisque;border-bottom-color:red;border-right-color:red;color:green;background-color: bisque "><pre>';
52+
print_r($str);
53+
echo '</pre></div>';
54+
}
55+
/**
56+
* var_dump()函数简化
57+
*/
58+
function v($str){
59+
echo '<div style="border: 1px solid bisque;color:green;background-color: bisque "><pre>';
60+
var_dump($str);
61+
echo '</pre></div>';
62+
}

Application/Admin/Common/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Application/Admin/Conf/config.php

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
return array(
3+
//'配置项'=>'配置值'
4+
);

Application/Admin/Conf/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
namespace Admin\Controller;
3+
use Think\Controller;
4+
use Think\Model;
5+
use Admin\Controller\CommonController;
6+
class AdminController extends CommonController {
7+
public function index()
8+
{
9+
$users =D('bao_users');
10+
$nickname=$users->where(array('user_id'=>35))->find();
11+
$this->assign('nickname',$nickname);
12+
$this->display();
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
namespace Admin\Controller;
3+
use Think\Controller;
4+
5+
class CommondController extends Controller
6+
{
7+
public function __construct()
8+
{
9+
//加载被覆盖的基类构造器
10+
parent::__construct();
11+
// 验证用户是否登录
12+
if (!session('loginkey')) {
13+
$this->error('请先登录!', U('admin/login/index'));
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)