bli saya mau tanyak, coding php menampilkan foto dari database sesuai id,
misalkan:tabelnya terdiri dari:
id,nama_siswa,alamat,foto.
dan datanya terdiri dari 3 siswa,
yang saya mau tanyakn ketika saya buka siswa yng idnya no 2 maka foto yg id no 2 ikut muncul..?

Lihat semua 3 jawaban

Silahkan login untuk menjawab!

Hitung Rata Ujian.

Ell · Jun 8, 2012
Mas misal untuk teknik average pada javascript+php gimana rumusnya? Misal pada nilai rata ujian=ujian tulis+ujian praktek/2.
90+80=85 yang benar.
jika 90+(-)=90 gimana y mas…. ket.(-)kosong krn tidak ada ujian praktek.. tolong. plis…solusinya. Ni contoh punya ku:
<?php
include("../inc/session.php");
?>
<script type="text/javascript" src="../inc/val.js"></script>
<h3><center>Nilai Ujian</center></h3>
<h5><left>
<?php $nama_siswa = $_POST['nama_siswa'];?><?php echo"Nama Siswa &nbsp;&nbsp;: <font color='red'>$nama_siswa</font>";?><br />
<?php $nomor_induk = $_POST['nomor_induk'];?><?php echo"Nomor Induk : <font color='red'>$nomor_induk</font>";?>
</left></h5>
<form name="form1" method="post" onsubmit="return validate();" action="index.php?page=nilaipraktek3.php&sessid=<?php echo $sessid;?>">
<table border="0" cellpadding="4" cellspacing="4" bordercolor="#FFFFFF" align="center">
<tr align="center" bgcolor="#336699">
    <td width="25"><div align="center"><strong>NO</strong></div></td>
    <td width="175"><div align="center"><strong>MAPEL</strong></div></td>
    <td width="50"><div align="center"><strong>UJIAN TULIS</strong></div></td>
	<td width="50"><div align="center"><strong>UJIAN PRAKTEK</strong></div></td>
	<td width="50"><div align="center"><strong>RATA UJIAN</strong></div></td>

  </tr>
 
<?php
// membaca kode matakuliah yang disubmit dari formnilai.php
$nama_siswa = $_POST['nama_siswa'];
$nomor_induk = $_POST['nomor_induk'];
$CEK=mysql_query("SELECT kode_pelajaran, ujian_tulis, ujian_praktek, rata_ujian FROM nilai_sekolah WHERE nomor_induk='$nomor_induk' AND kode_pelajaran='$mata_pelajaran'")or die(mysql_error());
if(empty($nomor_induk))
{
	msgbox('Nomor Induk Masih Kosong');
}else{
// menampilkan data nim dan nilai mahasiswa yang mengambil matakuliah berdasarkan kode MK
$query =mysql_query("SELECT * FROM nilai_sekolah, pelajaran WHERE nilai_sekolah.kode_pelajaran=pelajaran.kode_pelajaran AND nomor_induk = '$nomor_induk'")or die(mysql_error());
}
// inisialisasi counter
$g=0;
$i = 1;
while ($data = mysql_fetch_array($query)){
?>
<script language="javascript">
function jml2_<?php echo $i;?>()
{
document.form1.rata_ujian<?php echo $i;?>.value=((parseFloat(document.form1.ujian_tulis<?php echo $i;?>.value*1)+parseFloat(document.form1.ujian_praktek<?php echo $i;?>.value*1))/2);
} 
</script>
<?php
$nama=mysql_fetch_array(mysql_query("SELECT mata_pelajaran FROM pelajaran WHERE kode_pelajaran ='$data[kode_pelajaran]'"));
if($g==0){
			$bg="#CCCCCC";
			$g=1;
		}else{
			$bg="#F0F0F0";
			$g=0;
		}
echo "<tr bgcolor=$bg onmouseover=bgColor='#ff9900' onmouseout=bgColor='$bg'>";
echo"<td align='center' bgcolor='#336699'>".$i."</td><td>".$nama['mata_pelajaran']."</td><td align='center'><input type='hidden' name='pelajaran".$i."' value='".$data['kode_pelajaran']."' />";
if($data['keterangan2']=='Ujian Tulis'){
echo "
<input type='text' maxlength='5' size='5' style='text-align: center' name='ujian_tulis".$i."' value='".$data['ujian_tulis']."'onblur='extractNumber(this,2,false);' onchange='jml2_".$i."()' onfocus='jml2_".$i."()' onkeyup='jml2_".$i."(); extractNumber(this,2,false);' onkeypress='return blockNonNumbers(this, event, true, false);'/></td>";
}else{
echo "<input type='hidden' name='pelajaran".$i."' value='".$data['kode_pelajaran']."' />
<input type='text' maxlength='5' size='5' style='text-align: center' name='ujian_tulis".$i."' value='0.00' onchange='jml2_".$i."()' onfocus='jml2_".$i."()' onkeyup='jml2_".$i."()'/>";
}
echo "
<td align='center'><input type='hidden' name='pelajaran".$i."' value='".$data['kode_pelajaran']."' />";
if($data['keterangan3']=='Ujian Praktek'){
echo "
<input type='text' maxlength='5' size='5' style='text-align: center' name='ujian_praktek".$i."' value='".$data['ujian_praktek']."' onblur='extractNumber(this,2,false);' onchange='jml2_".$i."()' onfocus='jml2_".$i."()' onkeyup='jml2_".$i."(); extractNumber(this,2,false);' onkeypress='return blockNonNumbers(this, event, true, false);'/>";
}else{
echo "<input type='hidden' name='pelajaran".$i."' value='".$data['kode_pelajaran']."' />
<input type='text' maxlength='5' size='5' style='text-align: center' name='ujian_praktek".$i."' value='0.00' onchange='jml2_".$i."()' onfocus='jml2_".$i."()' onkeyup='jml2_".$i."()'/>";
}
echo "</td><td align='center'><input type='hidden' name='pelajaran".$i."' value='".$data['kode_pelajaran']."' />
<input type='text' maxlength='5' size='5' readonly='true' style='text-align: center' name='rata_ujian".$i."' value='".$data['rata_ujian']."'/>";
echo "</tr>";
$i++;
}
$jumMhs = $i-1;
?>
</table>
<input type="hidden" name="n" value="<?php echo $jumMhs ?>" />
<input type="hidden" name="nomor_induk" value="<?php echo $nomor_induk;?>">
<div align="center"><table border="0" width="300" cellpadding="3" cellspacing="2">
<tr bgcolor="#FF9900" align="center">
<td><input type="submit" value="Simpan" name="submit" /></td>
</tr></table></div>
<div align="left"><font color="#0000FF" size="2">* Gunakan tanda <font color="#FF0000">titik (.)</font> untuk digit angka.<br />* Gunakan tombol <font color="#FF0000">tabulasi (tab)</font> untuk pindah kolom.</font></div>
</form>

Lihat semua 1 jawaban

Silahkan login untuk menjawab!

NL2BR Terbatas

Ariyasa · Jun 8, 2012
bli putu, sy mo tny nie ttg nl2br..
kn di text area kl kit tekan enter brrti <br>..
klo ada org iseng bikin komen yg panjang dg enter nnti desktopnya penuh ruang kosong jadinya.
1.Ada gk cara agar <br> to maximum ada 2 aja, jd gk ada bnyk space antar baris..?? dan atau
2.Ada script read more.. kyk di FB sehingga misal kalo ada lebih dari 5 baris, sisanya disembunyiin kyk spoiler itu. ktk ditekan read more.. itu baru komentar komplitnya muncul.

suksma bli putu. maaf pertnayaannya "kekanak2an".. :D

Lihat semua 1 jawaban

Silahkan login untuk menjawab!
selamat siang master,
saya mau coba buat function checkall sama uncheckall tapi ga' bisa2,dan saya kurang paham salah dan masalah nya dimana,sekiranya abang2 sekalian bisa membantu buat mecahin masalah ini,ini scriptnya..
<?
session_start();

$namaHari=array(0=>"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
$namaBulan=array(1=>"january","February","March","April","May","June","July","August","September","October","November","December");
	function tanggal()
	{
		global $namaHari;
		global $namaBulan;
		return $namaHari[date("w")].", ".$namaBulan[date("n")]." ".date("d").", ".date("Y");
	}
	function cekbox($cek)
	{
		if($cek=="")
		{
		echo("<script>alert('cekbox belum dipilih !');</script>");
		echo("<script>history.back();</script>");
		exit();
		}
	}
?>
<html>
<head>

<title>MY COMPANY</title>

<style type="text/css">
<!--
body {
	background-image: url(IMAGE/web-background.jpg);
}
-->
</style>
<style type="text/css" media="screen">
body {
font-family: "Lucida Grande",Verdana,sans-serif;
font-size: 11px;
line-height: 16px;
padding: 0px;
}

h2 {
margin-top: 0;
}

#wrapper {
	width: 420px;
	margin-left:1px;
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
}

.fader {
opacity: 0;
-moz-opacity: 0;
filter:alpha(opacity=0);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 60px;
background-color: #A4ADB7;
}

.clear {
clear: left;
}

#datacontent {
padding: 20px 10px;
}

#datacontent ul {
list-style: none;
margin: 0;
padding: 5px;
display: block;
height: 30px;
background: #DFDFDF;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
}

#datacontent li {
float: left;
}

#datacontent li a {
outline: 0;
display: block;
background: #DFDFDF;
color: #666;
text-decoration: none;
padding: 1px 5px;
margin: 5px;
border: 1px solid #DFDFDF;
}

#datacontent li a:hover {
border: 1px solid #D1D1D1;
background: #D1D1D1;
color: #000;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}

#datacontent li a.selected {
background: #AFAFAF;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border: 1px inset #fff;
color: #fff;
}

#datacontent .panels {
border: 1px solid #DFDFDF;
border-top: 0;
border-bottom: 10px solid #DFDFDF;
-moz-border-radius-bottomleft: 10px;
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
overflow: hidden;
}

#datacontent .panelsInner {
overflow: hidden;
}

#datacontent .panel {
padding: 20px;
}
</style>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />	
		<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
		<script type="text/javascript" src="js/jquery-ui-1.8.11.custom.min.js"></script>
        <style type="text/css">
<!--
.style6 {font-family: Tahoma}
.style12 {color: #CCCCCC}
.style13 {font-family: Tahoma; font-size: 12px; }
.style14 {font-size: 14px}
.style15 {font-size: 14px; font-weight: bold; }
.style16 {font-family: Tahoma; font-weight: bold; }
.style17 {
	font-family: "Times New Roman", Times, serif;
	font-size: medium;
	font-weight: bold;
}
.style21 {
	font-size: medium;
	font-weight: bold;
}
-->
        </style>
</head>

<?
  if($eksport)
  {
  $tombol='frm_report_salary_status.php';
  }
  else if($cari2)
  {
  $tombol='frm_report_salary.php';
  }
?>
	
<table width="113%" height="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="table1">
  <tr>	
    <td height="52" valign="top" class="headmenu" background="IMAGE/pala.gif"> 
      <p align="right" ><font size="1" face="Arial, Helvetica, sans-serif"> <marquee width="100%" direction="left" scrollamount="1" align="center">
        <span class="style12">MY COMPANY </span>
      </marquee> 
          <span class="style12">&nbsp;          </span></font></p>    </td>
</tr>
<tr>

			
    <td height="30" nowrap>
<? 
	if (($JOBDESC=="ADMINISTRATOR")){
	include("head_admin.php");
	 } else if (($JOBDESC=="USER")){
	  include("head_user.php");
     } else if (($JOBDESC=="TEAMLEADER")){
	  include("head_TL.php"); 
     } else if (($JOBDESC=="MANAGEMENT")){
	  include("head_administrator.php"); }
    ?>
<!--------------------------------------------------------------------------->
<SCRIPT LANGUAGE="JavaScript">
function checkAll()
{
var field=document.forms["FORM"].elements["cek[]"];
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function uncheckAll()
{
var field=document.forms["FORM"].elements["cek[]"];
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}
<?php
function rupiah($data)
 {
$rupiah = "";
$jml = strlen($data);

 while($jml > 3)
 {
$rupiah = "," . substr($data,-3) . $rupiah;
$l = strlen($data) - 3;
$data = substr($data,0,$l);
$jml = strlen($data);
 }
 $rupiah = $data . $rupiah ;
 return $rupiah;
 }
 ?>
 <?
  if($print)
  {
  $tombol='frm_report_salary_status.php';
  }
  else if($cari2)
  {
  $tombol='frm_report_salary.php';
  }
?>
 </script>
<div align="right" class="style2"><font size="1" face="Arial, Helvetica, sans-serif"><font size="2">
    </font></font> </div></td>
  </tr>

		
    <tr bgcolor="#999999"><td height="477"> 
	<form name = "form" method = "post" action = "<? echo ("$tombol") ?>">
	 <table width="531" align = "center" >
    <tr > 
      <td colspan="6" bgcolor="#FFFFFF"> 
        <div align="center"><span class="header_tabel style6 style14">Search</span> </div></td>
    </tr>    
    <tr class="isi_form"> 
      <td width="144" bgcolor="#CCCCCC"><div align="center" class="style13">Search By Client </div></td>
      <td width="19" bgcolor="#CCCCCC"><div align="center" class="style13">: </div></td>
      <td width="167" bgcolor="#CCCCCC"><div align="left" class="style13"> 
          <select name="lst_bank" size="1" id="lst_bank" >
		  <option value="" selected>[PILIH]</option>    
        <?	
		include("koneksi.php");		
	   //$hidd_hub_kntr="$row6[Ker_Hub_Info]";	
	  		  	
						$qry = @mysql_query("select DISTINCT BANK from tm_bank where Status='1'",$conn);						
						while ($row = mysql_fetch_array($qry))
						{	
						//$cek = cmb($hidd_hub_kntr,$row[Ms_NM]);		
						echo "<option value = '$row[BANK]'$cek>$row[BANK]</option>";
						}
		 ?>
		 
      </select>
        </div></td>
      <td width="89" bgcolor="#CCCCCC"><div align="center" class="style13"> Keyword </div></td>
      <td width="16" bgcolor="#CCCCCC"><div align="center" class="style13">:</div></td>
      <td width="227" bgcolor="#CCCCCC"> <div align="left" class="style13"> 
          <input name="txt_kata_kunci" type="text" size="21" maxlength="20">
          &nbsp; </div></td>
    </tr>
    <tr > 
      <td colspan="6" bgcolor="#FFFFFF" class="header_table"> <div align="center">
          <input name="cari2" type="submit" class="header_tabel" id="cari2" onClick="return cek();" value="Search">
		  <input name="eksport" type="submit" class="header_tabel" id="eksport" onClick="return cek();" value="Eksport">
        </div></td>
    </tr>
  </table>
</form>

  <table width="1236" border="0" align="center">
    <tr class="header_tabel"> 
      <td width="47" rowspan="2"  bgcolor="#FFFFFF" class="style15"><div align="center" class="style6" >No </strong></div></td>
      <td width="56" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style6" >check</div></td>
      <td width="123" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style15" >Agent Name</div></td>
      <td width="97" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style15" >Professiion</div></td>
      <td width="99" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style15" >Client</div></td>
	  <td width="110" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style15" >Joint date</div></td>
      <td colspan="3" bgcolor="#FFFFFF" class="style15"><div align="center">Salary</div></td>
      <td colspan="2" align="center" bgcolor="#FFFFFF" class="style15"><span class="style16">Jamsostek</span></td>
	  <td width="88" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" >Take Home Pay  </div></td>
	  <td width="121" rowspan="2" bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" >Total Cost Company </div></td>
    </tr>
    <tr class="header_tabel"> 
	<td width="96"  bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" >Salary</div></td>
	  <td width="88" bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" >Additional</div></td>
	  <td width="94"  bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" >Deduction </div></td>
      <td width="88" bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" >By MOC 4,24  </div></td>
	  <td width="75" bgcolor="#FFFFFF" class="style15"><div align="center" class="style16" ><p>By Own 2% </p>
	    </div></td>
    </tr>
<?

 
	include("koneksi.php");
	
	$sqltgl=mysql_query("SELECT * FROM `tm_periode` ");
	$rowtgl=mysql_fetch_array($sqltgl);
	
	$sqlsal=mysql_query("SELECT * FROM `salary` where USERID='$USERID' ");
	$rowsal=mysql_fetch_array($sqlsal);
	
	$tgl = $rowtgl[start_date];
	$tgl2= $rowtgl[finish_date];
	
	$sql53="select Tanggal from absen where Tanggal between '$tgl' and '$tgl2' group by tanggal";
	$res53=mysql_query($sql53);
	$row53=mysql_num_rows($res53);
		
	$sql54="select * from tbl_holiday where Tanggal between '$tgl' and '$tgl2'";
	$res54=mysql_query($sql54);
	$row54=mysql_num_rows($res54);
		
	$aktifday=$row53-row54;		
	
	$sql4 = " select A.USERID,A.USERNAME,A.BANK,
	case when b.total is null then 0 else b.total end total, 
	case when d.total is null then 0 else d.total end total_i, 
	case when e.total is null then 0 else e.total end total_a,  
	case when f.total is null then 0 else f.total end total_t,
	case when C.total_c is null then 0 else C.total_c end total_c from 
	(select * from users where (JOBDESC='USER' or JOBDESC='TEAMLEADER') and status='0' ORDER BY USERNAME)A left join 
	(select userid,count(*) as total  from permit where Keterangan='IZIN' and Tanggal between '$tgl' and '$tgl2' group by userid)b on a.userid=b.userid left join 
	(select userid,count(*) as total  from permit where Keterangan='SAKIT' and Tanggal between '$tgl' and '$tgl2' group by userid)d on a.userid=d.userid left join 
	(select userid,count(*) as total  from permit where Keterangan='ALPHA' and Tanggal between '$tgl' and '$tgl2' group by userid)e on a.userid=e.userid left join 
	(select userid,count(*) as total  from absen where JamMasuk>'08:00:00' and Tanggal between '$tgl' and '$tgl2' group by userid)f on a.userid=f.userid left join
    (select userid,count(*) as total_c from absen where Tanggal between '$tgl' and '$tgl2'group by userid)c on a.userid=c.userid  order by A.BANK ";
	
	$sql5 = " select A.USERID,A.USERNAME,A.BANK,
	case when b.total is null then 0 else b.total end total, 
	case when d.total is null then 0 else d.total end total_i, 
	case when e.total is null then 0 else e.total end total_a,  
	case when f.total is null then 0 else f.total end total_t,
	case when C.total_c is null then 0 else C.total_c end total_c from 
	(select * from users where (JOBDESC='USER' or JOBDESC='TEAMLEADER') and status='0' and BANK='$lst_bank' ORDER BY USERNAME)A left join 
	(select userid,count(*) as total  from permit where Keterangan='IZIN' and Tanggal between '$tgl' and '$tgl2' group by userid)b on a.userid=b.userid left join 
	(select userid,count(*) as total  from permit where Keterangan='SAKIT' and Tanggal between '$tgl' and '$tgl2' group by userid)d on a.userid=d.userid left join 
	(select userid,count(*) as total  from permit where Keterangan='ALPHA' and Tanggal between '$tgl' and '$tgl2' group by userid)e on a.userid=e.userid left join 
	(select userid,count(*) as total  from absen where JamMasuk>'08:00:00' and Tanggal between '$tgl' and '$tgl2' group by userid)f on a.userid=f.userid left join
    (select userid,count(*) as total_c from absen where Tanggal between '$tgl' and '$tgl2'group by userid)c on a.userid=c.userid  order by A.BANK ";
	
	$res4=mysql_query($sql4);
	 if($cari2){
	$res4=mysql_query($sql5);
	 };
	
	$start = 0;
	$c=$start+1;
	
	while ($row4 = mysql_fetch_array($res4)){
	
	$userid=$row4[0];
	$sqlsal=mysql_query("SELECT * FROM `salary` where USERID='$userid' ");
	$rowsal=mysql_fetch_array($sqlsal);
	
	$sqlde=mysql_query("SELECT * FROM `deduction`");
	$rowde=mysql_fetch_array($sqlde);
	
	$tgl = $rowtgl[start_date];
	$tgl2= $rowtgl[finish_date];
	
	$sql53="select Tanggal from absen where Tanggal between '$tgl' and '$tgl2' group by tanggal";
	$res53=mysql_query($sql53);
	$row53=mysql_num_rows($res53);
					
	$sql54="select * from tbl_holiday where Tanggal between '$tgl' and '$tgl2'";
	$res54=mysql_query($sql54);
	$row54=mysql_num_rows($res54);
		
	$aktifday=$row53-row54;	
?>
 <? ////////////////////////////////////////////////////////////////SALARY/////////////////////////////////////////?>       
        <tr id="">
          <td width="47" bgcolor="#CCCCCC" class="style13"><div align="center" class="style16"><span class="style1 style6 "> <?php echo $c++; ?></span></div></td>
          <td width="56"  align="center" bgcolor="#CCCCCC" class="isi_tabel"><input name="cek[]"
		   type="checkbox" value="<?php echo("$row4[name]");?>" /></td>
		  <td bgcolor="#CCCCCC" class="style13"><div align="left"><? echo ("$row4[1]") ?></strong></div></td>
		  <td bgcolor="#CCCCCC" class="style13"><div align="center" ><? echo ("$row4[ss]") ?></strong></div></td>
		  <td bgcolor="#CCCCCC" class="style13"><div align="center" ><? echo ("$row4[2]") ?></strong></div></td>
		  <td bgcolor="#CCCCCC" class="style13"><div align="center" ><? echo ("$row4[SS]") ?></strong></div></td>
            <td width="96" bgcolor="#CCCCCC" class="style2"><div align="center"><span class="style1 style6">
              <?php 
	$Sal=$rowsal[SALARY]+$rowsal[MEAL]+$rowsal[TRANSPORT];		
	echo Rupiah($Sal);?> 
              </a>
          </span></strong></div></td>
<? ////////////////////////////////////////////////////////////////ADDITIONAL/////////////////////////////////////////?>
            <td width="88" bgcolor="#CCCCCC" class="style2"><div align="center" class="style8"><span class="style1">	
            <?
	$additional=mysql_query("SELECT *FROM `aditional_salary` WHERE `USERID` ='$row4[0]' ");
	$rowadd=mysql_fetch_array($additional);
	
	  if($rowadd[Add_1]=='1'&&$rowadd[Add_2]<>'1'){
	  $adition=$rowsal[Add1];		
	  echo Rupiah($adition); 
	  }
	   else if($rowadd[Add_2]=='1'&&$rowadd[Add_1]<>'1'){
	   $adition=$rowsal[Add2];
	   echo Rupiah($adition); 
	  } 
	  else if ($rowadd[Add_2]=='1'&&$rowadd[Add_1]=='1')
	  {$adition=$rowsal[Add1]+$rowsal[Add2];
	  echo Rupiah($adition); 
	  
	  }
	  ?>	
          </span></strong></div></td>
<? ////////////////////////////////////////////////////////////////DEDUCTION/////////////////////////////////////////?>
            <td width="94" bgcolor="#CCCCCC" class="style2">
<div align="center" class="style8"><span class="style1">
<?php
	$userid=$row4[0];
	$sql10="select a.*,b.* from permit a, tbl_holiday b where a.Tanggal=b.Tanggal and USERID='$userid' and a.Keterangan='ALPHA' and a.Tanggal between '$tgl' and '$tgl2'";
	$res10=mysql_query($sql10) or die (mysql_error());
	$row10=mysql_num_rows($res10);
	$ab='ALPHA';
	$absens=$row4[total_a];
	$sabtua=$row10;
	$row18=$absens-$sabtua;
	$Alphatot=$row18*$rowde[Alpha];
	$sql11="select a.*,b.* from absen a, tbl_holiday b where a.Tanggal=b.Tanggal and a.USERID='$userid' and a.JamMasuk>'08:00:00' and a.Tanggal between '$tgl' and '$tgl2'";
	$res11=mysql_query($sql11) or die (mysql_error());
	$row11=mysql_num_rows($res11);	
	$telat=$row4[total_t];
	$sabtut=$row11;
	$row19=$telat-$sabtut;
	$Latetot=$row19*$rowde[Late];
	$deduction=$Alphatot+$Latetot;
	echo Rupiah($deduction);
	?>

</span></strong></div>	</td>
            
<? ///////////////////////////////////////////////////////////////JAMSOSTEK MOC/////////////////////////////////?>
<td width="88" bgcolor="#CCCCCC" class="style2">
    <div align="center" class="style8"><span class="style1">
    <? 
 if($rowadd[Jamsos]
 =='1'){
$JamsosMOC=$rowsal[Jamsostek_based]*$rowde[Jamsostek_MOC]/100;
echo Rupiah($JamsosMOC);}?> 
	</span></strong></div>	</td>
<? /////////////////////////////////////////////////////////////JAMSOSTEK OWN/////////////////////////////////////?>
            <td width="75" bgcolor="#CCCCCC" class="style2">           
              <div align="center" class="style8"><span class="style1">
              <?  if($rowadd[Jamsos]=='1'){
$JamsosOWN=$rowsal[Jamsostek_based]*$rowde[Jamsostek_own]/100;
echo Rupiah($JamsosOWN);}?> 
          </span></strong></div>	</td>
<? ////////////////////////////////////////////////////////////////TAKE HOME PAY/////////////////////////////////////////?>	
            <td width="88" bgcolor="#CCCCCC" class="style2">
	           
	           
              <div align="center" class="style8"><span class="style1">
              <?php 
	$takehomepay=$Sal+$adition-$deduction-$JamsosOWN;
	echo Rupiah($takehomepay);
	

	?>
          </span></strong></div>	</td>
<? ////////////////////////////////////////////////////////////////TOTAL COST COMPANY////////////////////////////////////////?>		
	 <td width="121" bgcolor="#CCCCCC" class="style2">
	           
	           
              <div align="center" class="style8"><span class="style1">
              <?php 
	$TOTALCOS=$Sal+$adition-$deduction-$JamsosOWN+$JamsosMOC;
	echo Rupiah($TOTALCOS);
	

	?>
          </span></strong></div>	</td>
        </tr>     
    <?
	?>
<tr> 

<td colspan="2%" bgcolor="#FFFFFF" class="m0l1oout"><div align="center" class="style13">
  <div align="center"><span class="style17"><a href="#" class="style15" onClick="javascript:return checkAll()">check all</a></span></div></td>
<td colspan="1%" bgcolor="#FFFFFF" class="m0l1oout"><div align="center" class="style13">
  <div align="center"><a href="#" class="style15" onClick="return uncheckAll()">uncheck all</a></div></td>
 <td colspan="1" bgcolor="#FFFFFF" class="m0l1oout"> <div align="center">
		  <input name="print" type="submit" class="style14" id="print" onClick="return checkall();" value="Print">
        </div></td>
	<?
	}
	?>

      </table>
	
    <tr class="header_tabel"> 
      <td height="12" colspan="10" bgcolor="#FFFFFF"></td>
    </tr>
	
</table>  
  
</form>

	 </td>
	
	
	
	<tr>			
    <td height="17" class='header' align="center"><span style="font-weight: bold"><FONT style="FONT-SIZE: 10pt" face=Tahoma > 
      <font color="#FFFFFF" size="1" face="Arial, Helvetica, sans-serif">Copryright 2011      </font></FONT></span><font size="1" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Helvetica, sans-serif">&nbsp;</font><div>    </td>
	</tr>
	
</table>


</html>
begitu scriptnya,tolong dibantu ya mas,
terima kasih banyak sebelumnya :)

Lihat semua 1 jawaban

Silahkan login untuk menjawab!

delete all

Rheyank Iwan Nytt · Jun 7, 2012
mas gmn caranya menghapu dta scara bersamaan ?? atw delete all????

Lihat semua 3 jawaban

Silahkan login untuk menjawab!

crontab

adhemb · Jun 7, 2012
met siang mas elly...
sya mau nanya bagaimana caranya menjalankan script php tanpa harus membuka filenya artinya di hanya berjalan didalam sistem windows sja...kan setahu sya klo dilinux itu bisa dengan menggunakan crontab tpi di windows apa bisa, selain menggunakan scheduled tasknya windows krna setahu sya scheduled task sendiri memiliki kekurangan..mohon pencerahannya mas.terima kasih sebelumnya:)

Lihat semua 3 jawaban

Silahkan login untuk menjawab!