Example #1
0
 public function logs()
 {
     $model_id = Str::studly($this->getTable());
     $data_id = $this->id;
     $logs = Activitylog::where('model_id', $model_id)->where('data_id', $data_id)->orderBy('id', 'desc')->get();
     return $logs->toArray();
 }
Example #2
0
 case 'auth':
     //machine list
     $au = new Authority();
     $au->createAuthorityList();
     $sel = new selectlist('Authority_ID', $au->getAuthorityList(), 'Select Authority Group', 'Authority_ID', 'Authority', '', '', '1');
     break;
 case 'approval':
     //machine list
     $app = new Approval();
     $app->setValue('skillgroup', $_GET['sgid']);
     $app->createApprovarList();
     $sel = new selectlist('Approver_ID', $app->getApprovarList(), 'Select Approver', 'Operator_ID', 'Operator_Name', '', '', '1');
     break;
 case 'idle':
     //machine list
     $act = new Activitylog();
     $act->createReasonList();
     $sel = new selectlist('Idle_ID', $act->getReasonList(), 'Select Idle Reason', 'Idle_ID', 'Idle_Reason', 'class="required"', '', '1');
     break;
 case 'nclog':
     //machine list
     $ncl = new NCLog();
     if (isset($_GET['class'])) {
         $class = 'class="required"';
     } else {
         $class = '';
     }
     if (isset($_GET['showall'])) {
         $ncl->setValue('showall', 1);
     }
     if (isset($_GET['nclt'])) {
Example #3
0
<?php

require_once 'autoload.php';
include 'checksession.php';
$ac = new Activitylog();
$_SESSION['LAST_ACTIVITY'] = time();
if (isset($_POST['Activity_ID'])) {
    //print_r($_POST);
    //print_r($_FILES);
    if (isset($_POST['Activity_ID'])) {
        $ac->setActivityID($_POST['Activity_ID']);
    }
    if (isset($_POST['Idle_ID'])) {
        $ac->setIdleID($_POST['Idle_ID']);
    }
    if (isset($_POST['lid'])) {
        $lid = $_POST['lid'];
        $activitylogid = $_POST['lid'];
    } else {
        $lid = '';
    }
    if (isset($_POST['Operation_ID'])) {
        $ac->setOperationID($_POST['Operation_ID']);
    }
    if (isset($_POST['Drawing_ID'])) {
        $ac->setDrawingID($_POST['Drawing_ID']);
    }
    if (isset($_POST['Operator_ID'])) {
        $operatorid = $_POST['Operator_ID'];
    } else {
        $operatorid = $_SESSION['operatorid'];
Example #4
0
<?php

require_once 'autoload.php';
$act = new Activitylog();
$_SESSION['LAST_ACTIVITY'] = time();
if (isset($_GET['asummary'])) {
    if (isset($_GET['sdate'])) {
        $act->setValue('sdtdb', $_GET['sdate']);
        $act->setValue('edtdb', $_GET['edate']);
    }
    $act->activitySummary();
}
if (isset($_GET['batchsummary'])) {
    $act->setValue('batchid', $_GET['bid']);
    $act->setValue('drawingid', $_GET['did']);
    $act->getBatchSummary();
}
?>