added style stuff

This commit is contained in:
amazing-username
2017-05-29 21:19:33 -05:00
parent e356bf4555
commit a51c1491dc
8 changed files with 209 additions and 65 deletions
+9 -6
View File
@@ -82,7 +82,6 @@ class BillController extends Controller
$cost = DB::table('transactions')->where('responsible', $id)->pluck('cost')->first();
$people = DB::table('transactions')->where('responsible', $id)->pluck('people')->first();
$full = ($cost * 100) / ($people * 100);
$full = $full . "";
echo $id . $billname . $payer . $amountpaid . $full . $username;
DB::table('responsible')->insert(
['id' => $id, 'billname' => $billname, 'username' => $payer, 'amountpaid' => $amountpaid, 'total' => $full, 'owner' => $username]
@@ -106,7 +105,7 @@ class BillController extends Controller
}
}
return view('manage', ['username' => $username, 'message' => $payer . " has been added to the bill"])->with('test', $test)->with('users', $users)->with('payer', '')->with('bills', '')->with('amountpaids', '')->with('totals', '')->with('responsibleid', $responsibleid)->with('count', $count);
return view('manage', ['username' => $username, 'message' => $payer . " has been added to the bill"])->with('test', $test)->with('users', $users)->with('payer', '')->with('bills', '')->with('amountpaids', $amountpaids)->with('totals', '')->with('responsibleid', $responsibleid)->with('count', '');
}
public function calcbill(Request $stuff)
{
@@ -119,7 +118,8 @@ class BillController extends Controller
$responsibleid = DB::table('responsible')->where('owner', $stuff->input('username'))->pluck('id');
$count = $amountpaids->count();
DB::table('responsible')->where('id', $responsibleid)->update(['amountpaid' => $stuff->input('amountpaid')]);
DB::table('responsible')->where('id', $stuff->input('responsibleid'))->update(['amountpaid' => $stuff->input('amountpaid')]);
echo $stuff->input('amountpaid') . "<br>";
return view('manage', ['username' => $stuff->input('username'), 'message' => ''])->with('test', $test)->with('users', $users)->with('payer', $payer)->with('bills', $bills)->with('amountpaids', $amountpaids)->with('totals', $totals)->with('responsibleid', $responsibleid)->with('count', $count);
}
@@ -141,17 +141,20 @@ class BillController extends Controller
public function view(Request $stuff)
{
$grass = DB::table('bills')->pluck('billname');
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass);
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', '')->with('owner', '')->with('amountpaid', '')->with('total', '');
}
public function viewbill(Request $stuff)
{
$grass = DB::table('bills')->pluck('billname');
$billchoice = $stuff->input('tough');
$bills = DB::table('responsible')->where('billname', $billchoice)->orderBy('id', 'desc');
$owner = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('owner')->first();
$amountpaid = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('amountpaid')->first();
$total = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('total')->first();
echo "Hey " . $stuff->input('username') . " you chose: ";
echo $stuff->input('tough');
echo "<br>";
return "Yup";
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', $billchoice)->with('owner', $owner)->with('amountpaid', $amountpaid)->with('total', $total);
}
}
+9 -7
View File
@@ -12,26 +12,28 @@
</head>
<body style="background-color:#eee">
<div class="jumbotron text-center">
<h1>Alright {{ $username }}, here is where you can create bills</h1>
{!! Form::open(array('action' => 'HomeController@home')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::button('userHome', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
<div style="background-color:#000000">
{{ Form::button('user home', array('style' => 'height:15%;width:100%;font-size:500%;background-color:#000000;color:#eee', 'type' => 'submit')) }}
</div>
</p>
{!! Form::close() !!}
<div class="jumbotron text-center">
<h1>Alright {{ $username }}, here is where you can create bills</h1>
<br>
{!! Form::open(array('action' => 'BillController@createbill')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::label('lbl', 'bill name', array('style' => 'font-size:400%')) }}
{{ Form::label('lbl', 'bill name', array('style' => 'font-size:500%')) }}
</p>
<p>
{{ Form::text('billname', '', array('style' => 'font-size:400%')) }}
{{ Form::text('billname', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
{{ Form::button('Create Bill', array('style' => 'height:20%;width:70%;font-size:500%', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
<h1>{{$message}}</h1>
+2 -1
View File
@@ -15,7 +15,8 @@
<div class="jumbotron text-center">
<h1>HomeIsWhereTheMoneyIs</h1>
<a href="login"><button style="height:40%;width:90%"><h1 style="font-size:1000%">Login</h1></button><br></a>
<a href="register"><button style="height:20%;width:50%"><h1 style="font-size:500%">Register</h1></button></a>
<br><br>
<a href="register"><button style="height:30%;width:90%"><h1 style="font-size:500%">Register</h1></button></a>
</div>
</body>
</html>
+13 -8
View File
@@ -12,21 +12,26 @@
</head>
<body style="background-color:#eee">
<div style="background-color:#000000;text-align:center">
<a href="/"><h1 style="height:10%;font-size:800%">Home</h1></a>
</div>
<div class="jumbotron text-center">
<h1>Login Page</h1>
<a href="/"><h1>Home</h1></a>
<h1 style="font-size:800%">Login Page</h1>
<br>
{{ Form::open(array('action' => 'HomeController@loginUser')) }}
<p>
{{ Form::label("username") }}
{{ Form::text("username") }}
{{ Form::label("usernamelabel", 'username', array('style' => 'width:50%;height:20%;font-size:500%')) }}
<br>
{{ Form::text("username", '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label("password") }}
{{ Form::password("password") }}
{{ Form::label("passwordlabel", 'password', array('style' => 'width:50%;height:20%;font-size:500%')) }}
<br>
{{ Form::password("password", array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::submit("Login maxipad resident") }}
<br>
{{ Form::submit("Login", array('style' => 'width:70%;height:25%;font-size:500%')) }}
</p>
{{ Form::close() }}
<h1>{{ $message }}</h1>
+95 -16
View File
@@ -9,38 +9,80 @@
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style type="text/css">
.test
{
height: 30%;
}
.test2 {
height:50%;
}
input {
width:70%;
height:20%;
font-size:500%;
}
select {
width:70%;
height:20%;
font-size:500%;
}
label {
font-size:500%;
}
button {
width:70%;
height:20%;
font-size:500%;
}
</style>
</head>
<body style="background-color:#eee">
<div class="jumbotron text-center">
<h1>Alright {{ $username }}, here is where you can manage the bills you own bills</h1>
{!! Form::open(array('action' => 'HomeController@home')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::button('user Home', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
<div style="background-color:#000000">
{{ Form::button('user home', array('style' => 'height:15%;width:100%;font-size:500%;background-color:#000000;color:#eee', 'type' => 'submit')) }}
</div>
</p>
{!! Form::close() !!}
<div class="jumbotron text-center">
<h1>Alright {{ $username }}, here is where you can manage the bills you own bills</h1>
<br><br>
{!! Form::open(array('action' => 'BillController@managebill')) !!}
{{ Form::hidden('username', $username) }}
<select name="billname">
<br>
<p>
{{ Form::label('billnamelabel', 'billname', array('style' => 'font-size:500%'))}}
</p>
<p>
<select name="billname" style="width:70%;height:20%;font-size:500%">
@foreach ($test as $bax)
<option value={{ $bax }}>{{ $bax }}</option>
@endforeach
</select>
<p>
{{ Form::label('datelabel', "enter in yyyymm") }}
{{ Form::text('date') }}
</p>
<p>
{{ Form::label('totallabel', 'total bill amount') }}
{{ Form::text('total') }}
{{ Form::label('datelabel', "enter date in yyyymm", array('style' => 'font-size:500%')) }}
</p>
<p>
{{ Form::label('eachlabel', 'each bill amount') }}
{{ Form::text('each') }}
{{ Form::text('date', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
{{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
<p>
{{ Form::label('totallabel', 'total bill amount', array('style' => 'font-size:500%')) }}
</p>
<p>
{{ Form::text('total', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label('eachlabel', 'how many people', array('style' => 'font-size:500%')) }}
</p>
<p>
{{ Form::text('each', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
{{ Form::button('add bill', array('style' => 'height:30%;width:70%;font-size:500%', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
<h1>{{ $message }}</h1>
@@ -51,12 +93,18 @@
{!! Form::open(array('action' => 'BillController@addpeople')) !!}
{{ Form::hidden('username', $username) }}
<p>
<select name="billname">
{{ Form::label('billnamelbl', 'billname') }}
</p>
<p>
<select name="billname" style="width:70%;height:20%;font-size:500%">
@foreach ($test as $bax)
<option value={{ $bax }}>{{ $bax }}</option>
@endforeach
</select>
</p>
<p>
{{ Form::label('payerlbl', 'payer') }}
</p>
<p>
<select name="payer">
@foreach ($users as $cax)
@@ -66,15 +114,19 @@
</p>
<p>
{{ Form::label('datelabel', 'date in yyyymm') }}
</p>
<p>
{{ Form::text('date') }}
</p>
<p>
{{ Form::label('amountpaidlabel', 'amount paid') }}
</p>
<p>
{{ Form::text('amountpaid') }}
</p>
<p>
{{ Form::button('Add person', array('style' => '', 'type' => 'submit')) }}
{{ Form::button('add payer', array('style' => '', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
</div>
@@ -83,6 +135,9 @@
<h1>Manage a bill</h1>
{!! Form::open(array('action' => 'BillController@calcbill')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::label('billnamelbl', 'billname') }}
</p>
<p>
<select name="billname">
@foreach ($test as $bax)
@@ -90,6 +145,9 @@
@endforeach
</select>
</p>
<p>
{{ Form::label('payerlbl', 'payer') }}
</p>
<p>
<select name="payer">
@foreach ($users as $cax)
@@ -97,6 +155,9 @@
@endforeach
</select>
</p>
<p>
{{ Form::label('idlbl', 'bill id') }}
</p>
<p>
<select name="responsibleid">
@foreach ($responsibleid as $dax)
@@ -106,10 +167,12 @@
</p>
<p>
{{ Form::label('amountpaidlabel', 'amount paid') }}
</p>
<p>
{{ Form::text('amountpaid') }}
</p>
<p>
{{ Form::button('Add person', array('style' => '', 'type' => 'submit')) }}
{{ Form::button('update payer', array('style' => '', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
</div>
@@ -118,6 +181,9 @@
<h1>Who owes you cash</h1>
{!! Form::open(array('action' => 'BillController@debt')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::label('payerlbl', 'payer') }}
</p>
<p>
<select name="payer">
@foreach ($users as $cax)
@@ -134,9 +200,22 @@
nothing
@endif
@if ($empt)
<table style="width:100%;font-size:300%">
<tr>
<td>Payer</td>
<td>Billname</td>
<td>Amount paid</td>
<td>Total</td>
</tr>
@for ($i = 0; $i < $count; ++$i)
{{ $payer }} {{ $bills[$i] }} {{ $amountpaids[$i] }} {{ $totals[$i] }} <br>
<tr>
<td>{{ $payer }}</td>
<td>{{ $bills[$i] }}</td>
<td>{{ $amountpaids[$i] }}</td>
<td>{{ $totals[$i] }}</td>
</tr>
@endfor
</table>
@endif
</div>
</div>
+28 -19
View File
@@ -12,40 +12,49 @@
</head>
<body style="background-color:#eee">
<div style="background-color:#000000;text-align:center">
<a href="/"><h1 style="height:10%;font-size:800%">Home</h1></a>
</div>
<div class="jumbotron text-center">
<h1>Registration Page</h1>
<a href="/"><h1>Home</h1></a>
<!--
<a href="stunt"><button style="height:40%;width:40%"><h1 style="font-size:1000%">Login</h1></button><br></a>
<button style="height:20%;width:20%"><h1 style="font-size:500%">Register</h1></button>
-->
<h1 style="font-size:800%">Registration Page</h1>
<br>
{{ Form::open(array('action' => 'HomeController@registerUser', 'method' => 'post')) }}
<p>
{{ Form::label('first name') }}
{{ Form::text('firstname') }}
{{ Form::label('firstnamelabel', 'first name', array('style' => 'width:60%;height:20%;font-size:500%')) }}
<br>
{{ Form::text('firstname', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label('last name') }}
{{ Form::text('lastname') }}
{{ Form::label('lastnamelabel', 'last name', array('style' => 'width:60%;height:20%;font-size:500%')) }}
<br>
{{ Form::text('lastname', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label('username') }}
{{ Form::text('username') }}
{{ Form::label('usernamelabel', 'username', array('style' => 'width:60%;height:20%;font-size:500%')) }}
<br>
{{ Form::text('username', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label('password') }}
{{ Form::password('password') }}
{{ Form::label('passwordlabel', 'password', array('style' => 'width:60%;height:20%;font-size:500%')) }}
<br>
{{ Form::password('password', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label('confirm') }}
{{ Form::password('confirm') }}
{{ Form::label('confirmlabel', 'confirm', array('style' => 'width:60%;height:20%;font-size:500%')) }}
<br>
{{ Form::password('confirm', array('style' => 'width:70%;height:15%;font-size:500%')) }}
</p>
<p>
{{ Form::label('roomlabel') }}
{{ Form::select('room', array('single' => 'single', 'double' => 'double')) }}
{{ Form::label('roomlabel', 'room', array('style' => 'width:60%;height:20%;font-size:500%')) }}
<br>
<select name="room" style="width:70%;height:20%;font-size:500%">
<option>single</option>
<option>double</option>
</select>
</p>
<p>
{{ Form::submit('register me') }}
<br>
{{ Form::submit('register me', array('style' => 'width:70%;height:25%;font-size:500%')) }}
</p>
{{ Form::close() }}
<h1>{{ $message }}</h1>
+4 -4
View File
@@ -22,26 +22,26 @@ height: 30%;
<body style="background-color:#eee">
<div class="jumbotron text-center">
<h1>What's good {{$username}}? it's your home page</h1>
<br>
<br><br>
{!! Form::open(array('action' => 'BillController@create')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::button('create', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
{{ Form::button('create', array('style' => 'height:30%;width:80%;font-size:800%', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
{!! Form::open(array('action' => 'BillController@manage')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::button('mange', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
{{ Form::button('mange', array('style' => 'height:30%;width:80%;font-size:800%', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
{!! Form::open(array('action' => 'BillController@view')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::button('view', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
{{ Form::button('view', array('style' => 'height:30%;width:80%;font-size:800%', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
</div>
+49 -4
View File
@@ -9,17 +9,46 @@
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style type="text/css">
.test
{
height: 30%;
}
.test2 {
height:50%;
}
input {
width:70%;
height:20%;
font-size:500%;
}
select {
width:70%;
height:20%;
font-size:500%;
}
label {
font-size:500%;
}
button {
width:70%;
height:20%;
font-size:500%;
}
</style>
</head>
<body style="background-color:#eee">
<div class="jumbotron text-center">
<h1>Alright {{ $username }}, here is where you can view bills that you need to pay...</h1>
{!! Form::open(array('action' => 'HomeController@home')) !!}
{{ Form::hidden('username', $username) }}
<p>
{{ Form::button('user Home', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
<div style="background-color:#000000">
{{ Form::button('user home', array('style' => 'height:15%;width:100%;font-size:500%;background-color:#000000;color:#eee', 'type' => 'submit')) }}
</div>
</p>
{!! Form::close() !!}
<div class="jumbotron text-center">
<h1>Alright {{ $username }}, here is where you can view bills that you need to pay...</h1>
{!! Form::open(array('action' => 'BillController@viewbill')) !!}
{{ Form::hidden('username', $username) }}
@@ -29,9 +58,25 @@
@endforeach
</select>
<p>
{{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
{{ Form::button('view bills', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}
</p>
{!! Form::close() !!}
<div>
<table style="width:100%;font-size:300%">
<tr>
<th>bill name</th>
<th>amount paid</th>
<th>total</th>
<th>owner</th>
</tr>
<tr>
<td>{{ $billname }}</td>
<td>{{ $amountpaid }}</td>
<td>{{ $total }}</td>
<td>{{ $owner }}</td>
</tr>
</table>
</div>
</div>
</body>
</html>