Jump to content

Create my own Domain name Price Listing Page


Sandbird

Recommended Posts

Hi, I am having problems making a php page that will output the domain names and their prices on a table.

 

I got this code from a tpl file:

 

{foreach key=num item=tldpricelist from=$tldpricelist}
<tr class="clientareatableactive"><td>{$tldpricelist.tld}</td><td>{$tldpricelist.period}</td><td>{if $tldpricelist.register}{$tldpricelist.register}{else}{$LANG.domainregnotavailable}{/if}</td><td>{if $tldpricelist.transfer}{$tldpricelist.transfer}{else}{$LANG.domainregnotavailable}{/if}</td><td>{if $tldpricelist.renew}{$tldpricelist.renew}{else}{$LANG.domainregnotavailable}{/if}</td></tr>
{/foreach}

 

and i am trying to make the php file.

 

function getDomains()
{
   $query = mysql_query("SELECT d.id, d.extension 'tld', t.type, c.code, c.suffix, t.msetupfee FROM tbldomainpricing AS d
       INNER JOIN tblpricing AS t ON t.relid = d.id
       INNER JOIN tblcurrencies AS c ON c.id = t.currency
       WHERE t.type IN ('domainregister','domaintransfer','domainrenew') ORDER BY d.id ASC");
   $dataArray=array();
   while($row = @mysql_fetch_array($query, MYSQL_ASSOC)) {
       $dataArray[$row['tld']][$row['type']]=$row;
   }
   return $dataArray;
}

$mydata = getDomains();
$smartyvalues["tldpricelist"] = $mydata; 

 

But i notices that the period of the domain names is nowhere to be found in the database.

For example i have set some names on a minimum of 2 years registration, renewal period...but i cant find this value anywhere in the database.

Can someone provide the original SQL that produces the values for this table ?

 

TLD | Min Reg Years | Register Price | Transfer Price | Renewal Price

 

Thanks

Link to comment
Share on other sites

yeah...thats the code i use above but its not including the duration of the names (ex. .com for 2 years)...like the original function does.

The original function has that field...but it uses some complex functions to show it on the table...cause the period of a name is writen in different tables (msetupfee qsetupfee ssetupfee asetupfee bsetupfee)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated