xauen Posted September 19, 2012 Share Posted September 19, 2012 I have a custom Admin Services Tab function in our module. It is not getting errors on page but it is not showing on the Admin Product/Services tab (image link http://prntscr.com/fto3h). My WHMCS install is version 5.03 Please see below the module code: function thismodule_AdminServicesTabFields($params) { $link = mysql_connect($params["configoption1"], $params["configoption3"], $params["configoption4"]); if (!$link) { return 'Could not connect to MySQL'; } # Select DB $db_select = mysql_select_db($params["configoption2"], $link); if (!$db_select) { return 'Could not select database'; } # Select row from database $sql1 = mysql_query("SELECT `port` FROM `userdata` WHERE `username` = '".$params["username"]."'", $link); $sql2 = mysql_query("SELECT `port2` FROM `userdata` WHERE `username` = '".$params["username"]."'", $link); $sql3 = mysql_query("SELECT `port3` FROM `userdata` WHERE `username` = '".$params["username"]."'", $link); if (!$sql1) { return 'Could not select row from database '.mysql_error($link); } else { return 'success'; } $fieldsarray = array( 'Field 1' => '<input type="text" name="modulefields[0]" size="30" value="'.$sql1.'" />', 'Field 2' => '<input type="text" name="modulefields[1]" size="30" value="'.$sql2.'" />', 'Field 3' => '<input type="text" name="modulefields[2]" size="30" value="'.$sql3.'" />', ); return $fieldsarray; } Hope you can help me with this 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.