whoami7 - Manager
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
contant
/
Upload File:
files >> //proc/thread-self/root/proc/self/root/home/papecmvm/www/application/views/contant/contant_add.php
<?php require_once(APPPATH.'views/header.php');?> <?php require_once(APPPATH.'views/menu.php');?> <script type="text/javascript"> $(document).ready(function(){ var count=$('#countdiv').val(); if(count!=undefined){ for(var i=0; i<count; i++){ CKEDITOR.replace('editor'+i); } var counter = parseInt(count)+1; }else{ var counter = 2; } $("#addButton").click(function () { /*if(counter>20){ alert("Only 10 textboxes allow"); return false; } */ var newTextBoxDiv = $(document.createElement('div')) .attr("id", 'TextBoxDiv' + counter, 'MyBoxDiv' + counter); newTextBoxDiv.after().html('<div class="form-group"><label>Content Heading #'+ counter + ' : </label>' + '<input type="text" name="contenthead[]" class="form-control" textbox' + counter + '" value="" ></div> <label>Content #'+ counter + ' : </label>' + '<textarea id="editor' + counter + '" name="myeditor[]" class="mytbox' + counter + '" value="" > </textarea> </div><br><br>'); newTextBoxDiv.appendTo("#TextBoxesGroup"); CKEDITOR.replace('editor'+counter); counter++; }); $("#removeButton").click(function () { if(counter==1){ alert("No more textbox to remove"); return false; } counter--; $("#TextBoxDiv" + counter).remove(); $("#MyBoxDiv" + counter).remove(); }); $("#getButtonValue").click(function () { var msg = ''; for(i=1; i<counter; i++){ msg += "\n Textbox #" + i + " : " + $('#textbox' + i).val(); } alert(msg); }); }); </script> <!-- 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 Page"; ?> <?php }else{?> <?php echo "Edit Page";} ?> </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li>Pages</li> <li class="active"><?php if (!isset($view)) {?> <?php echo "Add Page"; ?> <?php }else{?> <?php echo "Edit Page";} ?> </li> </ol> </section> <!-- Main content --> <section class="content"> <?php $attributes = array('Method'=>'post','class' =>'defaultForm','data-bv-message'=>'This value is not valid', 'data-bv-feedbackicons-validating'=>'glyphicon glyphicon-refresh'); $is=""; if (isset($view)) {?> <?php $this->load->model('alldata','model'); $encrypted_id = $this->model->encryptdata($view[0]['content_id']); $is=$view[0]['content_text']; echo form_open("admin/contentmanagement/editContentData/{$encrypted_id}",$attributes); ?> <?php }else{?> <?php echo form_open('admin/contentmanagement/addcontent',$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>Template</label> <?php if(isset($view)){ $page_category=$view[0]['page_category'];} ?> <select class="form-control" name="page_category" id="page_category" required data-bv-notempty-message="Please select any one category"> <option value="">--- Select Category ---</option> <?php $url='./application/views/Web/Template/'; $map = directory_map($url, FALSE, TRUE); for($i=0;$i<count($map);$i++){ $array=explode(".", $map[$i]); ?> <option value="<?php echo $array[0]; ?>" <?php if(isset($view)){if($page_category==$array[0]){ echo "selected='selected'";}}?>><?php echo ucwords($array[0]); ?></option> <?php } ?> </select> </div> <div class="form-group"> <label>Content Title</label> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-fw fa-file-text"></i></span> <input type="text" class="form-control" placeholder="Content Title" name="Content" value="<?php if(isset($view)){echo $view[0]['content_title'];}?>" pattern='^[^\`\~\@\#\$\%\^\*\[\]\{\}\\;:<>=+"]+$' data-bv-regexp-message="Special characters not allowed..." required data-bv-notempty-message="The Content Title is required and cannot be empty" > </div> </div> <!--<div class="form-group"> <textarea id="editor" name='myeditor'> <?php //echo $is;?> </textarea> </div>--> <div id='TextBoxesGroup'> <?php if(isset($view)){ $chead=explode('|-|',$view[0]['content_head']); $ccontent=explode('|-|',$is); ?> <input type="hidden" name="countdiv" id="countdiv" value="<?php echo count($chead); ?>"> <?php //print_r($ccontent); for($i=0; $i<count($chead); $i++){ ?> <div id="TextBoxDiv<?php echo $i; ?>"> <div class="form-group"> <label>Content Heading #<?php echo $i+1; ?></label> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-fw fa-newspaper-o "></i></span> <input type="text" class="form-control textbox<?php echo $i; ?>" data-bv-regexp-message="Special characters not allowed..." pattern='^[^\`\~\@\#\$\%\^\*\[\]\{\}\\;:<>=+"]+$' placeholder="Page Heading" name="contenthead[]" value="<?php echo $chead[$i]; ?>" > </div> </div> </div> <div id="MyBoxDiv<?php echo $i; ?>"> <div class="form-group"> <label>Content #<?php echo $i; ?> : </label> <textarea id="editor<?php echo $i;?>" name='myeditor[]' class='mybox<?php echo $i; ?>'> <?php echo $ccontent[$i]; ?> </textarea> </div> </div> <?php } }else{ ?> <div id="TextBoxDiv1"> <div class="form-group"> <label>Content Heading #1</label> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-fw fa-newspaper-o "></i></span> <input type="text" class="form-control textbox1" data-bv-regexp-message="Special characters not allowed..." pattern='^[^\`\~\@\#\$\%\^\*\[\]\{\}\\;:<>=+"]+$' placeholder="Page Heading" name="contenthead[]" value="<?php //if(isset($view)){echo $view[0]['content_head'];}?>" > </div> </div> </div> <div id="MyBoxDiv1"> <div class="form-group"> <label>Content #1 : </label> <textarea id="editor" name='myeditor[]' class='mybox1'> <?php //echo $is;?> </textarea> </div> </div> <?php } ?> </div> <div class="form-group"> <label>Footer Content: </label> <textarea name='footer_text' class='mybox1 form-control'><?php if(isset($view)){echo $view[0]['footer_text'];}?></textarea> </div> <div class="form-group"> <input type='button' class="btn btn-primary" value='Add Button' id='addButton' > <input type='button' class="btn btn-danger" value='Remove Button' id='removeButton'> <!-- <input type='button' value='Get TextBox Value' id='getButtonValue'>--> </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> <div class="col-lg-12" style="background:#E9E9EA; margin-bottom:10px;"> <h4><i class="fa fa-cog"></i> For Search Engine Optimization</h4> <hr style="margin-top: 0px;margin-bottom: 20px;border: 0;border-top: 1px solid #AAA;" /> <div class="form-group"> <label>Page Title </label> <i class="fa fa-question-circle" data-toggle="tooltip" data-original-title="Title tags should be a maximum of 70 characters long, including spaces."></i> <input type="text" data-bv-regexp-message="Special characters not allowed..." pattern='[^\`\~\@\#\$\%\^\*\+\=\[\]\{\}\\;:<>"]+$' class="form-control" placeholder="Page Title" name="meta_tital" value="<?php if(isset($view)){echo $view[0]['meta_tital'];}?>" required data-bv-notempty-message="The Page Title is required and cannot be empty" > </div> <div class="form-group"> <label>Meta Keyword </label> <i class="fa fa-question-circle" data-toggle="tooltip" data-original-title="Separate each keywords with a comma. Limit to 10-20 keywords."></i> <input type="text" data-bv-regexp-message="Special characters not allowed..." pattern='[^\`\~\@\#\$\%\^\*\+\=\[\]\{\}\\;:<>"]+$' class="form-control" placeholder="Meta Keyword" name="meta_keyword" value="<?php if(isset($view)){echo $view[0]['meta_keyword'];}?>" required data-bv-notempty-message="The Meta Keyword is required and cannot be empty" > </div> <div class="form-group"> <label>Meta Description </label> <i class="fa fa-question-circle" data-toggle="tooltip" data-original-title="Meta descriptions between 150 and 160 characters. Avoid Duplicate Meta Description Tags."></i> <input type="text" data-bv-regexp-message="Special characters not allowed..." pattern='[^\`\~\@\#\$\%\^\*\+\=\[\]\{\}\\;:<>"]+$' class="form-control" placeholder="Meta Description" name="meta_description" value="<?php if(isset($view)){echo $view[0]['meta_description'];}?>" required data-bv-notempty-message="The Meta Description is required and cannot be empty" > </div> </div> <div class="form-group"> <label>Publish</label> <input type="checkbox" name="publish" checked="" required="" class="" data-bv-notempty-message="Must be checked" /> <!--if(isset($view)){ if($view[0]['publish']=='on'){ echo 'checked="checked"';} }--> </div> <button class="btn btn-info" name="save" value="save" type="submit">Save Page</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');?>
Copyright ©2021 || Defacer Indonesia