Commit ca5b4019 by nurchamim

menyesuaikan pembaruan

parent 72891cb7
......@@ -32,8 +32,9 @@ $config['socket_dir'] = $config['base_url'].'/assets/plugins/node_ser
$config['dir_assets'] = $config['base_url'].'assets/';
$config['socket_server'] = $server_name.':'.$socket_port;
$config['socket_port'] = $socket_port;
$config['socket_namespace'] = 'absenku-apps';
// $config['base_image'] = 'https://apps.absenku.com/web/';
$config['socket_namespace'] = 'custom';
$config['socket_room_prefix'] = 'custom'; // tergantung subdomain
$config['user_agent'] = 'custom'; // disamakan socket room prefix
$config['base_image'] = $config['base_url'];
$config['base_upload'] = '../../../../uploads/biodata/';
$config['base_upload'] = $config['base_upload'].'master_custom/';
......
......@@ -250,6 +250,7 @@ class Data_reimburse extends MY_Controller {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$base."reimbursement/update-status");
curl_setopt($ch, CURLOPT_USERAGENT, $this->config->item('user_agent'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post_data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);
......
......@@ -757,7 +757,7 @@ class Pengajuan_izin extends MY_Controller
"api-key:absenku123**"
);
curl_setopt($curl, CURLOPT_USERAGENT, 'absenku_v3_250801_multi');
curl_setopt($ch, CURLOPT_USERAGENT, $this->config->item('user_agent'));
curl_setopt($curl, CURLOPT_URL, $url_act);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
......
......@@ -610,7 +610,7 @@ class Pengajuan_lembur extends MY_Controller
"api-key:absenku123**"
);
curl_setopt($curl, CURLOPT_USERAGENT, 'absenku_v3_250801_multi');
curl_setopt($ch, CURLOPT_USERAGENT, $this->config->item('user_agent'));
curl_setopt($curl, CURLOPT_URL, $url_act);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
......
......@@ -49,7 +49,7 @@ class Riwayat_pendidikan extends MY_Controller
public function save()
{
$id = $this->input->post('id_pendidikan');
$id_company = $this->session->userdata('id_company');
$id_company = $this->id_company;
$id_karyawan = $this->fungsi->decrypt_idkaryawan($this->input->post('id_karyawan'));
$transkrip_lama = $this->input->post('transkrip_lama');
......
......@@ -157,6 +157,7 @@ class Draft_pkwt extends MY_Controller {
'authentication: absenku123**'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $this->config->item('user_agent'));
$output = curl_exec($ch);
curl_close($ch);
......
......@@ -390,6 +390,7 @@ class Verifikasi extends MY_Controller {
'authentication: absenku123**'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $this->config->item('user_agent'));
$output = curl_exec($ch);
curl_close($ch);
......
<?php
function redirect($uri = '', $method = 'auto', $code = NULL)
{
$uri = str_replace("/web/", "", $uri);
if ( ! preg_match('#^(\w+:)?//#i', $uri))
{
$uri = site_url($uri);
}
// IIS environment likely? Use 'refresh' for better compatibility
if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
{
$method = 'refresh';
}
elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
{
if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
{
$code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
? 303 // reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
: 307;
}
else
{
$code = 302;
}
}
switch ($method)
{
case 'refresh':
header('Refresh:0;url='.$uri);
break;
default:
header('Location: '.$uri, TRUE, $code);
break;
}
exit;
}
......@@ -40,6 +40,7 @@ if (!function_exists('data_diri_action')) {
if (!function_exists('notif_approval')) {
function notif_approval($route, $id_karyawan, $judul, $content, $id_ref)
{
$CI =& get_instance();
$init = language_init();
$ch = curl_init();
$token_fcm = $init->db->get_where('users', ['id_karyawan' => $id_karyawan])->row()->token_fcm;
......@@ -60,6 +61,7 @@ if (!function_exists('notif_approval')) {
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authentication: absenku123**'
]);
curl_setopt($ch, CURLOPT_USERAGENT, $CI->config->item('user_agent'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
......
......@@ -26,6 +26,7 @@ if(!function_exists('publishTarget')) {
curl_setopt($ch, CURLOPT_URL, "https://mb-producer.absenku.com/fcm?".http_build_query($params));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['authentication: absenku123**']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $this->config->item('user_agent'));
curl_exec($ch);
curl_close($ch);
}
......
......@@ -24,10 +24,7 @@
"ajax": {
"url": "<?= site_url('master/cabang/list_data') ?>",
"type": "GET",
"complete": function(data) {
reconfigure(data);
}
"type": "GET"
},
"aoColumnDefs": [{
......
......@@ -335,9 +335,6 @@
$(function() {
callmasktanggal();
reconfigure();
// checkpermission();
lightbox.option({
'imageFadeDuration': 100,
'resizeDuration': 100,
......@@ -628,8 +625,10 @@
// window.Pace.stop();
if (typeof request.responseJSON !== 'undefined') {
if(request.responseJSON.csrf_token !== undefined) {
reconfigure(request);
}
}
var tabel = $('div.dataTables_scrollBody > table');
if (tabel.length > 0) {
var id_tabel = tabel.attr('id');
......@@ -699,7 +698,7 @@
let doPromise = new Promise(function(resolve, reject) {
$.ajax({
url: hostname + ":2083",
url: hostname + ":" + <?= $this->config->item('socket_port') ?>,
headers: {
'X-Requested-With': 'XMLHttpRequest'
},
......@@ -739,7 +738,7 @@
socket.on('connect', function() {
socket.emit('connect_users', {
'id_karyawan': '<?= $this->session->userdata("id_karyawan") ?>'
'id_karyawan': '<?= $this->config->item("socket_room_prefix")."~".$this->session->userdata("id_karyawan") ?>'
});
});
......@@ -801,7 +800,7 @@
function refresh_token() {
if (socket !== undefined) {
socket.emit('refresh-token', {
'id_karyawan': '<?= $this->session->userdata("id_karyawan") ?>',
'id_karyawan': '<?= $this->config->item("socket_room_prefix")."~".$this->session->userdata("id_karyawan") ?>',
'_token': $('meta[name="csrf-token"]').attr('content'),
'refresh': true
});
......
......@@ -12,7 +12,6 @@
},
"require": {
"php": ">=5.3.7",
"luthier/luthier": "^1.0",
"wisembly/elephant.io": "^3.3",
"mpdf/mpdf": "^8.0",
"php-amqplib/php-amqplib": "^3.6",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment