</div> <p></p> <?php if (count($topics) > 0) { ?> <FORM action="do_edit.php" method="POST"> <?php echo SecurityToken::FormParameter(); ?> <INPUT type="hidden" name="f_mode" value="<?php p($f_mode); ?>"> <INPUT type="hidden" name="f_blog_id" value="<?php p($f_blog_id); ?>"> <INPUT type="hidden" name="f_blogentry_id" value="<?php p($f_blogentry_id); ?>"> <table class="table_list"> <?PHP $color = 0; foreach ($topics as $path) { $currentTopic = camp_array_peek($path, false, -1); $name = $currentTopic->getName($language_id); if (empty($name)) { // Backwards compatibility $name = $currentTopic->getName(1); if (empty($name)) { continue; } } $$object = new $object($object_id, $currentTopic->getTopicId()); $checked = $$object->exists() ? 'checked="checked"' : ''; ?> <tr <?php if ($color) { $color=0; ?>class="list_row_even"<?php } else { $color=1; ?>class="list_row_odd"<?php } ?>> <td><input type="checkbox" name="f_topic_ids[]" value="<?php p($currentTopic->getTopicId()); ?>" <?php p($checked); p($is_admin ? '' : ' disabled'); ?>></td> <td style="padding-left: 3px; padding-right: 5px;" width="400px">
} $allIssues = array(); if ($f_destination_publication_id > 0) { $allIssues = Issue::GetIssues($f_destination_publication_id, $f_article_language, null, null, null, false, array("ORDER BY" => array("Number" => "DESC")), true); if (count($allIssues) == 1) { $singleIssue = camp_array_peek($allIssues); $f_destination_issue_number = $singleIssue->getIssueNumber(); $f_article_language = $singleIssue->getLanguageId(); } } $allSections = array(); if ($f_destination_issue_number > 0) { $selectedIssue = new Issue($f_destination_publication_id, $f_article_language, $f_destination_issue_number); $allSections = Section::GetSections($f_destination_publication_id, $f_destination_issue_number, $f_article_language, null, null, array("ORDER BY" => array("Name" => "ASC")), true); if (count($allSections) == 1) { $singleSection = camp_array_peek($allSections); $f_destination_section_number = $singleSection->getSectionNumber(); } } $allArticleTypes = ArticleType::GetArticleTypes(); $allLanguages = Language::GetLanguages(null, null, null, array(), array(), true); $crumbs = array(); $crumbs[] = array($translator->trans("Actions"), ""); $crumbs[] = array($translator->trans("Add new article"), ""); echo camp_html_breadcrumbs($crumbs); ?> <?php if (sizeof($allArticleTypes) == 0) { ?> <p>
?> <SELECT NAME="f_destination_section_number" class="input_select" ONCHANGE="this.form.submit();"> <OPTION VALUE="0"><?php echo $translator->trans('---Select section---'); ?> </OPTION> <?php $previousSection = camp_array_peek($allSections); foreach ($allSections as $tmpSection) { camp_html_select_option($tmpSection->getSectionNumber(), $f_destination_section_number, $tmpSection->getName()); } ?> </SELECT> <?php } elseif ($f_destination_issue_number > 0 && count($allSections) == 1) { $tmpSection = camp_array_peek($allSections); p(htmlspecialchars($tmpSection->getName())); ?> <input type="hidden" name="f_destination_section_number" value="<?php p($f_destination_section_number); ?> "> <?php } else { ?> <SELECT class="input_select" DISABLED><OPTION><?php echo $translator->trans('No sections'); ?> </SELECT> <?php }
} } camp_html_add_msg(getGS("\$1 toggled.", """ . getGS("On Section Page") . """), "ok"); break; case "toggle_comments": foreach ($articleCodes as $articleCode) { $articleObj = new Article($articleCode['language_id'], $articleCode['article_id']); if ($articleObj->userCanModify($g_user)) { $articleObj->setCommentsEnabled(!$articleObj->commentsEnabled()); } } camp_html_add_msg(getGS("\$1 toggled.", """ . getGS("Comments") . """), "ok"); break; case "copy": foreach ($groupedArticleCodes as $articleNumber => $languageArray) { $languageId = camp_array_peek($languageArray); $articleObj = new Article($languageId, $articleNumber); $articleObj->copy($articleObj->getPublicationId(), $articleObj->getIssueNumber(), $articleObj->getSectionNumber(), $g_user->getUserId(), $languageArray); camp_html_add_msg(getGS("Article(s) duplicated."), "ok"); } camp_session_set($offsetVarName, 0); break; case "copy_interactive": $args = $_REQUEST; unset($args[SecurityToken::SECURITY_TOKEN]); unset($args["f_article_code"]); $argsStr = camp_implode_keys_and_values($args, "=", "&"); $argsStr .= "&f_mode=multi&f_action=duplicate"; foreach ($_REQUEST["f_article_code"] as $code) { $argsStr .= "&f_article_code[]={$code}"; }
<TD> <TABLE border="0"> <TR> <TD VALIGN="middle" ALIGN="RIGHT" style="padding-left: 20px;"><?php putGS('Folder'); ?>: </TD> <TD valign="middle" ALIGN="LEFT"> <?php if (count($folders) > 1) { ?> <SELECT NAME="f_destination_folder" class="input_select" alt="select" emsg="<?php putGS("You must select a destination folder"); ?>"> <OPTION VALUE="">---<?php putGS('Select folder'); ?>---</option> <?php foreach ($folders as $folder) { camp_html_select_option($folder, $f_destination_folder, $folder); } ?> </SELECT> <?php } elseif (count($folders) == 1) { $tmpFolder = camp_array_peek($folders); p(htmlspecialchars($tmpFolder)); ?> <INPUT type="hidden" name="f_destination_folder" value="<?php p($folder); ?>"> <?php } else { ?> <SELECT class="input_select" DISABLED><OPTION><?php putGS('No folders'); ?></option></SELECT> <?php } ?> </TD> </TR> </TABLE> </TD> </TR> <TR> <TD align="center" colspan="2"> <INPUT TYPE="submit" Name="action_button" Value="<?php p(putGS("Move templates")); ?>" class="button" />
<fieldset class="plain"> <!-- BEGIN Language --> <?php if (sizeof($articleLanguages) > 1) { ?> <select name="f_language_selected" class="input_select right-floated" onchange="change_language(this);"> <?php foreach ($articleLanguages as $articleLanguage) { camp_html_select_option($articleLanguage->getLanguageId(), $f_language_selected, htmlspecialchars($articleLanguage->getNativeName())); } ?> </select> <?php } else { $articleLanguage = camp_array_peek($articleLanguages); echo '<strong class="right-floated" id="article_language">' . htmlspecialchars($articleLanguage->getNativeName()) . '</strong>'; } ?> <label for="f_action_language" class="inline-style right-floated" style="width:80px;"><?php putGS('Language'); ?> </label> <!-- END Language --> <?php if (empty($userIsBlogger)) { ?> <!-- BEGIN Actions --> <select name="f_action" class="input_select" onchange="action_selected(this);" style="margin-bottom:2px;"> <option value=""><?php
exit; } $issueObj = new Issue($f_src_publication_id, $f_language_id, $f_src_issue_number); if (!$issueObj->exists()) { camp_html_display_error(getGS('Issue does not exist.')); exit; } $sectionObj = new Section($f_src_publication_id, $f_src_issue_number, $f_language_id, $f_src_section_number); if (!$sectionObj->exists()) { camp_html_display_error(getGS('Section does not exist.')); exit; } $allPublications = Publication::GetPublications(); if (count($allPublications) == 1) { $f_dest_publication_id = $f_src_publication_id; $destPublicationObj = camp_array_peek($allPublications); } $allIssues = array(); if ($f_dest_publication_id > 0) { // Get the most recent 50 Issues...if they want something farther back, we are in trouble. $sqlOptions = array("LIMIT" => 50, "ORDER BY" => array("Number" => "DESC")); $allIssues = Issue::GetIssues($f_dest_publication_id, $f_language_id, null, null, null, false, $sqlOptions, true); if (count($allIssues) == 1) { $f_dest_issue_number = $f_src_issue_number; } } $allSections = array(); $destIssueObj = null; if ($f_dest_issue_number > 0) { $destIssueObj = new Issue($f_dest_publication_id, $sectionObj->getLanguageId(), $f_dest_issue_number); $allSections = Section::GetSections($f_dest_publication_id, $f_dest_issue_number, $sectionObj->getLanguageId(), null, null, null, true);
public static function GetMoodList($p_language_id) { $options = array(0 => '------'); foreach (Topic::GetTree((int)SystemPref::Get('PLUGIN_BLOG_ROOT_MOOD_ID')) as $path) { $currentTopic = camp_array_peek($path, false, -1); $name = $currentTopic->getName($p_language_id); if (empty($name)) { // Backwards compatibility $name = $currentTopic->getName(1); if (empty($name)) { continue; } } foreach ($path as $topicObj) { $name = $topicObj->getName($p_language_id); if (empty($name)) { $name = $topicObj->getName(1); if (empty($name)) { $name = "-----"; } } $value = htmlspecialchars($name); } $selected = $currentTopic->getTopicId() == SystemPref::Get('PLUGIN_BLOG_ROOT_MOOD_ID') ? 'selected' : ''; $options[$currentTopic->getTopicId()] = $value; } return (array)$options; }