} else { if ($opt == 'uf') { $mtitle = "Edit " . $fname . "'s employe status"; } else { $mtitle = "Delete " . $fname . "'s employe status"; } } // Function Module $fmod = "pf_info1"; // db Table $dbtable = "employee"; // Global Variables $mstr_level = MstrGet("mstr_level"); $mstr_division = MstrGet("mstr_division"); $mstr_group = MstrGet("mstr_group"); $mstr_position = MstrGet("mstr_position"); if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'up' || $opt == 'dn') { // Post Variables $inp = array(); $inp['nip'] = gpost('nip'); $inp['level'] = gpost('level'); $inp['division'] = gpost('division'); $inp['group'] = gpost('group'); $inp['position'] = gpost('position'); if ($opt == 'a') { $t = dbUpdate($dbtable, array('active' => 'N'), "empid='{$dcid}'"); dbInsert($dbtable, array('empid' => $dcid, 'status' => $status, 'date1' => $date1, 'date2' => $date2, 'position' => $position)); dbUpdate("employee", array('status' => $status), "dcid='{$dcid}'"); } else { if ($opt == 'u') { dbUpdate($dbtable, $inp, "dcid='{$cid}'");
<?php $empstatus = MstrGet("mstr_status"); $dcid = gpost('id'); $empappid = gpost('eid'); $tgl = gpost('tgl'); if ($tgl == '0') { $tgl = date("Y-m-d"); $dif = 1; $scuti = intval(gpost('scuti')) - $dif; } else { $dif = 1; $scuti = intval(gpost('scuti')) - $dif; } $fname = gpost('name'); $cyear = date("Y"); $t = mysql_query("SELECT * FROM `emp_dayoff` WHERE `empid`='{$empappid}' AND `date1y`='{$cyear}' AND `date2y`='{$cyear}'"); $hcuti = 0; while ($r = mysql_fetch_array($t)) { $hcuti += $r['count']; } $t = mysql_query("SELECT * FROM `emp_dayoff` WHERE `dcid`='{$dcid}'"); $r = mysql_fetch_array($t); $scuti = 12 - $hcuti + $r['count']; $fwidth = $r['count'] > 1 ? 550 : 420; ?> <script type="text/javascript" language="javascript"> </script> <table cellspacing="0" cellpadding="0" width="100%"><tr><td align="center" style="padding-top:120px"> <div class="fformbox" style="width:<?php
<?php $mstr_author = array(); $t = dbSel("*", "mstr_author", "O/ prefix LIMIT 0,20"); while ($r = dbFA($t)) { $mstr_author[$r['dcid']] = $r['name'] . " (" . $r['prefix'] . ")"; } $mstr_publisher = array(); $t = dbSel("*", "mstr_publisher", "O/ name LIMIT 0,20"); while ($r = dbFA($t)) { $mstr_publisher[$r['dcid']] = $r['name']; } $mstr_class = MstrGetx("mstr_class", "code"); $mstr_language = MstrGet("mstr_language"); $txtWidth = "width:344px"; ?> <script type="text/javascript" language="javascript"> function getBarcode(a){ var b=a.split("/"); E('barcode').value=b[0]; } function getCallNumber(){ var classcode=E('class').value; var author=getSelectedText('author'); var sa=author.indexOf("(")+1; var sb=author.indexOf(")",sa); auth=author.substring(sa,sb); var title=E('title').value.substr(0,1); title=title.toUpperCase(); var callnum=classcode+" "+auth+" "+title; E('tcallnumber').value=callnum;
if ($cid == $k['dcid']) { // found! // Re-Calculate page: $page = ceil($l / $npp); $nps = $npp * ($page - 1); $npl = $nps + $npp; break; } $l++; } // Re-Queries: $t = mysql_query($sql); $ndata = mysql_num_rows($t); } $mstr_author = MstrGet("mstr_author"); $mstr_publisher = MstrGet("mstr_publisher"); ?> <script type="text/javascript" language="javascript"> function goSearch(a){ jumpTo('<?php echo $page_link; ?> &q='+a); } </script> <table cellspacing="0" cellpadding="0" width="800px" style="margin-bottom:2px"><tr height="30px"> <td> <?php if ($keyw == '') { ?> <button class="btn" title="Add new classification" onclick="b_class('af')">
/** Page Personalization **/ $search_txt = "find name or nip..."; $search_action = RLNK . "employee.php"; $cview = "employee"; // current view $ct_bg = "folderico.png"; $ct_title = "Edit Profile"; function tdLabel($a, $s = "", $w = "150px", $cs = 0) { $s = $s == "L" ? "text-align:left" : $s; return "<td width=\"" . $w . "\"" . ($cs == 0 ? "" : " colspan=\"" . $cs . "\"") . " align=\"right\" style=\"padding-right:6px;" . $s . "\">{$a}:</td>"; } // Global Variables $mstr_marital = MstrGet("mstr_marital"); $mstr_religion = MstrGet("mstr_religion"); $mstr_family = MstrGet("mstr_family"); // Preprocessing Variables $dcid = gets('nid'); $t = dbSel("*", "employee", "W/ dcid='{$dcid}'"); $empp = dbFAx($t); ?> <html><head> <?php require_once VWDIR . 'style.php'; require_once SYDIR . 'preferences.php'; ?> <style type="text/css">.preftbl{border-radius:2px;padding:1px;border-collapse:collapse}.preftbl tr{border:1px solid #d0d0d0; height:16px;background:#ffffff}.preftbl td{font:11px 'Segoe UI', Tahoma, sans-serif;color:#303942}.preftbl tr:hover{background:#e4ecf7}.prefdel{border:none;width:15px;height:15px;background:url('<?php echo IMGR; ?> pfr_del0.png')center no-repeat;cursor:pointer}.prefdel:hover{background:url('<?php echo IMGR;
session_start(); require_once 'system/config.php'; require_once SYSDIR . 'db.php'; require_once LIBDIR . 'common.php'; /** Page Personalization **/ $search_txt = "find name or nip..."; $search_action = RLNK . "employee.php"; $cview = "report"; // current view $ct_bg = "conico.png"; $ct_title = "Reports"; /** Global Variables **/ $mstr_status = MstrGet("mstr_status", true, "any status"); $mstr_level = MstrGet("mstr_level", true, "any level"); $mstr_group = MstrGet("mstr_group", true, "any group"); $mstr_division = MstrGet("mstr_division", true, "any division"); ?> <html><head> <?php require_once VWDIR . 'style.php'; require_once SYDIR . 'preferences.php'; ?> <style type="text/css"> .pdiv{ font:11px Verdana,Tahoma,Arial;line-height:200%;color:#303942 } .ptracknumber { width:24px; height:24px; background:url('<?php echo IMGR;
<?php //$tpf=mysql_query("SELECT * FROM emp_document WHERE empid='".$r['dcid']."' ORDER BY dcid"); $tpf = mysql_query("SELECT t1.* FROM emp_document t1 LEFT JOIN mstr_document t2 ON t1.docid = t2.dcid WHERE t1.empid='" . $r['dcid'] . "' ORDER BY t2.urut"); $npf = mysql_num_rows($tpf); if ($npf > 0) { $rpf = mysql_fetch_array($t); $mstr_document = MstrGet("mstr_document"); ?> <div class="sfont" style="padding:5px 0 5px 0;background:#ededff;"> <b><?php echo $r['fname']; ?> 's Document<?php echo $npf > 1 ? "s" : ""; ?> :</b> </div><br/> <table class="tablex" border="0" cellspacing="1px"> <tr class="tablexhead"> <th>Document</th> <th>Validity</th> <th>Document Status</th> <th style="text-align:center">Option</th> </tr> <?php $is = 0; while ($rpf = mysql_fetch_array($tpf)) { $dd = diffDay($rpf['date2']); $active = $dd < 0 ? "Expired" : "Valid"; ?> <tr>
$td = dbSel("*", "emp_document"); while ($rd = dbFA($td)) { unset($doctype[$rd['docid']]); } foreach ($doctype as $k => $v) { echo "<option value=\"{$k}\"" . ($k == $cid ? " selected " : "") . ">{$v}</option>"; } } } else { if ($target == 'eb_family' || $target == 'family') { $dbtable = "mstr_family"; if ($opt == 'a') { $name = gpost('v'); $urut = MstrLastUrut($dbtable) + 1; dbInsert($dbtable, array('name' => $name, 'urut' => $urut)); $cid = mysql_insert_id(); $mstr_family = MstrGet($dbtable); foreach ($mstr_family as $k => $v) { echo "<option value=\"{$k}\"" . ($k == $cid ? " selected " : "") . ">{$v}</option>"; } } } } } } } } } } } }
<?php $target = gpost('t'); $opt = gpost('opt'); if ($target == 'language') { $dbtable = "mstr_language"; if ($opt == 'a') { $name = gpost('v'); $code = strtolower(substr($name, 0, 2)); $urut = MstrLastUrut($dbtable) + 1; dbInsert($dbtable, array('name' => $name, 'urut' => $urut, 'code' => $code)); $cid = mysql_insert_id(); $mstr = MstrGet($dbtable); foreach ($mstr as $k => $v) { echo "<option value=\"{$k}\"" . ($k == $cid ? " selected " : "") . ">{$v}</option>"; } } } else { if ($target == 'author' || $target == 'author2') { $dbtable = "mstr_author"; if ($opt == 'a') { $name = gpost('v'); $prefix = substr($name, 0, 3); //$urut=MstrLastUrut($dbtable)+1; dbInsert($dbtable, array('name' => $name, 'prefix' => $prefix)); $cid = mysql_insert_id(); $t = dbSel("*", "mstr_author", "O/ prefix"); while ($r = dbFA($t)) { echo '<option ' . ($r['dcid'] == $cid ? 'selected' : '') . ' value="' . $r['dcid'] . '">' . $r['name'] . '</option>'; } }
// Form Title if ($opt == 'af') { $mtitle = "Add new education history of " . $fname; } else { if ($opt == 'uf') { $mtitle = "Edit " . $fname . "'s education history"; } else { $mtitle = "Delete " . $fname . "'s education history"; } } // Function Module $fmod = "pf_education"; // db Table $dbtable = "emp_education"; // Global Variables $mstr_traintype = MstrGet("mstr_traintype"); if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'rf') { // Post Variables $tfile = gpost('pf_train_file'); $p = array('university', 'year', 'title', 'field', 'score'); $ipost = array(); foreach ($p as $k => $v) { $ipost[$v] = gpost($v); } if ($opt == 'a') { if ($tfile != '') { $description = "Attachment of education - " . $ipost['university'] . "-" . $ipost['year']; $filename = $tfile; $extension = end(explode(".", $filename)); dbInsert("emp_files", array('empid' => $dcid, 'description' => $description, 'file' => $filename, 'type' => $extension)); $fid = mysql_insert_id();
/* Page Setup */ $dcMarginT = 15; $dcMarginR = 15; $dcMarginL = 15; $dcPaperW = 290; $dcPaperH = 210; $dcPageW = $dcPaperW - $dcMarginR - $dcMarginL; $dcMarginRX = $dcPaperW - $dcMarginR; $mstr_status = MstrGet("mstr_status"); $mstr_level = MstrGet("mstr_level"); $mstr_group = MstrGet("mstr_group"); $mstr_division = MstrGet("mstr_division"); $mstr_traintype = MstrGet("mstr_traintype"); $mstr_family = MstrGet("mstr_family"); $mstr_marital = MstrGet("mstr_marital"); $mstr_religion = MstrGet("mstr_religion"); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, 15, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf->setLanguageArray($l); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Print a table /* dc_YDown() */ function dc_YDown($a = 0) {