...

View Full Version : Convert php to smarty script



codingpassion
09-15-2011, 10: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 :

---------

<?
session_start();

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

if(!aff_check_security())
{
aff_redirect('index.php');
exit;
}

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";

?>


---------



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum