AddOption(_M('Generate Formats',$module),$module,"$home:generate&item=$item"); $handler = $MIOLO->GetActionURL($module,"$home:generate&item=$item&format=$format"); $ui = $MIOLO->GetUI(); $formats = array( "all"=>_M("All the formats",$module), "pdf"=>_M("Portable Document",$module), "txt"=>_M("Text",$module), "dvi"=>_M("DVI",$module), "ps"=>_M("Post Script",$module), "docbook"=>_M("DocBook",$module), "xml"=>_M("XML",$module), "sgml"=>_M("Sgml",$module), "html"=>_M("Html",$module), "tar.gz"=>_M("TarGz Package",$module)); if ($format) $navbar->AddOption(_M('Generate @1',$module,$formats[$format]),$module,"$home:generate&item=$item&format=$format"); $Business = $MIOLO->GetBusiness($module, 'Topics'); $Business2 =$MIOLO->GEtBusiness($module, 'Projects'); if ($item && $format) { $project = $Business2->GetProject($item); if ($format == 'html') $data = $Business->GenerateHtml($project); else $data = $Business->GenerateDocBook($project,$format); if (is_array($data) || $format == 'html') { $content = ""; } else if ($format && $format != 'all') $content = $MIOLO->Information(_M("The @1 format couldn't be generated!",$module,$formats[$format]),"javascript:history.go(-1)"); else $content = $MIOLO->Information(_M("None format could be generated!",$module),"javascript:history.go(-1)"); } else { $content = ""; } $theme->SetContent($content); ?>