|
Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/iatax.com.au/public_html/application/views/admin/products/ |
Upload File : |
<div class="row">
<div class="col-sm-12">
<a href="<?= base_url('admin/products'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back to Product List Page</a><br><br>
<h4><?= empty($products->id_products) ? 'Add a new product' : 'Edit Product: '
. $products->title; ?></h4>
<?= $this->session->flashdata('success'); //to display success message ?>
<?= $this->session->flashdata('result'); //to display result message ?>
</div>
</div>
<?= form_open_multipart(); ?>
<p style="text-align:right;"><?= form_submit('submit', 'Save Product', 'class="btn btn-primary btn-success button-brown"'); ?> <?= anchor('admin/products', 'cancel'); ?></p><br>
<input type="hidden" name="product_id" value="<?= $products->id_products; ?>">
<div class="row">
<div class="col-sm-3">
<p>Product Name</p>
</div>
<div class="col-sm-9">
<p>
<?php
$data = array(
'name' => 'product_name',
'value' => set_value('product_name', $products->title), //product_name is validation repopulate, $products->title is getting value from database (initial state)..
'class' => 'form-control',
'required' => 'required'
);
echo form_input($data); ?>
<?= form_error('product_name'); ?></p>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<p>Product Code</p>
</div>
<div class="col-sm-9">
<p>
<?php
$data = array(
'name' => 'product_code',
'value' => set_value('product_code', $products->product_code, FALSE),
'class' => 'form-control',
'required' => 'required'
);
echo form_input($data); ?>
<?= form_error('product_code'); ?></p>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<p>Display</p>
</div>
<div class="col-sm-9">
<select name="product_status" class="form-control">
<option value="0" <?php echo set_select('product_status', '0'); ?>
<?php if($products->product_status == 0) : ?>
selected
<?php endif; ?>
>No</option>
<option value="1" <?php echo set_select('product_status', '1'); ?>
<?php if($products->product_status == 1) : ?>
selected
<?php endif; ?>
>Yes</option>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<p>Product Description</p>
</div>
<div class="col-sm-9">
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#description_id" data-toggle="tab">Indonesian</a></li>
<li><a href="#description_en" data-toggle="tab">English</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="description_id">
<?php echo form_textarea('description', set_value('description',
$products->description, FALSE)); ?>
<?php echo form_error('description'); ?>
</div>
<div class="tab-pane" id="description_en">
<?php echo form_textarea('description_en', set_value('description_en',
$products->description_en, FALSE)); ?>
<?php echo form_error('description_en'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<p>Product Image<br>
<?php if ($products->image1 != NULL): ?>
Image Preview: <img src="<?= base_url() . 'uploads/product/' .
$products->image1; ?>" style="width:50px; height:auto;">
<br>
<i class="fa fa fa-trash-o" aria-hidden="true"></i> <a href="<?= base_url() . 'admin/products/delete_image/' . $products->id_products . '/image1'; ?>">Delete</a>
<?php endif ?></p>
</div>
<div class="col-sm-9">
<input class="form-control" type="file" name="image1" size="20" /><br>
<span style="font-size:12px; font-style: italic;">Image size must be maximum of 500px (width) x 500px (height) pixel, jpg/png, max 300KB</span>
<span style="color:#F7931E;"><?php echo form_error('image1'); ?></span>
<?php echo $this->session->flashdata('image1-error'); //to display error message ?>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<p>Product Catalog</p>
<br>
<?php if($products->product_catalog != null): ?>
Catalog Preview : <a href="<?= base_url('uploads/product/'.$products->product_catalog);?>" target="_blank">Click here for preview</a>
<br>
<i class="fa fa fa-trash-o" aria-hidden="true"></i> <a href="<?= base_url('admin/products/delete_product_catalog/').$products->id_products; ?>">Delete</a>
<?php endif; ?>
</div>
<div class="col-sm-9">
<input class="form-control" type="file" name="product_catalog"/><br>
<span style="font-size:12px; font-style: italic;">
File type must be pdf, max 20MB
</span>
<?php echo $this->session->flashdata('product_catalog');?>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<p>Page Meta Description</p>
</div>
<div class="col-sm-9">
<p>
<?php
$data = array(
'name' => 'meta_description',
'value' => set_value('meta_description', $products->meta_description),
'class' => 'form-control'
);
echo form_input($data); ?>
<?= form_error('meta_description'); ?></p>
</div>
</div>
<div class="row">
<div class="col-sm-3">
</div>
<div class="col-sm-9">
<?= form_submit('submit', 'Save Product', 'class="btn btn-primary btn-success button-brown"'); ?>
<?= anchor('admin/products', 'cancel'); ?>
</div>
</div>
<?= form_close(); ?>