One Hat Cyber Team
Your IP :
18.191.147.160
Server IP :
192.185.194.254
Server :
Linux raider.websitewelcome.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home2
/
glenar
/
www
/
web
/
Panel
/
Pages
/
Base
/
View File Name :
category_option.php
<?php ob_start(); session_start(); include("../../fanction.php"); $General->AjaxCheckLogin('1'); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="../../css/bootstrap.min.css"> <link rel="stylesheet" href="../../css/bootstrap-rtl.min.css"> <link rel="stylesheet" href="../../css/reset.css"> <link rel="stylesheet" href="../../css/dataTables.bootstrap.min.css"> <link rel="stylesheet" href="../../css/bootstrap-datepicker.min.css" /> <link rel="stylesheet" href="../../css/index.css"> <link rel="stylesheet" href="../../css/font-awesome.css" media="screen"> <title>Vblog - Category</title> </head> <body> <?php include("../../header.php"); ?> <div class="container" style="width: 100%; min-height: 100%;"> <div class="row" style="border-right: 72px solid #383A3F;"> <!-- tools start --> <?php include("../../menu.php"); ?> <!-- tools end --> <!-- main start --> <div class="pull-left main-content"> <div class="clear" style="padding-bottom: 20px;"></div> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading">Category Option</div> <div class="panel-body"> <!-- --> <?php if(isset($_GET['action'],$_GET['CID']) && $_GET['CID'] != "" && $_GET['action'] == "del"){ $result = $Website->DeletCategory($_GET['CID']); $array = json_decode($result,true); echo $array['message']; } ?> <div id="w1" class="grid-view"> <div class="col-md-12"> <form class="do-ajax" method="post" action="../../ajax/category_option.php" name="login_form" enctype="multipart/form-data"> <div class="row"> <?php if(isset($_GET['action'],$_GET['CID']) && $_GET['CID'] != "" && $_GET['action'] == "edit") { $ID = $_GET['CID']; $Category_select = $Website->SelectCategory($ID,'','','','','','','','','',''); $row_Category_select = mysqli_fetch_assoc($Category_select); ?> <div class="col-md-3"> <div class="form-group"> <label for="inputState">نام </label> <input type="text" name="Name" class="form-control" id="usr" value="<?php echo $row_Category_select['Name']; ?>" placeholder=" Name" required> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">Slug </label> <input type="text" name="Slug" class="form-control" id="usr" value="<?php echo $row_Category_select['Slug']; ?>" placeholder=" Slug" required> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">دسته بندی والد </label> <select name="ParentID" class="form-control" id="browser" required> <option value="0" <?php if($row_Category_select['ParentID'] == 0){ ?> selected <?php } ?>>ندارد</option> <?php $list_Category_select = $Website->SelectCategory('','','','','','','','1','','',''); $i = 0; while ($rowCategory_select = mysqli_fetch_assoc($list_Category_select)){ $i++;?> <option value="<?php echo $rowCategory_select['ID']; ?>" <?php if($row_Category_select['ParentID'] == $rowCategory_select['ID']){ ?> selected <?php } ?>><?php echo $rowCategory_select['Name']; ?></option> <?php } ?> </select> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">Order </label> <input type="number" name="order" min="1" class="form-control" id="usr" value="<?php echo $row_Category_select['Order']; ?>" required> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>متن </label> <textarea cols="100" id="editor1" name="editor1" rows="10" class="form-control" data-sample-short><?php echo $row_Category_select['Desc']; ?></textarea> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>انتخاب لوگو</label> <input type="file" class="form-control" name="logo" > </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">زبان </label> <select title="" name="lang" class="form-control"> <option value="1" <?php if($row_Category_select['Lang'] == 1){ ?> selected <?php } ?>>انگلیسی</option> <option value="2" <?php if($row_Category_select['Lang'] == 2){ ?> selected <?php } ?>>فارسی</option> </select> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">مشاهده در منو </label> <select title="" name="show" class="form-control"> <option value="1" <?php if($row_Category_select['Show'] == 1){ ?> selected <?php } ?>>بله</option> <option value="0" <?php if($row_Category_select['Show'] == 0){ ?> selected <?php } ?>>خیر</option> </select> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">وضعیت </label> <select title="" name="status" class="form-control"> <option value="1" <?php if($row_Category_select['Status'] == 1){ ?> selected <?php } ?>>فعال</option> <option value="0" <?php if($row_Category_select['Status'] == 0){ ?> selected <?php } ?>>غیرفعال</option> </select> </div> </div> </div> <button href="#" class="btn btn-login" role="button">edite</button> <hr> <input name="action" type="hidden" value="edite"/> <input name="oldpic" type="hidden" value="<?php echo $row_Category_select['Pic']; ?>"/> <input name="ID" type="hidden" value="<?php echo $_GET['CID']; ?>"/> <?php //insert Section }else{ ?> <div class="col-md-3"> <div class="form-group"> <label for="inputState">نام </label> <input type="text" name="Name" class="form-control" id="usr" placeholder=" Name"> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">Slug </label> <input type="text" name="Slug" class="form-control" id="usr" placeholder=" Slug"> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">دسته بندی والد </label> <input list="browsers" name="ParentID" class="form-control" id="browser"> <datalist id="browsers"> <option value="0" selected>ندارد</option> <?php $list_Category_select1 = $Website->SelectCategory('','','','','','','','1','','',''); $i = 0; while ($rowCategory_select = mysqli_fetch_assoc($list_Category_select1)){ $i++;?> <option value="<?php echo $rowCategory_select['ID']; ?>" ><?php echo $rowCategory_select['Name']; ?></option> <?php } ?> </datalist> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">Order </label> <input type="number" name="order" min="1" class="form-control" id="usr" value="" required> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>متن </label> <textarea cols="100" id="editor1" name="editor1" rows="10" class="form-control" data-sample-short></textarea> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>انتخاب لوگو</label> <input type="file" class="form-control" name="logo"> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">زبان </label> <select title="" name="lang" class="form-control"> <option value="1">انگلیسی</option> <option value="2">فارسی</option> </select> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">مشاهده در منو </label> <select title="" name="show" class="form-control"> <option value="1">بله</option> <option value="0">خیر</option> </select> </div> </div> <div class="col-md-3"> <div class="form-group"> <label for="inputState">وضعیت </label> <select title="" name="status" class="form-control"> <option value="1">فعال</option> <option value="0">غیرفعال</option> </select> </div> </div> </div> <button href="#" class="btn btn-login" role="button">Insert</button> <hr> <input name="action" type="hidden" value="insert"/> <?php } ?> </form> </div> </div> <!-- --> </div> </div> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> Categorys </div> <div class="panel-body"> <!-- --> <div id="w1" class="grid-view"> <div class="col-md-12"> <table id="example" class="table table-striped table-bordered" style="width:100%"> <thead> <tr> <th>عنوان</th> <th>والد</th> <th>تصویر</th> <th>زبان</th> <th>وضعیت</th> <th>عملیتات</th> </tr> </thead> <tbody> <?php $list_Category = $Website->SelectCategory('','','','','','','', '','','',''); $i = 0; while ($row_Category = mysqli_fetch_assoc($list_Category)){ $i++;?> <tr> <td> <?php echo $row_Category['Name']; ?> </td> <td> <?php if($row_Category['ParentID'] != 0) { $ParentID = $row_Category['ParentID']; $get_Category = $Website->SelectCategory($ParentID, '', '', '', '', '', '', '', '', '', ''); $row_Category_get = mysqli_fetch_assoc($get_Category); echo $row_Category_get['Name']; }else{ echo "-"; } ?> </td> <td><img src="../../../upload/<?php echo $row_Category['Pic']; ?>" alt="" width="80" height="80" class="avatar photo"></td> <td> <?php if($row_Category['Lang'] == 1) { echo "English"; }else{ echo "فارسی"; } ?> </td> <td> <?php if($row_Category['Status'] == 1) { echo "فعال"; }else{ echo "غیرفعال"; } ?> </td> <td> <a href="?action=del&CID=<?php echo $row_Category['ID']; ?>" > <button type="button" class="btn btn-danger">حذف</button></a> <a href="?action=edit&CID=<?php echo $row_Category['ID']; ?>" > <button type="button" class="btn btn-info">ویرایش</button></a> </td> </tr> <?php } ?> </tfoot> </table> </div> </div> <!-- --> </div> </div> </div> </div> </div> <!-- main end --> </div> </div> <?php include('../../footer.php'); ?> <script src="../../js/jquery-2.2.3.min.js"></script> <script src="../../js/bootstrap.min.js"></script> <script src="../../js/chart.bundle.min.js"></script> <!-- <script src="js/chart_config.js"></script> --> <script src="../../js/mycode.js"></script> <script src="../../js/jquery.dataTables.min.js"></script> <script src="../../js/dataTables.bootstrap.min.js"></script> <script> $(document).ready(function() { $('#example').DataTable(); } ); $(document).ready(function() { $(".datepicker0").datepicker(); }); $(document).ready(function () { var counter = 1; var datecounter = 5; $("#addrow").on("click", function () { var newRow = $("<tr>"); var cols = ""; cols += '<td></td>'; cols += '<td><input type="text" class="form-control" name="sessions['+counter+'][]"/></td>'; cols += '<td><input type="number" class="form-control" name="sessions['+counter+'][]"/></td>'; cols += '<td><input type="button" class="ibtnDel btn btn-md btn-danger" value=" - "></td>'; newRow.append(cols); $("table.order-list").append(newRow); counter++; datecounter++; $(".datepicker1").datepicker(); }); $("table.order-list").on("click", ".ibtnDel", function (event) { $(this).closest("tr").remove(); counter -= 1 }); }); function calculateRow(row) { var price = +row.find('input[name^="price"]').val(); } function calculateGrandTotal() { var grandTotal = 0; $("table.order-list").find('input[name^="price"]').each(function () { grandTotal += +$(this).val(); }); $("#grandtotal").text(grandTotal.toFixed(2)); } </script> </body> </html>