Beispiel #1
0
    if (file_exists("images/6.gif")) {
        $ikon_2 = "<img src=\"images/6.gif\" alt=\"\" border=\"0\" />";
    }
    if (file_exists("images/7.gif")) {
        $ikon_3 = "<img src=\"images/7.gif\" alt=\"\" border=\"0\" />";
    }
    $hasil = $koneksi_db->sql_query("SELECT * FROM artikel WHERE id='{$id}' AND publikasi=1");
    $data = $koneksi_db->sql_fetchrow($hasil);
    $artikelid = $data['id'];
    $judulnya = $data['judul'];
    $topik = $data['topik'];
    $gambar = $data['gambar'];
    $hits = $data['hits'];
    //title
    $judul_situs = '' . $judulnya . ' | ' . $judul_situs . '';
    $_META['description'] = limittxt(htmlentities(strip_tags($data['konten'])), 200);
    $_META['keywords'] = empty($data['tags']) ? implode(',', explode(' ', htmlentities(strip_tags($data['judul'])))) : $data['tags'];
    if (empty($judulnya)) {
        $tengah .= '<div class="error">Access Denied<br /><br />Regard<br /><br />teamworks<br />webmaster@teamworks.co.id<br>
Lihat...</div>';
        $tengah .= '<meta http-equiv="refresh" content="3; url=index.php">';
    } else {
        $hits = $hits + 1;
        $updatehits = $koneksi_db->sql_query("UPDATE artikel SET hits='{$hits}' WHERE id='{$id}'");
        $tgl = datetimes($data['tgl']);
        $judul = $data['judul'];
        $konten = $data['konten'];
        $sumber = $data['sumber'];
        $gambar = $data['gambar'] == '' ? '' : '<div style="float:left; margin-right:10px;"><img src="' . $url_situs . '/mod/news/images/normal/' . $data['gambar'] . '" width="310" border="0" alt="' . $data['judul'] . '" /><br><span style="font-size:10px; color:#666666; width:310px;">' . $data['caption'] . '</span></div>';
        ////////////Topik////////////////////////////////////
        $query2 = $koneksi_db->sql_query("SELECT * FROM topik WHERE id='{$topik}'");
Beispiel #2
0
     $tengah .= '<div class="border"><table width="100%"><tr><td>Kategori# &raquo; <a href="' . $url_situs . '/' . get_link($dataperiksa['kid'], $dataperiksa['kategori'], "kategori-produk") . '" title="' . $datapc['kategori'] . '">' . $dataperiksa['kategori'] . '</a> , Urut Menurut : ' . $orderby . '</td>';
     ///////////////////
     $tengah .= '<td align="right">Pilih Urutan <select onchange="redir(this)"><option value="' . $url_situs . '/katalog.html">- Silahkan Pilih -</option>';
     $bs = $koneksi_db->sql_query("SELECT * FROM kat_urut ORDER BY urut asc");
     while ($dat = $koneksi_db->sql_fetchrow($bs)) {
         $urut = $dat['urut'];
         $uid = $dat['uid'];
         $tengah .= '<option value="' . $url_situs . '/' . get_link2($kid, $uid, $kategori, "kategori-produk-urut") . '" title="' . $urut . '">' . $urut . '</option>';
     }
     $tengah .= '</select></td></tr></table></div>';
     ///////////////////
     $query2 = mysql_query("SELECT count(`id`) AS `total_files` FROM `katalog` WHERE `kategori`='{$kid}'");
 }
 //title
 $judul_situs = '' . $dataperiksa['kategori'] . ' | ' . $judul_situs . '';
 $_META['description'] = limittxt(htmlentities(strip_tags($data['ket'])), 150);
 $_META['keywords'] = empty($data['tags']) ? implode(',', explode(' ', htmlentities(strip_tags($data['judul'])))) : $data['tags'];
 $getdata2 = mysql_fetch_assoc($query2);
 $jumlah = $getdata2['total_files'];
 $limit = 16;
 if ($jumlah > 0) {
     if (empty($_GET['offset']) and !isset($_GET['offset'])) {
         $offset = 0;
     } else {
         $offset = $_GET['offset'];
     }
     $a = new paging($limit);
     $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}");
Beispiel #3
0
        $admin .= '</form></div>';
        break;
    default:
        $query = mysql_query("SELECT * FROM halaman ORDER BY id");
        $admin .= '
<table cellspacing="0" style="width:100%">
	<tr bgcolor="#d1d1d1">
	<th style="width:25px;text-align:center;padding:10px 5px 10px 5px;border-left:1px solid #ccc;border-top:1px solid #ccc;">No</th>
	<th style="text-align:left;padding:10px 5px 10px 5px;border-top:1px solid #ccc;border-left:1px solid #ccc;">Judul Halaman</th>
	<th style="text-align:center;padding:10px 5px 10px0 5px;border-right:1px solid #ccc;border-top:1px solid #ccc;border-left:1px solid #ccc;">Aksi</th>
	</tr>';
        $no = 1;
        while ($data = mysql_fetch_assoc($query)) {
            $warna = empty($warna) ? 'bgcolor="#efefef"' : '';
            if ($data['id'] == 1) {
                $deleted = '';
            } else {
                $deleted = '<a href="admin.php?pilih=pages&amp;mod=yes&amp;aksi=del&amp;id=' . $data['id'] . '" onclick="return confirm(\'Apakah Anda Ingin Menghapus Data Ini ?\')" style="color:red">Delete</a> - ';
            }
            $admin .= '
	<tr ' . $warna . '>
	<td style="width:25px;text-align:center;padding:2px;border-left:1px solid #ccc;border-top:1px solid #ccc;">' . $no . '</td>
	<td style="text-align:left;padding:2px;border-top:1px solid #ccc;border-left:1px solid #ccc;"><a href="pages-' . AuraCMSSEO($data['seftitle']) . '.html" title="' . $data['judul'] . '">' . limittxt($data['judul'], 40) . '</a></td>
	<td style="text-align:center;padding:10px 5px 10px0 5px;border-right:1px solid #ccc;border-top:1px solid #ccc;border-left:1px solid #ccc;">' . $deleted . '<a href="?pilih=pages&amp;mod=yes&amp;aksi=edit&amp;id=' . $data['id'] . '">Edit</a> - <a href="?pilih=menu&amp;mod=yes&amp;aksi=add&amp;url=pages-' . AuraCMSSEO($data['judul']) . '.html">Buat Menu</a> - <a href="?pilih=menu&amp;mod=yes&amp;aksi=addsub&amp;url=pages-' . AuraCMSSEO($data['judul']) . '.html">Buat Sub Menu</a></td>
	</tr>';
            $no++;
        }
        $admin .= '<tr><td colspan="3" style="width:25px;text-align:center;padding:5px;border-top:1px solid #ccc;">&nbsp;</td></tr></table>';
        break;
}
echo $admin;
Beispiel #4
0
            $alhasil = mysql_fetch_row($querymax);
            $numbers_parent = $alhasil[0];
            if ($jumlah < 1) {
                $admin .= '<div class="error">Tidak Ada Header </div>';
            } else {
                $hasil = $koneksi_db->sql_query("SELECT * FROM header ORDER BY ordering ASC LIMIT {$offset},{$limit}");
                $admin .= '<div class="border"><table width="100%" cellspacing="0" cellpadding="4">';
                $admin .= '<tr bgcolor="#d1d1d1">
	<th style="text-align:center;padding:10px 5px 10px 5px;border-top:1px solid #ccc;border-left:1px solid #ccc;">Header</th>	
	<th style="text-align:center;padding:10px 5px 10px 5px;border-top:1px solid #ccc;border-left:1px solid #ccc;">Konten</th>
	<th style="text-align:center;padding:10px 5px 10px 5px;border-top:1px solid #ccc;border-left:1px solid #ccc;width:5px;">Order</th>
	<th colspan="2" style="text-align:center;padding:10px 5px 10px0 5px;border-right:1px solid #ccc;border-top:1px solid #ccc;border-left:1px solid #ccc;">Aksi</th>
	</tr>';
                while ($data = $koneksi_db->sql_fetchrow($hasil)) {
                    $header = $data['header'];
                    $konten = limittxt($data['konten'], 200);
                    $urut = $data['ordering'];
                    $orderd = '<a href="' . $adminfile . '.php?pilih=header&amp;mod=yes&amp;aksi=down&amp;id=' . $data[3] . '"><img src="images/downarrow-1.png" border="0" alt="down" /></a>';
                    $orderu = '<a href="' . $adminfile . '.php?pilih=header&amp;mod=yes&amp;aksi=up&amp;id=' . $data[3] . '"><img src="images/uparrow-1.png" border="0" alt="up" /></a>';
                    $ordering_down = $orderd;
                    $ordering_up = $orderu;
                    if ($data[3] == 1) {
                        $ordering_up = '&nbsp;&nbsp;&nbsp;';
                    }
                    if ($data[3] == $numbers_parent) {
                        $ordering_down = '&nbsp;';
                    }
                    $gambar2 = "<a href='mod/header/images/{$header}' rel='lightbox[roadtrip]'>\n\t\t<img height='60' src='mod/header/images/{$header}'></a>";
                    $admin .= "<tr>\n\t\t<td style='text-align:left;padding:5px;border-top:1px solid #ccc;'valign=top width='30%'>{$gambar2}&nbsp;</td>";
                    $admin .= "\n\t\t<td style='text-align:left;padding:5px;border-top:1px solid #ccc;'valign=top width='30%'>{$konten}&nbsp;</td>";
                    $admin .= "\n\t\t<td style='text-align:center;padding:5px;border-top:1px solid #ccc;'valign=top>{$ordering_up} {$ordering_down}</td>";
Beispiel #5
0
        }
        $admin .= '</table>';
        $admin .= '<h4>sidebar kanan</h4>';
        $admin .= '<table class="tabel-modul" cellspacing="0" cellpadding="0">';
        $admin .= '<tr class="head"><td class="depan">title</td><td>publish</td><td>posisi</td><td>order</td><td>type</td><td>Action</td></tr>';
        $query = mysql_query("SELECT * FROM `modul` WHERE `posisi` = 1 ORDER BY `ordering`");
        while ($data = mysql_fetch_assoc($query)) {
            $select = '<select name="publish[' . $data['id'] . ']">';
            if ($data['published'] == 1) {
                $select .= '<option value="1" selected="selected">yes</option>';
                $select .= '<option value="0">no</option>';
            } else {
                $select .= '<option value="1">yes</option>';
                $select .= '<option value="0" selected="selected">no</option>';
            }
            $select .= '</select>';
            $select1 = '<select name="posisi[' . $data['id'] . ']">';
            if ($data['posisi'] == 0) {
                $select1 .= '<option value="0" selected="selected">kiri</option>';
                $select1 .= '<option value="1">kanan</option>';
            } else {
                $select1 .= '<option value="0">kiri</option>';
                $select1 .= '<option value="1" selected="selected">kanan</option>';
            }
            $select1 .= '</select>';
            $admin .= '<tr class="isi" title="' . $data['modul'] . '"><td class="depan">' . limittxt($data['modul'], 15) . '</td><td>' . $select . '</td><td>' . $select1 . '</td><td><input type="text" name="order[' . $data['id'] . ']" value="' . $data['ordering'] . '" size="3" /></td><td>' . $data['type'] . '</td><td><a href="admin.php?pilih=modul&amp;mod=yes&amp;action=edit&amp;id=' . $data['id'] . '"><img src="images/edit.gif" alt="edit"/></a> <a href="admin.php?pilih=modul&amp;mod=yes&amp;action=delete&amp;id=' . $data['id'] . '" onclick="return confirm(\'Apakah anda yakin ?\')"><img src="images/delete.gif" alt="delete"/></a></td></tr>';
        }
        $admin .= '</table><br/><input type="submit" name="submit" value="save" /></form>';
        break;
}
echo $admin;
Beispiel #6
0
<th>Kelas</th>
<th>Ket</th>
<th width="240px">Aksi</th>
</tr></thead><tbody>';
        $no = 1;
        while ($data = $koneksi_db->sql_fetchrow($hasil)) {
            $nama = $data['nama'];
            $kelas = $data['kelas'];
            $file = $data['file'];
            $ket = $data['ket'];
            $ukuranfile = filesize('mod/tugas/download/' . $file . '');
            $admin .= '<tr>
<td><b>' . $no . '</b></td>
<td>' . $nama . '</td>
<td>' . $kelas . '</td>
<td>' . limittxt($ket, 200) . '</td>
<td><a href="?pilih=tugas&amp;mod=yes&amp;aksi=delfile&amp;id=' . $data['id'] . '" onclick="return confirm(\'Apakah Anda Yakin Ingin Menghapus Data Ini ?\')"><span class="btn btn-danger">Hapus</span></a> <a href="mod/tugas/download/' . $data['file'] . '"target="new"><span class="btn btn-success">Download</span></a> <a href="?pilih=tugas&amp;mod=yes&amp;aksi=komentar&amp;id=' . $data['id'] . '"target=""><span class="btn btn-primary">Komentar</span></a></td>
</tr>';
            $no++;
        }
        $admin .= '</tbody></table>';
    }
    if ($_GET['aksi'] == "komentar") {
        $admin .= '<div class="panel-heading"><b>Data Tugas</b></div>';
        $id = int_filter($_GET['id']);
        $query = mysql_query("SELECT * FROM `tugassiswa` WHERE `id`='{$id}'");
        $data = mysql_fetch_array($query);
        $idtugas = $data['tugas'];
        $tugassiswa = $data['id'];
        $downloadfile = '<a href="mod/tugas/download/' . $data['file'] . '" target="new"><span class="btn btn-success">Download</span></a>';
        $admin .= '