assign("MOD", $mod_strings);
$list_report_form->assign("APP", $app_strings);
$repObj = new Reports ();
if($recordid!=''){
$oRep = new Reports($recordid);
if($oRep->secmodule!=''){
$sec_mod = split(":",$oRep->secmodule);
$rel_modules = getReportRelatedModules($oRep->primodule,$oRep);
if(!empty($sec_mod)){
foreach($sec_mod as $module){
if(!in_array($module,$rel_modules))
$restricted_modules[] = $module;
else
$sec_module[$module] = 1;
}
}
}
if(vtlib_isModuleActive($oRep->primodule)==false){
echo "
";die;
}
$list_report_form->assign("RELATEDMODULES",getReportRelatedModules($oRep->primodule,$oRep));
$list_report_form->assign("RECORDID",$recordid);
$list_report_form->assign("REPORTNAME",$oRep->reportname);
$list_report_form->assign("REPORTDESC",$oRep->reportdescription);
$list_report_form->assign("REP_MODULE",$oRep->primodule);
if(!isset($_REQUEST['secondarymodule'])){
$list_report_form->assign("SEC_MODULE",$sec_module);
}
if(!empty($restricted_modules)){
$restrictedmod = implode(",",$restricted_modules);
} else {
$restrictedmod = '';
}
$list_report_form->assign("RESTRICTEDMODULES",$restrictedmod);
$list_report_form->assign("BACK",'false');
}
if($_REQUEST['reportmodule'] != '')
{
if(vtlib_isModuleActive($_REQUEST['reportmodule'])==false || isPermitted($_REQUEST['reportmodule'],'index')!= "yes"){
echo "";die;
}
$list_report_form->assign("RELATEDMODULES",getReportRelatedModules($_REQUEST['reportmodule'],$repObj));
$list_report_form->assign("REP_MODULE",vtlib_purify($_REQUEST['reportmodule']));
}
if($_REQUEST['reportName'] !='')
{
$list_report_form->assign("RELATEDMODULES",getReportRelatedModules($_REQUEST['primarymodule'],$repObj));
$list_report_form->assign("REPORTNAME",vtlib_purify($_REQUEST['reportName']));
$list_report_form->assign("REPORTDESC",vtlib_purify($_REQUEST['reportDesc']));
$list_report_form->assign("REP_MODULE",vtlib_purify($_REQUEST['primarymodule']));
$sec_mod = split(":",vtlib_purify($_REQUEST['secondarymodule']));
$sec_module = array();
foreach($sec_mod as $module){
$sec_module[$module] = 1;
}
$list_report_form->assign("SEC_MODULE",$sec_module);
$list_report_form->assign("BACK_WALK",'true');
}
$list_report_form->assign("FOLDERID",vtlib_purify($_REQUEST['folder']));
$list_report_form->assign("REP_FOLDERS",$repObj->sgetRptFldr());
$list_report_form->assign("IMAGE_PATH", $image_path);
$list_report_form->assign("THEME_PATH", $theme_path);
$list_report_form->assign("ERROR_MSG", $mod_strings['LBL_NO_PERMISSION']);
$list_report_form->display("ReportsStep0.tpl");
?>