whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
public_html
/
application
/
views
/
portfolio
/
Upload File:
files >> //proc/self/root/home/papecmvm/public_html/application/views/portfolio/portfolio_add.php
<?php require_once(APPPATH.'views/header.php');?> <?php require_once(APPPATH.'views/menu.php');?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?php if (!isset($view)) {?> <?php echo "Add Portfolio"; ?> <?php }else{?> <?php echo "Edit Portfolio";} ?> </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('admin/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li> <a href="<?php echo site_url('admin/portfolio')?>">Portfolio</a></li> <li class="active"><?php if (!isset($view)) {?> <?php echo "Add Portfolio"; ?> <?php }else{?> <?php echo "Edit Portfolio";} ?> </li> </ol> </section> <!-- Main content --> <section class="content"> <?php $attributes = array('class' =>'defaultForm','data-bv-message'=>'This value is not valid', 'data-bv-feedbackicons-validating'=>'glyphicon glyphicon-refresh'); if (isset($view)) {?> <?php $this->load->model('alldata','model'); $encrypted_id = $this->model->encryptdata($view[0]['portfolio_id']); echo form_open_multipart("admin/portfolio/edit_portfolio/{$encrypted_id}",$attributes); ?> <?php }else{?> <?php echo form_open_multipart('admin/portfolio/add_portfolio',$attributes); ?> <?php }?> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <div class="box box-success"> <div class="box-header"> </div><!-- /.box-header --> <div class="box-body"> <div class="form-group"> <label>Porfolio Name</label> <input type="text" data-bv-regexp-message="Special characters not allowed..." pattern='^[^\`\~\@\#\$\%\^\*\[\]\{\}\\;:<>=+"]+$' class="form-control" placeholder="Portfolio Name" name="portfolio_name" value="<?php if(isset($view)){echo $view[0]['portfolio_name'];}?>" required data-bv-notempty-message="The Portfolio name is required and cannot be empty" /> </div> <div class="form-group"> <label>Content: </label> <textarea id="editor" name='portfolio_Desc' class='mybox1'> <?php if(isset($view)){echo $view[0]['prot_desc'];}?> </textarea> </div> <div class="form-group"> <label>Porfolio Category </label> <?php if(isset($view)){ $catid=$view[0]['portfolio_cat_id'];} ?> <select onchange="subfun()" class="form-control" name="portfolio_cat_id" id="portfolio_cat_id" required data-bv-notempty-message="The Portfolio Category is required and cannot be empty"> <option value="">--- Select Portfolio Category ---</option> <?php foreach($portfolio_category as $key ) { ?> <option value="<?Php echo $key['portfolio_cat_id'] ?>" <?php if(isset($view)){ if($catid== $key['portfolio_cat_id']){ echo "selected='selected'";}}?>><?Php echo $key['portfolio_cat_name'] ?></option> <?php }?> </select> </div> <div class="form-group"> <label for="model_name" class="control-label" >Select Sub Category</label> <select class="form-control multiselect" id="sub" name="port_sub_cat" required > <option>--SELECT--</option> <?php if (isset($view)) { $c = $view[0]['port_sub_cat']; } foreach ($sub_cat as $ct) { ?> <option value="<?php echo $ct['psid']; ?>" <?php if (isset($view)) { if ($c == $ct['psid']) { echo "selected"; } } ?>><?php echo $ct['ps_name']; ?></option> <?php } ?> </select> </div> <div class="form-group photo"> <label>Upload Image</label> <?php if(isset($view)){ ?> <img src="<?php echo base_url()."portfolio_images/".$view[0]['portfolio_image_path'];?>" class="thumbnail" width="150" /> <input class="file-0" type="file" name="image_name" data-show-upload="false" /> <?php }else{?> <input required="" class="file-0" type="file" name="image_name" data-show-upload="false" /> <?php } ?> <input type="hidden" value="<?php if(isset($view)){echo $view[0]['portfolio_image_path'];}?>" name="hidden_photo"/> </div> <div class="form-group"> <label>Slider</label> <select class="form-control" name="banner_id" id="banner_id"> <option value="">--- Select Banner ---</option> <?php if(isset($view)){ $banner_id=$view[0]['banner_id'];} foreach($bannergrid as $bannergrid1){?> <option value="<?php echo $bannergrid1["banner_id"]; ?>" <?php if(isset($view)){if($bannergrid1["banner_id"]==$banner_id){ echo "selected='selected'";}}?>><?php echo $bannergrid1["banner_title"]; ?></option> <?php } ?> </select> </div> <?php if(isset($view)){ ?> <div class="form-group"> <label>Porfolio Video Path</label> <input type="text" class="form-control" placeholder="Portfolio Video Path" name="portfolio_video_path" value="<?php if(isset($view)){echo $view[0]['portfolio_video_path'];}?>" /> </div> <?php }else{ ?> <div class="form-group video"> <label>Porfolio Video Path</label> <input type="text" class="form-control" placeholder="Portfolio Video Path" name="portfolio_video_path" value="" /> </div> <?php } ?> <div class="form-group"> <label>Porfolio Link</label> <input type="text" data-bv-regexp-message="Special characters not allowed..." class="form-control" placeholder="Portfolio Name" name="portfolio_link" value="<?php if(isset($view)){echo $view[0]['portfolio_link'];}?>" /> </div> <button class="btn btn-primary bg-blue" name="save" value="save" type="submit">Save</button> </div><!-- /.box-body --> </div><!-- /.box --> </div><!--End .col-xs-12--> </div> <!-- /.row --> <?php echo form_close(); ?> <!-- /.Form data --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/footer.php');?> <script> function subfun(){ var cat = $('#portfolio_cat_id').val(); //alert (cat); $.ajax({ url:'<?php echo base_url(); ?>admin/portfolio/subfun/'+cat, type:'PUT', //data : {dist:dist}, success:function(data){ $('#sub').html(data); } }); } /*$(document).ready(function(){ $(".video").hide(); $(".link").hide(); $("#portfolio_cat_id").change(function(){ var group=document.getElementById("portfolio_cat_id").value; if(group==3){ $(".video").show(); $(".photo").hide(); }else{ $(".video").hide(); $(".photo").show(); } }); });*/ </script>
Copyright ©2021 || Defacer Indonesia