whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
menu
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/views/menu/oladmeneview.php
<?php require_once(APPPATH.'views/header.php');?> <?php require_once(APPPATH.'views/menu.php');?> <!-- Content Wrapper. Contains Navigation content --> <div class="content-wrapper"> <!-- Content Header (Navigation header) --> <section class="content-header"> <h1> Navigation </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('Welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Navigation</li> </ol> </section> <!-- Main content --> <section class="content"> <!-- /.row --> <div class="row"> <div class="col-md-4"> <!-- Page --> <div class="box box-success"> <div class="box-body box-profile"> <h3 class="profile-username text-center">Pages</h3> <form id='myFormId' method='post'> <ul class="list-group list-group-unbordered"> <?php foreach($page as $key) { ?> <li class="list-group-item"> <b><?php echo $key['content_title'] ?></b> <a class="pull-right"><input class='minimal' name='pageid' value='<?php echo $key['content_id'] ?>' type='checkbox'></a> </li> <?php }?> </ul> <button type='button' id='movetomenu' class="btn btn-success btn-block"><b>Move To Menu</b></button> </form> </div><!-- /.box-body --> </div><!-- /.box --> <!-- Menu Group --> <?php echo form_open("menumanagement/addgroup"); ?> <div class="box box-success"> <div class="box-body box-profile"> <h3 class="profile-username text-center">Create Menu Group</h3> <ul class="list-group list-group-unbordered"> <input class="form-control input-lg" type="text" required name='menugroupname' placeholder="Menu Name"> </ul> <button type='submit' class="btn btn-success btn-block"><b>Save</b></button> </div><!-- /.box-body --> </div><!-- /.box --> <?php echo form_close(); ?> </div> <!--Display Menu--> <div class='col-md-8'> <div class="box box-success"> <form id='mysaveid' method='post'> <div class="box-body "> <div class="input-group input-group-md"> <select class='form-control' name='menugroup' id='menugroup'> <?php echo $menugroup_id=$this->uri->segment(3); foreach($menugroup as $key) { ?> <option value='<?php echo $key['menugroup_id'] ?>' <?php if($menugroup_id==$key['menugroup_id']){ echo 'selected="selected"';}?> ><?php echo $key['menugroupname'] ?></option> <?php }?> </select> <span class="input-group-btn"> <button type="button" class="btn btn-info btn-flat">Select Menu Group</button> </span> </div> <br> <div class="input-group input-group-md"> <h3>Menu Stucture</h3> <span class="input-group-btn"> <button type="button" id='addmenus' class="btn btn-success btn-flat">Save Menu</button> </span> </div> <div id='alertmsg'> </div> <div class="cf nestable-lists" > <div class="dd" id="nestable"> <ol class="dd-list" id='lidata'> <?php $i=0; while($i <count($menu)) { ?><!--Level Zero menu Display--> <li class="dd-item rem_<?php echo $menu[$i]['menu_content'];?>" data-id="<?php echo $menu[$i]['menu_content'];?>"> <div class="pull-right out-line"> <button class="btnclick btn btn-link" type='button' value="<?php echo $menu[$i]['menu_content'];?>" > <span class="caret my-caret"></span> </button> </div> <div class="dd-handle"><?php echo $menu[$i]['menu_name'];?></div> <div class="box-body ids_<?php echo $menu[$i]['menu_content'];?>" style="display: none;"> <div class="form-group"> <label>Menu Lable</label> <input type="text" id='lable[]' class="form-control" name='lable[]' value='<?php echo $menu[$i]['menu_displayname'];?>' placeholder="Enter ..."> <input type="hidden" class="form-control" id='menu[]' name='menu[]' value='<?php echo $menu[$i]['menu_name'];?>' placeholder="Enter ..."> </div> <button type="button" value='<?php echo $menu[$i]['menu_content'];?>' class="btn btn-default remove">Remove</button> </div> <!--Level one Dispaly--> <?php $levels=0; for ($j=$i; $j <count($menu) ; $j++) { if($menu[$i]['menu_content']==$menu[$j]['submenu']) { $levels++; } } for ($k=0; $k <$levels; $k++) { if ($k==0) {echo "<ol class='dd-list'>";} $i++; ?> <li class="dd-item rem_<?php echo $menu[$i]['menu_content'];?>" data-id="<?php echo $menu[$i]['menu_content'];?>"> <div class="pull-right out-line"> <button class="btnclick btn btn-link" type='button' value="<?php echo $menu[$i]['menu_content'];?>" > <span class="caret my-caret"></span> </button> </div> <div class="dd-handle"><?php echo $menu[$i]['menu_name'];?></div> <div class="box-body ids_<?php echo $menu[$i]['menu_content'];?>" style="display: none;"> <div class="form-group"> <label>Menu Lable</label> <input type="text" id='lable[]' class="form-control" name='lable[]' value='<?php echo $menu[$i]['menu_displayname'];?>' placeholder="Enter ..."> <input type="hidden" class="form-control" id='menu[]' name='menu[]' value='<?php echo $menu[$i]['menu_name'];?>' placeholder="Enter ..."> </div> <button type="button" value='<?php echo $menu[$i]['menu_content'];?>' class="btn btn-default remove">Remove</button> </div> <!--Level Two Dispaly--> <?php $level2=0; for ($j=$i; $j <count($menu) ; $j++) { if($menu[$i]['menu_content']==$menu[$j]['submenu']) { $level2++; } } for ($l=0; $l <$level2; $l++) { if ($l==0) {echo "<ol class='dd-list'>";} $i++; ?> <li class="dd-item rem_<?php echo $menu[$i]['menu_content'];?>" data-id="<?php echo $menu[$i]['menu_content'];?>"> <div class="pull-right out-line"> <button class="btnclick btn btn-link" type='button' value="<?php echo $menu[$i]['menu_content'];?>" > <span class="caret my-caret"></span> </button> </div> <div class="dd-handle"><?php echo $menu[$i]['menu_name'];?></div> <div class="box-body ids_<?php echo $menu[$i]['menu_content'];?>" style="display: none;"> <div class="form-group"> <label>Menu Lable</label> <input type="text" id='lable[]' class="form-control" name='lable[]' value='<?php echo $menu[$i]['menu_displayname'];?>' placeholder="Enter ..."> <input type="hidden" class="form-control" id='menu[]' name='menu[]' value='<?php echo $menu[$i]['menu_name'];?>' placeholder="Enter ..."> </div> <button type="button" value='<?php echo $menu[$i]['menu_content'];?>' class="btn btn-default remove">Remove</button> </div> </li> <?php if ($l==($level2-1)) {echo "</ol></li>";} } ?><!-- End Level Two Display --> </li> <?php if ($k==($levels-1)) {echo "</ol></li>";} }?><!-- End Level one Display --> </li> <?php $i++; }?> <!-- End Zero one Display --> </ol> </div> </div> <textarea style='display:none' name='postion' id="nestable-output"></textarea> </div><!-- /.box-body --> <?php echo form_close(); ?> </div><!-- /.box --> </div> </div> <!-- /.row --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/footer.php');?> <script src="<?php echo base_url();?>bootstrap/js/jquery.nestable.js" type="text/javascript"></script> <script> $(document).ready(function() { window.onbeforeunload = function(e) { e = e || window.event; e.preventDefault = true; e.cancelBubble = true; e.returnValue = 'Save the data'; } var updateOutput = function(e) { var list = e.length ? e : $(e.target), output = list.data('output'); if (window.JSON) { output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2)); } else { output.val('JSON browser support required for this demo.'); } }; // activate Nestable for list 1 $('#nestable').nestable({ group: 1 }) .on('change', updateOutput); // output initial serialised data updateOutput($('#nestable').data('output', $('#nestable-output'))); // Move to Menu $( "#movetomenu" ).click(function() { var queryString = $('#myFormId').serialize(); $('.minimal').iCheck('uncheck'); $.post("menumanagement/Menustu", { pageid: queryString }, function(data,status){ if (status=='success') { $("#lidata").append(data); }; }); }); $( "#lidata" ).on('click', '.btnclick', function() { var id=$(this).val(); $( ".ids_"+id ).toggle( "slow" ); }); // Add to Menu $( "#addmenus" ).click(function() { updateOutput($('#nestable').data('output', $('#nestable-output'))); var postionval = $('#nestable-output').val(); var menugroupval = $('#menugroup').val(); var lable = '' var menu = ''; $("input[name='menu[]'").each(function() { menu=menu+","+$(this).val(); }); $("input[name='lable[]'").each(function() { lable=lable+","+$(this).val(); }); $.post("menumanagement/addmenu", { postions: postionval, menugroup: menugroupval, lable: lable, menu: menu }, function(data,status){ if (status=='success') { $('#alertmsg').html(data); }; }); }); //remove li $( "#lidata" ).on('click', '.remove', function() { var id=$(this).val(); var menugroupval = $('#menugroup').val(); $('.rem_'+id).remove(); $.post("menumanagement/deleteMenuData/"+id+'/'+menugroupval,{}, function(data,status){ if (status=='success') { $('#alertmsg').html(data); }; }); }); }); </script>
Copyright ©2021 || Defacer Indonesia