<?php //@Copy nangkoelframework require_once 'master_validation.php'; include 'lib/nangkoelib.php'; echo open_body(); ?> <script language=javascript1.2 src='js/menusetting.js'></script> <?php include 'master_mainMenu.php'; /*ambil pengguna */ $str = "select a.namauser,b.namakaryawan,b.lokasitugas,c.namajabatan,d.nama from " . $dbname . ".user a\r\n left join " . $dbname . ".datakaryawan b on a.karyawanid=b.karyawanid\r\n left join " . $dbname . ".sdm_5jabatan c on b.kodejabatan=c.kodejabatan\r\n left join " . $dbname . ".sdm_5departemen d on b.bagian=d.kode"; $res = mysql_query($str); $optPengguna = ""; while ($bar = mysql_fetch_object($res)) { $optPengguna .= "<option value='" . $bar->namauser . "'>" . $bar->namauser . "-" . $bar->lokasitugas . "</option>"; } OPEN_BOX(); echo OPEN_THEME($_SESSION['lang']['privconf'] . ':'); echo "<fieldset>\r\n <legend><img src='images/vista_icons_03.png' height=60px style='vertical-align:middle;'>" . $_SESSION['lang']['newuser'] . "</legend> \r\n\t <table>\r\n\t <tr>\r\n\t <td>" . $_SESSION['lang']['newuser'] . "</td><td>:<select id=pengguna>" . $optPengguna . "</select></td></tr>\r\n\t <tr><td>" . $_SESSION['lang']['copyfrom'] . "</td><td>:<select id=dari>" . $optPengguna . "</select></td></tr>\r\n\t <tr><td colspan=2 align=right><button class=mybutton onclick=copyPrivileges()>" . $_SESSION['lang']['proses'] . "</button></td></tr>\r\n\t </tr>\r\n\t </table>\r\n\t </fieldset>\r\n\t "; echo CLOSE_THEME(); echo "<div id=container></div>"; CLOSE_BOX(); echo close_body();
//get all registred employee $arrid = array(); $prestr = "select distinct karyawanid from " . $dbname . ".sdm_ho_employee order by karyawanid"; $preres = mysql_query($prestr, $conn); while ($prebar = mysql_fetch_object($preres)) { array_push($arrid, $prebar->karyawanid); } $str = "select karyawanid,namakaryawan,statuspajak,tanggalmasuk,tanggalkeluar,npwp from " . $dbname . ".datakaryawan where alokasi=1 limit " . $limit . ",500"; $res = mysql_query($str, $conn); echo "<input type=checkbox onclick=checkAll(this," . mysql_num_rows($res) . ")>" . $_SESSION['lang']['pilihsemua']; echo "           \r\n\t\t <a href='?limit=" . ($_GET['limit'] - 500 > -1 ? $_GET['limit'] - 500 : 0) . "'>" . $_SESSION['lang']['pref'] . "</a>   <a href='?limit=" . ($_GET['limit'] + 500) . "'>" . $_SESSION['lang']['lanjut'] . "</a>"; echo "<table class=sortable cellspacing=1 border=0>\r\n\t\t <thead>\r\n\t\t\t <tr class=rowheader>\r\n\t\t\t <td>" . $_SESSION['lang']['pilih'] . "</td>\r\n\t\t\t <td>No.</td>\r\n\t\t\t <td>" . $_SESSION['lang']['id'] . "</td>\r\n\t\t\t\t<td>" . $_SESSION['lang']['namakaryawan'] . "</td>\r\n\t\t\t\t<td>" . $_SESSION['lang']['statuspajak'] . "</td>\r\n\t\t\t\t<td>" . $_SESSION['lang']['npwp'] . "</td>\r\n\t\t\t\t<td>" . $_SESSION['lang']['tanggalmasuk'] . "</td>\r\n\t\t\t\t<td>" . $_SESSION['lang']['tanggalkeluar'] . "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t </thead>\r\n\t\t\t <tbody id=tablebody>\r\n\t\t\t "; $no = 0; while ($bar = mysql_fetch_object($res)) { $no += 1; echo "<tr class=rowcontent id=row" . $no . ">"; //if its a new employee then check the checkbox if (in_array($bar->karyawanid, $arrid)) { echo "<td><input type=checkbox id='chk" . $no . "'></td>"; } else { echo "<td style='background-color:orange'><input type=checkbox id='chk" . $no . "' checked>" . $_SESSION['lang']['new'] . "</td>"; } echo "<td class=firsttd>" . ($no + $limit) . "</td>\r\n\t\t\t\t <td id=userid" . $no . ">" . $bar->karyawanid . "</td>\r\n\t\t\t\t <td id=nama" . $no . ">" . $bar->namakaryawan . "</td>\r\n\t\t\t\t <td id=mstatus" . $no . ">" . $bar->statuspajak . "</td>\r\n\t\t\t\t <td id=npwp" . $no . ">" . $bar->npwp . "</td>\r\n\t\t\t\t <td id=start" . $no . ">" . tanggalnormal($bar->tanggalmasuk) . "</td>\r\n\t\t\t\t <td id=resign" . $no . ">" . tanggalnormal($bar->tanggalkeluar) . "</td>\r\n\t\t\t\t </tr>"; } echo "</tbody>\r\n\t\t <tfoot>\r\n\t\t\t </tfoot>\r\n\t\t\t </table>"; echo "</td>\r\n\t\t <td valign=top>\r\n\t\t\t <fieldset style='text-align:center'>\r\n\t\t\t\t <legend id=legend><b>" . $_SESSION['lang']['panelsinkronisasi'] . "</b></legend>\r\n\t\t\t\t " . $_SESSION['lang']['sinkronisasiinfo'] . "<br>\r\n\t\t\t\t <button id=synbutton onclick=sync(" . $no . ")>Synchronize</button>\r\n\t\t\t\t <button id=stpbutton onclick=stopSync(" . ($no + 1) . ") disabled>" . $_SESSION['lang']['stop'] . "</button>\r\n\t\t\t\t </fieldset>\r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t </table>\r\n\t\t\t "; echo CLOSE_THEME(''); echo "</div>"; CLOSE_BOX(); //+++++++++++++++++++++++++++++++++++++++++++ echo close_body();
?> "; </script> <?php $optOrg2 = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>"; $sOrg2 = "select kodeorganisasi,namaorganisasi from " . $dbname . ".organisasi where tipe in ('AFDELING','BIBITAN') and induk='" . $_SESSION['empl']['lokasitugas'] . "' order by namaorganisasi asc"; $qOrg2 = mysql_query($sOrg2) or die(mysql_error()); while ($rOrg2 = mysql_fetch_assoc($qOrg2)) { $optOrg2 .= "<option value=" . $rOrg2['kodeorganisasi'] . ">" . $rOrg2['namaorganisasi'] . "</option>"; } OPEN_BOX('', "<b>" . $_SESSION['lang']['alokasisupervisi'] . "</b>"); $frm[0] .= OPEN_THEME($_SESSION['lang']['keterangan'] . ":"); $frm[0] .= "<fieldset style='text-align:left;width:300px;'><legend><b><img src=images/info.png align=left height=25px valign=asmiddle>[Info]</b></legend>"; $frm[0] .= "<div align=justify>" . $_SESSION['lang']['infoSupervisi'] . "</div>"; $frm[0] .= "</fieldset>"; $frm[0] .= CLOSE_THEME(); $frm[1] .= "<fieldset style='width:300px'><legend>" . $_SESSION['lang']['hksupervisi'] . "</legend>"; $frm[1] .= "<table cellspacing=1 border=0>\r\n<tr><td>" . $_SESSION['lang']['budgetyear'] . "</td><td>:</td><td>\r\n<input type=text class=myinputtextnumber id=thnAnggran name=thnAnggran maxlength=4 onkeypress=\"return angka_doang(event);\" style=width:150px; onblur=getHk() /></td></tr>\r\n<tr><td>" . $_SESSION['lang']['kodebudget'] . "</td><td>:</td><td><input type=text disabled class=myinputtext id=kdBudget name=kdBudget onkeypress=\"return tanpa_kutip(event);\" style=width:150px; value='SUPERVISI' /></td></tr>\r\n<tr><td>" . $_SESSION['lang']['upahsupervisi'] . "</td><td>:</td><td><input type=text class=myinputtextnumber id=uphSupervisi name=uphSupervisi onkeypress=\"return angka_doang(event);\" style=width:150px; onblur=kalikan() /></td></tr>\r\n<tr><td>" . $_SESSION['lang']['jmlhPersonel'] . "</td><td>:</td><td><input type=text class=myinputtextnumber id=jmlhPersonel name=jmlhPersonel onkeypress=\"return angka_doang(event);\" style=width:150px; onblur=kalikan() /></td></tr>\r\n<tr><td>" . $_SESSION['lang']['totalUpahSpr'] . "</td><td>:</td><td><input type=text disabled class=myinputtextnumber id=totUpah name=totUpah onkeypress=\"return angka_doang(event);\" style=width:150px; /></td></tr>\r\n\r\n\r\n<tr><td colspan=3>\r\n<button class=mybutton id=save_kepalaBr name=save_kepalaBr onclick=tampilKan()>" . $_SESSION['lang']['preview'] . "</button>\r\n<button class=mybutton id=btlTmbl name=btlTmbl onclick=batalBr() >" . $_SESSION['lang']['cancel'] . "</button></td></tr></table><input type='hidden' id='hkEfektif' name='hkEfektif' />\r\n"; $frm[1] .= "</fieldset>"; $frm[1] .= "<div id=listPrevData style='display:none;'><fieldset style=width:1100px><legend>" . $_SESSION['lang']['list'] . "</legend>"; $frm[1] .= "<button class=mybutton id=saveAwal name=saveAwal onclick=saveAll(1) >" . $_SESSION['lang']['save'] . "</button> <button class=mybutton id=lnjutTmbl name=lnjutTmbl onclick=lanjutkan() style='display:none'>" . $_SESSION['lang']['lanjut'] . "</button>"; $frm[1] .= "<table cellpadding=1 cellspacing=1 border=0 class=sortable widht=100%>\r\n <thead>\r\n <tr class=rowheader>\r\n <td>No</td>\r\n <td>" . $_SESSION['lang']['budgetyear'] . "</td>\r\n <td>" . $_SESSION['lang']['kodeorg'] . "</td>\r\n <td>" . $_SESSION['lang']['kegiatan'] . "</td>\r\n <td>" . $_SESSION['lang']['noakun'] . "</td>\r\n <td>" . $_SESSION['lang']['volume'] . "</td>\r\n <td>" . $_SESSION['lang']['satuan'] . "</td>\r\n <td>" . $_SESSION['lang']['rotasi'] . "</td>\r\n <td>" . $_SESSION['lang']['jumlahhk'] . "</td>\r\n <td>" . $_SESSION['lang']['namakegiatan'] . "</td>\r\n <td>" . $_SESSION['lang']['hksupervisi'] . "</td>\r\n <td>" . $_SESSION['lang']['supervisi'] . "</td>\r\n </tr>\r\n </thead><tbody id=containDetail>\r\n\t\t"; $frm[1] .= "</tbody></table></fieldset></div>"; $optThn = "<option value=''>" . $_SESSION['lang']['budgetyear'] . "</option>"; $frm[2] .= "<fieldset style='width:250px;'><legend>" . $_SESSION['lang']['sebaran'] . "</legend>"; $frm[2] .= "<table cellspacing=1 border=0>\r\n<tr><td>" . $_SESSION['lang']['budgetyear'] . "</td><td>:</td><td><input type=text class=myinputtextnumber id=thnBudget style='width:100px;' onkeypress='return angka_doang(event)' maxlength=4 /></td></tr>\r\n\r\n<tr><td colspan=3>\r\n<button class=mybutton onclick=prevSebaran() id=tmblPrev>" . $_SESSION['lang']['preview'] . "</button>\r\n\r\n</td></tr>\r\n</table></fieldset><br />"; $frm[2] .= "<div id=contentSebaran style=width:100%; ></div>"; $frm[3] .= "<fieldset style='width:250px;'><legend>" . $_SESSION['lang']['ulang'] . "</legend>"; $frm[3] .= "<table cellspacing=1 border=0>\r\n<tr><td>" . $_SESSION['lang']['budgetyear'] . "</td><td>:</td><td><input type=text class=myinputtextnumber id=thnBudgetUlg style='width:100px;' onkeypress='return angka_doang(event)' maxlength=4 /></td></tr>\r\n\r\n<tr><td colspan=3>\r\n<button class=mybutton onclick=delAll()>" . $_SESSION['lang']['delete'] . "</button>\r\n\r\n</td></tr>\r\n</table><br />"; $frm[3] .= "</fieldset>"; $frm[3] .= "<div id=contentSebaran></div>";
} echo "</div>"; echo "<li class=mmgr>\t\r\n <img id='" . $bar->kodestruktur . "_new' class=elink title='Create Child' src='images/plus.png'" . "style='width:16px;height:16px;cursor:pointer' onclick=\"javascript:orgVal='" . $bar->kodestruktur . "';clos=2;activeOrg='" . $bar->kodestruktur . "_new';setpos('inputorg',event);clearForm();\">\r\n </li>"; echo "</ul>"; # <a id='".$bar->kodeorganisasi."_new' class=elink title='Create Child' onclick=\"javascript:orgVal='".$bar->kodeorganisasi."';clos=2;activeOrg='".$bar->kodeorganisasi."_new';setpos('inputorg',event);clearForm();\">New<a> #$headControl = "<img id='addHeaderId' title='Tambah Header' src='images/plus.png'". # "style='width:20px;height:20px;cursor:pointer' onclick='addHeader(event)' /> "; //============================================ echo "</li>"; } } else { echo "<li class=mmgr>\t\r\n <a id=HQ class=elink title='Create New HQ' onclick=\"javascript:orgVal='';clos=1;activeOrg='HQ';setpos('inputorg',event);clearForm();\">New Entity<a>\r\n </li>"; } echo "</ul>"; echo "</div>"; echo CLOSE_THEME(); CLOSE_BOX(); $optkary = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>"; $sdata = "select distinct karyawanid,namakaryawan from " . $dbname . ".datakaryawan \r\n where (tanggalkeluar = '0000-00-00' or tanggalkeluar > '" . date("Y-m-d") . "') and tipekaryawan in ('0','7','8') order by namakaryawan asc"; $qdata = mysql_query($sdata) or die(mysql_error($conn)); while ($rdata = mysql_fetch_assoc($qdata)) { $optkary .= "<option value='" . $rdata['karyawanid'] . "'>" . $rdata['namakaryawan'] . "</option>"; } $optjbtn = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>"; $sjbtn = "select distinct * from " . $dbname . ".sdm_5jabatan order by namajabatan asc"; $qjbnt = mysql_query($sjbtn) or die(mysql_error($conn)); while ($rjbtn = mysql_fetch_assoc($qjbnt)) { $optjbtn .= "<option value='" . $rjbtn['kodejabatan'] . "'>" . $rjbtn['namajabatan'] . "</option>"; } echo "<div id=inputorg style='display:none;position:absolute'>" . OPEN_THEME($_SESSION['lang']['orgentry']) . "\r\n <table>\r\n <tr>\r\n <td>" . $_SESSION['lang']['kodestruktur'] . "</td><td><input type=text class=myinputtext id=kdStruktur maxlength=10 style='width:150px;' onkeypress=\"return charAndNum(event);\"></td>\r\n </tr>\r\n <tr>\r\n <td>" . $_SESSION['lang']['namakaryawan'] . "</td>\r\n <td><select id=karyId style='width:150px;'>" . $optkary . "</select></td>\r\n </tr>\t\r\n <tr>\r\n <td>" . $_SESSION['lang']['kodejabatan'] . "</td>\r\n <td><select id=kdJbtn style='width:150px;'>" . $optjbtn . "</select></td>\r\n </tr>\r\n <tr>\r\n <td>" . $_SESSION['lang']['email'] . "</td>\r\n <td><input type=text class=myinputtext id=maildt style='width:150px;' onkeypress=\"return tanpa_kutip(event);\"></td>\r\n </tr>\r\n <tr>\r\n <td>" . $_SESSION['lang']['detail'] . "</td><td><select id=detailDt><option value=1>" . $_SESSION['lang']['yes'] . "</option><option value=0>" . $_SESSION['lang']['no'] . "</option></select></td>\r\n </tr>\t\t\r\n <tr>\r\n <td>" . $_SESSION['lang']['pt'] . "</td><td><select id=alokasi style='width:150px;'>" . $optalokasi . "</select></td>\r\n </tr>\r\n\r\n </table>\r\n <input type=button class=mybutton value='" . $_SESSION['lang']['save'] . "' onclick=saveOrg()>\r\n <input type=button class=mybutton value='" . $_SESSION['lang']['close'] . "' onclick=\"hideById('inputorg');clearForm();\">\r\n " . CLOSE_THEME() . "\r\n </div>"; echo close_body();
echo "<li class=mmgr>\t\r\n\t\t\t\t\t\t\t<img id='" . $bar2->kodeorganisasi . "_new' class=elink title='Create Child' src='images/plus.png'" . "style='width:12px;height:12px;cursor:pointer' onclick=\"javascript:orgVal='" . $bar2->kodeorganisasi . "';clos=4;activeOrg='" . $bar2->kodeorganisasi . "_new';setpos('inputorg',event);clearForm();\">\r\n\t\t\t\t\t\t\t</li>"; echo "</ul>"; # <a id='".$bar2->kodeorganisasi."_new' class=elink title='Create Child' onclick=\"javascript:orgVal='".$bar2->kodeorganisasi."';clos=4;activeOrg='".$bar2->kodeorganisasi."_new';setpos('inputorg',event);clearForm();\">New Org<a> //============================================ echo "</li>"; } echo "</div>"; echo "<li class=mmgr>\t\r\n\t\t\t\t\t<img id='" . $bar1->kodeorganisasi . "_new' class=elink title='Create Child' src='images/plus.png'" . "style='width:14px;height:14px;cursor:pointer' onclick=\"javascript:orgVal='" . $bar1->kodeorganisasi . "';clos=3;activeOrg='" . $bar1->kodeorganisasi . "_new';setpos('inputorg',event);clearForm();\">\r\n\t\t\t\t\t</li>"; echo "</ul>"; # <a id='".$bar1->kodeorganisasi."_new' class=elink title='Create Child' onclick=\"javascript:orgVal='".$bar1->kodeorganisasi."';clos=3;activeOrg='".$bar1->kodeorganisasi."_new';setpos('inputorg',event);clearForm();\">New Org<a> //============================================ echo "</li>"; } echo "</div>"; echo "<li class=mmgr>\t\r\n\t\t\t<img id='" . $bar->kodeorganisasi . "_new' class=elink title='Create Child' src='images/plus.png'" . "style='width:16px;height:16px;cursor:pointer' onclick=\"javascript:orgVal='" . $bar->kodeorganisasi . "';clos=2;activeOrg='" . $bar->kodeorganisasi . "_new';setpos('inputorg',event);clearForm();\">\r\n\t\t\t</li>"; echo "</ul>"; # <a id='".$bar->kodeorganisasi."_new' class=elink title='Create Child' onclick=\"javascript:orgVal='".$bar->kodeorganisasi."';clos=2;activeOrg='".$bar->kodeorganisasi."_new';setpos('inputorg',event);clearForm();\">New<a> #$headControl = "<img id='addHeaderId' title='Tambah Header' src='images/plus.png'". # "style='width:20px;height:20px;cursor:pointer' onclick='addHeader(event)' /> "; //============================================ echo "</li>"; } } else { echo "<li class=mmgr>\t\r\n\t\t<a id=HQ class=elink title='Create New HQ' onclick=\"javascript:orgVal='';clos=1;activeOrg='HQ';setpos('inputorg',event);clearForm();\">New Entity<a>\r\n\t\t</li>"; } echo "</ul>"; echo "</div>"; echo CLOSE_THEME(); CLOSE_BOX(); echo "<div id=inputorg style='display:none;position:absolute'>\r\n\t\t" . OPEN_THEME($_SESSION['lang']['orgentry']) . "\r\n\t\t<table>\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['orgcode'] . "</td><td><input type=text class=myinputtext id=orgcode maxlength=10 size=12 onkeypress=\"return charAndNum(event);\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['orgname'] . "</td><td><input type=text class=myinputtext id=orgname maxlength=45 size=100 onkeypress=\"return charAndNumAndStrip(event);\"></td>\r\n\t\t</tr>\t\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['orgtype'] . "</td><td><select id=orgtype>" . $optTipeOrg . "</select></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['detail'] . "</td><td><select id=orgdetail><option value=1>" . $_SESSION['lang']['yes'] . "</option><option value=0>" . $_SESSION['lang']['no'] . "</option></select></td>\r\n\t\t</tr>\t\t\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['address'] . "</td><td><input type=text class=myinputtext id=orgadd maxlength=100 size=100 onkeypress=\"return tanpa_kutip(event);\"></td>\r\n\t\t</tr>\t\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['city'] . "</td><td><input type=text class=myinputtext id=orgcity maxlength=20 size=15 onkeypress=\"return charAndNum(event);\"></td>\r\n\t\t</tr>\t\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['country'] . "</td><td><select id=orgcountry>" . $optCountry . "</select></td>\r\n\t\t</tr>\t\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['zipcode'] . "</td><td><input type=text class=myinputtext id=orgzip maxlength=6 size=6 onkeypress=\"return angka_doang(event);\"></td>\r\n\t\t</tr>\t\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['telp'] . "</td><td><input type=text class=myinputtext id=orgtelp maxlength=20 size=20 onkeypress=\"return charAndNum(event);\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['alokasibiaya'] . "</td><td><select id=alokasi>" . $optalokasi . "</select></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t <td>" . $_SESSION['lang']['noakun'] . "</td><td><select id=noakun>" . $optnoakun . "</select></td>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t\t<input type=button class=mybutton value='" . $_SESSION['lang']['save'] . "' onclick=saveOrg()>\r\n\t\t<input type=button class=mybutton value='" . $_SESSION['lang']['close'] . "' onclick=\"hideById('inputorg');clearForm();\">\r\n\t\t" . CLOSE_THEME() . "\r\n\t\t</div>"; echo close_body();