} if (!empty($stat)) { exit($stat); } switch ($_POST['aksi']) { case 'display': display($_POST['kodeorg'], $_POST['periode'], $_POST['harga'], $dbname, $conn); break; case 'simpan': display($_POST['kodeorg'], $_POST['periode'], $_POST['harga'], $dbname, $conn); break; case 'replace': display($_POST['kodeorg'], $_POST['periode'], $_POST['harga'], $dbname, $conn); break; case 'posting': posting($_POST['kodeorg'], $_POST['periode'], $_POST['jumlah'], $dbname, $conn); break; } function display($kodeorg, $periode, $harga, $dbname, $conn) { $tgl1 = ''; $tgl2 = ''; $str = "select tanggalmulai,tanggalsampai from " . $dbname . ".sdm_5periodegaji where kodeorg='" . $kodeorg . "'\r\n and periode='" . $periode . "' and jenisgaji='H'"; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $tgl1 = str_replace("-", "", $bar->tanggalmulai); $tgl2 = str_replace("-", "", $bar->tanggalsampai); } if ($tgl1 == '' or $tgl2 == '') { exit(" Error: Periode penggajian Harian tidak ditemukan/ Daily base payrol period not found"); } else {
if ($profileQ) { if (mysql_num_rows($profileQ) > 0) { $getProfile = mysql_fetch_assoc($profileQ); $printThis = $row['info']; $typee = $row['type']; $username = $getProfile['username']; $privacy = $getProfile['privacy']; $postTime = strtotime($row['timestamp']); $date = date('M d, Y', $postTime); $time = date("g:i A", $postTime); $privacy = $getProfile['privacy']; $profile_ID = $row['User_ID']; $post_ID = $row['postID']; //makes sure only specified posts are displayed if ($profile_ID == $temp_ID) { posting($typee, $printThis, $username, $privacy, $date, $time, $profile_ID, $post_ID); } } } else { echo "ERROR IN POSTING"; } } ?> </div> </div> <div id = "searchHolder"> <a> HUE </a> </div> </body> </html>