diff --git a/workflow/engine/classes/class.jrml.php b/workflow/engine/classes/class.jrml.php index 4915a3def..813ec7e08 100755 --- a/workflow/engine/classes/class.jrml.php +++ b/workflow/engine/classes/class.jrml.php @@ -1,6 +1,8 @@ . + * along with this program. If not, see . * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ - /** * Jrml - Jrml class + * * @package workflow.engine.ProcessMaker * @author Maborak * @copyright 2008 COLOSA */ -class Jrml +class Jrml { - public $rows; - public $sql; - private $data; - - /** - * This function is the constructor of the class Jrml - * @param array $data - * @return void - */ - function __construct($data=array()) - { - $this->data = $data; - $this->sql = $data['sql']; - $this->rows = $this->get_rows($data['type']); - $this->md = $this->get_md(); - } - - /** - * This function is for get rows - * @param array $a - * @return array - */ - private function get_rows($a) - { - $b=array(); - foreach ($a as $key=>$value){ - $b[]=$key; - } - return $b; - } - - public function get_md() - { - } - - /** - * This function is for get the header - * @return string - */ - public function get_header() - { - $xml="sql}]]>"; - foreach ($this->data['type'] as $key=>$value) + public $rows; + public $sql; + private $data; + + /** + * This function is the constructor of the class Jrml + * + * @param array $data + * @return void + */ + function __construct ($data = array()) { - $xml.=""; + $this->data = $data; + $this->sql = $data['sql']; + $this->rows = $this->get_rows( $data['type'] ); + $this->md = $this->get_md(); } - $xml.=""; - $xml.=' + + /** + * This function is for get rows + * + * @param array $a + * @return array + */ + private function get_rows ($a) + { + $b = array (); + foreach ($a as $key => $value) { + $b[] = $key; + } + return $b; + } + + public function get_md () + { + } + + /** + * This function is for get the header + * + * @return string + */ + public function get_header () + { + $xml = "sql}]]>"; + foreach ($this->data['type'] as $key => $value) { + $xml .= ""; + } + $xml .= ""; + $xml .= ' <band height="58"> <line> @@ -95,64 +99,65 @@ class Jrml <textElement textAlignment="Center"> <font size="26" isBold="true"/> </textElement> - <text><![CDATA['.$this->data['title'].']]></text> + <text><![CDATA[' . $this->data['title'] . ']]></text> </staticText> </band> - '; - return $xml; - } - - /** - * This function is for get a column of the header - * @return string - */ - public function get_column_header() - { - $xml=""; - $w = (int)($this->data['columnWidth']/sizeof($this->rows)); - $i=0; - foreach ($this->data['type'] as $key=>$value) + '; + return $xml; + } + + /** + * This function is for get a column of the header + * + * @return string + */ + public function get_column_header () { - $xml.=" + $xml = ""; + $w = (int) ($this->data['columnWidth'] / sizeof( $this->rows )); + $i = 0; + foreach ($this->data['type'] as $key => $value) { + $xml .= " "; - $i=$i+$w; + $i = $i + $w; + } + $xml .= " "; + return $xml; } - $xml.=" "; - return $xml; - } - - /** - * This function is for get the detail - * @return string - */ - public function get_detail() - { - $xml=''; - $w = (int)($this->data['columnWidth']/sizeof($this->rows)); - $i=0; - foreach ($this->data['type'] as $key=>$value) + + /** + * This function is for get the detail + * + * @return string + */ + public function get_detail () { - $xml.=""; - $i=$i+$w; + $xml = ''; + $w = (int) ($this->data['columnWidth'] / sizeof( $this->rows )); + $i = 0; + foreach ($this->data['type'] as $key => $value) { + $xml .= ""; + $i = $i + $w; + } + $xml .= ''; + return $xml; } - $xml.=''; - return $xml; - } - - /** - * This function is for get the footer - * @return string - */ - public function get_footer() - { - $xml=' + + /** + * This function is for get the footer + * + * @return string + */ + public function get_footer () + { + $xml = ' @@ -201,22 +206,23 @@ class Jrml '; - return $xml; - } - - /** - * This function is for export - * @return string - */ - public function export() - { - $xml=' - '; - $xml.=$this->get_header(); - $xml.=$this->get_column_header(); - $xml.=$this->get_detail(); - $xml.=$this->get_footer(); - $xml.=''; - return $xml; - } + return $xml; + } + + /** + * This function is for export + * + * @return string + */ + public function export () + { + $xml = ' + '; + $xml .= $this->get_header(); + $xml .= $this->get_column_header(); + $xml .= $this->get_detail(); + $xml .= $this->get_footer(); + $xml .= ''; + return $xml; + } } \ No newline at end of file