| .. | |||||
| assets | |||||
| page | |||||
| .htaccess | |||||
| getData.php | |||||
| getDataPMA.php | |||||
| getDataPMDN.php | |||||
| getPhoto.php | |||||
| getVideo.php | |||||
| index.php | |||||
| singel_post.php |
| Server IP : 103.169.32.36 / Your IP : 216.73.217.108 Web Server : Apache System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : apache ( 48) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/dpmptsp/public_html/promosi/ |
Upload File : |
<?php
require_once('../home/admin/part/db.php');
if($_REQUEST['action']=='getdata'){
$filter = array();
if($_REQUEST['nama']<>''){
$filter[] = "(ubNama LIKE '%".aInj($_REQUEST['nama'])."%')";
}
if($_REQUEST['sektor']<>''){
$filter[] = "ubSektor ='".aInj($_REQUEST['sektor'])."'";
}
if($_REQUEST['subsektor']<>''){
$filter[] = "ubSubSektor ='".aInj($_REQUEST['subsektor'])."'";
}
$filter[] = "ubTipe='PMA'";
$where = "";
if (count($filter) > 0) {
$where = "WHERE ".implode(' AND ', $filter);
}
$sql ="SELECT * FROM tbl_ub ".$where;
$data = getDataBySQL($sql);
if(!empty($data)){
?>
<style>
.nomRow {
float:left;
font-weight: 700;
font-size:20px;
font-style:italic;
color:#566573;
}
</style>
<table>
<thead>
<tr>
<th>No.</th>
<th>Nama Usaha</th>
<th>Alamat Usaha</th>
<th>Sektor</th>
<th>Sub Sektor</th>
<th>View</th>
</tr>
</thead>
<tbody>
<?php
$x=1;
foreach($data as $v){
$sektor = str_replace('Sektor ','',$v['ubSektor']);
if($sektor=='Primer'){
$sektor = '<span class="status primer">'.$sektor .'</span>';
}else if($sektor=='Sekunder'){
$sektor = '<span class="status sekunder">'.$sektor .'</span>';
}else{
$sektor = '<span class="status tersier">'.$sektor .'</span>';
}
?>
<tr>
<td><span class="nomRow"><?php echo $x ?></span></td>
<td><b><a href="javascript:void(0)" onclick="modalEvent(this);" data-id="<?php echo $v['ubID']; ?>" data-modal-trigger="detailData" data-namaUsaha="<?php echo $v['ubNama']; ?>" ><?php echo $v['ubNama']; ?></a></b></td>
<td><?php echo $v['ubAlamat']; ?></td>
<td><?php echo $sektor; ?></td>
<td><?php echo $v['ubSubSektor']; ?></td>
<td>
<a href="javascript:void(0)" onclick="modalEvent(this);" data-id="<?php echo $v['ubID']; ?>" data-modal-trigger="detailData" data-namaUsaha="<?php echo $v['ubNama']; ?>"><i class="fa fa-search"></i></a>
</td>
</tr>
<?php
$x++;
}
?>
</tbody>
</table>
<div data-modal="detailData" class="modal" id="modalDetail">
<article class="content-wrapper" style="background-image:url('<?php echo PATH2;?>promosi/assets/images/bg9.jpg');background-repeat:no-repeat;padding-left:10%;">
<button class="close"></button>
<header class="modal-header">
<h4 class="title" id="namaUsaha" style="margin-top:-10px;"></h4>
</header>
<div class="modal_content" id="fetched-data">
</div>
</article>
</div>
<?php
}else{
?>
<center><img src="<?php echo PATH2;?>promosi/assets/images/no_result.gif" /></center>
<?php
}
}else if($_REQUEST['action']=='getDetail'){
$sql ="SELECT * FROM tbl_ub WHERE ubID=".aInj($_POST['id']);
$v = getDataBySQL($sql);
?>
<div class="row">
<div class="col-7">
<table>
<tr>
<td width="25%">Alamat Usaha</td>
<td width="1%" style="text-align:center">:</td>
<td width="74%"><?php echo $v[0]['ubAlamat']; ?></td>
</tr>
<tr>
<td>Negara</td>
<td style="text-align:center">:</td>
<td><?php echo $v[0]['ubNegara']; ?></td>
</tr>
<tr>
<td>Email</td>
<td style="text-align:center">:</td>
<td><?php echo $v[0]['ubEmail']; ?></td>
</tr>
<tr>
<td>Bidang Usaha</td>
<td style="text-align:center">:</td>
<td><?php echo $v[0]['ubBidangUsaha']; ?></td>
</tr>
<tr>
<td>Lokasi</td>
<td style="text-align:center">:</td>
<td><?php echo $v[0]['ubLokasi']; ?></td>
</tr>
<tr>
<td>No. Izin</td>
<td style="text-align:center">:</td>
<td><?php echo $v[0]['ubNoIzin']; ?></td>
</tr>
<tr>
<td>Total Investasi</td>
<td style="text-align:center">:</td>
<td>Rp. <?php echo $v[0]['ubInvestasi']; ?> Juta</td>
</tr>
</table>
</div>
<div class="col-5">
<div class="col-12">
<h6>Video Promosi</h6>
<?php
if($v[0]['ubVideo']==''){
?>
<center><img src="<?php echo PATH2;?>promosi/assets/images/novideos.png" /></center>
<?php
}else{
$parts = parse_url($v[0]['ubVideo']);
parse_str($parts['query'], $kode);
?>
<iframe width="500" height="250" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/<?php echo $kode['v'];?>"></iframe>
<?php
}
?>
</div>
<hr>
<div class="col-12">
<h6>Maps</h6>
<?php
if($v[0]['ubKoor']==''){
?>
<center><img src="<?php echo PATH2;?>promosi/assets/images/nomaps.png" /></center>
<?php
}else{
?>
<iframe
width="500"
height="250"
frameborder="0"
scrolling="no"
marginheight="0"
marginwidth="0"
src="https://maps.google.com/maps?q=<?php echo $v[0]['ubKoor']; ?>&output=embed"
>
</iframe>
<?php
}
?>
</div>
</div>
</div>
<?php
}else if($_REQUEST['action']=='getdataSubsektor'){
$sql ="SELECT DISTINCT(ubSubSektor) as nama FROM tbl_ub WHERE ubSektor='".aInj($_POST['sektor'])."'";
$data = getDataBySQL($sql);
echo json_encode($data);
exit;
}
?>
| .. | |||||
| assets | |||||
| page | |||||
| .htaccess | |||||
| getData.php | |||||
| getDataPMA.php | |||||
| getDataPMDN.php | |||||
| getPhoto.php | |||||
| getVideo.php | |||||
| index.php | |||||
| singel_post.php |