Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Convert php to smarty script

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

    ?>


    ---------
    Last edited by codingpassion; 09-15-2011 at 10:24 AM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •