Solve conflicts.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\GoodInfo;
|
||||
|
||||
class ContentController extends Controller
|
||||
{
|
||||
public function Mainpage()
|
||||
{
|
||||
return View::make('welcome');
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ use App\GoodInfo;
|
||||
use App\Transaction;
|
||||
use App\TransactionLog;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Storage;
|
||||
|
||||
class GoodController extends Controller
|
||||
{
|
||||
@@ -69,6 +70,7 @@ class GoodController extends Controller
|
||||
$data['is_admin'] = $request->session()->get('is_admin');
|
||||
else
|
||||
$data['is_admin'] = NULL;
|
||||
$good = GoodInfo::where('id', $good_id)->first();
|
||||
return view::make('good.goodInfo')->with($data);
|
||||
}
|
||||
|
||||
@@ -145,6 +147,11 @@ class GoodController extends Controller
|
||||
$good->good_tag = $input['good_tag'];
|
||||
$good->user_id = $request->session()->get('user_id');
|
||||
$good->save();
|
||||
$new_good = GoodInfo::orderby('id', 'dsc')->first();
|
||||
Storage::put(
|
||||
'good/title/'.$new_good->id,
|
||||
file_get_contents($request->file('goodTitlePic')->getRealPath())
|
||||
);
|
||||
return Redirect::to('/good/add');
|
||||
}
|
||||
}
|
||||
@@ -219,9 +226,10 @@ class GoodController extends Controller
|
||||
public function quickAccess(Request $request)
|
||||
{
|
||||
$data = [];
|
||||
$query = $request->input('query');
|
||||
$input = $request->all();
|
||||
$query = $input['query'];
|
||||
$data['cats'] = GoodCat::orderby('cat_name', 'asc')->get();
|
||||
$data['goods'] = GoodInfo::where('good_name', 'like', $query)->get();
|
||||
$data['goods'] = GoodInfo::where('good_name', 'like', "%$query%")->get();
|
||||
if($request->session()->has('user_id'))
|
||||
$data['user_id'] = $request->session()->get('user_id');
|
||||
else
|
||||
|
||||
@@ -14,6 +14,7 @@ use Illuminate\Support\Facades\View;
|
||||
use App\User;
|
||||
use App\UserInfo;
|
||||
use App\CheckEmail;
|
||||
use App\PasswordReset;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Session\Store;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
@@ -29,8 +30,7 @@ class UserController extends Controller
|
||||
'username'=>'required|max:20',
|
||||
'email'=>'required|email|max:20',
|
||||
'password'=>'required|max:20',
|
||||
'stuid'=>'required|max:8',
|
||||
'nickname'=>'required|max:20',
|
||||
'nickname'=>'max:20',
|
||||
]);
|
||||
$input = $request->all();
|
||||
$test = User::where('username',$request->username)->first();
|
||||
@@ -41,13 +41,13 @@ class UserController extends Controller
|
||||
}
|
||||
$user = new User;
|
||||
$user->username = $input['username'];
|
||||
$user->password = Hash::make($request->password);
|
||||
//$user->password = $input['password'];
|
||||
$user->password = sha1($input['password']);
|
||||
$user->email = "#".$input['email'];
|
||||
$user->stuid = $input['stuid'];
|
||||
$user->nickname = $input['nickname'];
|
||||
$userinfo=new UserInfo;
|
||||
if($user->save())
|
||||
{
|
||||
$userinfo->save();
|
||||
$new_user = User::where('username', $user->username)->first();
|
||||
return redirect('/user/'.$new_user->id.'/sendCheckLetter');
|
||||
}
|
||||
@@ -60,16 +60,17 @@ class UserController extends Controller
|
||||
public function login(Request $request)
|
||||
{
|
||||
$input = $request->all();
|
||||
$user = User::where('username',$request->username)->first();
|
||||
$user = User::where('username',$input['username'])->first();
|
||||
// if($user->password==$request->password&&$user->baned==0)
|
||||
if(Hash::check($request->password, $user->password))
|
||||
if(sha1($input['password'])==$user->password)
|
||||
{
|
||||
if($user->email[0]=='#') return redirect()->back()->withInput()->withErrors('未验证您的邮箱,请查收您的电子邮箱或<a href\"/user/'.$user->id.'/sendCheckLetter\">重新发送一封</a>');
|
||||
$request->session()->put('user_id', $user->id);
|
||||
$request->session()->put('username', $user->username);
|
||||
if($user->privilege == 1)
|
||||
$request->session()->put('nickname', $user->nickname);
|
||||
if($user->privilege == 2)
|
||||
$request->session()->put('is_admin', 1);
|
||||
return redirect('/good');
|
||||
return redirect('/');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -93,6 +94,16 @@ class UserController extends Controller
|
||||
$data['user'] = UserInfo::find($user_id);
|
||||
return View::make('user.userinfo')->with($data);
|
||||
}
|
||||
|
||||
public function logOut(Request $request)
|
||||
{
|
||||
$request->session()->forget('user_id');
|
||||
$request->session()->forget('username');
|
||||
$request->session()->forget('nickname');
|
||||
$request->session()->forget('is_admin');
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
public function editList(Request $request, $user_id)
|
||||
{
|
||||
$input = $request->all();
|
||||
@@ -149,4 +160,64 @@ class UserController extends Controller
|
||||
$check_email->delete();
|
||||
return redirect('/show');
|
||||
}
|
||||
|
||||
public function passwordReset(Request $request)
|
||||
{
|
||||
if($request->method() == 'GET'){
|
||||
$data['method']='GET';
|
||||
return View::make('user.passwordReset')->with($data);
|
||||
}else{
|
||||
$data['method']='POST';
|
||||
$data['sentence']='';
|
||||
$input = $request->all();
|
||||
$user = User::where('username', $input['username'])->first();
|
||||
if($user==NULL||$user->email!=$input['email']){
|
||||
$data['sentence']='无法验证你的身份,请检查用户名与邮箱是否有误';
|
||||
}else{
|
||||
$data['sentence']='已向你的邮箱发送一份包含重置密码的链接的邮件。';
|
||||
$password_reset = PasswordReset::where('user_id',$user->id)->first();
|
||||
$email = $user->email;
|
||||
$token = sha1($email.time());
|
||||
if($password_reset!=NULL){
|
||||
$token = $password_reset->token;
|
||||
}else{
|
||||
$new_password_reset = new PasswordReset;
|
||||
$new_password_reset->user_id = $user->id;
|
||||
$new_password_reset->token = $token;
|
||||
$new_password_reset->save();
|
||||
}
|
||||
$data['token'] = $token;
|
||||
$data['host'] = $request->server("HTTP_HOST");
|
||||
Mail::send('user.resetLetter', $data, function ($m) use ($user, $email) {
|
||||
$m->from('519418441@qq.com', 'Catsworld');
|
||||
$m->to($email, $user->username)->subject('');
|
||||
});
|
||||
}
|
||||
return View::make('user.passwordReset')->with($data);
|
||||
}
|
||||
}
|
||||
|
||||
public function resetPassword(Request $request, $token)
|
||||
{
|
||||
if($request->method() == 'GET'){
|
||||
$data['method'] = 'GET';
|
||||
$data['token'] = $token;
|
||||
return view::make('user.resetPassword')->with($data);
|
||||
}else{
|
||||
$data['method'] = 'POST';
|
||||
$data['sentence'] = '';
|
||||
$password_reset = PasswordReset::where('token', $token)->first();
|
||||
if($password_reset==NULL){
|
||||
$data['sentence'] = '未知的Token';
|
||||
return View::make('user.resetPassword')->with($data);
|
||||
}
|
||||
$input = $request->all();
|
||||
$user = User::find($password_reset->user_id);
|
||||
$user->password = sha1($input['password']);
|
||||
$user->update();
|
||||
$password_reset->delete();
|
||||
$data['sentence'] = '成功重置密码!';
|
||||
return View::make('user.resetPassword')->with($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
-6
@@ -76,7 +76,12 @@ Route::group(['middleware' => ['web']],function () {
|
||||
"uses" => "GoodController@allow",
|
||||
"middleware" => "auth"
|
||||
]);
|
||||
|
||||
|
||||
Route::get('/good/quick_access', [
|
||||
"uses" => "GoodController@quickAccess",
|
||||
"middleware" => "auth"
|
||||
]);
|
||||
|
||||
Route::get('/good/{good_id}', [
|
||||
"uses" => "GoodController@getInfo",
|
||||
"middleware" => "auth"
|
||||
@@ -92,11 +97,6 @@ Route::group(['middleware' => ['web']],function () {
|
||||
"middleware" => "auth"
|
||||
]);
|
||||
|
||||
Route::get('/good/quick_access', [
|
||||
"uses" => "GoodController@quickAccess",
|
||||
"middleware" => "auth"
|
||||
]);
|
||||
|
||||
Route::get('/good/{good_id}/add_favlist', [
|
||||
"uses" => "GoodController@addFavlist",
|
||||
"middleware" => "auth"
|
||||
@@ -166,4 +166,15 @@ Route::group(['middleware' => ['web']],function () {
|
||||
"uses" => "UserController@login"
|
||||
]);
|
||||
|
||||
Route::get('/logout', [
|
||||
"uses" => "UserController@logOut"
|
||||
]);
|
||||
|
||||
Route::match(['post', 'get'], '/iforgotit', [
|
||||
"uses" => "UserController@passwordReset"
|
||||
]);
|
||||
|
||||
Route::match(['post', 'get'], '/passwordReset/{token}', [
|
||||
"uses" => "UserController@resetPassword"
|
||||
]);
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PasswordReset extends Model
|
||||
{
|
||||
protected $table='password_resets';
|
||||
}
|
||||
@@ -13,9 +13,10 @@ class CreatePasswordResetsTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
$table->timestamp('created_at');
|
||||
$table->increments('id');
|
||||
$table->integer('user_id');
|
||||
$table->string('token');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class UserSeeder extends Seeder
|
||||
DB::table('users')->insert([
|
||||
'priviledge' => 2,
|
||||
'username' => 'admin',
|
||||
'password' => Hash::make('admin'),
|
||||
'password' => sha1('admin'),
|
||||
'nickname' => '超级管理员',
|
||||
'email' => 'admin@admin',
|
||||
'stuid' => '00000000'
|
||||
|
||||
Vendored
+92
@@ -0,0 +1,92 @@
|
||||
html{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
body{
|
||||
font-family: "微软雅黑 Light"
|
||||
}
|
||||
.button{
|
||||
box-shadow: 0 -2px 0 rgba(0,0,0,0.2) inset;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.top-bar{
|
||||
box-shadow: rgba(0,0,0,0.1) 0 1px 2px;
|
||||
}
|
||||
.top-bar .menu{
|
||||
background: none;
|
||||
}
|
||||
.top-bar .menu a{
|
||||
color: black;
|
||||
}
|
||||
.top-bar .menu a:hover{
|
||||
color: white;
|
||||
}
|
||||
.top-bar .menu a:active{
|
||||
color: grey;
|
||||
}
|
||||
.top-bar .menu .button{
|
||||
color: white!IMPORTANT;
|
||||
}
|
||||
.top-bar, .top-bar-left, .top-bar-right{
|
||||
position: relative;
|
||||
z-index: 10000;
|
||||
}
|
||||
.top-bar-back{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.top-bar-filter{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
}
|
||||
.top-bar-bg{
|
||||
background-image: url('/img/banner.jpg');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
height: 130%;
|
||||
top: -5px;
|
||||
left: -5px;
|
||||
width: 105%;
|
||||
-webkit-filter: blur(5px);
|
||||
-ms-filter: blur(5px);
|
||||
filter: blur(5px);
|
||||
z-index: 50;
|
||||
}
|
||||
.banner{
|
||||
background-image: url('/img/banner.jpg');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: -5px;
|
||||
width: 105%;
|
||||
max-width: 150%;
|
||||
height: 100%;
|
||||
}
|
||||
.banner-content{
|
||||
margin: 69px auto 10px;
|
||||
}
|
||||
.banner-logo{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
max-width: 100px;
|
||||
}
|
||||
#top-bar-quick-access{
|
||||
position: relative;
|
||||
top: 30px;
|
||||
}
|
||||
.page-content{
|
||||
position: relative;
|
||||
z-index: 50;
|
||||
margin-top: 120px;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 475 KiB |
@@ -1,3 +1,9 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
Unchecked goods:
|
||||
@foreach($goods as $good)
|
||||
<div class="cat{{$good->cat_id}}"><a href="/good/{{$good->id}}">{{$good->good_name}}</a> <a href="/good/{{$good->id}}/check">Pass</a></div>
|
||||
@@ -52,4 +58,7 @@ All goods:
|
||||
Add a category: <input name="cat_name"/>
|
||||
{!! csrf_field() !!}
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
@@ -1,25 +1,36 @@
|
||||
@include('includes.head')
|
||||
<title>添加出售 - 先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
<form action="/good/add" method="POST">
|
||||
good_name:<input name="good_name"/><br/>
|
||||
cat:<select name="cat_id">
|
||||
<input type="text" name="good_name" placeholder="商品名称"/>
|
||||
<select name="cat_id">
|
||||
@foreach($cats as $cat)
|
||||
<option value="{{$cat->id}}">{{$cat->cat_name}}</option>
|
||||
@endforeach
|
||||
</select><br/>
|
||||
description:<textarea name="description"></textarea><br/>
|
||||
pricemin:<input name="pricemin"/><br/>
|
||||
pricemax:<input name="pricemax"/><br/>
|
||||
type:<select name="type">
|
||||
<option value="0">normal</option>
|
||||
<option value="1">auction</option>
|
||||
</select><br/>
|
||||
counts:<input name="counts"/><br/>
|
||||
good_tag:<input name="good_tag"/><br/>
|
||||
</select>
|
||||
<textarea name="description" placeholder="商品描述(此处应支持HTML)"></textarea>
|
||||
<input type="number" name="pricemin" placeholder="最低价格"/>
|
||||
<input type="number" name="pricemax" placeholder="最高价格"/>
|
||||
<select name="type">
|
||||
<option value="0">普通商品</option>
|
||||
<option value="1">拍卖商品</option>
|
||||
</select>
|
||||
<input type="number" name="counts" placeholder="库存"/>
|
||||
<input type="text" name="good_tag" placeholder="TAG"/>
|
||||
<label for="goodTitleUpload" class="button">上传封面</label>
|
||||
<input type="file" id="goodTitleUpload" class="show-for-sr" name="goodTitlePic"/><br/>
|
||||
{!! csrf_field() !!}
|
||||
<input type="submit"/>
|
||||
<input type="submit" class="button" value="添加"/>
|
||||
</form>
|
||||
@if(count($errors) > 0)
|
||||
@foreach($errors as $error)
|
||||
{{$error}}
|
||||
@endforeach
|
||||
@endif
|
||||
<a href='/good'>GoodList</a>
|
||||
<a href='/good'>商品列表</a>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
@@ -1,3 +1,9 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
@foreach($goods as $good)
|
||||
<form action="/good/{{$good->id}}/edit" method="POST">
|
||||
good_name:<input name="good_name" value="{{$good->good_name}}"/><br/>
|
||||
@@ -25,3 +31,6 @@
|
||||
@endforeach
|
||||
@endif
|
||||
<a href='/good/{{$good->id}}'>GoodInfo</a>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
|
||||
{{$goods->description}}<br/>
|
||||
@if($user_id==$goods->user_id)
|
||||
<a href='/good/{{$goods->id}}/edit'>Edit</a><br/>
|
||||
<form action='/good/{{$goods->id}}/delete' method='POST'>
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title></head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
@foreach($goods as $good)
|
||||
{{$good->description}}<br/>
|
||||
@if($user_id==$good->user_id)
|
||||
<a href='/good/{{$good->id}}/edit'>Edit</a><br/>
|
||||
<form action='/good/{{$good->id}}/delete' method='POST'>
|
||||
{!! csrf_field() !!}
|
||||
{{ method_field('DELETE') }}
|
||||
<input type="submit" name="submit1" value="Delete">
|
||||
@@ -22,3 +28,6 @@
|
||||
{{$users->tel_num}}<br/>
|
||||
@endif
|
||||
<a href='/good'>GoodList</a>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
<ul>
|
||||
@foreach($cats as $cat)
|
||||
<li>{{ $cat->cat_name }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<br/>
|
||||
<br/>
|
||||
<form action="/good/quick_access">
|
||||
<span>Quick Access: </span>
|
||||
<div>
|
||||
<input name="query" placeholder="Input Keyword to Search"/>
|
||||
</div>
|
||||
<input type="submit" value="Go"/>
|
||||
</form>
|
||||
<br/>
|
||||
@foreach($goods as $good)
|
||||
<div class="cat{{ $good->cat_id }}"><a href="/good/{{ $good->id }}">{{ $good->good_name }}</a></div>
|
||||
@endforeach
|
||||
@@ -21,7 +18,8 @@
|
||||
<br/>
|
||||
@if($user_id != NULL)
|
||||
<a href='/good/add'>Add</a>
|
||||
@endif
|
||||
@if($user_id != NULL)
|
||||
<a href='/good/mygood'>my good</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<script src="/js/vendor/jquery.js"></script>
|
||||
<script src="/js/vendor/what-input.js"></script>
|
||||
<script src="/js/vendor/foundation.js"></script>
|
||||
<script src="/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/foundation.css">
|
||||
<link rel="stylesheet" href="/css/app.css">
|
||||
@@ -0,0 +1,37 @@
|
||||
<div class="top-bar">
|
||||
<div id="responsive-menu">
|
||||
<div class="top-bar-back">
|
||||
<div class="top-bar-bg"></div>
|
||||
<div class="top-bar-filter"></div>
|
||||
</div>
|
||||
<div class="top-bar-left">
|
||||
<ul class="dropdown menu" data-dropdown-menu>
|
||||
<li><a href="/good">商品</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="top-bar-right">
|
||||
<ul class="dropdown menu" data-dropdown-menu>
|
||||
@if(Session::has('user_id'))
|
||||
<li><a href="/user/{{Session::get('user_id')}}">{{Session::get('nickname')}}@if(Session::get('nickname')=="") {{Session::get('username')}} @endif</a></li>
|
||||
<li><a href="#">消息</a></li>
|
||||
<li><a href="#">收藏夹</a></li>
|
||||
<li><a href="/good/add" class="button">出售</a></li>
|
||||
@else
|
||||
<li><a href="/register">注册</a></li>
|
||||
<li><a href="/show">登录</a></li>
|
||||
<li><a href="/good/add" class="button">出售</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row banner">
|
||||
<div class="banner-content">
|
||||
<div class="row">
|
||||
<div class="small-2 columns"> </div>
|
||||
<div class="small-1 columns"><a href="/"><img src="/img/logo.png" class="banner-logo"></img></a></div>
|
||||
@include('layout.search')
|
||||
<div class="small-3 columns"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="small-6 columns">
|
||||
<form action="/good/quick_access" method="GET">
|
||||
<div class="input-group" id="top-bar-quick-access">
|
||||
<input class="input-group-field" type="search" name="query" placeholder="开始我们的交易吧~"/>
|
||||
<div class="input-group-button">
|
||||
<input type="submit" class="button" value="G♂"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,9 +1,9 @@
|
||||
{!! csrf_field() !!}
|
||||
<html>
|
||||
<head>
|
||||
@include('includes.head')
|
||||
<title>修改个人信息</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
<form action="/user/{{$user->id}}/edit/middle" method="POST">
|
||||
<div>
|
||||
性别:<select name="gender">
|
||||
@@ -29,5 +29,6 @@
|
||||
<input type="submit" name="submit" value="修改">
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
@if($method=="GET")
|
||||
<form action="/iforgotit" method="POST">
|
||||
Username: <input type="text" name="username"></input>
|
||||
Email: <input type="email" name="email"></input>
|
||||
{!! csrf_field() !!}
|
||||
<input type="submit" class="button"></input>
|
||||
</form>
|
||||
@else
|
||||
{{$sentence}}
|
||||
<a href="/iforgotit">Back</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
@@ -1,29 +1,30 @@
|
||||
{!! csrf_field() !!}
|
||||
<html>
|
||||
<head>
|
||||
<title>注册</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/adduser" method="POST">
|
||||
<div>
|
||||
昵称:<input type="text" name="nickname">
|
||||
</div>
|
||||
<div>
|
||||
用户名:<input type="text" name="username">
|
||||
</div>
|
||||
<div>
|
||||
密码:<input type="password" name='password'>
|
||||
</div>
|
||||
<div>
|
||||
邮箱:<input type="email" name="email">
|
||||
</div>
|
||||
<div>
|
||||
学号:<input type="text" name="stuid">
|
||||
</div>
|
||||
{!! csrf_field() !!}
|
||||
<div>
|
||||
<input type="submit" name="submit" value="注册">
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@include('includes.head')
|
||||
<title>注册 - 先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
<form action="/adduser" method="POST" data-abide novalidate>
|
||||
<label>
|
||||
<input type="text" name="username" placeholder="用户名" required pattern="alpha_numeric">
|
||||
<span class="form-error">用户名不能为空!只允许包含字母和数字!</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" id="password" name="password" placeholder="密码" required>
|
||||
<span class="form-error">密码不能为空!</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" placeholder="确认密码" required pattern="alpha_numeric" data-equalto="password">
|
||||
<span class="form-error">两次输入的密码不一致!</span>
|
||||
</label>
|
||||
<input type="text" name="nickname" placeholder="昵称">
|
||||
<label>
|
||||
<input type="email" name="email" placeholder="邮箱" required>
|
||||
<span class="form-error">邮箱未填写或格式不正确!</span>
|
||||
</label>
|
||||
{!! csrf_field() !!}
|
||||
<input type="submit" class="button" value="注册">
|
||||
</form>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<a href="http://{{$host}}/passwordReset/{{$token}}">http://{{$host}}/passwordReset/{{$token}}</a>
|
||||
@@ -0,0 +1,19 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
@if($method=="GET")
|
||||
<form action="/passwordReset/{{$token}}" method="POST">
|
||||
Password: <input type="password" name="password"></input>
|
||||
Again: <input type="password"></input>
|
||||
{!! csrf_field() !!}
|
||||
<input type="submit" class="button"></input>
|
||||
</form>
|
||||
@else
|
||||
{{$sentence}}
|
||||
@endif
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
@@ -1,6 +1,9 @@
|
||||
<html>
|
||||
@include('includes.head')
|
||||
<title>登陆</title>
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
<form action="/login" method="POST">
|
||||
<div>
|
||||
用户名:<input type="text" name="username">
|
||||
@@ -13,5 +16,7 @@
|
||||
<input type="submit" name="submit" value="登陆">
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<a href='/iforgotit'>忘记密码</a><br/>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
@@ -1,3 +1,9 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
性别:{{$user->gender}}
|
||||
</br>
|
||||
</br>
|
||||
@@ -11,4 +17,7 @@
|
||||
</br>
|
||||
</br>
|
||||
<a href='/user/{{$user->id}}/edit'>Edit</a><br/>
|
||||
|
||||
<a href='/logout'>Log Out</a><br/>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
@@ -0,0 +1,9 @@
|
||||
@include('includes.head')
|
||||
<title>先锋市场</title>
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="page-content">
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@include('includes.foot')
|
||||
Reference in New Issue
Block a user