/******************************************************************* PHP Class : /Controller/System/AboutController Description : Informasi Aplikasi Created By : Siau Pheng (siaupheng@3fonia.com). Created Date : November 23th, 2011. Last Modified : November 2nd, 2026. (c) 3FONIA Software; WWW.3FONIA.COM. *******************************************************************/ var AboutJS = { PHP: '', KODE: '', index() { let _html = []; if (typeof jQuery !== undefined) _html.push('jQuery v'+$().jquery); if (typeof bootstrap !== undefined) _html.push('Bootstrap v'+$.fn.tooltip.Constructor.VERSION); if (typeof DataTable !== undefined) _html.push('DataTable v'+DataTable.version); if (typeof Chart !== undefined) _html.push('Chart.js v'+Chart.version); if (typeof qz !== undefined) _html.push('QZ Connector v'+qz.version); if (typeof FoniaJS !== undefined) _html.push('FoniaJS v'+FoniaJS.version); $('#win'+this.KODE).find('#divBuildInfo').html(`
${_html.join('')}
`); $('#butDBCek').click(() => this.db_check()); $('#butDBOpti').click(() => this.db_opti()); $('#butUpdateCek').click(() => this.update_check()); new Request({ url: this.PHP + '/composer', onSuccess: (ajson) => { $('#win'+this.KODE).find('#divComposerInfo').html(ajson.html); } }).send(); }, db_check() { new Request({ url: this.PHP + '/db_check', onSuccess: (ajson) => { this.winCheck = FoniaJS.showWindow('CekDB', 'Cek Database', ajson.html, 500, [{},{i:'butTutup'}], () => this.db_run(ajson.db_count)); } }).send(); }, db_opti() { new Request({ url: this.PHP + '/db_check', onSuccess: (ajson) => { this.winCheck = FoniaJS.showWindow('CekDB', 'Optimalisasi Database', ajson.html, 500, [{},{i:'butTutup'}], () => this.opti_run(ajson.db_count)); } }).send(); }, update_check() { new Request({ url: this.PHP + '/update_check', onSuccess: (ajson) => { var tomb = [{},{i:'butTutup'},{i:'butWUpdate',v:'Proses Update !',c:'success'}]; if (ajson.is_update) tomb.pop(); this.winUpdate = FoniaJS.showWindow('CekApp', 'Cek dan Update Aplikasi', ajson.html, 500, tomb, () => { $('#winCekApp').find('#butWUpdate').click(() => this.update_run()); }); } }).send(); }, db_run(db_count = 0) { if (db_count === 0) return false; var items = Array(db_count).fill(0).map((_, index) => index); var $ul = $('#db-list').empty(); items.reduce((prev, curr) => { return prev.then(() => { return $.ajax({ url: this.PHP + '/db_proses', data: {'Nomor': curr}, dataType: 'json', type: 'POST', }).done((response) => { $ul.append('