- Beranda
- Komunitas
- Tech
- Programmer Forum
<Ask>ada yang tahu tentang configure xampp??
TS
wahyudoank
<Ask>ada yang tahu tentang configure xampp??
permisi gan,,
ane mau tanya ane,sebelumnya ane jalanin aplikasi php, di phptriad 2.2.1 & OS XP berjalan lancar jaya, tapi berhubung ada migrasi OS k'windows 7 maka ane pake xampp 1.6 buat jalanin aplikasi PHP tsb,
ada yang ane setting di xampp yang sebelumnya aplikasi tsb ga bisa jalan,
1. short open tag ane ubah jadi on
2. ane buat file .htaccess "php_flag register_globals on"
jadi setelah ane lakuin cara tsb di xampp,aplikasi berjalan lancar,tapi javascript nya ga jalan,sepertinya ada yang kurang configurasi di xampp nya,,,tapi ane ga tahu dimana nya,,,,
sebelumnya mkasih para agan" yang bersedia mau membantu ane...
berikut kode script nya
ane mau tanya ane,sebelumnya ane jalanin aplikasi php, di phptriad 2.2.1 & OS XP berjalan lancar jaya, tapi berhubung ada migrasi OS k'windows 7 maka ane pake xampp 1.6 buat jalanin aplikasi PHP tsb,
ada yang ane setting di xampp yang sebelumnya aplikasi tsb ga bisa jalan,
1. short open tag ane ubah jadi on
2. ane buat file .htaccess "php_flag register_globals on"
jadi setelah ane lakuin cara tsb di xampp,aplikasi berjalan lancar,tapi javascript nya ga jalan,sepertinya ada yang kurang configurasi di xampp nya,,,tapi ane ga tahu dimana nya,,,,
sebelumnya mkasih para agan" yang bersedia mau membantu ane...
berikut kode script nya
Spoiler for show:
<html>
<head>
<title>Daftar Cabang</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
[removed]
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
function mClk(src) {
if(event.srcElement.tagName=='TD'){
src.children.tags('A')[0].click();
}
}
[removed]
<style type="text/css">
<!--
body,td,th {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
color: #333333;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.keliling {
border: #6699CC; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 1px
}
.kelilingputih {
border: #ffffff; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 1px
}
.headher {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 12px;
color: #666600;
}
.kotak {
BORDER: #666600; BORDER-LEFT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid;
}
.box {
BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #cccccc 1px
solid; COLOR: #000066; BORDER-BOTTOM: #cccccc 1px solid; FONT-FAMILY: Trebuchet MS, Arial, Helvetica, serif;
}
.tombolbox {
BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 10px; BORDER-LEFT: #cccccc 1px
solid; COLOR: #000066; BORDER-BOTTOM: #cccccc 1px solid; FONT-FAMILY: Trebuchet MS, Arial, Helvetica, serif;
}
.textbox {
BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid;
COLOR: #999999;
BORDER-BOTTOM: #999999 1px solid; FONT-FAMILY: Trebuchet MS, Arial, Helvetica, serif;; background-color:#ebebeb;
}
.mix {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-TOP: 1px; PADDING-BOTTOM: 1px;
}
.mix2 {
PADDING-RIGHT: 2px; PADDING-LEFT: 2px;
}
.right {
PADDING-RIGHT: 2px;
}
.tdright {
PADDING-RIGHT: 5px;
}
.left {
PADDING-LEFT: 5px;
}
.pages {
PADDING-LEFT: 10px;
color: #ffffff;
}
.head {
PADDING-RIGHT: 20px;
}
.note {
PADDING-RIGHT: 20px;
}
a {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
color: #000000;
}
a:link {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
}
a:visited {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
color: #000000;
}
a:hover {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
color: #FF0000;
text-decoration: none;
}
a:active {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
color: #3361A1;
}
-->
</style>
</head>
<body>
<table align="center" width="100%" border="0" height="100%">
<tr>
<td valign="middle" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="300" width="300">
<tr>
<td height="300">
<table border="0" cellspacing="0" cellpadding="0" height="300" class="keliling">
<tr>
<td width="300" valign="top">
<table border="0" cellspacing="0" cellpadding="0" height="20" class="kelilingputih">
<tr>
<td bgcolor="#6699CC" align="center" height="20" width="30">
<font color="#FFFFFF">No.</font></td>
<td width="1"></td>
<td bgcolor="#6699CC" align="center" height="20" width="70">
<font color="#FFFFFF">Kode</font></td>
<td width="1"></td>
<td bgcolor="#6699CC" align="center" height="20" width="200" >
<font color="#FFFFFF">Cabang</font></td>
</tr>
<tr>
<td height="1" colspan="5"></td>
</tr>
<?php
include "Koneksi.php";
$limit=6;
if (empty($halaman))
{
$offset=0;
$halaman=1;
} else {
$offset=($halaman-1)*$limit;
}
$no=$offset+1;
$color=1;
$sql=mysql_query("SELECT * FROM Profile ORDER BY KodeCabang
LIMIT $offset, $limit");
While ($data=mysql_fetch_array($sql))
{
if ($color==1)
{
?>
<tr>
<td bgcolor=#B6CEE7 align=center colspan=2><?php echo"$no"; ?></td>
<td bgcolor=#B6CEE7 align=center height=20 width=70 colspan=2>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[KodeCabang]"; ?>
</a></td>
<td bgcolor=#B6CEE7 align=left height=20 width=200>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[NamaCabang]"; ?>
</a></td>
</tr>
<tr>
<td height=1 colspan=5></td>
</tr>
<?php
$no=$no+1;
$color=$color+1;
} else {
?>
<tr>
<td bgcolor=#ffffff align=center colspan=2><?php echo"$no"; ?></td>
<td bgcolor=#ffffff align=center height=20 width=70 colspan=2>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[KodeCabang]"; ?>
</a></td>
<td bgcolor=#ffffff align=left height=20 width=200>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[NamaCabang]"; ?>
</a></td>
</tr>
<tr>
<td height=1 colspan=5></td>
</tr>
<?php
$no=$no+1;
$color=$color-1;
}
}
?>
</table>
</td>
</tr>
<tr>
<td valign="bottom" height="20">
<table border="0" cellspacing="0" cellpadding="0" height="20" class="kelilingputih">
<tr>
<?php
$sql = mysql_query("SELECT * FROM Profile ORDER BY KodeCabang");
$limit=12;
if (empty($halaman))
{
$offset=0;
$halaman=1;
} else {
$offset=($halaman-1)*$limit;
}
$jumlahbaris = mysql_num_rows($sql);
$total = ceil($jumlahbaris/$limit);
echo"<td bgcolor=#6699CC width=198 class=pages><font color=#FFFFFF>
Pages $halaman Of $total</font></td>";
if ($total!=1)
{
if (($halaman!=$total) && ($halaman ==1))
{
$next=$halaman+1;
echo"<td width=51 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Next</a></font></td>";
}
if (($halaman!=$total) && ($halaman !=1))
{
$prev=$halaman-1;
$next=$halaman+1;
echo"<td width=1 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Back</a></font></td>
<td width=1 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Next</a></font></td>";
}
if ($halaman==$total)
{
$prev=$halaman-1;
echo"<td width=51 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Back</a></font></td>";
}
} else {
echo"<td width=51 bgcolor=#6699CC colspan=2>
<td width=51 bgcolor=#6699CC colspan=2></td>";
}
?>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
[removed]
function pilih(kodecabang, namacabang)
{
parent.opener.document.myform.kodecabang.value=kodecabang;
parent.opener.document.myform.namacabang.value=namacabang;
self.close();
}
[removed]
</body>
</html>
<head>
<title>Daftar Cabang</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
[removed]
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
function mClk(src) {
if(event.srcElement.tagName=='TD'){
src.children.tags('A')[0].click();
}
}
[removed]
<style type="text/css">
<!--
body,td,th {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
color: #333333;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.keliling {
border: #6699CC; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 1px
}
.kelilingputih {
border: #ffffff; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 1px
}
.headher {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 12px;
color: #666600;
}
.kotak {
BORDER: #666600; BORDER-LEFT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid;
}
.box {
BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #cccccc 1px
solid; COLOR: #000066; BORDER-BOTTOM: #cccccc 1px solid; FONT-FAMILY: Trebuchet MS, Arial, Helvetica, serif;
}
.tombolbox {
BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 10px; BORDER-LEFT: #cccccc 1px
solid; COLOR: #000066; BORDER-BOTTOM: #cccccc 1px solid; FONT-FAMILY: Trebuchet MS, Arial, Helvetica, serif;
}
.textbox {
BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid;
COLOR: #999999;
BORDER-BOTTOM: #999999 1px solid; FONT-FAMILY: Trebuchet MS, Arial, Helvetica, serif;; background-color:#ebebeb;
}
.mix {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-TOP: 1px; PADDING-BOTTOM: 1px;
}
.mix2 {
PADDING-RIGHT: 2px; PADDING-LEFT: 2px;
}
.right {
PADDING-RIGHT: 2px;
}
.tdright {
PADDING-RIGHT: 5px;
}
.left {
PADDING-LEFT: 5px;
}
.pages {
PADDING-LEFT: 10px;
color: #ffffff;
}
.head {
PADDING-RIGHT: 20px;
}
.note {
PADDING-RIGHT: 20px;
}
a {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
color: #000000;
}
a:link {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
}
a:visited {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
color: #000000;
}
a:hover {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
color: #FF0000;
text-decoration: none;
}
a:active {
font-family: Trebuchet MS, Arial, Helvetica, serif;
font-size: 11px;
text-decoration: none;
color: #3361A1;
}
-->
</style>
</head>
<body>
<table align="center" width="100%" border="0" height="100%">
<tr>
<td valign="middle" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="300" width="300">
<tr>
<td height="300">
<table border="0" cellspacing="0" cellpadding="0" height="300" class="keliling">
<tr>
<td width="300" valign="top">
<table border="0" cellspacing="0" cellpadding="0" height="20" class="kelilingputih">
<tr>
<td bgcolor="#6699CC" align="center" height="20" width="30">
<font color="#FFFFFF">No.</font></td>
<td width="1"></td>
<td bgcolor="#6699CC" align="center" height="20" width="70">
<font color="#FFFFFF">Kode</font></td>
<td width="1"></td>
<td bgcolor="#6699CC" align="center" height="20" width="200" >
<font color="#FFFFFF">Cabang</font></td>
</tr>
<tr>
<td height="1" colspan="5"></td>
</tr>
<?php
include "Koneksi.php";
$limit=6;
if (empty($halaman))
{
$offset=0;
$halaman=1;
} else {
$offset=($halaman-1)*$limit;
}
$no=$offset+1;
$color=1;
$sql=mysql_query("SELECT * FROM Profile ORDER BY KodeCabang
LIMIT $offset, $limit");
While ($data=mysql_fetch_array($sql))
{
if ($color==1)
{
?>
<tr>
<td bgcolor=#B6CEE7 align=center colspan=2><?php echo"$no"; ?></td>
<td bgcolor=#B6CEE7 align=center height=20 width=70 colspan=2>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[KodeCabang]"; ?>
</a></td>
<td bgcolor=#B6CEE7 align=left height=20 width=200>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[NamaCabang]"; ?>
</a></td>
</tr>
<tr>
<td height=1 colspan=5></td>
</tr>
<?php
$no=$no+1;
$color=$color+1;
} else {
?>
<tr>
<td bgcolor=#ffffff align=center colspan=2><?php echo"$no"; ?></td>
<td bgcolor=#ffffff align=center height=20 width=70 colspan=2>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[KodeCabang]"; ?>
</a></td>
<td bgcolor=#ffffff align=left height=20 width=200>
<a href='[removed]pilih("<?php echo"$data[KodeCabang]"; ?>","<?php echo"$data[NamaCabang]"; ?>")'><?php echo"$data[NamaCabang]"; ?>
</a></td>
</tr>
<tr>
<td height=1 colspan=5></td>
</tr>
<?php
$no=$no+1;
$color=$color-1;
}
}
?>
</table>
</td>
</tr>
<tr>
<td valign="bottom" height="20">
<table border="0" cellspacing="0" cellpadding="0" height="20" class="kelilingputih">
<tr>
<?php
$sql = mysql_query("SELECT * FROM Profile ORDER BY KodeCabang");
$limit=12;
if (empty($halaman))
{
$offset=0;
$halaman=1;
} else {
$offset=($halaman-1)*$limit;
}
$jumlahbaris = mysql_num_rows($sql);
$total = ceil($jumlahbaris/$limit);
echo"<td bgcolor=#6699CC width=198 class=pages><font color=#FFFFFF>
Pages $halaman Of $total</font></td>";
if ($total!=1)
{
if (($halaman!=$total) && ($halaman ==1))
{
$next=$halaman+1;
echo"<td width=51 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Next</a></font></td>";
}
if (($halaman!=$total) && ($halaman !=1))
{
$prev=$halaman-1;
$next=$halaman+1;
echo"<td width=1 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Back</a></font></td>
<td width=1 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Next</a></font></td>";
}
if ($halaman==$total)
{
$prev=$halaman-1;
echo"<td width=51 bgcolor=#6699CC colspan=2></td>
<td width=1></td>
<td bgcolor=#6699CC width=50 align=center
>
<font color=#FFFFFF>
<a >Back</a></font></td>";
}
} else {
echo"<td width=51 bgcolor=#6699CC colspan=2>
<td width=51 bgcolor=#6699CC colspan=2></td>";
}
?>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
[removed]
function pilih(kodecabang, namacabang)
{
parent.opener.document.myform.kodecabang.value=kodecabang;
parent.opener.document.myform.namacabang.value=namacabang;
self.close();
}
[removed]
</body>
</html>
0
1.2K
Kutip
1
Balasan
Komentar yang asik ya
Urutan
Terbaru
Terlama
Komentar yang asik ya
Komunitas Pilihan