Commit 0cb8f321 authored by Shahzod's avatar Shahzod

CaptchaPer

parent 531148ff
......@@ -2,10 +2,14 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="45142ad9-1f6f-4356-8738-3011f539d65e" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/fazoshop.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/fazoshop.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Auth/RegisterController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Auth/RegisterController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Auth/LoginController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Auth/LoginController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/HomeController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/HomeController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/captcha.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/captcha.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/main.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/main.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/pages/terms.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/pages/terms.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -235,6 +239,7 @@
<workItem from="1571336316933" duration="11634000" />
<workItem from="1571458855290" duration="49658000" />
<workItem from="1572018556391" duration="40349000" />
<workItem from="1573827723198" duration="5980000" />
</task>
<task id="LOCAL-00001" summary="first commit (10/07/2019//11/;58)">
<created>1570475345391</created>
......
......@@ -3,6 +3,8 @@
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
//use http\Env\Request;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
......@@ -27,6 +29,26 @@ class LoginController extends Controller
*/
protected $redirectTo = '/packages';
/**
* Validate the user login request.
*
* @param \Illuminate\Http\Request $request
* @return void
*
* @throws \Illuminate\Validation\ValidationException
*/
protected function validateLogin(Request $request)
{
$request->validate([
$this->username() => 'required|string',
'password' => 'required|string',
]);
$request->validate([
'captcha' => 'required|captcha',
], ['captcha.captcha' => 'Неверный защитный код...']);
}
/**
* Create a new controller instance.
*
......@@ -37,6 +59,7 @@ class LoginController extends Controller
$this->middleware('guest')->except('logout');
}
public function refresh()
{
return captcha_img();
......
......@@ -46,21 +46,28 @@ class HomeController extends Controller
public function sendMail(Request $request)
{
$request->validate([
'captcha' => 'require|captcha',
], ['captcha.captcha' => 'Неверный защитный код...']);
$name = $request->get('name');
$lastname = $request->get('lastname');
$email = $request->get('email');
$phone = $request->get('phone');
$message = $request->get('phone');
$message = $request->get('message');
$to_name = $name . ' ' . $lastname;
$to_email = $email;
$data = array('mes' => $message . ' | ' . $phone);
Mail::send('emails', $data, function ($message) use ($to_name, $to_email) {
$message->to($to_email, $to_name)
->subject('Fazo Cargo | Checking customer email');
$message->from('noreply@fazoshop.us', 'Verification code');
$message->to('info@fazoshop.us', $to_name)
->subject('Fazo Cargo');
$message->from($to_email, $to_name);
});
}
public function sendMailGet()
{
return captcha_img();
}
}
This diff is collapsed.
......@@ -3,11 +3,11 @@
return [
'characters' => ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z'],
'default' => [
'length' => 9,
'width' => 120,
'height' => 36,
'length' => 6,
'width' => 150,
'height' => 56,
'quality' => 90,
'math' => true,
'math' => false,
],
'math' => [
'length' => 9,
......
......@@ -761,6 +761,7 @@
<div class="col-xs-12 col-md-9 col-lg-6 col-md-offset-2 col-lg-offset-3">
<!--p.fw-l.h5.text-transform-none Enter your email address to receive all company news, special offers and other discount information.-->
<!-- RD Mailform-->
<form class="rd-mailform text-left" data-form-output="form-output-global" data-form-type="forms"
method="post" action="{{ route('send.mail') }}">
@csrf
......@@ -800,9 +801,26 @@
data-constraints="@Required" required></textarea>
</div>
</div>
<div class="col-xs-12 text-center">
<div class="col-xs-6 text-left" >
<div class="captcha">
<span style="float: right;" >{!! captcha_img() !!} </span>
</div>
</div>
<div class="col-xs-6 text-right">
<button class="btn btn-primary btn-sm" type="submit">Отправить</button>
</div>
</div>
<div class="form-wrap" >
<input id="captcha" type="text" class="form-input{{ $errors->has('captcha') ? ' has-error' : '' }}" name="captcha" placeholder="Введите код с картинки" required>
@if ($errors->has('captcha'))
<span class="invalid-feedback">
<strong>{{ $errors->first('captcha') }}</strong>
</span>
@endif
</div>
</form>
</div>
......
......@@ -229,14 +229,14 @@
<b>B. Payment:</b>
<p>The User will be charged for all FazoShop Shopping orders. Acceptable methods of payment are credit card, debit card, PayPal, alternate local payment methods or credited funds available on your account.
<p >The User will be charged for all FazoShop Shopping orders. Acceptable methods of payment are credit card, debit card, PayPal, alternate local payment methods or credited funds available on your account.
There is a FazoShop Shopping fee for each order successfully processed. Fees for FazoShop Shopping orders are:</p>
<ul>
<li> When using a credit or debit card for payment, 8% of the order total or minimum $10 per order, whichever is greater.</li>
<li> When using PayPal for payment, 8% of the order total or minimum $10 per order, whichever is greater.</li>
<li> When placing a FazoShop Shopping order with more than 10 unique items per online merchant, there will be a $1 per unique item charge for every item over 10.</li>
</ul>
<ol>
<li style="text-align: justify;"> When using a credit or debit card for payment, 8% of the order total or minimum $10 per order, whichever is greater.</li>
<li style="text-align: justify;"> When using PayPal for payment, 8% of the order total or minimum $10 per order, whichever is greater.</li>
<li style="text-align: justify;"> When placing a FazoShop Shopping order with more than 10 unique items per online merchant, there will be a $1 per unique item charge for every item over 10.</li>
</ol>
<b>C. Large Orders / New Customers:</b>
<p>Limit 20 unique items per order.</p>
......@@ -517,8 +517,8 @@
<h4 class="my-4" style="color: #004085;">VII. NO LEGAL RELATIONSHIP</h4>
<p>You agree that no joint venture, partnership, employment, or agency relationship (other than as expressly set forth in these Terms and Conditions) exists between you and FazoShop.us as a result of this Agreement or your use of this Website.</p>
<h4 class="my-4" style="color: #004085;">VIII. DIRECT EXPORT TRANSACTIONS (i.e., non-routed exports)</h4>
<b>For Members acting as the U.S. Principal Party in Interest:</b>
<h4 class="my-4" style="color: #004085;">VIII. DIRECT EXPORT TRANSACTIONS (i.e., non-routed exports)</h4><br>
<b style="text-align: justify; float: left">For Members acting as the U.S. Principal Party in Interest:</b><br><br>
<ul style="text-align: justify;">
<li> Any reference to <b>"Member or the USPPI" should be read as "Member."</b></li>
<li> The following excerpt of Part II is amended to read:
......
......@@ -63,10 +63,12 @@ Route::get('/questions', function () {
Route::get('/refresh', 'Auth\LoginController@refresh')->name('refresh');
//Route::post('/login', 'Auth\LoginController@refreshpost')->name('login');
Route::post('/feedback/add', 'FeedbackController@addGuest');
Route::post('/send-mail', 'HomeController@sendMail')->name('send.mail');
Route::get('/send-mail', 'HomeController@sendMailGet');
//
Route::get('/packages', 'OrderController@index')->name('package')->middleware('auth');
Route::get('/packages/create/{id}', 'OrderController@create')->name('package.create')->middleware('auth');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment