/** * Exports language in XML form * * @param void * @return null */ function export() { $this->wireframe->print_button = false; $this->skip_layout = true; if ($this->active_language->isNew()) { $this->httpError(HTTP_ERR_NOT_FOUND); } // if $translation_files = $this->active_language->getTranslationFiles(); if (is_foreachable($translation_files)) { $translations_path = $this->active_language->getLocalizationPath(); foreach ($translation_files as $translation_file) { $translation_filename = $translations_path . '/module.' . $translation_file . '.php'; if (is_file($translation_filename)) { $translation_content = (require $translation_filename); if (is_foreachable($translation_content)) { foreach ($translation_content as $phrase => $translation) { if ($translation) { $translations[$translation_file][$phrase] = $translation; } // if } // forach } // if } // if } // foreach } // if $this->smarty->assign(array('ac_version' => $this->application->version ? $this->application->version : '1.0', 'translations' => $translations)); $xml = $this->smarty->fetch($this->getTemplatePath()); header('Content-Type: application/xml; charset=utf-8'); download_contents($xml, 'application/xml', clean($this->active_language->getName()) . ' (' . $this->active_language->getLocale() . ').xml', true, true); }
$f_issue_name = Input::Get('f_issue_name', 'string', ''); if ($f_issue_name != '') { $translationIssueObj->setName($f_issue_name); } $f_issue_urlname = Input::Get('f_issue_urlname', 'string', $issueObj->getUrlName()); if ($f_issue_urlname == "") { camp_html_add_msg(getGS('You must fill in the $1 field.', '"' . getGS('New issue URL name') . '"')); camp_html_goto_page($backLink); } if (!camp_is_valid_url_name($f_issue_urlname)) { camp_html_add_msg(getGS('The $1 field may only contain letters, digits and underscore (_) character.', '"' . getGS('New issue URL name') . '"')); camp_html_goto_page($backLink); } $translationIssueObj->create($f_issue_urlname); if (!$translationIssueObj->exists()) { camp_html_add_msg(getGS('Unable to create the issue for translation $1.', $translationLanguageObj->getName())); camp_html_goto_page($backLink); } } else { $f_issue_name = Input::Get('f_issue_name', 'string', $issueObj->getName()); $f_issue_urlname = Input::Get('f_issue_urlname', 'string', $issueObj->getUrlName()); $translationIssueObj->update(array('Name' => $f_issue_name, 'ShortName' => $f_issue_urlname)); } $f_section_number = $articleObj->getSectionNumber(); $sectionObj = new Section($f_publication_id, $f_issue_number, $f_language_id, $f_section_number); if (!$sectionObj->exists()) { camp_html_display_error(getGS('No such section.'), $backLink); exit; } $translationSectionObj = new Section($f_publication_id, $f_issue_number, $f_translation_language, $f_section_number); if (!$translationSectionObj->exists()) {
/** * Get the english language name * * @return string */ public function getLanguageName() { $language = new Language($this->m_data['fk_language_id']); return $language->getName(); }
<TD> <A HREF="/<?php echo $ADMIN; ?>/pub/" class="breadcrumb"><?php putGS("Publications"); ?></A> </TD> </TR> </TABLE> </TD> </TR> </TABLE> <TABLE BORDER="0" CELLSPACING="1" CELLPADDING="1" WIDTH="100%" class="current_location_table"> <TR> <TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title"> <?php putGS("Publication"); ?>:</TD> <TD VALIGN="TOP" class="current_location_content"><?php echo htmlspecialchars($publicationObj->getName()); ?></TD> <TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title"> <?php putGS("Issue"); ?>:</TD> <TD VALIGN="TOP" class="current_location_content"><?php echo $issueObj->getIssueNumber(); ?>. <?php echo htmlspecialchars($issueObj->getName()); ?> (<?php echo htmlspecialchars($issueLanguage->getName()); ?>)</TD> <TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title"> <?php putGS("Section"); ?>:</TD> <TD VALIGN="TOP" class="current_location_content"><?php echo $sectionObj->getSectionNumber(); ?>. <?php echo htmlspecialchars($sectionObj->getName()); ?></TD> <TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title"> <?php putGS("Article"); ?>:</TD> <TD VALIGN="TOP" class="current_location_content"><?php echo htmlspecialchars($articleObj->getTitle()); ?> (<?php echo htmlspecialchars($articleLanguage->getName()); ?>)</TD> </TR> </TABLE> <table width="100%" border="0"> <tr> <td style="padding:20px;" align="center"> Here you can upload an article that has been written in Open Office (files with extension ".sxw"). Click <a href="CampsiteArticleTemplate.stw">here</a> to get the template. </td> </tr>
"><?php p(htmlspecialchars($pub->getName())); ?> </A> </TD> <TD> <?php $aliasObj = new Alias($pub->getDefaultAliasId()); p(htmlspecialchars($aliasObj->getName())); ?> </TD> <TD> <?php $languageObj = new Language($pub->getDefaultLanguageId()); p(htmlspecialchars($languageObj->getName())); ?> </TD> <?php if ($g_user->hasPermission("ManagePub")) { ?> <TD align="center"> <?php if ($pub->commentsEnabled()) { ?> <img src="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?> /is_shown.png" border="0"> <?php
echo htmlspecialchars($publicationObj->getName()); ?> </TD> <TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title"> <?php echo $translator->trans("Issue"); ?> :</TD> <TD VALIGN="TOP" class="current_location_content"><?php echo $issueObj->getIssueNumber(); ?> . <?php echo htmlspecialchars($issueObj->getName()); ?> (<?php echo htmlspecialchars($issueLanguage->getName()); ?> )</TD> <TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title"> <?php echo $translator->trans("Section"); ?> :</TD> <TD VALIGN="TOP" class="current_location_content"><?php echo $sectionObj->getSectionNumber(); ?> . <?php echo htmlspecialchars($sectionObj->getName()); ?> </TD>
<select name="lang" class="input_select" style="width:160px;" id="lang" onchange="changeBio(<?php echo $id ?>)"> <?php $publications = Issue::GetIssues(); $languages = array(); foreach ($publications as $publication) { $languages[] = $publication->getLanguageId(); } $languages = array_unique($languages); $defaultLanguage = 0; $combo = ""; foreach ($languages as $language) { $lang = new Language($language); if ($defaultLanguage == 0) { $defaultLanguage = $language; } $combo .= '<option value="' . $language . '">' . $lang->getName() . "</option>"; } $biography = ""; if ($id > 0) { $bioObj = new AuthorBiography($id, $defaultLanguage); //$biography = $author->getBiography($defaultLanguage); //$lang_first_name = $biography[0]["first_name"]; //$lang_last_name = $biography[0]["last_name"]; $lang_first_name = $bioObj->getFirstName(); $lang_last_name = $bioObj->getLastName(); if (strlen($lang_first_name) == 0) { $lang_first_name = $first_name; } if (strlen($lang_last_name) == 0) { $lang_last_name = $last_name; }
$f_issue_name = Input::Get('f_issue_name', 'string', ''); $f_issue_urlname = Input::Get('f_issue_urlname', 'string', $issueObj->getUrlName()); if ($f_issue_name != '') { $translationIssueObj->setName($f_issue_name); } if ($f_issue_urlname == "") { camp_html_add_msg($translator->trans('You must fill in the $1 field.', array('$1' => '"' . $translator->trans('New issue URL name', array(), 'articles') . '"'))); camp_html_goto_page($backLink); } if (!camp_is_valid_url_name($f_issue_urlname)) { camp_html_add_msg($translator->trans('The $1 field may only contain letters, digits and underscore (_) character.', array('$1' => '"' . $translator->trans('New issue URL name', array(), 'articles') . '"'))); camp_html_goto_page($backLink); } $translationIssueObj->create($f_issue_urlname); if (!$translationIssueObj->exists()) { camp_html_add_msg($translator->trans('Unable to create the issue for translation $1.', array('$1' => $translationLanguageObj->getName()), 'articles')); camp_html_goto_page($backLink); } } else { $f_issue_name = Input::Get('f_issue_name', 'string', $translationIssueObj->getName()); $f_issue_urlname = Input::Get('f_issue_urlname', 'string', $translationIssueObj->getUrlName()); $translationIssueObj->update(array('Name' => $f_issue_name, 'ShortName' => $f_issue_urlname)); } $f_section_number = $articleObj->getSectionNumber(); $sectionObj = new Section($f_publication_id, $f_issue_number, $f_language_id, $f_section_number); if (!$sectionObj->exists()) { camp_html_display_error($translator->trans('No such section.', array(), 'articles'), $backLink); exit; } $translationSectionObj = new Section($f_publication_id, $f_issue_number, $f_translation_language, $f_section_number); if (!$translationSectionObj->exists()) {
$publicationObj = new Publication($f_publication_id); $languageObj = new Language($publicationObj->getDefaultLanguageId()); $manageUser = new User($f_user_id); $subscription = new Subscription($f_subscription_id); $isPaid = false; if ($subscription->getType() == 'P') { $isPaid = true; } $subscriptionSections = SubscriptionSection::GetSubscriptionSections($f_subscription_id, $f_section_number, $f_language_id); $subscriptionSection = array_pop($subscriptionSections); if ($f_section_number > 0) { if ($f_language_id > 0) { $subscriptionSectionLanguage = new Language($f_language_id); $languageName = $subscriptionSectionLanguage->getName(); } else { $languageName = '-- ' . getGS('All languages') . ' --'; } } else { $languageName = getGS('N/A'); } $crumbs = array(); $crumbs[] = array(getGS("Configure"), ""); $crumbs[] = array(getGS("Subscribers"), "/$ADMIN/users/?uType=Subscribers"); $crumbs[] = array(getGS("Account") . " '".$manageUser->getUserName()."'", "/$ADMIN/users/edit.php?User=$f_user_id&uType=Subscribers"); $crumbs[] = array(getGS("Subscriptions"), "/$ADMIN/users/subscriptions/?f_user_id=$f_user_id"); $crumbs[] = array(getGS("Subscribed sections").": ".$publicationObj->getName(), "/$ADMIN/users/subscriptions/sections/?f_user_id=$f_user_id&f_subscription_id=$f_subscription_id&f_publication_id=$f_publication_id"); $crumbs[] = array(getGS("Change subscription"), "");