Anda perlu mengupgrade Flash Player Anda atau ijinkan javascript untuk mengenable menu website.
Unduh Flash Player

Membuat Mod Free Templates AuraCMS sederhana

Bookmark and Share

kali ini di topik sepesial menyambut ramadhan aurathemes.com
mempersembahkan modul freetemplates yang semestinya itu sudah
disertakan oleh auracms, tapi berhubung tidak disertakan dalam paket
auracms maka saya selaku admin aurathemes membuatkan modul ini.


nah sekarang kita mulai untuk membuatnya.


1.buat dir "freetemplates" pada dir mod


2.buat dir "storeData" di dalam dir "freetemplates"


3.buat dir "thumb" dan "normal" pada dir "storeData"


4.buat dir "images" pada dir "freetemplates" untuk mengkopi gambar berikut:



5.buat file dengan nama "freetemplates.php" pada dir ""freetemplates"


3. copy source code berikut ini:



<?php


if(ereg(basename (__FILE__), $_SERVER['PHP_SELF']))
{
header("HTTP/1.1 404 Not Found");
exit;
}


global $koneksi_db, $maxkonten;


$tengah .= '<h4 class="bg">Download Freetemplates</h4>';
$tengah .= '<div class="border" style="text-align: left;"><a
href="index.php?pilih=freetemplates&amp;mod=yes">Home</a>
| <a
href="index.php?pilih=freetemplates&amp;mod=yes&amp;aksi=add">Add
Themes</a></div>';
if($_GET['aksi']==""){


global $koneksi_db;


//connect database table freetemplates
$dataPeroffset = 3;


// apabila $_GET['offset'] sudah didefinisikan, gunakan nomor halaman tersebut,
// sedangkan apabila belum, nomor halamannya 1.


if(isset($_GET['offset']))
{
$nooffset = $_GET['offset'];
}
else $nooffset = 1;


// perhitungan offset


$offset = ($nooffset - 1) * $dataPeroffset;
$kolom = 1; // Tentukan banyaknya kolom
$no = $posisi+1; // Untuk penomoran
// query SQL untuk menampilkan data perhalaman sesuai offset


$hasil = $koneksi_db->sql_query("SELECT * FROM freetemplates WHERE id ORDER BY id DESC LIMIT $offset, $dataPeroffset");
$jml_baris = mysql_num_rows($hasil);
$tengah .= '<div class="border">';
$tengah .= '<table border="0" cellpadding="0" cellspacing="4" width="100%"> <tbody>';
for($i = 0; $i < $jml_baris; $i++){
$data = mysql_fetch_array($hasil);
if($i % $kolom == 0){
$tengah .= '<tr >';
}
$tengah .= '
<td rowspan="8" style="padding-right: 10px; width: 100px; text-align: center;" valign="top" >
<a
href="index.php?pilih=freetemplates&amp;mod=yes&amp;aksi=view&amp;id='.$data[id].'&amp;screenshort='.$data[screenshort].'"
rel="lightbox[themes]" title="'.$data[screenshort].'">
<img
src="mod/freetemplates/storeData/thumb/'.$data[screenshort].'"
alt="'.$data[screenshort].'" style="width:90px;"></a><div
style="text-align: center;">
<a
href="index.php?pilih=freetemplates&amp;mod=yes&amp;aksi=view&amp;id='.$data[id].'&amp;screenshort='.$data[screenshort].'"
rel="lightbox[themes]" title="'.$data[screenshort].'">Klik to
View</a></div></td>

</tr>
<tr>

<td><b>Nama</b></td>
<td>:</td>
<td><b style="color:#0099cc;">'.$data[nama].'</b></td>
</tr>
<tr>
<td><b>Versi</b></td>
<td>:</td>
<td>AuraCMS Versi '.$data[versi].'</td>
</tr>
<tr>
<td><b>Pengirim</b></td>
<td>:</td>
<td>'.$data[pengirim].'</td>
</tr>
<tr>
<td><b>Website</b></td>
<td>:</td>
<td><a href="'.$data[website].'" target="_blank">'.$data[website].'</a></td>
</tr>
<tr>
<td valign="top"><b>Rating</b></td>
<td valign="top">:</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>Hits</b></td>
<td>:</td>
<td><b style="color:red;">'.$data[hits].'</b> x didownload</td>
</tr>
<tr>
<td style="padding-top: 5px;"></td>
<td style="padding-top: 5px;"></td>
<td style="padding-top: 5px;"><a
href="index.php?pilih=freetemplates&amp;mod=yes&amp;aksi=download&amp;id='.$data[id].'&amp;nama='.$data[nama].'"><img
src="mod/freetemplates/images/download.gif"
alt="Download"></a>
</td>
<tr>
<td colspan="4"><hr style=" border:1px solid #f2f2f2;"/></td>
</tr>
';


if(($i % $kolom) == ($kolom - 1) OR ($i + 1) == $jml_baris){
$tengah .= '</tr>';
}
$no++;
}
$tengah .= '</tbody></table>';
$tengah .= '</div>';
// mencari jumlah semua data dalam tabel guestbook


$query = "SELECT COUNT(*) AS jumData FROM freetemplates";
$hasil = mysql_query($query);
$data = mysql_fetch_array($hasil);


$jumData = $data['jumData'];


// menentukan jumlah halaman yang muncul berdasarkan jumlah semua data


$jumoffset = ceil($jumData/$dataPeroffset);


// menampilkan link previous
$tengah .= "<div align='center' class='border'>";
if ($nooffset > 1) $tengah .= "<a
href='".$_SERVER['PHP_SELF']."?pilih=freetemplates&amp;mod=yes&amp;offset=".($nooffset-1)."'>&lt;&lt;
Prev</a>";


// memunculkan nomor halaman dan linknya


for($offset = 1; $offset <= $jumoffset; $offset++)
{
if ((($offset >= $nooffset - 3) && ($offset <= $nooffset + 3)) || ($offset == 1) || ($offset == $jumoffset))
{
if (($showoffset == 1) && ($offset != 2)) $tengah .= "...";
if (($showoffset != ($jumoffset - 1)) && ($offset == $jumoffset)) $tengah .= "...";
if ($offset == $nooffset) $tengah .= " <b>".$offset."</b> ";
else $tengah .= " <a
href='".$_SERVER['PHP_SELF']."?pilih=freetemplates&amp;mod=yes&amp;offset=".$offset."'>".$offset."</a>
";
$showoffset = $offset;
}
}


// menampilkan link next


if ($nooffset < $jumoffset) $tengah .= "<a
href='".$_SERVER['PHP_SELF']."?pilih=freetemplates&amp;mod=yes&amp;offset=".($nooffset+1)."'>Next
&gt;&gt;</a>";
$tengah .= "</div>";


}
if($_GET['aksi']=="add"){
$tengah .= '<div class="border">';
if (cek_login()){


if(isset($_POST['submit'])){
$_POST = array_map('cleantext',$_POST);
$nama = $_POST['nama'];
$email = $_POST['email'];
$versi = $_POST['versi'];
$pengirim = $_POST['pengirim'];
$website = $_POST['website'];
$screenshort = $_POST['screenshort'];
$files= cleantext($_POST['files']);
$confirm_code = md5(uniqid(rand()));


$mail_blocker = explode(",", $mail_blocker);
foreach ($mail_blocker as $key => $val) {
if ($val == strtolower($email) && $val != "") $error .= "Given E-Mail the address is forbidden to use!<br />";
}
$name_blocker = explode(",", $name_blocker);
foreach ($name_blocker as $key => $val) {
if ($val == strtolower($nama) && $val != "") $error .= "Named it is forbidden to use!<br />";
}


if (!$nama || preg_match("/[^a-zA-Z0-9_-]/", $nama)) $error .=
"Error: Karakter Name tidak diizinkan kecuali a-z,A-Z,0-9,-, dan
_<br />";
if (strlen($nama) > 10) $error .= "Name Terlalu Panjang Maksimal 10 Karakter<br />";
if (strrpos($nama, " ") > 0) $error .= "Name Tidak Boleh Menggunakan Spasi";
if ($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT nama
FROM freetemplates WHERE nama='$nama'")) > 0) $error .= "Error: Name
".$nama." sudah terdaftar , silahkan ulangi.<br />";
if
($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT nama
FROM temp_freetemplates WHERE nama='$nama'")) > 0) $error .= "Error:
Name ".$nama." sudah terdaftar , silahkan ulangi.<br />";
if (!$nama) $error .= "Error: Formulir Nama belum diisi , silahkan ulangi.<br />";
if (!$nama) $error .= "Error: Formulir Nama belum diisi , silahkan ulangi.<br />";
if (empty($_POST['versi'])) $error .= "Error: Formulir versi belum diisi , silahkan ulangi.<br />";
if (empty($files)) $error .= "Error: Formulir Files belum diisi , silahkan ulangi.<br />";
if (!is_valid_email($email)) $error .= "Error: E-Mail address invalid!<br />";
if ($_POST['gfx_check'] != $_SESSION['Var_session'] or
!isset($_SESSION['Var_session'])) {$error .= "Security Code Invalid
<br />";}


if ($error){
$tengah.='<div class="error">'.$error.'</div>';
$style_include[] ='<meta http-equiv="refresh" content="3; url=index.php?pilih=freetemplates&amp;mod=yes" />';
}else{
$hasil1 = $koneksi_db->sql_query("INSERT INTO freetemplates (nama,
email, versi , pengirim, website,screenshort, files)VALUES('$nama',
'$email', '$versi','$pengirim','$website','$screenshort','$files')" );


if($hasil1){
$subject ="Your Add Themes Information";
$header = $email_master;
$message ="Your Themes \r\n";
$message .="<br /><br />";
$message .="Name : ".$nama." <br>versi : ".$_POST['versi']."";
$message .="<br /><br />Please Don't Replay This Email,
this is Automatic Email Because You Register in AuraCMS Member<br
/><br />";
$message .="<br /><br /><br />Regard:<br /><br />Webmaster<br />";
$sentmail = mail_send($email, $header, $subject, $message, 1, 1);


$tengah.='<div class="sukses">Add Themes Success</div>';
$style_include[] ='<meta http-equiv="refresh" content="3; url=index.php?pilih=freetemplates&amp;mod=yes" />';
unset($_POST);


}
}


}


$nama = !isset($nama) ? '' : $nama;
$email = !isset($email) ? '' : $email;
$versi = !isset($versi) ? '' : $versi;
$pengirim = !isset($pengirim) ? '' : $pengirim;
$website = !isset($screenshort) ? '' : $screenshort;
$screenshort = !isset($website) ? '' : $website;
$files= !isset($files) ? '' : $files;
$tengah .= '
<form method="post" action="" enctype="multipart/form-data">
<br>
<table width="100%">
<tbody><tr>
<td style="padding-bottom: 5px;">Email*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="email" type="text" size="33" /></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Website</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="website" size="33" type="text"></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Nama*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="nama"
type="text" size="33"
value="'.cleantext(stripslashes(@$_POST['nama'])).'" /></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Versi*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="versi" size="33" type="text"></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Files*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="files" size="33" type="text"></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Screenshort</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;">
<input name="screenshort" class="text" size="33" type="hidden" value="screenshort.jpg">
<input name="screenshort" class="text" size="33" type="file"></td>
</tr><tr>
<td style="padding-bottom: 5px;">Pengirim</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="pengirim" size="33" maxlength="20" type="text"></td>
</tr>';
if (extension_loaded("gd")) {
$tengah .= '
<tr>
<td></td>
<td></td>
<td><img src="includes/code_image.php" border="1" alt="Security Code" /></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Key kode*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="gfx_check" size="8" maxlength="20" type="text"></td>
</tr>';
}
$tengah .= '
<tr>
<td></td>
<td></td>
<td><input value="Submit" name="submit"
type="hidden"><input src="mod/freetemplates/images/submit.gif"
name="submit" value="Sumbit" type="image"></td>
</tr>
</tbody></table>
</form> ';


} else {
$tengah .= '<div class="error">Anda Mesti Login, atau register jika blm punya account</div>';
$style_include[] ='<meta http-equiv="refresh" content="3; index.php?pilih=user&aksi=register" />';
}
$tengah .= '</div>';
}
if($_GET['aksi']=="view"){
$tengah .= '<div align="center" class="border">';
$screenshort = int_filter($_GET['screenshort']);
$id = int_filter($_GET['id']);
$hasil = $koneksi_db->sql_query("select * from freetemplates where id='$id'");
$data = $koneksi_db->sql_fetchrow($hasil);
$tengah .= '<img src="mod/freetemplates/storeData/normal/'.$data[screenshort].'" alt="'.$data[screenshort].'"
style="
background-color: #313b44;
border: 1px solid #2b353e;
padding: 7px;
margin: 0px 0px 0px 0px;
max-width:400px;
min-width:300px;">';
$tengah .= '</div>';
}


if($_GET['aksi']=="download"){


if (isset($_GET['id']) && cek_login()){


$id = int_filter($_GET['id']);
$hasil = $koneksi_db->sql_query("SELECT files,hits,id FROM `freetemplates` where id='$id'");
$data = $koneksi_db->sql_fetchrow($hasil);
$files = $data['files'];
$hit = $data['hit'];
$id = $data['id'];
$hits =$hits+1 ;
$hasil1 = $koneksi_db->sql_query("UPDATE `freetemplates` SET `hits`=hits+1 WHERE `id` = '$id'");
header ("location: $files");
exit;
} else {
$tengah .= '<div class="error">Anda Mesti Login, atau register jika blm punya account</div>';
$style_include[] ='<meta http-equiv="refresh" content="3; index.php?pilih=user&aksi=register" />';
}
}
$tengah .= '</div>';
echo $tengah;
?>



lalu save file tsb.


untuk melihat silahkan masukkan pada adress browser kesayangan anda "http://localhost/auracms/index.php?plih=freetemplates&mod=yes" tanpa tanda petik (") lihat sreenshort berikut:



4. untuk adminnya silahkan ikuti langkah beikutnya


5. buat dir admin pada dir "freetemplate"


6. buat file "admin_freetemplates.php"


7. copy source code berikut:



<?php


if (!defined('AURACMS_admin')) {
Header("Location: ../admin.php");
exit;
}


$admin = '';
if (!cek_login ()){
$admin .= 'Access Denied!.... You Must Login First';


}
if (@$_SESSION['LevelAkses'] != 'Administrator') {
exit;
}


global $koneksi_db, $maxkonten;


$admin .= '<h4 class="bg">Manager Freetemplates</h4>';
$admin .= '<div class="border" style="text-align: left;"><a
href="admin.php?pilih=freetemplates&amp;mod=yes">Home</a>
| <a
href="admin.php?pilih=freetemplates&amp;mod=yes&amp;aksi=add">Add
Themes</a></div>';
if($_GET['aksi']==""){


global $koneksi_db;


//connect database table freetemplates
$dataPeroffset = 3;


// apabila $_GET['offset'] sudah didefinisikan, gunakan nomor halaman tersebut,
// sedangkan apabila belum, nomor halamannya 1.


if(isset($_GET['offset']))
{
$nooffset = $_GET['offset'];
}
else $nooffset = 1;


// perhitungan offset


$offset = ($nooffset - 1) * $dataPeroffset;
$kolom = 1; // Tentukan banyaknya kolom
$no = $posisi+1; // Untuk penomoran
// query SQL untuk menampilkan data perhalaman sesuai offset


$hasil = $koneksi_db->sql_query("SELECT * FROM freetemplates WHERE id ORDER BY id DESC LIMIT $offset, $dataPeroffset");
$jml_baris = mysql_num_rows($hasil);
$admin .= '<div class="border">';
$admin .= '<table border="0" cellpadding="0" cellspacing="4" width="100%"> <tbody>';
for($i = 0; $i < $jml_baris; $i++){
$data = mysql_fetch_array($hasil);
if($i % $kolom == 0){
$admin .= '<tr >';
}
$admin .= '
<td rowspan="8" style="padding-right: 10px; width: 100px; text-align: center;" valign="top" >
<a
href="admin.php?pilih=freetemplates&amp;mod=yes&amp;aksi=view&amp;id='.$data[id].'&amp;screenshort='.$data[screenshort].'"
rel="lightbox[themes]" title="'.$data[screenshort].'">
<img
src="mod/freetemplates/storeData/thumb/'.$data[screenshort].'"
alt="'.$data[screenshort].'" style="width:90px;"></a><div
style="text-align: center;">
<a
href="admin.php?pilih=freetemplates&amp;mod=yes&amp;aksi=view&amp;id='.$data[id].'&amp;screenshort='.$data[screenshort].'"
rel="lightbox[themes]" title="'.$data[screenshort].'">Klik to
View</a></div></td>

</tr>
<tr>

<td><b>Nama</b></td>
<td>:</td>
<td>'.$data[nama].'</td>
</tr>
<tr>
<td><b>Versi</b></td>
<td>:</td>
<td>AuraCMS Versi '.$data[versi].'</td>
</tr>
<tr>
<td><b>Pengirim</b></td>
<td>:</td>
<td>'.$data[pengirim].'</td>
</tr>
<tr>
<td><b>Website</b></td>
<td>:</td>
<td><a href="'.$data[website].'" target="_blank">'.$data[website].'</a></td>
</tr>
<tr>
<td valign="top"><b>Rating</b></td>
<td valign="top">:</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>Hits</b></td>
<td>:</td>
<td>'.$data[hits].' x didownload</td>
</tr>
<tr>
<td style="padding-top: 5px;"></td>
<td style="padding-top: 5px;"></td>
<td style="padding-top: 5px;"><a
href="admin.php?pilih=freetemplates&amp;mod=yes&amp;aksi=del&amp;id='.$data[id].'&amp;nama='.$data[nama].'"><img
src="images/delete_button.gif" alt="Delete"></a>
</td>
<tr>
<td colspan="4"><hr style=" border:1px solid #f2f2f2;"/></td>
</tr>
';


if(($i % $kolom) == ($kolom - 1) OR ($i + 1) == $jml_baris){
$admin .= '</tr>';
}
$no++;
}
$admin .= '</tbody></table>';
$admin .= '</div>';
// mencari jumlah semua data dalam tabel guestbook


$query = "SELECT COUNT(*) AS jumData FROM freetemplates";
$hasil = mysql_query($query);
$data = mysql_fetch_array($hasil);


$jumData = $data['jumData'];


// menentukan jumlah halaman yang muncul berdasarkan jumlah semua data


$jumoffset = ceil($jumData/$dataPeroffset);


// menampilkan link previous
$admin .= "<div align='center' class='border'>";
if ($nooffset > 1) $admin .= "<a
href='".$_SERVER['PHP_SELF']."?pilih=freetemplates&amp;mod=yes&amp;offset=".($nooffset-1)."'>&lt;&lt;
Prev</a>";


// memunculkan nomor halaman dan linknya


for($offset = 1; $offset <= $jumoffset; $offset++)
{
if ((($offset >= $nooffset - 3) && ($offset <= $nooffset + 3)) || ($offset == 1) || ($offset == $jumoffset))
{
if (($showoffset == 1) && ($offset != 2)) $admin .= "...";
if (($showoffset != ($jumoffset - 1)) && ($offset == $jumoffset)) $admin .= "...";
if ($offset == $nooffset) $admin .= " <b>".$offset."</b> ";
else $admin .= " <a
href='".$_SERVER['PHP_SELF']."?pilih=freetemplates&amp;mod=yes&amp;offset=".$offset."'>".$offset."</a>
";
$showoffset = $offset;
}
}


// menampilkan link next


if ($nooffset < $jumoffset) $admin .= "<a
href='".$_SERVER['PHP_SELF']."?pilih=freetemplates&amp;mod=yes&amp;offset=".($nooffset+1)."'>Next
&gt;&gt;</a>";
$admin .= "</div>";


}
if($_GET['aksi']=="add"){
$admin .= '<div class="border">';
if (cek_login()){


if(isset($_POST['submit'])){
$_POST = array_map('cleantext',$_POST);
$nama = $_POST['nama'];
$email = $_POST['email'];
$versi = $_POST['versi'];
$pengirim = $_POST['pengirim'];
$website = $_POST['website'];
$screenshort = $_POST['screenshort'];
$files= cleantext($_POST['files']);
$confirm_code = md5(uniqid(rand()));


$mail_blocker = explode(",", $mail_blocker);
foreach ($mail_blocker as $key => $val) {
if ($val == strtolower($email) && $val != "") $error .= "Given E-Mail the address is forbidden to use!<br />";
}
$name_blocker = explode(",", $name_blocker);
foreach ($name_blocker as $key => $val) {
if ($val == strtolower($nama) && $val != "") $error .= "Named it is forbidden to use!<br />";
}


if (!$nama || preg_match("/[^a-zA-Z0-9_-]/", $nama)) $error .=
"Error: Karakter Name tidak diizinkan kecuali a-z,A-Z,0-9,-, dan
_<br />";
if (strlen($nama) > 10) $error .= "Name Terlalu Panjang Maksimal 10 Karakter<br />";
if (strrpos($nama, " ") > 0) $error .= "Name Tidak Boleh Menggunakan Spasi";
if ($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT nama
FROM freetemplates WHERE nama='$nama'")) > 0) $error .= "Error: Name
".$nama." sudah terdaftar , silahkan ulangi.<br />";
if
($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT nama
FROM temp_freetemplates WHERE nama='$nama'")) > 0) $error .= "Error:
Name ".$nama." sudah terdaftar , silahkan ulangi.<br />";
if (!$nama) $error .= "Error: Formulir Nama belum diisi , silahkan ulangi.<br />";
if (!$nama) $error .= "Error: Formulir Nama belum diisi , silahkan ulangi.<br />";
if (empty($_POST['versi'])) $error .= "Error: Formulir versi belum diisi , silahkan ulangi.<br />";
if (empty($files)) $error .= "Error: Formulir Files belum diisi , silahkan ulangi.<br />";
if (!is_valid_email($email)) $error .= "Error: E-Mail address invalid!<br />";
if ($_POST['gfx_check'] != $_SESSION['Var_session'] or
!isset($_SESSION['Var_session'])) {$error .= "Security Code Invalid
<br />";}


if ($error){
$admin.='<div class="error">'.$error.'</div>';
}else{
$hasil1 = $koneksi_db->sql_query("INSERT INTO freetemplates (nama,
email, versi , pengirim, website,screenshort, files)VALUES('$nama',
'$email', '$versi','$pengirim','$website','$screenshort','$files')" );


if($hasil1){
$subject ="Your Add Themes Information";
$header = $email_master;
$message ="Your Themes \r\n";
$message .="<br /><br />";
$message .="Name : ".$nama." <br>versi : ".$_POST['versi']."";
$message .="<br /><br />Please Don't Replay This Email,
this is Automatic Email Because You Register in AuraCMS Member<br
/><br />";
$message .="<br /><br /><br />Regard:<br /><br />Webmaster<br />";
$sentmail = mail_send($email, $header, $subject, $message, 1, 1);


$admin.='<div class="sukses">Add Themes Success</div>';
unset($_POST);


}
}


}


$nama = !isset($nama) ? '' : $nama;
$email = !isset($email) ? '' : $email;
$versi = !isset($versi) ? '' : $versi;
$pengirim = !isset($pengirim) ? '' : $pengirim;
$website = !isset($screenshort) ? '' : $screenshort;
$screenshort = !isset($website) ? '' : $website;
$files= !isset($files) ? '' : $files;
$admin .= '
<form method="post" action="" enctype="multipart/form-data">
<br>
<table width="100%">
<tbody><tr>
<td style="padding-bottom: 5px;">Email*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="email" type="text" size="33" /></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Website</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="website" size="33" type="text"></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Nama*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="nama"
type="text" size="33"
value="'.cleantext(stripslashes(@$_POST['nama'])).'" /></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Versi*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="versi" size="33" type="text"></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Files*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="files" size="33" type="text"></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Screenshort</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="screenshort"
class="text" size="33" type="text"
value="screenshort.jpg"></td>
</tr><tr>
<td style="padding-bottom: 5px;">Pengirim</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="pengirim" size="33" maxlength="20" type="text"></td>
</tr>';
if (extension_loaded("gd")) {
$admin .= '
<tr>
<td></td>
<td></td>
<td><img src="includes/code_image.php" border="1" alt="Security Code" /></td>
</tr>
<tr>
<td style="padding-bottom: 5px;">Key kode*</td>
<td style="padding-bottom: 5px; padding-right: 5px; padding-left: 5px;">:</td>
<td style="padding-bottom: 5px;"><input name="gfx_check" size="8" maxlength="20" type="text"></td>
</tr>';
}
$admin .= '
<tr>
<td></td>
<td></td>
<td><input value="Submit" name="submit"
type="hidden"><input src="mod/freetemplates/images/submit.gif"
name="submit" value="Sumbit" type="image"></td>
</tr>
</tbody></table>
</form> ';


} else {
$admin .= '<div class="error">Anda Mesti Login, atau register jika blm punya account</div>';
$style_include[] ='<meta http-equiv="refresh" content="3; admin.php?pilih=user&aksi=register" />';
}
$admin .= '</div>';
}
if($_GET['aksi']=="view"){
$admin .= '<div align="center" class="border">';
$screenshort = int_filter($_GET['screenshort']);
$id = int_filter($_GET['id']);
$hasil = $koneksi_db->sql_query("select * from freetemplates where id='$id'");
$data = $koneksi_db->sql_fetchrow($hasil);
$admin .= '<img src="mod/freetemplates/storeData/normal/'.$data[screenshort].'" alt="'.$data[screenshort].'"
style="
background-color: #313b44;
border: 1px solid #2b353e;
padding: 7px;
margin: 0px 0px 0px 0px;
max-width:400px;
min-width:300px;">';
$admin .= '</div>';
}
if($_GET['aksi']=="del"){
$id = int_filter($_GET['id']);
$hasil = $koneksi_db->sql_query("DELETE FROM freetemplates WHERE id='$id'");
if($hasil){
$admin.='<div class="sukses">Themes telah di delete! .</div>';
$style_include[] ='<meta http-equiv="refresh" content="3; url=admin.php?pilih=freetemplates&amp;mod=yes" />';
}
}


$admin .= '</div>';
echo $admin;
?>



lalu save.


untuk melihat silahkan masukkan pada adress browser kesayangan anda
"http://localhost/auracms/admin.php?plih=freetemplates&mod=yes"
tanpa tanda petik (") sebelumnya anda harus log admin.


lihat sreenshort berikut:



8. untuk databasenya sebagai berikut:




--
-- Table structure for table `freetemplates`
--

CREATE TABLE `freetemplates` (
  `id` int(12) NOT NULL auto_increment,
  `email` varchar(225) NOT NULL,
  `nama` varchar(225) NOT NULL,
  `versi` varchar(30) NOT NULL,
  `pengirim` varchar(30) NOT NULL,
  `website` varchar(225) NOT NULL,
  `hits` int(11) NOT NULL,
  `files` varchar(225) NOT NULL,
  `screenshort` varchar(225) NOT NULL default 'screenshort.jpg',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `freetemplates`
--

INSERT INTO `freetemplates` VALUES (1, 'id.hpaherba@yahoo.com', 'Refresh', '2.2.2', 'Ismail Marzuki', 'http://www.kera-ngalam.com', 1, 'http://www.ziddu.com', 'Refresh.jpg');
INSERT INTO `freetemplates` VALUES (3, 'id.hpaherba@yahoo.co.id', 'contoh', '2.2.2', 'eko', 'http://www.aurathemes.com', 0, 'http://www.ziddu.com', 'screenshort.jpg');




jika anda repot untuk membuatnya silahkan anda login dan download modulnya


kirim ke teman | versi cetak

Share |

Berita "" Lainnya