?> </td> </tr> <?php } else { if ($opt == 'df') { $okbtn = "Yes"; $nobtn = " No "; $gd = 'false'; // Delete form ?> <tr><td><p class="line150">Are you sure you want to delete "<b><?php echo $mstr_status[$r['status']]; ?> </b>" in period <?php echo ftgl($r['date1']) . " to " . ftgl($r['date2']); ?> ?<?php if ($r['active'] == 'Y') { ?> This status is <span style="color:#008000"><b>active</b></span>. If it deleted, status of <?php echo $fname; ?> will set to "No Status".<?php } ?> </p></td></tr> <?php } } ?>
function log_print($somecontent = '') { $filename = 'log_print.txt'; $somecontent = ftgl(date("Y-m-d")) . " : " . $somecontent . "\r\n"; // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!($handle = fopen($filename, 'a'))) { //echo "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $somecontent) === FALSE) { //echo "Cannot write to file ($filename)"; exit; } //echo "Success, wrote ($somecontent) to file ($filename)"; fclose($handle); } else { //echo "The file $filename is not writable"; } }
function ftgljam($d){ $c=explode(" ",$d); $a=ftgl($c[0]); return $a.($a=='-'?'':' '.$c[1]); }
<td class="xtdh">Description</td> <td class="xtdh" style="text-align:center">Options</td> </tr> <?php $n = 0; $rc = 1; //$p=Array('title','type','host','place','date1','date2','speaker','participant'); while ($r = mysql_fetch_array($t)) { if ($n >= $nps && $n < $npl) { if ($rc == 0) { $rc = 1; } else { $rc = 0; } $date1 = ftgl($r['date1']); $date2 = ftgl($r['date2']); ?> <tr id="p_train<?php echo $r['dcid']; ?> " class="xr<?php echo $rc; ?> "> <td width="30px" align="center"><?php echo ++$n; ?> </td> <td width="50px"><?php echo src_replace($r['code']); ?>
?> </b> as <?php echo $q; ?> <b><?php echo $df[$b]['position']; ?> </b></div> <div class="pdiv">Company address: <b><?php echo $df[$b]['address']; ?> </b>.</div><div class="pdiv">Period: <b><?php echo ftgl($df[$b]['date1']); ?> </b> until <b><?php echo ftgl($df[$b]['date2']); ?> </b>. Salary:<b><?php echo $df[$b]['salary']; ?> </b>.</div>Reason for leaving this job: <i><?php echo $df[$b]['reason']; ?> </i> </td><td align="right"><div class="prefopt" style="width:30px"><input type="button" title="Remove" class="prefdel" onclick="removeEntry(4,<?php echo $b; ?> )"/></div> <input type="hidden" name="jobhis_name<?php echo $b; ?>
echo $mstr_traintype[$rpf['type']]; ?> </td> <td width="100px"><?php echo $rpf['host']; ?> </td> <td width="100px"><?php echo $rpf['place']; ?> </td> <td width="100px"><?php echo ftgl($rpf['date1']); ?> to <?php echo ftgl($rpf['date2']); ?> </td> <td width="90px"><?php echo $rpf['speaker']; ?> </td> <td width="100px"><?php echo $rpf['participant']; ?> </td> <td width="60px" align="center"><table style="border:none;background:none" cellspacing="0" cellpadding="0"><tr> <?php if ($rpf['file'] != 0) { $tfile = dbSel("file", "emp_files", "W/dcid='" . $rpf['file'] . "'"); if (mysql_num_rows($tfile) > 0) {
<?php $fmod = 'training'; $xtable = new xtable($fmod); // Query $t = mysql_query("SELECT * FROM hrd_training ORDER BY tgl1"); $xtable->ndata = mysql_num_rows($t); $xtable->btnbar_f('add'); if ($xtable->ndata > 0) { // Table head $xtable->head('judul', 'penyelenggara', 'tempat', 'tanggal', 'pembicara', 'peserta', 'jenis training'); while ($r = mysql_fetch_array($t)) { $xtable->row_begin(); $xtable->td($r['judul'], 200); $xtable->td($r['penyelenggara'], 200); $xtable->td($r['tempat'], 120); $xtable->td(ftgl($r['tgl1']) . ' s/d ' . ftgl($r['tgl2']), 200); $xtable->td($r['pembicara'], 120); $xtable->td($r['peserta']); $xtable->td(jenistraining_name($r['jenistraining']), 100); $xtable->opt_ud($r['replid']); } $xtable->foot(); } else { $xtable->nodata(); }
<td width="70px" align="center"><?php echo $rpf['jenis']; ?> </td> <td width="100px"><?php echo $rpf['penyelenggara']; ?> </td> <td width="120px"><?php echo $rpf['tempat']; ?> </td> <td width="160px" align="center"><?php echo ftgl($rpf['tanggal1']); if (diffDay($rpf['tanggal1'], $rpf['tanggal2']) > 1) { echo " s/d " . ftgl($rpf['tanggal2']); } ?> </td> <td width="120px"><?php echo $rpf['peserta']; ?> </td> <td width="60px" align="center"> <button class="btnedit" title="Edit data training" onclick="editTrain(<?php echo $rpf['dcid']; ?> )"></button> <button class="btndel" title="Hapus data training" onclick="delTrain(<?php echo $rpf['dcid']; ?>
<?php $un = dbFetch("alias", "mstr_user", "W/dcid='1'"); ?> <td style="padding:0 0 10px 0"> <img src="<?php echo IMGR; ?> banner.png" height="80px"/> </td> <td align="right" class="adms"> Welcome: <b>Admin</b> • Login at: <?php echo ftgl(date("Y-m-d")); ?> , <?php echo date("H:i:s"); ?> • <a class="alink" href="<?php echo RLNK; ?> login.php">Logout</a> </td>
<th>Date</th> <th>Description</th> <th style="text-align:center">Attachment</th> <th style="text-align:center">Option</th> </tr> <?php $is = 0; while ($rpf = mysql_fetch_array($tpf)) { ?> <tr> <td width="160px"><?php echo $rpf['reward']; ?> </td> <td width="220px"><?php echo ftgl($rpf['date']); ?> </td> <td width="160px"><?php echo $rpf['description']; ?> </td> <td width="60px" align="center"><table style="border:none;background:none" cellspacing="0" cellpadding="0"><tr> <?php if ($rpf['file'] != 0) { $tfile = dbSel("file", "emp_files", "W/dcid='" . $rpf['file'] . "'"); if (mysql_num_rows($tfile) > 0) { $rfile = mysql_fetch_array($tfile); ?> <td style="border:none;background:none"> <a class="filebtn" href="<?php
$imgdata = base64_decode($rimg); $pdf->Image('@' . $imgdata); } else { $pdf->Image('images/nophoto.png'); } // Employee Data ** $pdf->SetFont('dejavusans', '', 9, '', true); dc_EmployeeData('NIP', $r['nip']); dc_EmployeeData('Level', $mstr_level[$r['level']]); dc_EmployeeData('Division', $mstr_division[$r['division']]); dc_EmployeeData('Group', $mstr_group[$r['group']]); dc_EmployeeData('Position', $mstr_position[$r['position']]); $a = dbSFA("date1,date2", "emp_status", "W/empid='{$dcid}'"); dc_EmployeeData('Status', $mstr_status[$r['status']]); if ($r['status'] != 0) { dc_EmployeeData('Status period', ftgl($a['date1']) . ($r['status'] == 1 ? '' : ' - ' . ftgl($a['date2']))); } $cy = dc_YDown(2); $pdf->Line(65, $cy, $dcPaperW - $dcMarginR, $cy); $cy = dc_YDown(2); } if ($dps[dp_Personalinformation] == '1') { $dlbl = array(); $dlbl['Gender'] = $r['gender']; $dlbl['Address'] = $r['address']; $dlbl['Telepon/fax'] = $r['phonefax']; $dlbl['Email'] = $r['email']; $dlbl['Birth'] = $r['birthplace'] . ", " . fftgl($r['birthdate']); $dlbl['Marital status'] = $mstr_marital[$r['marital']]; $dlbl['Religion'] = $mstr_religion[$r['religion']]; foreach ($dlbl as $k => $v) {