Testimonial'; if (isset($_POST['submit'])) { $nama = text_filter($_POST['nama']); $alamat = text_filter($_POST['alamat']); $pesan = nl2br(text_filter($_POST['pesan'], 2)); $error = ''; if (!$nama) $error .= "Error: Please enter your name!
"; if (!$pesan) $error .= "Error: Please enter a message!
"; if (!$alamat) $error .= "Error: Please enter your Address!
"; if ($error) { $tengah.='
'.$error.'

'; } else { $insert = mysql_query ("INSERT INTO `komentar` (`nama`,`alamat`,`komentar`,`published`) VALUES ('$nama','$alamat','$pesan','0')"); $tengah.='
Thank you. Your comment has been sent! We will activated to you as soon as possible.
'; unset($nama); unset($alamat); unset($pesan); } } $nama = !isset($nama) ? '' : $nama; $alamat = !isset($alamat) ? '' : $alamat; $pesan = !isset($pesan) ? '' : $pesan; $tengah .='
'; $tengah .= "
"; $tengah .= "
Name :
Address :
Tell us your experience with IndoFlorist :
"; $tengah .='
'; $query = $koneksi_db->sql_query( "SELECT * FROM komentar WHERE published=1"); $jumlah = $koneksi_db->sql_numrows($query); if($jumlah < 1){ $tengah .= '

Empty Testimonial'; }else{ $limit = 15; $a = new paging_s ($limit,$web.'testimonial/'.$id.'/',''); if (empty($_GET['offset']) and !isset ($_GET['offset'])) { $offset = 0; }else { $offset = int_filter ($_GET['offset']); } $query1 = $koneksi_db->sql_query( "SELECT * FROM komentar WHERE published=1 ORDER BY id DESC LIMIT $offset,$limit"); $tengah .= '
'; $tengah .= '
'; while($data = $koneksi_db->sql_fetchrow($query1)){ if (!isset($warna)) $warna = 'style="background:#f6f6eb"'; else $warna = null; $tengah .= '
Name:'.$data['nama'].'
Address:'.$data['alamat'].'
Comment:'.$data['komentar'].'

'; } $tengah .= ''; $tengah .='
'; } $title_testi = 'Testimonial : '.$title; $keyword_shop = 'Testimonial , '.$keyword; $variable = array ( 'tengah' => $tengah, 'kanan' => $kanan, 'kiri' => $kiri, 'header' => $kepala, 'footer' => $buntut, 'title' => $title_testi, 'keyword' => $keyword_testi, 'description' => $description, 'web' => $web ); $tpl = new template ($GLOBALS['themes']['theme']); $tpl->define_tag ($variable); $tpl->cetak (); ?>