-
Notifications
You must be signed in to change notification settings - Fork 0
/
usrprofile.php
68 lines (67 loc) · 2.07 KB
/
usrprofile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?
include_once(PATH_FUNGSI.'/kelas.php');
$usr = new kelas;
//definisi variabel
$smarty->assign("jdlImages","./images/jdlPlayerMonth.gif");
$smarty->assign("tampil",true);
if(isset($_GET['id'])){
//detail halaman tips
$id = custom_strips($_GET['id'],"@[\\\'\"]@i");
$sql = "select id,name,date_format(tglLahir,'%D %M %y') as waktu,tmpLahir,alamat,negara,hobby,ortu,handicap,golfClub,group_type,gambar from tbl_membership where id='$id'";
//echo $sql;
if($baris = mysql_fetch_array($kDef->exq($sql))){
foreach($baris as $k=>$value){
$listDetail[$k] = $value;
if($k == 'gambar'){
if($value != ""){
$listDetail['image'] = IMAGE_MEMBER.'/'.$value;
}else {
$listDetail['image'] = IMAGE_MEMBER.'/noPict.jpg';
}
}
}
$smarty->assign("listDetail", $listDetail);
$negara = $usr->country($baris['negara']);
$group = $usr->gType($baris['group_type']);
$smarty->assign("negara", $negara);
$smarty->assign("group", $group);
} else {
$pesan = "ID not Matched";
}
$smarty->assign("tampil",false);
} else {
// fetch data
$x = 0;
$kDef->sql = "select distinct id_unik from tbl_user where status=1 order by id_unik Asc";
$kDef->perPage = REC_PER_PAGE;
$kDef->gul = 10;
$smarty->assign('paging',$kDef->pageMe());
$sql = $kDef->genSql();
//echo $sql;
$result = $kDef->exQ($sql);
if(@mysql_num_rows($result)>0){
while($data = mysql_fetch_array ($result,MYSQL_ASSOC)){
//detail user
$sqld = "select id,name,ortu,gambar,golfClub from tbl_membership where id='".$data['id_unik']."'";
//echo "<br>".$sqld;
if($hasil = $kDef->exQ($sqld)){
$baris = mysql_fetch_array($hasil,MYSQL_ASSOC);
$listUsr[$x]['id'] = $baris['id'];
$listUsr[$x]['name'] = $baris['name'];
$listUsr[$x]['ortu'] = $baris['ortu'];
if($baris['gambar'] != ""){
$listUsr[$x]['gambar'] = IMAGE_MEMBER."/".$baris['gambar'];
}else {
$listUsr[$x]['gambar'] = IMAGE_MEMBER."/noPict.jpg";
}
} else {
$pesan .= "This ID Member doesnt exist";
}
$x++;
}
}else {
$smarty->assign("pesan","Belum ada data");
}
}
$smarty->assign('listUsr',$listUsr);
?>