assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); if (empty($_REQUEST['return_id'])) $xtpl->assign("RETURN_ACTION", 'index'); $PDFLanguagesOptions = array(); require_once('modules/EcmInvoiceOutOlds/PDFLabelList.php'); $PDFLL = array(); foreach ($PDFLabelList as $value) { $PDFLL [] = array( 'label' => $value, 'translation' => '', ); } $PDFLanguagesOptions['PDFLabelList'] = $PDFLL; $PDFLL = array( 'labels' => $PDFLL, 'texts' => array( 'Contacts' => array( 'header_text' => $mod_strings['LBL_DEFAULT_CONTACT_HEADER_TEXT'], 'footer_text' => $mod_strings['LBL_DEFAULT_CONTACT_FOOTER_TEXT'], 'ads_text' => $mod_strings['LBL_DEFAULT_CONTACT_ADS_TEXT'], ), 'Accounts' => array( 'header_text' => $mod_strings['LBL_DEFAULT_ACCOUNT_HEADER_TEXT'], 'footer_text' => $mod_strings['LBL_DEFAULT_ACCOUNT_FOOTER_TEXT'], 'ads_text' => $mod_strings['LBL_DEFAULT_ACCOUNT_ADS_TEXT'], ), ), ); foreach ($app_list_strings['ecmlanguages_dom'] as $key => $value) { $data = EcmText::LoadText(null, null, "EcmInvoiceOutOlds", $key); //echo '
' . var_export($data, true) . '
'; //exit; if (isset($data[0]) && isset($data[0]['data'])) { $d = $data[0]['data']; } else { $d = $PDFLL; if (!isset($d['labels'])) $d['labels'] = $PDFLL['labels']; if (!isset($d['texts']['Contacts']['header_text'])) $d['texts']['Contacts']['header_text'] = $mod_strings['LBL_DEFAULT_CONTACT_HEADER_TEXT']; if (!isset($d['texts']['Contacts']['footer_text'])) $d['texts']['Contacts']['footer_text'] = $mod_strings['LBL_DEFAULT_CONTACT_FOOTER_TEXT']; if (!isset($d['texts']['Contacts']['ads_text'])) $d['texts']['Contacts']['ads_text'] = $mod_strings['LBL_DEFAULT_CONTACT_ADS_TEXT']; if (!isset($d['texts']['Accounts']['header_text'])) $d['texts']['Accounts']['header_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_HEADER_TEXT']; if (!isset($d['texts']['Accounts']['footer_text'])) $d['texts']['Accounts']['footer_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_FOOTER_TEXT']; if (!isset($d['texts']['Accounts']['ads_text'])) $d['texts']['Accounts']['ads_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_ADS_TEXT']; } $tmp2 = array(); foreach ($d['labels'] as $k => $v) { $tmp2[$v['label']] = $v['translation']; } $tmp = array(); $count = 0; foreach ($PDFLanguagesOptions['PDFLabelList'] as $k => $v) { $tmp[strval($count)] = array( 'index' => strval($count++), 'label' => $v['label'], 'translation' => $tmp2[$v['label']], ); } $d['labels'] = $tmp; $PDFLanguagesOptions['ecmlanguage'][$key] = $d; } //$xtpl->assign("PHONE_LIST", EcmInvoiceOutOld::getPhoneList()); $json = getJSONobj(); $scriptOpt = ' '; echo $scriptOpt; require_once('modules/EcmInvoiceOutOlds/EcmInvoiceOutOld.php'); $ecminvoiceoutold = new EcmInvoiceOutOld(); $xtpl->assign("MFP", $ecminvoiceoutold->loadParserArray()); $xtpl->assign("ECMLANGUAGES_OPTIONS", get_select_options_with_id($app_list_strings['ecmlanguages_dom'], '')); $xtpl->assign("PARENT_OPTIONS", get_select_options_with_id($app_list_strings['ecminvoiceoutolds_parent_dom'], '')); echo "\n

\n"; echo get_module_title('EcmInvoiceOutOlds', $GLOBALS['mod_strings']['LBL_ECMINVOICEOUTOLDS_PDFLANGUAGES_TITLE'], true); echo "\n

\n"; $xtpl->parse("main"); $xtpl->out("main"); require_once('include/javascript/javascript.php'); $javascript = new javascript(); $javascript->setFormName('PDFLanguages'); echo $javascript->getScript();