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

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

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

		$output .= Form::open(
			sprintf('%s/%s',$this->so->manage_url,'login_up.php3'),
			array('target'=>'w24','method'=>'post','id'=>'manage')
		);
		$output .= Form::input($this->login_user_field,$u,array('type'=>'hidden','id'=>'u'));
		$output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden','id'=>'p'));
		$output .= Form::close();
		$output .= Form::button('submit',_('Manage'),array('class'=>'form_button'));

		return $output;
	}
}
?>
