This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/domain/classes/Service/Domain/TPP.php

35 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2013-10-10 02:44:53 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class is able to interact with TPP
*
* @package Domain
* @category Service
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Service_Domain_TPP extends Service_Domain {
private $login_acnt_field = '';
private $login_user_field = 'login';
private $login_pass_field = 'password';
// Our required abstract classes
public function manage_button(Model_Service_Plugin_Domain $spdo,$t) {
$debug = FALSE;
$output = '';
$output .= Form::open(
$debug ? 'debug/site' : $this->so->manage_url,
2013-10-10 02:44:53 +00:00
array('target'=>'tpp','method'=>'post','id'=>sprintf('id_%s_%s',$spdo->service_id,$t))
);
2013-11-28 06:41:34 +00:00
$output .= Form::input($this->login_user_field,$spdo->username(),array('type'=>'hidden','id'=>sprintf('u_%s_%s',$spdo->service_id,$t)));
$output .= Form::input($this->login_pass_field,substr(md5($spdo->password()),0,8),array('type'=>'hidden','id'=>sprintf('p_%s_%s',$spdo->service_id,$t)));
2013-10-10 02:44:53 +00:00
$output .= Form::close();
$output .= Form::button('submit',_('Login'),array('class'=>'btn btn-default','value'=>sprintf('%s:%s',$spdo->service_id,$t)));
2013-10-10 02:44:53 +00:00
return $output;
}
}
?>