%PDF- %PDF-
Direktori : /home/cargonizer/domains/cargonizer.com.tr/public_html/admin/ |
Current File : /home/cargonizer/domains/cargonizer.com.tr/public_html/admin/pages.php |
<?php if(!defined('BASE')) die(); $parent = (intval("0".$_GET['parent'])) ? $_GET['parent']:0; if(isset($_POST['allaction'])) { $c = clean($_POST['c']); $st = clean($_POST['status']); if(is_array(array_filter($c))) : foreach($c as $ids) insert2lang(LANG,'pages',$ids,array('status'=>$st)); echo message('Durum başarı ile güncellenmiştir','success'); endif; } if(intval("0".$_GET['rem'])) { $ids = intval("0".$_GET['rem']); insert2lang(LANG,'pages',$_GET['rem'],array('status'=>2)); echo message('Kayıt başarı ile silinmiştir','success'); } $q[] = "status!=2"; $q[] = "type='{$type}'"; // Search with name if (isset($_GET['cName'])) { $cName = "%".$_GET['cName']."%"; $q[] = "name LIKE '{$cName}' || code LIKE '{$cName}'"; } else { $q[] = "parent='{$parent}'"; } $pagi->table = 'pages'; $pagi->pg = $_GET['pg']; $pagi->link = '?s=pages'._GETFilter('pg').'&'; $pagi->where = implode(' && ',$q); $pagi->perpage = PERPAGE; $pagi->startPage(); $contents = getAllTables('pages',"WHERE ".implode(' && ',$q)." ORDER BY row ASC LIMIT {$pagi->start}, {$pagi->perpage}",LANG); $parents = parentName($parent,LANG); $parents = array_map('array_filter',$parents); ?> <div class="row"> <div class="col-md-12"> <h3 class="page-title"> <?php echo $indexMenu[$type][1]; ?> </h3> <ul class="page-breadcrumb breadcrumb"> <li> <i class="fa fa-home"></i> <a href="index.php"> Anasayfa </a> <i class="fa fa-angle-right"></i> </li> <li> <a href="?s=pages&type=<?php echo $type; ?>"> <?php echo $indexMenu[$type][1]; ?> </a> <i class="fa fa-angle-right"></i> </li> <?php if(array_filter($parents)) : foreach($parents as $pr) : ?> <li> <a href="?s=pages&type=<?php echo $type; ?>&parent=<?php echo $pr['id']; ?>"> <?php echo $pr['name']; ?> </a> <i class="fa fa-angle-right"></i> </li> <?php endforeach; endif; ?> </ul> </div> </div> <div class="btn-toolbar margin-bottom-10"> <?php if($parent): $prcont = getTable('pages',"WHERE id='$parent'"); ?><a class="btn purple" href="?s=pages&type=<?php echo $type; ?>&parent=<?php echo $prcont['parent']; ?>"><i class="fa fa-arrow-up"></i> Üst Menü</a><?php endif; ?> <a class="btn blue" href="?s=edit&parent=<?php echo $parent; ?>&type=<?php echo $type; ?>"><i class="fa fa-plus"></i> Yeni Ekle</a> <a class="btn yellow" href="?s=rows&type=<?php echo $type; ?>&parent=<?php echo $parent; ?>"><i class="fa fa-sort-amount-asc"></i> Sırala ve Taşı</a> <div style="float: right;"> <select class="form-control" onchange="javascript:top.location.href='?s=pages&type=<?php echo $type; ?>&parent=<?php echo $parent; ?>&perpage='+this.value"> <?php foreach(range(10,150,10) as $key) : echo '<option value="'.$key.'"'; echo ($key==PERPAGE) ? ' selected="selected"':''; echo '>'.$key.'</option>'; endforeach; ?> </select> </div> <form action="" class="col-md-3 pull-right" method="get"> <div class="input-group"> <input name="cName" type="text" class="form-control" placeholder="Ara..."> <span class="input-group-btn"> <button class="btn btn-default" type="submit">Git!</button> </span> </div> <input type="hidden" name="s" value="pages"> <input type="hidden" name="type" value="<?=$type?>"> </form> </div> <form method="post" action="?s=pages&type=<?php echo $type; ?>&parent=<?php echo $parent; ?>"> <table class="table table-striped table-bordered table-hover table-full-width" id="data"> <thead> <tr> <th width="2%"> <input type="checkbox" data-set=".checkboxes" class="group-checkable"> </th> <th width="2%">Resim</th> <th class="col-md-2"> İsim </th> <th class="hidden-xs col-md-1"> Durumu </th> <th class="hidden-xs col-md-1"> Üyelik Zorunlu? </th> <th class="hidden-xs col-md-1"> Alt İçerikler </th> <th class="hidden-xs col-md-1"> Son Güncelleme </th> <th class="hidden-xs col-md-2"> İşlemler </th> </tr> </thead> <tbody> <?php if($contents) : foreach($contents as $val) : if($val['status'] == 2) continue; ?> <tr> <td><input type="checkbox" class="checkboxes" name="c[]" value="<?php echo $val['id']; ?>"></td> <td> <a class="btn default mdl" href="gallery.php?intence=detail&id=<?=$val['id']?>" data-target="#ajaxs"><i class="fa fa-camera"></i></a> </td> <td><input class="editable-input" type="text" value="<?=$val['name'];?>" data-input="<?=$val['id']?>" data-type="<?=$val['type']?>" readonly></td> <td><?php echo $status[$val['status']]; ?></td> <td><?php echo ($val['przone']) ? '<span class="badge badge-success">Evet</span>' : '<span class="badge badge-default">Hayır</span>'; ?></td> <td><a href="?s=pages&type=<?php echo $type; ?>&parent=<?php echo $val['id']; ?>">Alt İçerikler <span class="badge badge-primary"><?php echo countRecord('pages',"WHERE parent='{$val['id']}' && status=1"); ?></span></a></td> <td><?php echo date("d.m.Y H:i",$val['create_time']); ?></td> <td> <a class="btn default btn-xs purple" href="?s=edit&type=<?php echo $type; ?>&id=<?php echo $val['id']; ?>&parent=<?php echo $val['parent']; ?>"><i class="fa fa-edit"></i> Düzenle</a> <a class="btn default btn-xs black" href="javascript:void(0);" onclick="return deleteRow('Sayfayı Silmek istediğinizden emin misiniz?','?s=pages&type=<?php echo $type; ?>&parent=<?php echo $parent; ?>&rem=<?php echo $val['id']; ?>');"><i class="fa fa-trash-o"></i> Sil</a> </td> </tr> <?php endforeach; else: ?> </table> <div class="note note-warning">Üzgünüz, herhangi bir kayıt bulunamadı !</div> <?php endif; ?> </tbody> </table> <div class="row"> <div class="col-md-2"> <div class="input-group"> <select class="form-control" name="status"> <option value="1">Aktif Et</option> <option value="0">Pasif Et</option> <option value="2">Sil</option> </select> <div class="input-group-btn"> <input type="submit" class="btn default" value="Tamam" name="allaction" /> </div> </div> </div> <div class="col-md-10 text-right"> <?php echo $pagi->paginations(); ?> </div> </div> </form> <div aria-hidden="true" role="basic" id="ajaxs" class="modal fade"> <div class="modal-dialog modal-full"> <div class="modal-content"> </div> </div> </div>