Jump to content

domain checker joomla integration


maara

Recommended Posts

Hi guys,

 

Im trying integrate whmcs domain checker to joomla module. Can please somebody gimme a hand with integration following code:

 

<form action="http://www.mydomain.cz/cwhmcs/domainchecker.php" method="post">
<input type="hidden" name="token" value="token value" /> 
<input type="hidden" name="direct" value="true"> 
Domain: <input type="text" name="domain" size="20"> <select name="ext">
</select>
<input type="submit" value="Go"> 
</form>

 

into this code:

 

<?php




defined( '_JEXEC' ) or die( 'Restricted access' );



$tpwhois_domain 	= $params->get( 'tpwhois_domain', 'com,net,org,us,biz,info,tv,ws,cc' );

$tpwhois_domain_default_selected 	= $params->get( 'tpwhois_domain_default_selected', 'com,net' );

$tpwhois_multiple_domain 	= (int) $params->get( 'tpwhois_multiple_domain', 0 );



$Itemid = JRequest::getInt( 'Itemid' );



$selectitemid 	= $params->get( 'selectitemid', '1' );

$inputitemid 	= $params->get( 'inputitemid', '99999' );

switch ($selectitemid) {

case '2':

	$db = & JFactory::getDBO();

	$db->setQuery("SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart_tp_extended_search' AND type='component'");

	$theItemid = $db->loadResult();

	if(empty($theItemid)) {

		$theItemid = $inputitemid;

	}

	break;

case '3':

	$theItemid = $inputitemid;

	break;

default:

	$theItemid = $Itemid;

	break;

}



if($tpwhois_multiple_domain) {

?>



<div align="center">Please enter the full domains that you want to check, one per line.</div>

<div align="center">

<form name="whois_search" method="post" action="index.php">

<table>

	<tbody>

	<tr>

		<td>http://www.</td><td><textarea rows="10" cols="40" name="domain"></textarea></td>

	</tr>

	</tbody>

</table>

<input name="task" value="WhoisSearch" type="hidden" />

<input name="skip_additional" value="1" type="hidden" />

<input name="option" value="com_tpwhois" type="hidden" />

<input name="Itemid" value="<?php echo $theItemid; ?>" type="hidden"/>

<input id="Submit" value="Check Availability" type="submit" /> 

</form>

</div>



<?

} else {

?>



<div align="center">

<form name="whois_search" method="post" action="index.php">

<table>

	<tbody>

	<tr><td align="left" valign="top"><span class="tphttp">http://www.</span></td>

		<td><input name="domain" value="" class="tpwhoisinput" type="text" /><br />

<?

$domainLists = explode(",", $tpwhois_domain);

$domainSelected = explode(",", $tpwhois_domain_default_selected);



if(count($domainLists)) {

$n = 0;

foreach($domainLists as $domainList) {

	?>

			<input name="ext<?php echo $n; ?>" id="ext<?php echo $n; ?>" value="<?php echo $domainList; ?>" type="checkbox"<?php if(in_array($domainList, $domainSelected)) { echo ' checked="checked"'; } ?> />.<?php echo $domainList; ?>

	<?

	$n++;

}

}

?>

 

 

Im trying to integrate it 2 days fulltime already but no luck as Im not programmer Im just trying by my logic .... some help will be great ...

 

thanx in advance

 

David

Link to comment
Share on other sites

  • 1 year later...

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