Example #1
0
         			$si.=($r['status']==1?'<span style="color:#01a8f7">&nbsp;&nbsp;<b>Sudah bayar</b></span>':'<span style="color:#fd6906">&nbsp;&nbsp;<b>Belum bayar</b></span>');
         		}
         		else if($r['syarat']==2 && false){
         			$si.=($r['status']==1?'<span style="color:#01a8f7">&nbsp;&nbsp;<b>Sudah bayar</b></span>':'<span style="color:#fd6906">&nbsp;&nbsp;<b>Belum bayar</b></span>');
         		}
         		else{*/
         $si .= '<div style="margin-left:10px;width:14px;padding:0px;text-align:center;border:1px solid #999"><input type="checkbox" class="iCheck" id="syarat' . $r['syarat'] . '" name="syarat" value="1" ' . ($r['status'] == 1 ? 'checked' : '') . ' /></div>';
         if ($s != '') {
             $s .= ',';
         }
         $s .= 'syarat' . $r['syarat'];
         //}
         $si .= '</td></tr>';
     }
     $si .= '</table>';
     $fform->fw('<b>Persyaratan wajib</b>', $si);
 }
 $t = mysql_query("SELECT psb_calonsiswa_syarat.*,psb_syarat.wajib,psb_syarat.syarat as nama FROM psb_calonsiswa_syarat LEFT JOIN psb_syarat ON psb_syarat.replid=psb_calonsiswa_syarat.syarat WHERE psb_calonsiswa_syarat.calonsiswa='{$cid}' AND psb_syarat.wajib<>'1'");
 if (mysql_num_rows($t) > 0) {
     $si = '<table cellspacing="0" cellpaddin="0">';
     while ($r = mysql_fetch_array($t)) {
         $si .= '<tr height="26px"><td width=150px">' . $r['nama'] . ':</td><td>';
         /*if($r['syarat']==1||$r['syarat']==2 && false){
         			$si.=($r['status']==1?'<span style="color:#01a8f7">&nbsp;&nbsp;<b>Sudah bayar</b></span>':'&nbsp;&nbsp;Belum bayar');
         		}
         		else{*/
         $si .= '<div style="margin-left:10px;width:14px;padding:0px;text-align:center;border:1px solid #999"><input type="checkbox" class="iCheck" id="syarat' . $r['syarat'] . '" name="syarat" value="1" ' . ($r['status'] == 1 ? 'checked' : '') . ' /></div>';
         if ($s != '') {
             $s .= ',';
         }
         $s .= 'syarat' . $r['syarat'];