sunita Posted December 27, 2013 Share Posted December 27, 2013 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 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.