"__init_rtf(\\\$P,\\\$V,\\\$F);\\r\\n", "__samples_rtf"=>"__samples_rtf(\\\$P,\\\$V,\\\$F);\\r\\n", "__init_table_rtf"=>"__init_table_rtf(\\\$P,\\\$V,\\\$F);\\r\\n", "__row_table_rtf"=>"__row_table_rtf(\\\"\\\",\\\$P,\\\$V,\\\$F);\\r\\n", "__done_rtf"=>"\\\$V[out]=__done_rtf(\\\$P,\\\$V,\\\$F);\\r\\n", ); return $out; } function _cut_array($prefix,$arr) { $out=array(); foreach ($arr as $key=>$val) { $nkey=eregi_replace($prefix ."_","",$key) ; $out[$nkey]=$val ; } return $out ; } function __init_rtf(&$P,&$V,&$F) { $V[rtf]=new rtf(0,24,1); $V[rtf]->setPaperSize(5); $V[rtf]->setPaperOrientation(1); $V[rtf]->setDefaultFontFace(0); $V[rtf]->setDefaultFontSize(12); $V[rtf]->setAuthor("ProReports"); $V[rtf]->setOperator(""); $V[rtf]->setTitle("USERS"); $V[rtf]->addColour("#000000"); $V[rtf]->addColour("#666666"); $V[rtf]->addColour("#00ff00"); $V[rtf]->addColour("#ffffff"); } function __samples_rtf(&$P,&$V,&$F) { $V[img]=$V[rtf]->imageContent("../rep/files/logoprot.png",3,1); $V[rtf]->addText("{\header\fs20 $V[img] List of ProReports users}{\footer\fs12The first line of the footer\line The second line of the footer\line Page:\chpgn}"); $V[rtf]->addText("{\fs12

List of ProReports users

}"); $V[rtf]->addText("{\fs12

List of ProReports users

}"); $V[rtf]->addText("{\fs12

List of ProReports users

}"); $V[rtf]->addText("{\fs12 }

"); $V[rtf]->addText("{\fs12 Sample text - bold}
"); $V[rtf]->addText("{\fs12 Sample text - underlined}
"); $V[rtf]->addText("{\fs12 \cf3Sample text - in a different color}
"); $V[rtf]->addText("{\fs12 Sample text - crossed}
"); $V[rtf]->addText("{\fs12 Sample text - leaning }

"); $V[rtf]->addText("{\pard\fs12\cbpat2\cf4 Sample text - with a different color background\par}

"); $V[rtf]->addText("{\fs12 This can be used as a line:}
"); $V[rtf]->addText("{\pard\fs4\cbpat2\cf2 \par}

"); $V[rtf]->addText("{\fs12 or:}
"); $V[rtf]->addText("{\pard {\*\do\dobxcolumn\dobypara\dodhgt\dpline\dpxsize9200\dplinesolid\dplinew10}\par}
"); $V[rtf]->addText("{\pard \pvpg\phpg \posx9097\posy755\absh-557\absw1600 \brdrt \brdrs \brdrw10 \brsp20 \brdrl \brdrs \brdrw10 \brsp80 \brdrb \brdrs \brdrw10 \brsp20 \brdrr \brdrs \brdrw10 \brsp80 Here is an example paragraph invested in a particular place. \par}") ; $V[rtf]->addText(" {\pard\qc\fs20 Paragraph \'a71 - Test\par}
"); $V[rtf]->addText("{\pard\fi480\\fs16\qj We are here for any part of the text showing among other things, the text enclosed in quotation marks (this is the text\"we also have a presentation using a single apostrophe - Peter\x27s\"). Please note that the text begins and is justified paragraph (qj), and below is an example of a text segment centered (qc). This is what is written here is to only bring up a few lines of text to be seen better adjustment..\par}

"); $V[rtf]->addText(" {\pard \brdrt \brdrs \brdrw10 \brsp20 \brdrl \brdrs \brdrw10 \brsp80 \brdrb \brdrs \brdrw10 \brsp20 \brdrr \brdrs \brdrw10 \brsp80 \fs16\qc Here are an example paragraph with a border \par}
"); } function __init_table_rtf(&$P,&$V,&$F) { $V[rtf]->openTable("center") ; $V[rtf]->addRow(array( array("font-color"=>1, "font-size"=>12, "align"=>"center", "width"=>2, "border"=>"lrtb", "bgcolor"=> 2, "value"=>"Login"), array("font-color"=>1, "font-size"=>12, "align"=>"center", "width"=>6, "border"=>"lrtb", "bgcolor"=> 2, "value"=>"Name"), array("font-color"=>1, "font-size"=>12, "align"=>"center", "width"=>3, "border"=>"lrtb", "bgcolor"=> 2, "value"=>"City") )); } function __row_table_rtf($elem,&$P,&$V,&$F) { //przepisanie danych z tablicy $F do tablicy $R ale bez prefixu $elenm $R=_cut_array($elem,$F) ; $V[rtf]->addRow(array( array("font-color"=>1, "font-size"=>12, "align"=>"center", "width"=>2, "border"=>"lrtb", "bgcolor"=> 0, "value"=>"$R[login]"), array("font-color"=>1, "font-size"=>12, "align"=>"left", "width"=>6, "border"=>"lrtb", "bgcolor"=> 0, "value"=>"$R[surname]"), array("font-color"=>1, "font-size"=>12, "align"=>"right", "width"=>3, "border"=>"lrtb", "bgcolor"=> 0, "value"=>"$R[city]") )); } function __done_rtf(&$P,&$V,&$F) { $V[rtf]->closeTable(); $V[rtf]->addText($V[rtf]->getTable() ."
"); $V[rtf]->addText("{\fs12 }
"); $V[rtf]->addText("{\fs12 ___________________________________}
"); $V[rtf]->addText("{\fs12 (sign) }

"); return $V[rtf]->getDocument(); } ?>