Minggu, 12 Juli 2020

Kode Marquee Informasi


<?php 
$gab="";
  $sql="select * from `$tbagen` where `status`='Aktif' order by rand()";
  $arr=getData($conn,$sql);
$no=0;
foreach($arr as $d) {
$no++;
$id_agen=$d["id_agen"];
$nama_agen=strtoupper($d["nama_agen"]);
$nomor_ktp=$d["nomor_ktp"];
$alamat_agen=$d["alamat_agen"];
$email=$d["email"];
$no_hp=$d["no_hp"];
$gab.="<li><small>No $no. $nama_agen | HP: $no_hp<br><i>$alamat_agen ...</small></li>";
}
echo'<marquee onmouseover=this.stop() onmouseout=this.start() scrollamount=2 scrolldelay=90 direction=up width=100% height=150>'.$gab.'</marquee>';
?>
               
<?php 
$gab="";
  $sql="select * from `$tbkelas`  order by rand()";
  $arr=getData($conn,$sql);
foreach($arr as $d) {
$id_kelas=$d["id_kelas"];
$nama_kelas=strtoupper($d["nama_kelas"]);
$deskripsi=$d["deskripsi"];
$gambar=$d["gambar"];
$status=$d["status"];
$jam_normal=$d["jam_normal"];//320x240.pn

$gab.="<a href='#' onclick='bukalink(\"kelas/zoom.php?id=$id_kelas\")'>
<img src='$YPATH/$gambar' title='$nama_kelas $jam_normal' width='280' height='250' /></a>";

}
$gab.="";
?>

<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollamount="1" scrolldelay="90" direction="right" width="100%" height="150">
<?php
echo $gab;
?>
</marquee>
 
 
 
<form method="get" action="http://www.google.com/search">
<INPUT TYPE='text' name='q' size=31 maxlength=255 value=''>
<INPUT TYPE='hidden' name='hl' value='lacak'>     
<INPUT type='submit' name='cari' VALUE='Proses Pencarian'></p>
</FORM> 

BACK JAVASCIPT
<?php
echo "Kode yang Anda masukkan tidak cocok<br /><a href=javascript:history.go(-1)><b>Ulangi Lagi</b></a>";
?>


function microtime_float(){
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();

$time_end = microtime_float();
$time = $time_end - $time_start;





<?php
  $sql="select `id_admin` from `$tbadmin` order by `id_admin` desc";
  $q=mysqli_query($conn, $sql);
  $jum=mysqli_num_rows($q);
  $kd="ADM";
if($jum > 0){
$d=mysqli_fetch_array($q);
$idmax=$d["id_admin"];
$urut=substr($idmax,3,2)+1;//01
if($urut<10){$idmax="$kd"."0".$urut;}
else{$idmax="$kd".$urut;}
}
else{$idmax="$kd"."01";}

  $id_admin=$idmax;
?>

<?php
  $sql="select `id_kelas` from `$tbkelas` order by `id_kelas` desc";
$q=mysqli_query($conn, $sql);
  $jum=mysqli_num_rows($q);
  $th=date("y");
  $bl=date("m")+0;if($bl<10){$bl="0".$bl;}

  $kd="KLS".$th.$bl;//KEG1610001
  if($jum > 0){
   $d=mysqli_fetch_array($q);
   $idmax=$d["id_kelas"];
 
   $bul=substr($idmax,5,2);
   $tah=substr($idmax,3,2);
    if($bul==$bl && $tah==$th){
     $urut=substr($idmax,7,3)+1;
     if($urut<10){$idmax="$kd"."00".$urut;}
     else if($urut<100){$idmax="$kd"."0".$urut;}
     else{$idmax="$kd".$urut;}
    }//==
    else{
     $idmax="$kd"."001";
     } 
   }//jum>0
  else{$idmax="$kd"."001";}
  $id_kelas=$idmax;
?>






Tidak ada komentar:

Posting Komentar

global_priv WARNING Selalu

 Jika muncul pesan kesalahan: Warning in .\libraries\classes\Dbal\DbiMysqli.php#209  mysqli::query(): (HY000/1034): Index for table 'glo...