示例#1
0
        $tengah .= '<table width="100%" cellpadding="0" cellspacing="5"><tr>';
        $no = 0;
        if ($cekparentid == '0') {
            $s = mysql_query("SELECT * FROM `katalog` WHERE `parentid`='{$kid}' OR `kategori`='{$kid}' order by {$orderby} LIMIT {$offset},{$limit}");
        } else {
            $s = mysql_query("SELECT * FROM `katalog` WHERE `kategori`='{$kid}'  order by {$orderby} LIMIT {$offset},{$limit}");
        }
        while ($data = mysql_fetch_array($s)) {
            $id = $data['id'];
            $judul = $data['judul'];
            $gambar = $data['gambar'];
            $idkat = $data['kategori'];
            $tgl = $data['tgl'];
            $idkota = $data['kota'];
            $kategori = getkategori($idkat);
            $kota = getkota($idkota);
            $harga = $data['harga'] == '' ? 'Call me' : '' . rupiah_format($data['harga']) . '';
            $urutan = $no + 1;
            $tengah .= '
<div id="imgkatalog"><img src="' . $url_situs . '/mod/katalog/images/thumb/' . $gambar . '" alt="' . $judul . '"/class="imgkatalog">

<div id="judulkatalog">
<a href="' . $url_situs . '/' . get_link($id, $judul, "produk") . '" title="' . $judul . '"class="judulkatalog">
' . kutip($judul, 6) . '</a>
</div>
<div id="tglkatalog">
<img src="' . $url_situs . '/images/timeicon.png" class="imgtimeicon"/><div class="tglkatalog">' . tanggalindo($tgl) . '</div>
</div>
<div id="jeniskota"><img src="' . $url_situs . '/images/googlepointer.png" class="imggooglepointer"/>
<a href="' . $url_situs . '/' . get_link($idkota, $kota, "kota-produk") . '"  title="' . $kota . '"class="jeniskota">
' . $kota . '</a>
示例#2
0
        $gambar = $data['gambar'];
        $tgl = $data['tgl'];
        $kategori = $data['kategori'];
        $client = $data['client'];
        $kota = $data['kota'];
        $jenis = $data['jenis'];
        $ket = $data['ket'];
        $edit = '<a class="image" href="admin.php?pilih=katalog&amp;mod=yes&amp;aksi=edit_produk&amp;id=' . $id . '"><div class="btn btn-primary">Edit</div></a> ';
        $deleted = '<a href="admin.php?pilih=katalog&amp;mod=yes&amp;aksi=hapus_produk&amp;id=' . $id . '" onclick="return confirm(\'Lelang ini akan di hapus! Anda yakin ?\')" style="color:red"><div class="btn btn-danger">Hapus</div></a>';
        $tengah .= '<tr>
<td><img src="mod/katalog/images/thumb/' . $gambar . '" alt="' . $judul . '" style="float:left; border:1px solid #dddddd; margin-right:10px; max-width:75px; max-height:75px;" />' . $judul . '</td>
<td>' . $tgl . '</td>
<td>' . getjenis($jenis) . '</td>
<td>' . getkategori($kategori) . '</td>
<td>' . getclient($client) . '</td>
<td>' . getkota($kota) . '</td>
<td>' . $edit . ' ' . $deleted . '</td>
</tr>';
        $no++;
    }
    $tengah .= '</tbody></table>';
}
if ($_GET['aksi'] == 'hapus_photo') {
    $id = int_filter($_GET['id']);
    $cek = $koneksi_db->sql_query("SELECT gambar FROM katalogphoto WHERE id={$id}");
    while ($data = mysql_fetch_array($cek)) {
        $gambar = $data['gambar'];
        $uploaddir = $normal2 . $gambar;
        $uploaddir2 = $thumb2 . $gambar;
        unlink($uploaddir);
        unlink($uploaddir2);