Skrip PHP-tukar nilai Rp kepada RM

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
Assalamualaikum dan salam sejahtera..

Saya memiliki beberapa website skrip php dari negara jiran (rasanya skrip tu popular kat sini)..saya dah berjaya mengubahsuai hampir kesemua skrip tersebut mengikut kesesuaian bahasa kita..

Malangnya saya masih buntu untuk mengubah simbol Rp (rupiah) kepada RM (ringgit malaysia)..

kalau proses ni mudah, mohon rakan-rakan tolong tunjuk ajarkan..:)
 

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
Ni salah satu contoh skrip asal..aku tercari-cari kat mana nak ubah simbol ni supaya keseluruhan nilai matawang menjadi RM..maklumlah baru nak belajar..
<?PHP
include "../database/dbbisnis.php";
mysql_connect($server, $db_user, $db_pass) or die ("Database CONNECT Error (line 102)");
$set = mysql_db_query($database, "select sum(transfer) AS total from user where reseller ='".$HTTP_SESSION_VARS['registeringuser']."'and stat=1")
or die ("Database INSERT Error");
$row = mysql_fetch_array( $set );
print rp($row['total']);

?>
 

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
aik..?? nak tukar kat mane tue..?? tukar je rupiah tue ke rm la..
Tak leh la imabiz..sebabnyer ada ruangan seperti total komisyen member tak jumpa nak ubah kat mana..kalau saya tukar kepada RM akan jadi macam kat bawah ni..

Fatal error: Call to undefined function RM() in /xxx/xxxx/public_html/xxx/xxx.php on line 150
 

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
mesti ade code yang boleh di edit di dbbisnis.php tue...
tapi dalam ruangan bisnes.php tu cuma ada ini..

<?PHP
$server = "localhost"; // (Server default 'localhost')
$db_user = "xxxxxx"; //database username
$db_pass = "xxxxxx"; //password database
$database = "xxxxxx"; // nama database mysql
$emailinfo = "xxxxxxx"; // nama email anda
$domain = "xxxxxxx"; // nama domain anda
$clientdate = (date ("d/m/y")); // Jangan di edit
$unik = (date ("2s")); // Jangan di edit
$clientbrowser = getenv("HTTP_USER_AGENT"); // Jangan di edit
$clientip = $REMOTE_ADDR; // Jangan di edit
$clienturl = getenv("HTTP_REFERER"); // Jangan di edit
?>
apakah ini bermakna saya perlu edit pada php my admin dalam cpanel?
 

kodin

Senior
Joined
Jul 6, 2006
Messages
968
Points
18
ada language file die tak? kalau takde boleh paste kat sini keseluruhan code untuk page yg gune currency RP tuh..

meh kita tolong tengok koding die satu-satu..
 

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
Ni salah satu page yang gunakan currency Rupiah ni..harap2 membantu

<?php
// Buzz inet PHPLS03 - Check User Session is set
session_start();
if(!isset($HTTP_SESSION_VARS['registeringuser'])){
header("Location: login.php");
}

$colname_member = "1";
if (isset($HTTP_SESSION_VARS['registeringuser'])) {
$colname_member = (get_magic_quotes_gpc()) ? $HTTP_SESSION_VARS['registeringuser'] : addslashes($HTTP_SESSION_VARS['registeringuser']);
}

?>
<?php require_once('../connections/bisnis.php');
require "../admin/configadmin.php";

$colname_member = "1";
if (isset($HTTP_SESSION_VARS['registeringuser'])) {
$colname_member = (get_magic_quotes_gpc()) ? $HTTP_SESSION_VARS['registeringuser'] : addslashes($HTTP_SESSION_VARS['registeringuser']);
}
mysql_select_db($database_bisnis, $bisnis);
$query_member = sprintf("SELECT * FROM user WHERE reseller ='%s' and stat=1", $colname_member);
$member = mysql_query($query_member, $bisnis) or die(mysql_error());
$row_member = mysql_fetch_assoc($member);
$totalRows_member = mysql_num_rows($member);

$colname_peme = "1";
if (isset($HTTP_SESSION_VARS['registeringuser'])) {
$colname_peme = (get_magic_quotes_gpc()) ? $HTTP_SESSION_VARS['registeringuser'] : addslashes($HTTP_SESSION_VARS['registeringuser']);
}
mysql_select_db($database_bisnis, $bisnis);
$query_peme = sprintf("SELECT * FROM user WHERE reseller = '%s 'and stat=1", $colname_peme);
$peme = mysql_query($query_peme, $bisnis) or die(mysql_error());
$row_peme = mysql_fetch_assoc($peme);
$totalRows_peme = mysql_num_rows($peme);
?>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Mainpage</TITLE>
<STYLE>A:link {
COLOR: #0000ff; TEXT-DECORATION: none
}
A:visited {
COLOR: #0000ff; TEXT-DECORATION: none
}
A:hover {
COLOR: #0000ff; TEXT-DECORATION: underline
}
</STYLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<META content=FrontPage.Editor.Document name=ProgId>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
</HEAD>
<BODY bgColor=#003366 leftMargin=0 topMargin=0 onunload=leave() marginheight="0"
marginwidth="0">
<DIV align=center>
<CENTER>
</CENTER></DIV>
<table width="95%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="770" height="15" bgcolor="#003366"> </td>
</tr>
<tr valign="top">
<td bgcolor="#FFFFFF"> <table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr valign="top">
<td height="10" bgcolor="#666666"> <p><strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF">Daftar
Member! </font><font color="#000000"><br>
</font></strong></font></strong></p></td>
</tr>
<tr valign="top">
<td height="13" bgcolor="#999999"></td>
</tr>
<tr valign="top">
<td width="100%"><table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td height="180">
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Jumlah
kunjungan yang anda hasilkan :<strong>
<? include "../database/dbbisnis.php";
mysql_connect($server, $db_user, $db_pass)
or die ("Database CONNECT Error (line 20)");
$result = mysql_db_query($database, "select * from statistik where userid= '".$_SESSION['registeringuser']."' ORDER BY date and time")
or die ("Database INSERT Error");
print mysql_num_rows($result);
if (mysql_num_rows($result))
{ while ($qry = mysql_fetch_array($result))

{}
}



?>
</strong> Kunjungan <a href="http://www.scriptreseller.us.tt/memberscript/detailkun.php">
</a> </font><br>
</p>
<table width="95%" border="1" align="center" cellspacing="0" bordercolor="#666666">
<tr bordercolor="#000000" class="butnStyle1">
<td bgcolor="#CCCCCC"> <div align="center">
<p class="butnStyle1"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">T_Pendaftaran</font></strong></p>
</div></td>
<td bgcolor="#CCCCCC"> <div align="center"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">User
id </font></strong></div></td>
<td bgcolor="#CCCCCC"> <div align="center"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">Nama</font></strong></div></td>
<td bgcolor="#CCCCCC"> <div align="center"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">email</font></strong></div></td>
<td bgcolor="#CCCCCC"> <div align="center"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">Kota</font></strong></div></td>
<td bgcolor="#CCCCCC"> <div align="center"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">Telepon</font></strong></div></td>
<td bgcolor="#CCCCCC"> <div align="center"><strong><font color="#000000" size="2" face="Arial, Helvetica, sans-serif">Transfer</font></strong></div></td>
<td bgcolor="#CCCCCC"><div align="center"><strong><font size="2" face="Arial, Helvetica, sans-serif">Blokir?</font></strong></div></td>
</tr>
<?php do { ?>
<?php if ($totalRows_peme > 0) { ?>
<tr bordercolor="#000000">
<td height="14">
<div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_peme['tanggal']; ?> </font></div></td>
<td>
<div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_peme['userid']; ?>
</font></div></td>
<td>
<div align="left"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_peme['nama']; ?> </font></div></td>
<td>
<div align="left"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_peme['email']; ?> </font></div></td>
<td>
<div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_peme['kota']; ?> </font></div></td>
<td>
<div align="left"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_peme['telepon']; ?> </font></div></td>
<td>
<div align="center"><font size="2" face="Arial, Helvetica, sans-serif">
<font color="#000000"><?php echo rp($row_peme['transfer']); ?> </font> </font></div></td>
<td><div align="center"><strong><font size="2" face="Arial, Helvetica, sans-serif"><a href="blokir.php?aff=<?php echo $row_peme['id']; ?>">Blokir</a></font></strong></div></td>
</tr>
<?php } ?>
<?php } while ($row_peme = mysql_fetch_assoc($peme)); ?>
</table>
<table width="95%" border="0" align="center" cellspacing="0">
<?php if ($totalRows_peme > 0) { ?>
<tr bgcolor="#CCCCCC">
<td width="53%"><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td width="27%"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Jumlah
Komisi anda :</strong></font></td>
<td width="20%"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><font color="#FF0000" face="Arial, Helvetica, sans-serif"><strong>
<?PHP
include "../database/dbbisnis.php";
mysql_connect($server, $db_user, $db_pass) or die ("Database CONNECT Error (line 102)");
$set = mysql_db_query($database, "select sum(transfer) AS total from user where reseller ='".$HTTP_SESSION_VARS['registeringuser']."'and stat=1")
or die ("Database INSERT Error");
$row = mysql_fetch_array( $set );
print rp($row['total']);

?></strong> </font></font> </td>
</tr>
<?php } ?>
</table>
<p>&nbsp;</p>
</td>
</tr>
</table>
<p align="left">&nbsp;</p></td>
</tr>
</table></td>
</tr>
<tr>
<td height="15">&nbsp;</td>
</tr>
</table>

</BODY></HTML>
<?php
mysql_free_result($member);

mysql_free_result($peme);

?>
 

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
dekat configadmin.php takde setting die..??
Aaa lah imabiz..memang kat situ..dah setel pun...cayalah imabiz..thanks banyak2...jasa imabiz terpahat dalam sanubariku (cewah)..

thanks jugak buat kodin dan syux yg sudi masuk thread ni..seperti kata mawi, you all memang world!!
 

Imabiz

Senior
Joined
Feb 10, 2009
Messages
13,846
Points
38
Aaa lah imabiz..memang kat situ..dah setel pun...cayalah imabiz..thanks banyak2...jasa imabiz terpahat dalam sanubariku (cewah)..

thanks jugak buat kodin dan syux yg sudi masuk thread ni..seperti kata mawi, you all memang world!!
biase nye memang mcm tue.. cari la fail yang bersangkutan.. include blabla.. cari la kat fail tersebut.. ok cayurk..
 

paktamduda

freshman
Joined
Jun 10, 2009
Messages
368
Points
16
bagusla dah setle. :)

mcm affiliate script je ;)
Memang pun..kebanyakan yg ada skrip MLM pelbagai kaki..termasuk HYIP dan reseller program:rolleyes:

tapi just untuk pembelajaran sahaja..tak lebih daripada tu..ilmu masih cetek..::cool:
 
Top