Initial import

This commit is contained in:
sas.fajri
2026-04-27 10:26:26 +07:00
commit bf9b9097ee
2388 changed files with 3002242 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Soresultlog
{
function __construct()
{
$CI = &get_instance();
$this->db_onedev = $CI->load->database("default", true);
$this->db_smartone = $CI->load->database("default", true);
}
function clean_mysqli_connection($dbc)
{
while (mysqli_more_results($dbc)) {
if (mysqli_next_result($dbc)) {
$result = mysqli_use_result($dbc);
if (get_class($result) == 'mysqli_stmt') {
mysqli_stmt_free_result($result);
} else {
unset($result);
}
}
}
}
public function step_action($act,$re_id,$userid)
{
//$CI = &get_instance();
//$this->db = $CI->load->database("one", true);
$sql = "INSERT INTO so_reactionlog(
So_REActionLogDate,
So_REActionLogSo_ResultEntryID,
So_REActionLogAction,
So_REActionLogUserID
)
VALUES(
NOW(),?,?,?
)";
$qry = $this->db_onedev->query($sql, array($re_id,$act,$userid));
if (!$qry) {
return array(false, print_r($this->db_onedev->error(), true));
}else
return array(true);
}
public function log_result($data_json,$re_id,$userid)
{
//$CI = &get_instance();
//$this->db = $CI->load->database("one", true);
//echo $re_id;
$sql = "INSERT INTO cpone_log.log_resultentry_so(
Log_ResultEntrySoDate,
Log_ResultEntrySoReID,
Log_ResultEntrySoJSON,
Log_ResultEntrySoUserID
)
VALUES(
NOW(),?,?,?
)";
$qry = $this->db_onedev->query($sql, array($re_id,$data_json,$userid));
if (!$qry) {
return array(false, print_r($this->db_onedev->error(), true));
}else
return array(true);
}
}