Jump to content

Homepage hook not working


sunita

Recommended Posts

Dear sir i m trying to create a module for homepage variables. i created a hooks but its not working how i can debug.

 

code is below

function proweb_homepage_ClientAreaHomepage($vars){
$result=array();
for($i=1;$i<4;$i++){
	$sql = "SELECT triennially FROM `tblpricing` WHERE relid = ".$vars['hosting-'.$i]." AND currency = '1';";
	$sql = mysql_query($sql) or die(mysql_error());
	if(mysql_num_rows($sql) > 0)
	{
		$data = mysql_fetch_array($sql);
		$result['vars']['hosting'.$i]['price'] = number_format($data['triennially'],2);
		$result['vars']['hosting'.$i]['title']=$vars['hosting-title-'.$i];
	} 
}
for($i=1;$i<6;$i++){
	$sql = "SELECT msetupfee FROM `tblpricing` p,tbldomainpricing d WHERE p.relid =d.id and d.extension= '".$vars['tld'.$i]."' AND currency = '1';";
	$sql = mysql_query($sql);
	if(mysql_num_rows($sql) > 0)
	{
		$data = mysql_fetch_array($sql);
		$result['vars']['tld'.$i]['price'] = number_format($data['msetupfee'],2);
		$result['vars']['tld'.$i]['name']=$vars['tld'.$i];
	} 
}$result['vars']['tld']=5;
return $result;
}
add_hook("ClientAreaHomepage",1,"proweb_homepage_ClientAreaHomepage");	

 

Note: $vars are configuration variables of modules

 

thanks in advance

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