diff --git a/.env.travis b/.env.travis
index 47ca76c..49ce59c 100644
--- a/.env.travis
+++ b/.env.travis
@@ -9,4 +9,4 @@ CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
-ALLOW_REG=true
+ALLOW_REG=true
\ No newline at end of file
diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php
index 8521a20..b87744a 100644
--- a/app/Http/Controllers/AdminController.php
+++ b/app/Http/Controllers/AdminController.php
@@ -23,7 +23,7 @@ class AdminController extends Controller
* @return View
* @description The Index of administrator.
*/
- public function adminIndex(Request $request)
+ public function adminIndex(Request $request, $tab = 'notice')
{
$data = [];
$data['goods'] = GoodInfo::where('baned', '1')->orderby('id', 'asc')->get();
@@ -33,7 +33,7 @@ class AdminController extends Controller
$data['reports'] = Ticket::where('type', '2')->orderby('id', 'dsc')->paginate(40);
$data['users'] = User::orderby('id', 'asc')->paginate(40);
$data['trans'] = Transaction::orderby('id', 'asc')->paginate(40);
- return View::make('admin.index')->with($data);
+ return View::make('admin.'.$tab)->with($data);
}
/**
@@ -92,7 +92,7 @@ class AdminController extends Controller
$cat = new GoodCat;
$cat->cat_name = $input['cat_name'];
$cat->save();
- return Redirect::to('/admin');
+ return Redirect::to('/admin/classify');
}
/**
@@ -105,7 +105,7 @@ class AdminController extends Controller
{
$cat = GoodCat::find($cat_id);
$cat->delete();
- return Redirect::to('/admin');
+ return Redirect::to('/admin/classify');
}
/**
@@ -120,7 +120,7 @@ class AdminController extends Controller
$cat = GoodCat::find($cat_id);
$cat->cat_name = $input['cat_name'];
$cat->update();
- return Redirect::to('/admin');
+ return Redirect::to('/admin/classify');
}
/**
@@ -171,7 +171,7 @@ class AdminController extends Controller
$repo->state = $input['setstate'];
$repo->update();
}
- return Redirect::to('/admin');
+ return Redirect::to('/admin/report');
}
// This part gonna work with https://github.com/NEUP-Net-Depart/email-daemon/
diff --git a/app/Http/routes.php b/app/Http/routes.php
index 76f51a7..c431cb4 100644
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -141,7 +141,7 @@ Route::group(['middleware' => ['web']],function () {
Route::post('/notice', "AdminController@sendAnnouncement")->middleware('admin');
Route::delete('/notice/{ann_id}', "AdminController@delAnnouncement")->middleware('admin');
- Route::get('/admin', "AdminController@adminIndex")->middleware('admin');
+ Route::get('/admin/{tab?}', "AdminController@adminIndex")->middleware('admin');
Route::get('/test/email', "AdminController@testEmail")->middleware('su');
Route::post('/user/{user_id}/updatePriv', [
diff --git a/composer.lock b/composer.lock
index 7628fc4..cb5f14e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -75,16 +75,16 @@
},
{
"name": "erusev/parsedown",
- "version": "1.6.2",
+ "version": "1.6.3",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01"
+ "reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01",
- "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
+ "reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
"shasum": ""
},
"require": {
@@ -113,7 +113,7 @@
"markdown",
"parser"
],
- "time": "2017-03-29T16:04:15+00:00"
+ "time": "2017-05-14T14:47:48+00:00"
},
{
"name": "ezyang/htmlpurifier",
@@ -322,16 +322,16 @@
},
{
"name": "intervention/image",
- "version": "2.3.13",
+ "version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
- "reference": "15a517f052ee15d373ffa145c9642d5fec7ddf5c"
+ "reference": "322a4ade249467179c50a3e50eda8760ff3af2a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Intervention/image/zipball/15a517f052ee15d373ffa145c9642d5fec7ddf5c",
- "reference": "15a517f052ee15d373ffa145c9642d5fec7ddf5c",
+ "url": "https://api.github.com/repos/Intervention/image/zipball/322a4ade249467179c50a3e50eda8760ff3af2a3",
+ "reference": "322a4ade249467179c50a3e50eda8760ff3af2a3",
"shasum": ""
},
"require": {
@@ -341,7 +341,7 @@
},
"require-dev": {
"mockery/mockery": "~0.9.2",
- "phpunit/phpunit": "3.*"
+ "phpunit/phpunit": "^4.8 || ^5.7"
},
"suggest": {
"ext-gd": "to use GD library based image processing.",
@@ -352,6 +352,14 @@
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Intervention\\Image\\ImageServiceProvider"
+ ],
+ "aliases": {
+ "Image": "Intervention\\Image\\Facades\\Image"
+ }
}
},
"autoload": {
@@ -366,8 +374,8 @@
"authors": [
{
"name": "Oliver Vogel",
- "email": "oliver@olivervogel.net",
- "homepage": "http://olivervogel.net/"
+ "email": "oliver@olivervogel.com",
+ "homepage": "http://olivervogel.com/"
}
],
"description": "Image handling and manipulation library with support for Laravel integration",
@@ -380,7 +388,7 @@
"thumbnail",
"watermark"
],
- "time": "2017-04-23T18:45:36+00:00"
+ "time": "2017-07-03T15:50:40+00:00"
},
{
"name": "jasig/phpcas",
@@ -438,23 +446,24 @@
},
{
"name": "jaybizzle/crawler-detect",
- "version": "v1.2.46",
+ "version": "v1.2.50",
"source": {
"type": "git",
"url": "https://github.com/JayBizzle/Crawler-Detect.git",
- "reference": "55e98a6c733a7f99912f6239c8d7ee25ed4f9eb5"
+ "reference": "c9638a5d7d6fc4ecfb35f32a9cc6d05bc4f5a914"
},
"dist": {
"type": "zip",
- "url": "https://files.phpcomposer.com/files/JayBizzle/Crawler-Detect/55e98a6c733a7f99912f6239c8d7ee25ed4f9eb5.zip",
- "reference": "55e98a6c733a7f99912f6239c8d7ee25ed4f9eb5",
+ "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/c9638a5d7d6fc4ecfb35f32a9cc6d05bc4f5a914",
+ "reference": "c9638a5d7d6fc4ecfb35f32a9cc6d05bc4f5a914",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
- "phpunit/phpunit": "4.*"
+ "phpunit/phpunit": "4.8.*",
+ "satooshi/php-coveralls": "1.*"
},
"type": "library",
"autoload": {
@@ -482,7 +491,7 @@
"crawlerdetect",
"php crawler detect"
],
- "time": "2017-06-19T21:29:50+00:00"
+ "time": "2017-07-03T20:56:40+00:00"
},
{
"name": "jenssegers/agent",
@@ -494,7 +503,7 @@
},
"dist": {
"type": "zip",
- "url": "https://files.phpcomposer.com/files/jenssegers/agent/68bef4f773933d33f9b6c8d1f2ff002f97a65b0b.zip",
+ "url": "https://api.github.com/repos/jenssegers/agent/zipball/68bef4f773933d33f9b6c8d1f2ff002f97a65b0b",
"reference": "68bef4f773933d33f9b6c8d1f2ff002f97a65b0b",
"shasum": ""
},
@@ -590,16 +599,16 @@
},
{
"name": "laravel/framework",
- "version": "v5.4.27",
+ "version": "v5.4.28",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "66f5e1b37cbd66e730ea18850ded6dc0ad570404"
+ "reference": "442511fc62121085d184355e4f964c88942bbecb"
},
"dist": {
"type": "zip",
- "url": "https://files.phpcomposer.com/files/laravel/framework/66f5e1b37cbd66e730ea18850ded6dc0ad570404.zip",
- "reference": "66f5e1b37cbd66e730ea18850ded6dc0ad570404",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/442511fc62121085d184355e4f964c88942bbecb",
+ "reference": "442511fc62121085d184355e4f964c88942bbecb",
"shasum": ""
},
"require": {
@@ -715,7 +724,7 @@
"framework",
"laravel"
],
- "time": "2017-06-15T19:08:25+00:00"
+ "time": "2017-06-30T13:43:07+00:00"
},
{
"name": "league/flysystem",
@@ -875,7 +884,7 @@
},
"dist": {
"type": "zip",
- "url": "https://files.phpcomposer.com/files/serbanghita/Mobile-Detect/f0896b5c7274d1450023b0b376240be902c3251c.zip",
+ "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/f0896b5c7274d1450023b0b376240be902c3251c",
"reference": "f0896b5c7274d1450023b0b376240be902c3251c",
"shasum": ""
},
@@ -919,16 +928,16 @@
},
{
"name": "monolog/monolog",
- "version": "1.22.1",
+ "version": "1.23.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0"
+ "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0",
- "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
+ "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
"shasum": ""
},
"require": {
@@ -949,7 +958,7 @@
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
- "swiftmailer/swiftmailer": "~5.3"
+ "swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
@@ -993,7 +1002,7 @@
"logging",
"psr-3"
],
- "time": "2017-03-13T07:08:03+00:00"
+ "time": "2017-06-19T01:22:40+00:00"
},
{
"name": "mtdowling/cron-expression",
@@ -1433,16 +1442,16 @@
},
{
"name": "symfony/config",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca"
+ "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/35716d4904e0506a7a5a9bcf23f854aeb5719bca",
- "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca",
+ "url": "https://api.github.com/repos/symfony/config/zipball/a094618deb9a3fe1c3cf500a796e167d0495a274",
+ "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274",
"shasum": ""
},
"require": {
@@ -1450,10 +1459,12 @@
"symfony/filesystem": "~2.8|~3.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.3"
+ "symfony/dependency-injection": "<3.3",
+ "symfony/finder": "<3.3"
},
"require-dev": {
"symfony/dependency-injection": "~3.3",
+ "symfony/finder": "~3.3",
"symfony/yaml": "~3.0"
},
"suggest": {
@@ -1489,20 +1500,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T18:07:20+00:00"
+ "time": "2017-06-16T12:40:34+00:00"
},
{
"name": "symfony/console",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e"
+ "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e",
- "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a97e45d98c59510f085fa05225a1acb74dfe0546",
+ "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546",
"shasum": ""
},
"require": {
@@ -1558,7 +1569,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T19:24:58+00:00"
+ "time": "2017-07-03T13:19:36+00:00"
},
{
"name": "symfony/css-selector",
@@ -1615,16 +1626,16 @@
},
{
"name": "symfony/debug",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d"
+ "reference": "63b85a968486d95ff9542228dc2e4247f16f9743"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d",
- "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743",
+ "reference": "63b85a968486d95ff9542228dc2e4247f16f9743",
"shasum": ""
},
"require": {
@@ -1667,11 +1678,11 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-06-01T21:01:25+00:00"
+ "time": "2017-07-05T13:02:37+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.22",
+ "version": "v2.8.24",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@@ -1731,16 +1742,16 @@
},
{
"name": "symfony/filesystem",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "c709670bf64721202ddbe4162846f250735842c0"
+ "reference": "311fa718389efbd8b627c272b9324a62437018cc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/c709670bf64721202ddbe4162846f250735842c0",
- "reference": "c709670bf64721202ddbe4162846f250735842c0",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/311fa718389efbd8b627c272b9324a62437018cc",
+ "reference": "311fa718389efbd8b627c272b9324a62437018cc",
"shasum": ""
},
"require": {
@@ -1776,11 +1787,11 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-05-28T14:08:56+00:00"
+ "time": "2017-06-24T09:29:48+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
@@ -1829,16 +1840,16 @@
},
{
"name": "symfony/http-foundation",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "80eb5a1f968448b77da9e8b2c0827f6e8d767846"
+ "reference": "f347a5f561b03db95ed666959db42bbbf429b7e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/80eb5a1f968448b77da9e8b2c0827f6e8d767846",
- "reference": "80eb5a1f968448b77da9e8b2c0827f6e8d767846",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f347a5f561b03db95ed666959db42bbbf429b7e5",
+ "reference": "f347a5f561b03db95ed666959db42bbbf429b7e5",
"shasum": ""
},
"require": {
@@ -1878,20 +1889,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2017-06-05T13:06:51+00:00"
+ "time": "2017-06-24T09:29:48+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "be8280f7fa8e95b86514f1e1be997668a53b2888"
+ "reference": "33f87c957122cfbd9d90de48698ee074b71106ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/be8280f7fa8e95b86514f1e1be997668a53b2888",
- "reference": "be8280f7fa8e95b86514f1e1be997668a53b2888",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/33f87c957122cfbd9d90de48698ee074b71106ea",
+ "reference": "33f87c957122cfbd9d90de48698ee074b71106ea",
"shasum": ""
},
"require": {
@@ -1964,7 +1975,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2017-06-06T03:59:58+00:00"
+ "time": "2017-07-05T13:28:15+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -1976,7 +1987,7 @@
},
"dist": {
"type": "zip",
- "url": "https://files.phpcomposer.com/files/symfony/polyfill-mbstring/f29dca382a6485c3cbe6379f0c61230167681937.zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937",
"reference": "f29dca382a6485c3cbe6379f0c61230167681937",
"shasum": ""
},
@@ -2027,16 +2038,16 @@
},
{
"name": "symfony/process",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf"
+ "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
+ "url": "https://api.github.com/repos/symfony/process/zipball/5ab8949b682b1bf9d4511a228b5e045c96758c30",
+ "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30",
"shasum": ""
},
"require": {
@@ -2072,20 +2083,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22T12:32:03+00:00"
+ "time": "2017-07-03T08:12:02+00:00"
},
{
"name": "symfony/routing",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "39804eeafea5cca851946e1eed122eb94459fdb4"
+ "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/39804eeafea5cca851946e1eed122eb94459fdb4",
- "reference": "39804eeafea5cca851946e1eed122eb94459fdb4",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/dc70bbd0ca7b19259f63cdacc8af370bc32a4728",
+ "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728",
"shasum": ""
},
"require": {
@@ -2150,11 +2161,11 @@
"uri",
"url"
],
- "time": "2017-06-02T09:51:43+00:00"
+ "time": "2017-06-24T09:29:48+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
@@ -2203,16 +2214,16 @@
},
{
"name": "symfony/translation",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543"
+ "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/dc3b2a0c6cfff60327ba1c043a82092735397543",
- "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3",
+ "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3",
"shasum": ""
},
"require": {
@@ -2264,20 +2275,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22T07:42:36+00:00"
+ "time": "2017-06-24T16:45:30+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc"
+ "reference": "9ee920bba1d2ce877496dcafca7cbffff4dbe08a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/347c4247a3e40018810b476fcd5dec36d46d08dc",
- "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9ee920bba1d2ce877496dcafca7cbffff4dbe08a",
+ "reference": "9ee920bba1d2ce877496dcafca7cbffff4dbe08a",
"shasum": ""
},
"require": {
@@ -2332,20 +2343,20 @@
"debug",
"dump"
],
- "time": "2017-06-02T09:10:29+00:00"
+ "time": "2017-07-05T13:02:37+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063"
+ "reference": "1f93a8d19b8241617f5074a123e282575b821df8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063",
- "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8",
+ "reference": "1f93a8d19b8241617f5074a123e282575b821df8",
"shasum": ""
},
"require": {
@@ -2387,7 +2398,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T22:05:06+00:00"
+ "time": "2017-06-15T12:58:50+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@@ -2798,22 +2809,22 @@
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "3.1.1",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+ "reference": "46f7e8bb075036c92695b15a1ddb6971c751e585"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/46f7e8bb075036c92695b15a1ddb6971c751e585",
+ "reference": "46f7e8bb075036c92695b15a1ddb6971c751e585",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.2.0",
+ "phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
@@ -2839,24 +2850,24 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2016-09-30T07:12:33+00:00"
+ "time": "2017-07-15T11:38:20+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2.1",
+ "version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
- "php": ">=5.5",
+ "php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
@@ -2886,7 +2897,7 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2016-11-25T06:54:22+00:00"
+ "time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
@@ -3202,16 +3213,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "5.7.20",
+ "version": "5.7.21",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b"
+ "reference": "3b91adfb64264ddec5a2dee9851f354aa66327db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b",
- "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3b91adfb64264ddec5a2dee9851f354aa66327db",
+ "reference": "3b91adfb64264ddec5a2dee9851f354aa66327db",
"shasum": ""
},
"require": {
@@ -3280,20 +3291,20 @@
"testing",
"xunit"
],
- "time": "2017-05-22T07:42:55+00:00"
+ "time": "2017-06-21T08:11:54+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "3.4.3",
+ "version": "3.4.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118",
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118",
"shasum": ""
},
"require": {
@@ -3339,7 +3350,7 @@
"mock",
"xunit"
],
- "time": "2016-12-08T20:27:08+00:00"
+ "time": "2017-06-30T09:13:00+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
diff --git a/public/css/main.css b/public/css/main.css
index 50ef95f..474ac24 100644
--- a/public/css/main.css
+++ b/public/css/main.css
@@ -25,6 +25,10 @@ a:hover, a:focus {
box-sizing: content-box;
}
+.navbar {
+ padding: 0;
+}
+
.navbar-back {
position: absolute;
top: 0;
@@ -59,8 +63,25 @@ a:hover, a:focus {
box-sizing: content-box;
}
+.nav-btn {
+ color: rgba(255,255,255,.75)!important;
+ padding-top: 16px;
+ padding-bottom: 16px;
+ padding-left: 10px!important;
+ padding-right: 10px!important;
+}
+
.navbar-avatar {
- padding: 0 !important;
+ padding-top: 8px!important;
+ padding-bottom: 8px!important;
+}
+
+.nav-btn:hover {
+ background: rgba(255, 255, 255, 0.25);
+}
+
+.nav-btn:active {
+ background: rgba(255, 255, 255, 0.5);
}
.avatar {
@@ -112,4 +133,8 @@ a:hover, a:focus {
img {
max-width: 100%;
+}
+
+.dropdown-menu {
+ margin: 0;
}
\ No newline at end of file
diff --git a/public/js/jquery-3.2.1.min.js b/public/js/jquery.min.js
similarity index 100%
rename from public/js/jquery-3.2.1.min.js
rename to public/js/jquery.min.js
diff --git a/resources/views/admin/classify.blade.php b/resources/views/admin/classify.blade.php
new file mode 100644
index 0000000..93ce3c4
--- /dev/null
+++ b/resources/views/admin/classify.blade.php
@@ -0,0 +1,43 @@
+@extends('admin.master')
+
+@section('tab-list')
+
公告管理
+ 分类管理
+ 查看举报记录
+ 查看所有用户
+ 交易列表
+@endsection
+
+@section('tab-classify')
+
+
+
+
+ @foreach($cats as $cat)
+ {{ $cat ->cat_name}}
+ @endforeach
+
+
+
+
+ @foreach($cats as $cat)
+
+
+
+ @endforeach
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/index.blade.php b/resources/views/admin/index.bak.blade.php
similarity index 100%
rename from resources/views/admin/index.blade.php
rename to resources/views/admin/index.bak.blade.php
diff --git a/resources/views/admin/master.blade.php b/resources/views/admin/master.blade.php
new file mode 100644
index 0000000..466bd8a
--- /dev/null
+++ b/resources/views/admin/master.blade.php
@@ -0,0 +1,45 @@
+@extends('layout.master')
+
+@section('title', "管理")
+
+@section('content')
+
+
+
+
+
+ @yield('tab-announcement')
+ @yield('tab-classify')
+ @yield('tab-report')
+ @yield('tab-userlist')
+ @yield('tab-translist')
+
+
+
+@endsection
+
diff --git a/resources/views/admin/notice.blade.php b/resources/views/admin/notice.blade.php
new file mode 100644
index 0000000..f0c28de
--- /dev/null
+++ b/resources/views/admin/notice.blade.php
@@ -0,0 +1,51 @@
+@extends('admin.master')
+
+@section('tab-list')
+ 公告管理
+ 分类管理
+ 查看举报记录
+ 查看所有用户
+ 交易列表
+@endsection
+
+@section('tab-announcement')
+
+
+
+
+ #
+ 公告标题
+ 公告内容
+ 发布时间
+
+
+ @foreach($announcements as $announcement)
+
+
+ {{ $announcement ->id }}
+ {{ $announcement->title }}
+ {{ $announcement->content }}
+ {{ $announcement->created_at }}
+
+
+
+
+
+
+ @endforeach
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/report.blade.php b/resources/views/admin/report.blade.php
new file mode 100644
index 0000000..b377a54
--- /dev/null
+++ b/resources/views/admin/report.blade.php
@@ -0,0 +1,85 @@
+@extends('admin.master')
+
+@section('tab-list')
+ 公告管理
+ 分类管理
+ 查看举报记录
+ 查看所有用户
+ 交易列表
+@endsection
+
+@section('tab-report')
+
+
+ {{ $reports->links() }}
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/translist.blade.php b/resources/views/admin/translist.blade.php
new file mode 100644
index 0000000..8d9666e
--- /dev/null
+++ b/resources/views/admin/translist.blade.php
@@ -0,0 +1,68 @@
+@extends('admin.master')
+
+@section('tab-list')
+ 公告管理
+ 分类管理
+ 查看举报记录
+ 查看所有用户
+ 交易列表
+@endsection
+
+@section('tab-translist')
+
+
+
+
+ 交易单号
+ 卖家学号
+ 买家学号
+ 商品ID
+ 交易数目
+ 交易状态
+ 评价
+
+
+ @foreach($trans as $tran)
+ @if($tran->seller != NULL)
+
+
+ {{$tran->id}}
+ {{$tran->seller->stuid}}
+ {{$tran->buyer->stuid}}
+ {{$tran->good_id}}
+ {{$tran->number}}
+
+ @if($tran->status == 0)
+ 订单已取消
+ @endif
+ @if($tran->status == 1)
+ 买家已购买,卖家未确认
+ @endif
+ @if($tran->status == 2)
+ 卖家已确认
+ @endif
+ @if($tran->status == 3)
+ 交易失败
+ @endif
+ @if($tran->status == 4)
+ 交易成功待评价
+ @endif
+ @if($tran->status == 5)
+ 交易成功已评价
+ @endif
+
+
+ @if($tran->status == 5)
+ {{$tran->reason}}
+ @else
+ 无
+ @endif
+
+
+
+ @endif
+ @endforeach
+
+ {{ $trans->links() }}
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/userlist.blade.php b/resources/views/admin/userlist.blade.php
new file mode 100644
index 0000000..d36ff7b
--- /dev/null
+++ b/resources/views/admin/userlist.blade.php
@@ -0,0 +1,55 @@
+@extends('admin.master')
+
+@section('tab-list')
+ 公告管理
+ 分类管理
+ 查看举报记录
+ 查看所有用户
+ 交易列表
+@endsection
+
+@section('tab-userlist')
+
+
+
+
+ #
+ 权限
+ 学号
+ 真实姓名
+ 昵称
+ 用户名
+ 邮箱
+ 是否封禁
+ 注册时间
+
+
+ @foreach($users as $user)
+
+
+ {{$user->id}}
+ {{$user->privilege}}
+ {{$user->stuid}}
+ {{$user->realname}}
+ {{$user->nickname}}
+ {{$user->username}}
+ {{$user->email}}
+
+ @if($user->baned == 0)
+ 否
+ @endif
+ @if($user->baned == 1)
+ 已封禁{{$user->banedtime}}天
+ @endif
+ @if($user->baned == -1)
+ 已永久封禁
+ @endif
+
+ {{$user->created_at}}
+
+
+ @endforeach
+
+ {{ $users->links() }}
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index c6110e0..d834496 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -34,7 +34,7 @@
旧很靠谱
-
+
自主研发 | 校卡绑定 | 安全便捷
@@ -49,7 +49,7 @@
用户名/邮箱
-
+
diff --git a/resources/views/layout/master.blade.php b/resources/views/layout/master.blade.php
index c2ce38d..52ae99e 100644
--- a/resources/views/layout/master.blade.php
+++ b/resources/views/layout/master.blade.php
@@ -10,7 +10,7 @@
-
+
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php
index 6be2b85..6466f79 100644
--- a/resources/views/welcome.blade.php
+++ b/resources/views/welcome.blade.php
@@ -24,8 +24,6 @@
@if(count($newgoods)>0)
新品
-
点击分类查看更多商品哦↑
-
点击分类查看更多商品哦
@foreach($newgoods as $good)
@include('good.goodInfoOnWelcome')
diff --git a/tests/UserTest.php b/tests/UserTest.php
index 013864c..dd573d9 100644
--- a/tests/UserTest.php
+++ b/tests/UserTest.php
@@ -234,13 +234,13 @@ class UserTest extends BrowserKitTestCase
->dontSee('testnotice');
//test new cat_name
- $this->visit('admin')
+ $this->visit('admin/classify')
->type('testcat', 'cat_name')
->press('提交')
->see('testcat')
->visit('/')
->see('testcat')
- ->visit('admin')
+ ->visit('admin/classify')
->press('删除')
->dontSee('testcat');
@@ -257,18 +257,18 @@ class UserTest extends BrowserKitTestCase
->type('admin@example.com', 'username')
->type('admin@example.com', 'password')
->press('登录')
- ->visit('admin')
+ ->visit('admin/report')
->see('He is selling a gay!')
->press('领取')
->seePageIs('/message')
- ->visit('admin')
+ ->visit('admin/report')
->see('批准显示')
->see('驳回此条')
->press('批准显示')
->see('已批准');
//test list all users
- $this->visit('admin')
+ $this->visit('admin/userlist')
->see('test@example.com')
->see('admin@example.com');