View Full Version : Convert php to smarty script

09-15-2011, 09:57 AM
Hello guys, sorry i'm new here..juz need help to convert Php script into smart script..actually, i create custom my own Affiliate script but i need to intergrate with other script ( smarty script )..so i need to make them work together but i got some difficulty to merged it.so i need to make my php script become smarty script..hope u'll can help me..this is the script :



include "../affconfig.php";
include "./lang/$language";


include "header.php";

mysql_connect($server, $db_user, $db_pass)
or die ("Database CONNECT Error (line 20)");
$result = mysql_db_query($database, "select * from clickthroughs where refid = '".$_SESSION['aff_valid_user']."' ORDER BY date and time")
or die ("Database INSERT Error");

echo "<br><br><font face=arial>".AFF_C_CLICKS.": ";
print mysql_num_rows($result);
print "<br><br>";

if (mysql_num_rows($result))
echo "<font face=arial><TABLE border=1 cellspacing=0 cellpadding=3>";
echo "<TR><TH>".AFF_G_DATE."</TH><TH>".AFF_G_TIME."</TH>";
echo "<TH>".AFF_C_REFERREDFROM."</TH></TR>";
while ($qry = mysql_fetch_array($result))
print "<TR>";
print "<TD><font size=2>";
print $qry[date];
print "</TD>";
print "<TD><font size=2>";
print $qry[time];
print "</TD>";
print "<TD><font size=2>";
print $qry[refferalurl];
print "</TD>";
print "</TR>";
print "</TABLE>";

include "footer.php";