<?php defined('SYSPATH') or die('No direct access allowed.');

/**
 * This class is able to interact with TPP
 *
 * @package    OSB
 * @subpackage Service
 * @category   Helpers
 * @author     Deon George
 * @copyright  (c) 2010 Open Source Billing
 * @license    http://dev.osbill.net/license.html
 */
class Service_Domain_PlanetDomain extends Service_Domain {
	private $login_acnt_field = '';
	private $login_user_field = 'login.username';
	private $login_pass_field = 'login.password';

	// Our required abstract classes
	public function manage_button($u,$p,$d) {
		$output = '';

		$output .= Form::open(
			sprintf('%s/%s',$this->so->whitelabel_url,'newdnr/action/user/login.jsp'),
			array('target'=>'pd','method'=>'post')
		);
		$output .= Form::input($this->login_user_field,$u,array('type'=>'hidden'));
		$output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden'));
		$output .= Form::input('page.next',sprintf('/newdnr/action/dns/getDNSDetails.jsp?domain.name=%s',$d),array('type'=>'hidden'));
		$output .= Form::button('submit',_('Manage'),array('class'=>'form_button'));
		$output .= Form::close();

		return $output;
	}
}
?>
