2008-11-26 22:50:40 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* AgileBill - Open Billing Software
|
|
|
|
*
|
|
|
|
* This body of work is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the Open AgileBill License
|
|
|
|
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
2009-08-03 04:10:16 +00:00
|
|
|
*
|
|
|
|
* Originally authored by Tony Landis, AgileBill LLC
|
|
|
|
*
|
|
|
|
* Recent modifications by Deon George
|
|
|
|
*
|
|
|
|
* @author Deon George <deonATleenooksDOTnet>
|
|
|
|
* @copyright 2009 Deon George
|
|
|
|
* @link http://osb.leenooks.net
|
2008-11-26 22:50:40 +00:00
|
|
|
*
|
|
|
|
* @link http://www.agileco.com/
|
|
|
|
* @copyright 2004-2008 Agileco, LLC.
|
|
|
|
* @license http://www.agileco.com/agilebill/license1-4.txt
|
2009-08-03 04:10:16 +00:00
|
|
|
* @author Tony Landis <tony@agileco.com>
|
2008-11-26 22:50:40 +00:00
|
|
|
* @package AgileBill
|
2009-08-03 04:10:16 +00:00
|
|
|
* @subpackage Module:StaticPage
|
2008-11-26 22:50:40 +00:00
|
|
|
*/
|
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
/**
|
|
|
|
* The main AgileBill Static Page Translation Class
|
|
|
|
*
|
|
|
|
* @package AgileBill
|
|
|
|
* @subpackage Module:StaticPage
|
|
|
|
*/
|
|
|
|
class static_page_translate extends OSB_module {
|
|
|
|
/**
|
|
|
|
* Get a translated page
|
|
|
|
*/
|
|
|
|
public function get_translated_page($VAR) {
|
|
|
|
$db = &DB();
|
|
|
|
|
|
|
|
if (! isset($VAR['id']) || ! isset($VAR['language_id']))
|
|
|
|
return array();
|
|
|
|
|
|
|
|
$result = $db->Execute(sqlSelect($db,'static_page_translate','body_intro,title,body_full',array('static_page_id'=>$VAR['id'],'language_id'=>$VAR['language_id'])));
|
|
|
|
if ($result && $result->RecordCount() == 1)
|
|
|
|
return array('title'=>$result->fields['title'],'intro'=>$result->fields['body_intro'],'body'=>$result->fields['body_full']);
|
2008-11-26 22:50:40 +00:00
|
|
|
}
|
|
|
|
}
|
2009-08-03 04:10:16 +00:00
|
|
|
?>
|