ÿØÿà JFIF H H ÿÛ C ÿÛ Cÿ " ÿÄ ÿÄ ÿÚ ±5¬€ ÿÄ àÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÄ àÿÚ ?! ÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÙ
| 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/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<?php $__env->startSection('controller','Product'); ?>
<?php $__env->startSection('action','Edit'); ?>
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<?php echo $__env->yieldContent('controller'); ?>
<small><?php echo $__env->yieldContent('action'); ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="admin"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="javascript:"><?php echo $__env->yieldContent('controller'); ?></a></li>
<li class="active"><?php echo $__env->yieldContent('action'); ?></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="box">
<?php echo $__env->make('admin.messages_error', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="box-body">
<form method="post" name="frmEditProduct" action="admin/product/edit?id=<?php echo e($id); ?>" enctype="multipart/form-data">
<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>" />
<input type="hidden" name="txtType" value="<?php if(@$_GET['type']=='combo' || @$_GET['type']=='sanpham'){ echo @$_GET['type'];}?>" />
<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 chung</a></li>
<?php if(@$_GET['type']!='combo' && @$_GET['type']!='sanpham'){?>
<li><a href="#tab_5" data-toggle="tab" aria-expanded="true">Thông số mô tả dưới</a></li>
<?php } ?>
<li><a href="#tab_2" data-toggle="tab" aria-expanded="true">Thông số sản phẩm</a></li>
<li><a href="#tab_4" data-toggle="tab" aria-expanded="true">SEO</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 <?php if($errors->first('fImages')!=''): ?> has-error <?php endif; ?>">
<img src="<?php echo e(asset('upload/product/'.$data->photo)); ?>" id="output" style="width: 150px;margin-bottom: 10px;"/>
<input class="max-with" name="fImages" type="file" onchange="loadFile(event)"/>
</div>
<div class="clearfix"></div>
<?php if(@$_GET['type']!='combo'){?>
<div class="form-group">
<label for="ten">Danh mục</label>
<select name="txtProductCate" class="form-control">
<option value="0">Chá»n danh mục</option>
<?php cate_parent($parent,0,"--",$data->cate_id) ?>
</select>
</div>
<?php if(@$_GET['type']!='sanpham'){?>
<div class="form-group hidden">
<label for="ten">Bán thêm đồ thêu</label>
<select name="cate_embroi" class="form-control">
<option value="0" <?php if($data->cate_embroi == 0){echo 'selected';}?>>Chá»n bán thêm mẫu</option>
<?php
$embloi=DB::table("embroidery_cates")->select()->get();
foreach($embloi as $row){
?>
<option value="<?php echo $row->id?>" <?php if($data->cate_embroi == $row->id){echo 'selected';}?>> <?php echo e($row->name); ?></option>
<?php } ?>
</select>
</div>
<?php } ?>
<?php } ?>
<div class="form-group <?php if($errors->first('txtName')!=''): ?> has-error <?php endif; ?>">
<label for="ten">Tiêu Ä‘á»</label>
<input type="text" name="txtName" id="txtName" value="<?php echo e($data->name); ?>" class="form-control" />
<?php if($errors->first('txtName')!=''): ?>
<label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> <?php echo $errors->first('txtName');; ?></label>
<?php endif; ?>
</div>
<div class="form-group <?php if($errors->first('txtName_eg')!=''): ?> has-error <?php endif; ?>">
<label for="ten">Tiêu Ä‘á»(English)</label>
<input type="text" name="txtName_eg" id="txtName_eg" value="<?php echo e($data->name_eg); ?>" class="form-control" />
<?php if($errors->first('txtName_eg')!=''): ?>
<label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> <?php echo $errors->first('txtName_eg');; ?></label>
<?php endif; ?>
</div>
<div class="form-group <?php if($errors->first('txtAlias')!=''): ?> has-error <?php endif; ?>">
<label for="alias">ÄÆ°á»ng dẫn tÄ©nh</label>
<input type="text" name="txtAlias" id="txtAlias" value="<?php echo e($data->alias); ?>" class="form-control" />
<?php if($errors->first('txtAlias')!=''): ?>
<label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> <?php echo $errors->first('txtAlias');; ?></label>
<?php endif; ?>
</div>
<?php if(@$_GET['type']!='combo' && @$_GET['type']!='sanpham'){?>
<div class="form-group">
<label for="ten">Giảm giá(%)</label>
<input type="number" name="sale" value="<?php echo e($data->sale); ?>" class="form-control" />
</div>
<?php } ?>
</div>
<div class="col-md-6 col-xs-12">
<?php if(@$_GET['type']=='combo' || @$_GET['type']=='sanpham'){?>
<?php if(@$_GET['type']!='sanpham'){?>
<div class="form-group">
<label for="ten">Danh mục cha</label>
<select name="combo_id" class="form-control">
<option value="0">Chá»n danh mục</option>
<?php $combo = DB::table("combos")->select()->get();
foreach($combo as $rows){
?>
<option value="<?php echo e($rows->id); ?>" <?php if($data->combo_id == $rows->id){echo 'selected';}?>><?php echo e($rows->name); ?></option>
<?php } ?>
</select>
</div>
<?php }} ?>
<div class="form-group">
<label for="desc">Mô tả(Tiếng việt)</label>
<textarea name="txtMota" rows="5" id="txtContent" class="form-control"><?php echo e($data->mota); ?></textarea>
</div>
<div class="form-group">
<label for="desc">Mô tả(English)</label>
<textarea name="txtMota_eg" rows="5" id="txtContent" class="form-control"><?php echo e($data->mota_eg); ?></textarea>
</div>
<?php if(@$_GET['type']!='combo'){?>
<div class="form-group">
<label for="desc">Nội dung(Tiếng việt)</label>
<textarea name="txtContent" rows="5" class="form-control"><?php echo e($data->content); ?></textarea>
</div>
<div class="form-group">
<label for="desc">Ná»™i dung(English)</label>
<textarea name="txtContent_eg" rows="5" class="form-control"><?php echo e($data->content_eg); ?></textarea>
</div>
<?php } ?>
<?php if(@$_GET['type']!='combo'){?>
<!------------- up nhieu anh ------------->
<div class="form-group hidden">
<?php $__currentLoopData = $product_img; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="form-group" id="<?php echo $key; ?>">
<a href="javascript:" type="button" id="del_img" class="btn btn-danger btn-circle icon_del"><i class="fa fa-times"></i></a>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<!------------- add nhiá»u ảnh ----------->
<div class="form-group hidden">
<label for="">Thêm nhiá»u hình ảnh</label>
<div id="a">
<div class="con">
<input id="Text1" name="detailImg[]" class="images-add" name="fImages2" type="file" />
<input id="bnt-images-add" type="button" class="btnRemove" id="btn-Remove" value="Xóa"/>
</div>
</div>
<input id="btnAdd" class="add-properties" type="button" value=" Thêm " />
</div>
<!------------- End up nhieu images ------>
<?php } ?>
</div>
</div>
<div class="clearfix"></div>
</div><!-- /.tab-pane -->
<div class="tab-pane" id="tab_2">
<?php if(@$_GET['type']== 'sanpham' || @$_GET['type']== 'combo'){?>
<div id="price">
<div class="col-md-6 col-xs-12">
<h2 class="mate">Chất liệu</h2>
<?php
$ak=0;
$chatlieu=DB::table('materials')->select()->orderBy('id','ASC')->orderBy('stt','asc')->get();
foreach($chatlieu as $k=>$pri){
$arr_mate=explode(',',$pri->pro_id);
foreach($arr_mate as $g=>$iteam_arr){
if($iteam_arr == $data->id){
$ak++;
?>
<div class="cauhinh">
<input readonly="" type="hidden" name="id_chatlieu[]" value="<?php echo $pri->id?>" />
<input readonly="" placeholder="Chất liệu" value="<?= $pri->name?>" class="form-control mbot" type="text" />
<?php
$type=DB::table('typematerials')->select()->orderBy('id','ASC')->where('pro_id',$data->id)->where('chatlieu_id',$pri->id)->first();
if(!empty($type)){
?>
<input placeholder="Id type Chất liệu" name="id_type[]" value="<?php echo e($type->id); ?>" class="form-control tygia" type="hidden" />
<?php if( $ak == 1){ ?>
<input placeholder="Äầu cánh" name="tygia[]" value="1" class="form-control tygia" type="hidden" />
<?php }else{ ?>
<input placeholder="Gấp bao lần số trước" name="tygia[]" value="<?= $type->price?>" class="form-control tygia" type="text" />
<?php } ?>
<?php }else{ ?>
<?php if( $ak == 1){ ?>
<input placeholder="Äầu cánh" name="tygia[]" value="1" class="form-control tygia" type="hidden" />
<?php }else{ ?>
<input placeholder="Gấp bao lần số trước" name="tygia[]" value="1" class="form-control tygia" type="text" />
<?php } ?>
<?php } ?>
</div>
<?php }}} ?>
<div style="clear: both;"></div>
</div>
<div class="col-md-6 col-xs-12">
<h2 class="mate">Size</h2>
<div class="price_size">
<?php
$n=0;
$size=DB::table('sizes')->select()->orderBy('id','ASC')->orderBy('stt','asc')->get();
foreach($size as $c=>$item_size){
$arr_exp=explode(',',$item_size->pro_id);
foreach($arr_exp as $item_cl){
if($item_cl == $data->id){
$n++;
?>
<div class="cauhinh">
<input type="hidden" name="id_size_txt_update[]" value="<?php echo $item_size->id?>" />
<div class="col-md-4 col-xs-12">
<input readonly="" placeholder="Size" name="size_txt_update[]" value="<?= $item_size->name?>" class="form-control add-100-w" type="text">
</div>
<div class="col-md-4 col-xs-12">
<!-- thông type mate id_price -->
<?php
@$price=DB::table('prices')->select('price','id','name')->where('size_id',$item_size->id)->where('pro_id',$data->id)->first();
if($n > 1){
?>
<?php if(!empty($price)){ ?>
<input placeholder="Id Price" name="id_price[]" value="<?php echo $price->id?>" class="form-control tygia" type="hidden" />
<input required="" placeholder="Tỷ lệ" name="price_txt_update[]" value="<?= $price->name?>" class="form-control add-100-w" type="text"/>
<?php }else{ ?>
<input required="" placeholder="Tỷ lệ" name="price_txt_update[]" class="form-control add-100-w" type="text"/>
<?php } ?>
<?php }else{ ?>
<?php if(!empty($price)){ ?>
<input placeholder="Id Price" name="id_price[]" value="<?php echo $price->id?>" class="form-control tygia" type="hidden" />
<input required="" placeholder="Giá gốc" name="price_txt_update[]" value="<?= $price->name?>" class="form-control add-100-w" type="text"/>
<?php }else{ ?>
<input required="" placeholder="Giá gốc" name="price_txt_update[]" class="form-control add-100-w" type="text"/>
<?php } ?>
<?php } ?>
<!-- End thông số type mate -->
</div>
<div style="clear: both;"></div>
</div>
<?php }}} ?>
<div style="clear: both;"></div>
</div>
</div>
<div style="clear: both;"></div>
</div>
<div class="col-md-6 col-xs-12">
<h2 class="mate">Mà u sắc</h2>
<?php
$arr = explode(',',$data->color_id);
$color = DB::table("colors")->select()->get();
foreach($color as $rows){
?>
<div class="col-xs-1">
<label style="font-weight: 400;cursor: pointer;text-align: center;"><input type="checkbox" name="color_id[]" value="<?php echo e($rows->id); ?>" <?php foreach($arr as $k){ if($k == $rows->id){echo 'checked';} } ?> /> <img style="width: 100%;" src="<?php echo e(asset('upload/color/'.$rows->images)); ?>" /></label>
</div>
<?php } ?>
</div>
<div style="height: 50px;"></div>
<div style="clear: both;"></div>
<?php } ?>
<!-- product big -->
<?php
if($data->type == null){
$arr_big=explode(',',$data->goi_id);
$pro_big=DB::table("products")->select('name','id')->where('type','sanpham')->orderBy('id','asc')->get();
foreach($pro_big as $item_big){
@$big=DB::table('bigs')->select('quantity','pro_id','id','status')->where('pro_id',$item_big->id)->where('big_pro',$data->id)->first();
?>
<div class="col-xs-3">
<div class="action-number">
<div class="lig_f">
<label><input type="checkbox" onclick="toggle(this);" name="parent_id_pro[]" <?php if(@$big->pro_id == $item_big->id){ if($big->status == 1){echo 'checked';}}?> value="<?= $item_big->id?>" id="red"><?= $item_big->name?></label>
<input <?php if(@$big->pro_id == $item_big->id){ if($big->status == 1){echo 'checked';}}?> name="idbig[]" value="<?php echo e(@$big->id); ?>" type="checkbox" hidden="" />
<div style="clear: both;"></div>
<span class="fa fa-minus minus" aria-hidden="true"></span>
<input id="soluong" type="text" value="<?php if(@$big->pro_id == $item_big->id){echo $big->quantity;}else{echo '1';}?>" class="qty">
<input <?php if(@$big->pro_id == $item_big->id){ if($big->status == 1){echo 'checked';}}?> id="quantity-text-onchange" name="qty[]" value="<?php if(@$big->pro_id == $item_big->id){echo $big->quantity;}else{echo '1';}?>" type="checkbox" class="qty" hidden=""/>
<span class="fa fa-plus add" aria-hidden="true"></span>
<div style="clear: both;"></div>
</div>
</div>
</div>
<?php }} ?>
<div style="clear: both;"></div>
<script type="text/javascript">
function toggle(e) {
$(e).parent().siblings('input[type=checkbox]').prop('checked',$(e).prop('checked'))
}
</script>
<script type="text/javascript">
$(function () {
$('.add').on('click',function(){
var $qty=$(this).closest('.action-number').find('.qty');
var currentVal = parseInt($qty.val());
if (!isNaN(currentVal)) {
$qty.val(currentVal + 1);
}
});
$('.minus').on('click',function(){
var $qty=$(this).closest('.action-number').find('.qty');
var currentVal = parseInt($qty.val());
if (!isNaN(currentVal) && currentVal > 0) {
$qty.val(currentVal - 1);
}
});
// text onchange
$('.qty').on('change, keyup',function(){
var currentValue = $(this).val();
$(this).next().val(currentValue)
})
});
</script>
</div>
<?php if(@$_GET['type']!='combo' && @$_GET['type']!='sanpham'){?>
<div class="tab-pane" id="tab_5">
<div class="row">
<div class="col-md-4 col-xs-12">
<div class="form-group">
<label for="desc">Material(Tiếng việt)</label>
<textarea name="mota2" rows="5" class="form-control"><?php echo e($data->mota2); ?></textarea>
</div>
<div class="form-group">
<label for="desc">Material(English)</label>
<textarea name="mota2_eg" rows="5" class="form-control"><?php echo e($data->mota2_eg); ?></textarea>
</div>
</div>
<div class="col-md-4 col-xs-12">
<div class="form-group">
<label for="desc">Why We Love This(Tiếng việt)</label>
<textarea name="mota3" rows="5" class="form-control"><?php echo e($data->mota3); ?></textarea>
</div>
<div class="form-group">
<label for="desc">Why We Love This(English)</label>
<textarea name="mota3_eg" rows="5" class="form-control"><?php echo e($data->mota3_eg); ?></textarea>
</div>
</div>
<div class="col-md-4 col-xs-12">
<div class="form-group">
<label for="desc">Try Us For 60 Nights Risk Free(Tiếng việt)</label>
<textarea name="mota4" rows="5" class="form-control"><?php echo e($data->mota4); ?></textarea>
</div>
<div class="form-group">
<label for="desc">Try Us For 60 Nights Risk Free(English)</label>
<textarea name="mota4_eg" rows="5" class="form-control"><?php echo e($data->mota4_eg); ?></textarea>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="tab-pane" id="tab_4">
<div class="row">
<div class="col-md-6 col-xs-12">
<div class="form-group">
<label for="title">Title(Tiếng việt)</label>
<input type="text" name="txtTitle" value="<?php echo e($data->title); ?>" class="form-control" />
</div>
<div class="form-group">
<label for="keyword">Keyword(Tiếng việt)</label>
<textarea name="txtKeyword" rows="5" class="form-control"><?php echo e($data->keyword); ?></textarea>
</div>
<div class="form-group">
<label for="description">Description(Tiếng việt)</label>
<textarea name="txtDescription" rows="5" class="form-control"><?php echo e($data->description); ?></textarea>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="form-group">
<label for="title">Title(English)</label>
<input type="text" name="txtTitle_eg" value="<?php echo e($data->title_eg); ?>" class="form-control" />
</div>
<div class="form-group">
<label for="keyword">Keyword(English)</label>
<textarea name="txtKeyword_eg" rows="5" class="form-control"><?php echo e($data->keyword_eg); ?></textarea>
</div>
<div class="form-group">
<label for="description">Description(English)</label>
<textarea name="txtDescription_eg" rows="5" class="form-control"><?php echo e($data->description_eg); ?></textarea>
</div>
</div>
</div>
<div class="clearfix"></div>
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
</div>
<div class="clearfix"></div>
<div class="col-md-6">
<div class="form-group" style="display: none;">
<label for="ten">Số thứ tự</label>
<input type="number" min="1" name="stt" value="<?php echo isset($data->status) ? $data->stt : (count($product)+1); ?>" class="form-control" style="width: 100px;">
</div>
<div class="form-group">
<label>
<input type="checkbox" name="status" <?php echo (!isset($data->status) || $data->status==1)?'checked="checked"':''; ?>> Hiển thị
</label>
</div>
<?php if(@$_GET['type']!='combo' && @$_GET['type']!='sanpham'){?>
<div class="form-group">
<label>
<input type="checkbox" name="noibat" <?php echo (!isset($data->noibat) || $data->noibat==1)?'checked="checked"':''; ?>> Nổi báºt
</label>
</div>
<?php } ?>
</div>
<div class="clearfix"></div>
<div class="box-footer">
<div class="row">
<div class="col-md-6">
<button type="submit" class="btn btn-primary">Cáºp nháºt</button>
<button type="button" class="btn btn-danger" onclick="javascript:window.location='admin/product'">Thoát</button>
</div>
</div>
</div>
</form>
</div><!-- /.box-body -->
</div><!-- /.box -->
</section><!-- /.content -->
<!-- Modal -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>