コード例 #1
0
ファイル: checksession.php プロジェクト: sknagesh/divyaeng2
function checksession($sg = null)
{
    if ($sg != null && isset($_SESSION['operatorid'])) {
        $ap = new Approval();
        $ap->setValue('skillgroup', $sg);
        $ap->setValue('operatorid', $_SESSION['operatorid']);
        if ($ap->checkAuthority()) {
            return true;
        } else {
            return false;
        }
    }
    if (isset($_SESSION['user'])) {
        if (isset($_SESSION["LAST_ACTIVITY"])) {
            if (time() - $_SESSION["LAST_ACTIVITY"] > 300) {
                // last request was more than 30 minutes ago
                session_unset();
                // unset $_SESSION variable for the run-time
                session_destroy();
                // destroy session data in storage
                return false;
            } else {
                $_SESSION["LAST_ACTIVITY"] = time();
                // update last activity time stamp
                return true;
            }
        }
    }
    return false;
}
コード例 #2
0
         $class = 'class="required"';
     } else {
         $class = '';
     }
     $sel = new selectlist('Skill_Group_ID', $sg->getSkillGroupList(), 'Select Skill Group', 'Skill_Group_ID', 'Group_Desc', $class, '', '1');
     break;
 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 {
コード例 #3
0
ファイル: attendence.php プロジェクト: sknagesh/divyaeng2
 }
 if (isset($_GET['holui'])) {
     $op->holidayUI();
 }
 if (isset($_GET['leaveappui'])) {
     $op->setValue('leaveid', $_GET['lid']);
     $op->leaveapproveUI();
 }
 if (isset($_GET['attendence'])) {
     $op->setValue('uitype', 'att');
     $op->setValue('attstatusid', 1);
     $op->saveAttendence();
 }
 if (isset($_GET['sgid'])) {
     $au = new Approval();
     $au->setValue('skillgroup', $_GET['sgid']);
     $au->setValue('tname', 'Leaves');
     $au->setValue('linkcol', 'Leave_ID');
     $au->setValue('linkid', $_GET['lid']);
     $au->setValue('remarks', $_GET['appremarks']);
     $au->saveApproval();
 }
 if (isset($_GET['plan'])) {
     if (isset($_GET['mid'])) {
         $op->setValue('operatorid', $_GET['mid']);
     }
     $op->showAttencence();
 }
 if (isset($_GET['mpdetail'])) {
     $op->setValue('attendenceid', $_GET['id']);
     $op->getAttendenceDetails();
コード例 #4
0
ファイル: dimension.php プロジェクト: sknagesh/divyaeng2
        $i = $_GET['rowno'] - 1;
        $data = array('id' => $i, 'tl' => $_GET['tl'], 'tu' => $_GET['tu']);
        $dimn->addDimensionRow($data);
    }
    if (isset($_GET['rev'])) {
        $dimn->setValue('operationid', $_GET['opid']);
        if (isset($_GET['oldrev'])) {
            $dimn->setValue('oldrev', 1);
        }
        if (isset($_GET['id'])) {
            $dimn->getStageRevno($_GET['id']);
        } else {
            $dimn->getStageRevno();
        }
    }
    if (isset($_GET['sgid'])) {
        $au = new Approval();
        $au->setValue('skillgroup', $_GET['sgid']);
        $au->setValue('tname', 'Ope_Drawing');
        $au->setValue('linkcol', 'Ope_Drawing_ID');
        $au->setValue('linkid', $_GET['opdrgid']);
        $au->setValue('remarks', $_GET['appremarks']);
        $au->saveApproval();
    }
    if (isset($_GET['copy'])) {
        ///show dimwnsions list for copying to another operation
        $dimn->setValue('operationid', $_GET['opid']);
        $dimn->setValue('opedrawingid', $_GET['revid']);
        $dimn->showDimensionCopyUI();
    }
}
コード例 #5
0
ファイル: nclog.php プロジェクト: sknagesh/divyaeng2
    if (isset($_GET['ui'])) {
        $nc->showNCUI();
    }
    if (isset($_GET['newtmrow'])) {
        $id = $_GET['id'];
        $ope = new Operator();
        $ope->createOperatorList();
        $any = new Anylist();
        $any->createList('Department');
        echo '<tr><td>';
        $sel = new selectlist("teammember[" . $id . "]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', '', '');
        echo '</td><td>';
        $sel = new selectlist("department[" . $id . "]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', '', '');
        echo '</td><td><input id="work[' . $id . ']" name="work[' . $id . ']" class="required"></td>';
        echo '<td><input id="tdate[' . $id . ']" name="tdate[' . $id . ']" class="required"></td><td><input id="memberremarks[' . $id . ']" name="memberremarks[' . $id . ']"></td>';
        echo '<input type="hidden" id="tdatedb[' . $id . ']" name="tdatedb[' . $id . ']"></tr>';
    }
    if (isset($_GET['nclid'])) {
        $nc->setValue('nonconformanceid', $_GET['nclid']);
        $nc->showNCUI();
    }
    if (isset($_GET['sgid'])) {
        $au = new Approval();
        $au->setValue('skillgroup', $_GET['sgid']);
        $au->setValue('tname', 'NonConformance');
        $au->setValue('linkcol', 'NonConformance_ID');
        $au->setValue('linkid', $_GET['lid']);
        $au->setValue('remarks', $_GET['appremarks']);
        $au->saveApproval();
    }
}
コード例 #6
0
ファイル: index.php プロジェクト: sknagesh/divyaeng2
<?php

require_once 'autoload.php';
include 'checksession.php';
if (!checksession()) {
    header('Location: login.php');
}
$au = new Approval();
$commallowed = array('2', '17');
if (isset($_SESSION['operatorid'])) {
    $au->setValue('operatorid', $_SESSION['operatorid']);
    $me = new Message();
    $me->setTo($_SESSION['operatorid']);
    $nm = $me->getMessagecount();
} else {
    checksession('index.php');
}
echo <<<_END



<!DOCTYPE HTML>
    <head>
        <meta charset="utf-8" />
        <title>Divya Engineering ERP</title>
<link href="js/css/sm-core-css.css" rel="stylesheet" type="text/css" />
<link href="js/css/sm-blue/sm-blue.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-2.1.4.min.js" ></script>
<script src="js/jquery.smartmenus.js" ></script>

<script>
コード例 #7
0
ファイル: ecn.php プロジェクト: sknagesh/divyaeng2
            $ecn->setValue('ecnid', $_GET['ecnid']);
        }
        $ecn->showECNUI();
    }
    if (isset($_GET['newtmrow'])) {
        $id = $_GET['id'];
        $ope = new Operator();
        $ope->createOperatorList();
        $any = new Anylist();
        $any->createList('Department');
        echo '<tr><td>';
        $sel = new selectlist("teammember[" . $id . "]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', '', '');
        echo '</td><td>';
        $sel = new selectlist("department[" . $id . "]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', '', '');
        echo '</td><td><input id="work[' . $id . ']" name="work[' . $id . ']" class="required" size="75"></td>';
        echo '<td><input id="tdate[' . $id . ']" name="tdate[' . $id . ']" class="required"></td><td><input id="memberremarks[' . $id . ']" name="memberremarks[' . $id . ']"></td>';
        echo '<input type="hidden" id="tdatedb[' . $id . ']" name="tdatedb[' . $id . ']"></tr>';
    }
    if (isset($_GET['sgid'])) {
        $au = new Approval();
        $au->setValue('skillgroup', $_GET['sgid']);
        $au->setValue('tname', 'ECN');
        $au->setValue('linkcol', 'ECN_ID');
        $au->setValue('linkid', $_GET['ecnid']);
        $au->setValue('remarks', $_GET['appremarks']);
        $au->saveApproval();
    }
    if (isset($_GET['partecn'])) {
        $ecn->showECN($_GET['ecnid']);
    }
}
コード例 #8
0
                }
            }
            $dimnob->showDimensionObservationUI();
        }
        if (isset($_GET['jno'])) {
            $dimnob->setValue('operationid', $_GET['opid']);
            $dimnob->setValue('batchid', $_GET['bid']);
            $dimnob->setValue('opedrawingid', $_GET['revid']);
            $dimnob->getJobnos();
        }
        if (isset($_GET['date'])) {
            $dimnob->setValue('dimnobservationid', $_GET['doid']);
            $dimnob->getDate();
        }
        if (isset($_GET['check'])) {
            $dimnob->checkvalue($_GET['edimn'], $_GET['tlow'], $_GET['tup'], $_GET['bdim']);
        }
        if (isset($_GET['tomm'])) {
            $dimnob->converttomm($_GET['edimn']);
        }
        if (isset($_GET['sgid'])) {
            $au = new Approval();
            $au->setValue('skillgroup', $_GET['sgid']);
            $au->setValue('tname', 'Dimn_Observation');
            $au->setValue('linkcol', 'Dimn_Observation_ID');
            $au->setValue('linkid', $_GET['doid']);
            $au->setValue('remarks', $_GET['appremarks']);
            $au->saveApproval();
        }
    }
}