/
var
/
www
/
doncode.com.ua
/
www
/
views
/
arm
/
/var/www/doncode.com.ua/www/views/arm
mkdir
upload
Name
Size
Mode
Actions
js/
-
0755
rm
arm.php
9181
0644
edit
dl
rm
Edit:
/var/www/doncode.com.ua/www/views/arm/arm.php
(9181B)
<script> var url = '<?php echo ($_GET['url']=='arm')?URL.$_GET['url'].'/getList':URL.$_GET['url'];?>'; var count = <?php echo $this->count['count']; ?>; var limit = <?php echo LIMIT; ?>; function loadPageArm (param){ $.get(param, function(prevent) { $.tmpl('arm',prevent).appendTo('#main-table'); }, "JSON"); } $(function(){ $.template('arm','\ <tr>\ <td>${nn}</td>\ <td>${stat}</td>\ <td>${taxi_name}</td>\ <td>${key}</td>\ <td>${serverip}</td>\ <td>${last_update}</td>\ <td>${ver}</td>\ <td>${license}</td>\ <td>${verbose}</td>\ <td id="action">\ <a class="btn edit_arm" rel="${id}" title="Редактировать ${taxi_name}" href="#">\ <i class="icon-pencil"></i>\ </a>\ <a class="btn del_arm" href="<?php echo URL;?>arm/deleteRecords/id/${id}" title="Удалить ${taxi_name}">\ <i class="icon-remove"></i>\ </a>\ </td>\ </tr>'); loadPageArm (url); $('#paginator').paginator({ pagesTotal : <?php echo ceil($this->count['count']/LIMIT);?>, pagesSpan : 10, pageCurrent : <?php echo (isset($this->currentPage))?$this->currentPage: '1';?>, scroll : true, baseUrl : '<?php echo URL;?>arm/getList/page/%number%', clickHandler : function (page){ var url = '<?php echo URL;?>arm/getList/page/'+page; history.pushState(url, null, url); $.get(url, function(prevent) { $('#main-table tr:not(.header)').remove(); $.tmpl('arm',prevent ).appendTo('#main-table'); }, "JSON"); return false; } }); $('.del_arm').live('click',function(){ var url = $(this).attr("href"); if (confirm("Вы точно хотите удалить Arm?")) { $.get(url, function(prevent) { if (prevent.msg=='success'){ $('#main-table tr:not(.header)').remove(); var parse = document.location.href.split('/'); if( !!!parse[4]){ var url = document.location.href+'/getList/page/1'; }else{ var url = document.location.href; } loadPageArm (url); } if(prevent.msg=='fail'){ alert ('Не удалось удалить Arm.'); } }, "JSON"); return false; }else{ return false; } } ); $('.edit_arm').live('click',function(e){ var id = $(this).attr("rel"); $('#myModal').css({width: '1000px','margin-left': function () {return -($(this).width() / 2);}}); $('.modal h3').text('Редактирование данных Arm'); $('.modal div.modal-body').html('Загрузка...'); $('.modal div.modal-body').load("<?php echo URL;?>/arm/editArm/id/"+id); $('.modal').modal('show'); }); $('#refresh_arm').click (function (e){ location.refresh(); }); $('#createarm').click (function (){ $.colorbox({ ajax: true, href: "<?php echo URL;?>arm/createForm", fixed: true, overlayClose:false }); return false; }); /* $('#toogle_type_search').on('click',function(){ var a = $(this).parent().innerWidth(); var b = $(this).outerWidth(); var t = $(this); if($(this).hasClass('phone')){ $(this).animate({ 'left':'+='+(a-b) },'fast','linear',function(){ t.html('<i class="icon-th icon-white"></i>'); t.attr('title','Поиск по номеру телефона'); t.closest('form').find('input[name="type"]').val('FIO'); $('#arm').val('').focus(); }); $(this).removeClass('phone') .addClass('FIO'); }else{ $(this).animate({ 'left':'-='+(a-b) },'fast','linear',function(){ t.html('<i class="icon-user icon-white"></i>'); t.attr('title','Поиск по имени фамилии'); t.closest('form').find('input[name="type"]').val('phone'); $('#arm').val('').focus(); }); $(this).removeClass('FIO') .addClass('phone'); } return false; });*/ /*----------------------------Search arm---------------------------------------*/ }); </script> <div id="arm"> <div class="row-fluid"> <div class="span12"> <?php if(session::get('msgFail')!=false):?> <div class="alert alert-error"> <a class="close" data-dismiss="alert" href="#">×</a> <h4 class="alert-heading">Ошибка!</h4> <?php echo session::get('msgFail')?> </div> <?php session::del('msgFail')?> <?php endif;?> <?php if(session::get('msgSuccess')!=false):?> <div class="alert alert-success"> <a class="close" data-dismiss="alert" href="#">×</a> <h4 class="alert-heading">Готово!</h4> <?php echo session::get('msgSuccess')?> </div> <?php session::del('msgSuccess')?> <?php endif;?> <div class="row-fluid"> <div class="span4"> <h3><a href="<?php echo URL;?>arm/getList/page/<?php echo (isset($this->currentPage))?$this->currentPage: '1';?>" class="btn" id="refresh_contractor" title="Обновить список"> <i class="icon-refresh"></i> <?php echo $this->title; ?> </a> </h3> <div class="search" style="margin-top: 25px;" > <form class="form-search" onsubmit="return false;"> <input type="text" id="arm" style="display: inline-block;" class="search-query"> <input type="hidden" id="typesearch" name="type" value="phone"> <div style="width:90px; position: relative; display: inline-block; background-color: #9F9F9F; border: 1px solid #929292; border-radius: 4px; "> <span class="btn btn-inverse phone" style="left: 0px; position: relative;" title="Поиск по Taxi" id="toogle_type_search"><i class="icon-user icon-white"></i></span> </div> </form> </div> </div> <div class="span5"> <?php if ($this->count['count']>LIMIT): ?> <div id="paginator" class="paginator" ></div> <?php endif;?> </div> </div> <div id="result-search"> </div> <table class="table table-striped table-condensed" id="main-table"> <tr class="header info" > <td>№</td> <td>ST</td> <td>Taxi</td> <td>Ключ</td> <td>Сервер IP</td> <td>Онлайн</td> <td>Вер.</td> <td>Лицензия</td> <td>Отладка</td> <td>Действие</td> </tr> </table> <center><span id="loading"></span></center> </div> </div> </div>
Save
cmd:
run