Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / sman1baleendahok / modul / | server ip : 172.67.156.115 your ip : 172.69.130.131 H O M E |
Filename | /var/www/html/sman1baleendahok/modul/tag_guru.php |
Size | 891 |
Permission | rw-rw-r-- |
Owner | ulung : ulung |
Create time | 27-Apr-2025 11:12 |
Last modified | 05-Feb-2025 08:55 |
Last accessed | 06-Jul-2025 15:40 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
$data="select user_id from t_staf ";
if(!$query=mysql_query($data)) die ("Pengambilan gagal2 profil ");
$i=0;
while($row=mysql_fetch_array($query)) {
$guru[$i]=$row[user_id];
$i++;
}
$n = rand(1,$i-1);
$sql="select user_id,nip,tgl_lahir,alamat,pelajaran,email,telp,nama from t_staf where user_id='".$guru[$n]."'";
if(!$query=mysql_query($sql)) die ("Pengambilan gagal1 staf a $n");
$row=mysql_fetch_array($query);
$file ="../images/staf/".$row['nip'].".jpg";
$gbr="<img src='../images/noava.jpg' border='1' hspace='5' align='left' >";
if (file_exists($file)) {
$gbr="<img src='../images/staf/$row[nip].jpg' width='100' height='120' hspace='5' border=1 align='left'>";
}
$tag .="$gbr Nama : $row[nama] , NIP : $row[nip]. Alamat : $row[alamat] Telp.$row[telp]
. Tanggal Lahir : $row[tgl_lahir]. Mengajar Pelajaran/TU : $row[pelajaran]. : $row[e]";
?>
$data="select user_id from t_staf ";
if(!$query=mysql_query($data)) die ("Pengambilan gagal2 profil ");
$i=0;
while($row=mysql_fetch_array($query)) {
$guru[$i]=$row[user_id];
$i++;
}
$n = rand(1,$i-1);
$sql="select user_id,nip,tgl_lahir,alamat,pelajaran,email,telp,nama from t_staf where user_id='".$guru[$n]."'";
if(!$query=mysql_query($sql)) die ("Pengambilan gagal1 staf a $n");
$row=mysql_fetch_array($query);
$file ="../images/staf/".$row['nip'].".jpg";
$gbr="<img src='../images/noava.jpg' border='1' hspace='5' align='left' >";
if (file_exists($file)) {
$gbr="<img src='../images/staf/$row[nip].jpg' width='100' height='120' hspace='5' border=1 align='left'>";
}
$tag .="$gbr Nama : $row[nama] , NIP : $row[nip]. Alamat : $row[alamat] Telp.$row[telp]
. Tanggal Lahir : $row[tgl_lahir]. Mengajar Pelajaran/TU : $row[pelajaran]. : $row[e]";
?>