class views_task_templates
{
public $id;
public $style;
public $style_table_width;
public $style_left;
public $results;
public function __construct($context)
{
$this->id = $context['id'];
$this->style = $context['style'];
}
public function set()
{
global $database;
$results = common_task_templates::get_details($this->id);
$this->results =& $results;
return $this;
}
public function details()
{
extract($this->results);
?>
return $this;
}
public function view()
{
?>
$this->details();
?>
return $this;
}
public function view_pdf()
{
$this->client_details();
?>
$this->details();
?>
$this->items();
?>
$this->notes();
?>
$this->payment_info();
?>
$this->terms();
return $this;
}
public function view_email()
{
$this->style_table_width = 'style="width:800px;"';
$this->style_left = 'style="width:150px;"';
$this->client_details();
?>
$this->details();
?>
$this->items();
?>
$this->notes();
?>
$this->payment_info();
?>
$this->terms();
return $this;
}
}
?>