?>
;
}
<?php 
    }
    ?>
*/
</style>
    <div id="multiDateEventList" style="display:block; padding-bottom:8px;">

    </div>

    <?php 
    if ($inEditMode && $g_user->hasPermission('ChangeArticle')) {
        ?>
        <a class="iframe ui-state-default icon-button right-floated"
        href="<?php 
        echo camp_html_article_url($articleObj, $f_language_id, "multidate/popup.php", "", "");
        ?>
">
        <span class="ui-icon ui-icon-pencil"></span><?php 
        echo $translator->trans('Edit');
        ?>
</a>
    <?php 
    }
    ?>
</div>
</div></div>
<?php 
}
示例#2
0
        $f_section_name = Input::Get('f_section_name', 'string', $sectionObj->getName());
        $f_section_urlname = Input::Get('f_section_urlname', 'string', $sectionObj->getUrlName());
        if ($f_section_urlname == "") {
            camp_html_add_msg(getGS('You must fill in the $1 field.', '"' . getGS('New section URL name') . '"'));
            camp_html_goto_page($backLink);
        }
        if (!camp_is_valid_url_name($f_section_urlname)) {
            camp_html_add_msg(getGS('The $1 field may only contain letters, digits and underscore (_) character.', '"' . getGS('New section URL name') . '"'));
            camp_html_goto_page($backLink);
        }
        $translationSectionObj->create($f_section_name, $f_section_urlname);
        if (!$translationSectionObj->exists()) {
            camp_html_add_msg(getGS('Unable to create the section for translation $1.', $translationLanguageObj->getName()));
            camp_html_goto_page($backLink);
        }
    } else {
        $f_section_name = Input::Get('f_section_name', 'string', $sectionObj->getName());
        $f_section_urlname = Input::Get('f_section_urlname', 'string', $sectionObj->getUrlName());
        $translationSectionObj->update(array('Name' => $f_section_name, 'ShortName' => $f_section_urlname));
    }
}
if ($articleObj->translationTitleExists($f_translation_title, $f_translation_language)) {
    camp_html_add_msg(getGS("There already is an article with the same name. Please change the name and try again."), "ok");
    camp_html_goto_page($backLink);
    exit;
}
$articleCopy = $articleObj->createTranslation($f_translation_language, $g_user->getUserId(), $f_translation_title);
camp_html_add_msg(getGS("Article translation created."), "ok");
ArticleIndex::RunIndexer(3, 10, true);
camp_html_goto_page(camp_html_article_url($articleCopy, $f_translation_language, 'edit.php'), true);
     href="<?php p($detachMapUrl); ?>" onclick="return confirm('<?php putGS("Are you sure you want to remove the map from the article?"); ?>'); return false;" style="margin-bottom:8px;"><span
     class="ui-icon ui-icon-closethick"></span><?php putGS('Remove'); ?></a>
   <a class="iframe ui-state-default icon-button right-floated"
     href="<?php echo camp_html_article_url($articleObj, $f_language_id, 'locations/preview.php'); ?>"><span
     class="ui-icon ui-icon-zoomin"></span><?php putGS('Preview'); ?></a>
   <?php } else { ?>
   <a href="<?php echo camp_html_article_url($articleObj, $f_language_id, 'locations/preview.php'); ?>"
       class="iframe map-thumb"><img
     src="<?php echo $Campsite['ADMIN_STYLE_URL']; ?>/images/map_thumb.png" alt="<?php putGS('Preview'); ?>" title="<?php putGS('Preview'); ?>" /></a>
   <a class="iframe ui-state-default icon-button right-floated"
     href="<?php echo camp_html_article_url($articleObj, $f_language_id, 'locations/preview.php'); ?>"><span
     class="ui-icon ui-icon-zoomin"></span><?php putGS('Preview'); ?></a>
 <?php }
 } elseif ($canEdit) { ?>
   <a class="iframe ui-state-default icon-button right-floated"
     href="<?php echo camp_html_article_url($articleObj, $f_language_id, 'locations/popup.php'); ?>"><span
     class="ui-icon ui-icon-plusthick"></span><?php putGS('Add'); ?></a>
 <?php } ?>
 <?php if ($map->exists()) { ?>
   <h4 class="geo_map_name"<?php echo $map_name_title; ?>>
   <?php echo $map_name; ?>
   </h4>
 <?php } ?>
   <div class="clear"></div>
 <?php if ($map->exists() && !empty($locations)) { ?>
   <ul class="block-list">
   <?php
   $language_usage = $f_language_selected;
   if (!$language_usage) { $language_usage = $f_language_id; }
   foreach ($locations as $location) {
       $content = $location->getContent($language_usage);
示例#4
0
            <A HREF="<?php 
        echo camp_html_article_url($articleObj, $f_language_id, "images/view.php", camp_html_article_url($articleObj, $f_language_id, "images/popup.php")) . '&f_image_id=' . $image['id'];
        ?>
">
              <img src="<?php 
        echo $image['thumbnail_url'];
        ?>
" border="0"><br>
              <?php 
        echo $image['width'] . 'x' . $image['height'];
        ?>
            </a>
        </TD>
        <TD style="padding-left: 5px;">
            <A HREF="<?php 
        echo camp_html_article_url($articleObj, $f_language_id, "images/view.php", camp_html_article_url($articleObj, $f_language_id, "images/popup.php")) . '&f_image_id=' . $image['id'];
        ?>
"><?php 
        echo htmlspecialchars($image['description']);
        ?>
</A>
        </TD>
        <TD style="padding-left: 5px;">
            <?php 
        echo htmlspecialchars($image['photographer']);
        ?>
&nbsp;
        </TD>
        <TD style="padding-left: 5px;">
            <?php 
        echo htmlspecialchars($image['place']);
示例#5
0
	$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj,
					  'Section' => $sectionObj, 'Article'=>$articleObj);
	camp_html_content_top($title, $topArray, true, true, $extraCrumbs);
} else {
	$crumbs = array();
	$crumbs[] = array(getGS("Actions"), "");
	$crumbs[] = array(getGS("Edit article"), camp_html_article_url($articleObj, $f_language_id, "edit.php"));
	$crumbs[] = array(getGS("Attachments"), "");
	$crumbs[] = array($title, "");
	echo camp_html_breadcrumbs($crumbs);
}
?>
<table cellpadding="1" cellspacing="0" class="action_buttons" style="padding-top: 10px;">
<tr>
	<td><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/left_arrow.png" BORDER="0"></td>
	<td><a href="<?php echo camp_html_article_url($articleObj, $f_language_id, "edit.php"); ?>"><b><?php putGS("Back to Edit Article"); ?></b></a></td>
</table>
<P>
<?php if (strstr($attachmentObj->getMimeType(), "image/") &&
                (strstr($_SERVER['HTTP_ACCEPT'], $attachmentObj->getMimeType()) ||
                (strstr($_SERVER['HTTP_ACCEPT'], "*/*")))) { ?>
<div class="indent">
<IMG SRC="<?php echo $attachmentObj->getAttachmentUrl(); ?>" BORDER="0" ALT="<?php echo htmlspecialchars($attachmentObj->getDescription($f_language_selected)); ?>">
</div>
<P>
<?php } ?>
<FORM NAME="dialog" METHOD="POST" ACTION="do_edit.php" >
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="6" class="table_input" width="400px">
<TR>
	<TD COLSPAN="2">
		<B><?php  p($title); ?></B>
示例#6
0
            <?php 
    if ($g_user->hasPermission('CommentModerate')) {
        ?>
            <a href="<?php 
        echo $controller->view->url(array('module' => 'admin', 'controller' => 'comment', 'action' => 'set-recommended'));
        ?>
/comment/${id}/recommended/${recommended_toggle}" class="ui-state-default text-button comment-recommend status-${recommended_toggle}"><?php 
        putGS('Recommend');
        ?>
</a>
            <?php 
    }
    ?>

            <a href="<?php 
    echo camp_html_article_url($articleObj, $f_language_selected, 'comments/reply.php', '', '&f_comment_id=${id}');
    ?>
" class="ui-state-default text-button"><?php 
    putGS('Reply to comment');
    ?>
</a>

        </dd>
        <?php 
}
//inEditMode
?>
      </dl>
    </div>
</fieldset>
<p style="display:none"><?php 
示例#7
0
	        <td>
            	<a href="javascript: void(0);" onclick="window.open('/<?php p($ADMIN); ?>/comments/ban.php?f_comment_id=<?php p($comment->getMessageId()); ?>', null, 'resizable=yes, menubar=no, toolbar=no, width=400, height=200, top=200, left=200'); return false;"><b><?php putGS("Ban user"); ?></b></a>
	        </td>

	        <td style="padding-left: 10px;">
	        	<input type="submit" name="save" value="<?php putGS("Save"); ?>" class="button">
	        </td>

            </tr>
            </table>
            <!-- END table for the action controls -->

            <!-- BEGIN table with article content -->
            <table BORDER="0" CELLSPACING="1" CELLPADDING="3" width="100%"  style="border-top: 1px solid #8EAED7;">
            <tr><td style="padding-top: 5px;">
                <b><?php putGS("Article"); ?>:</b>&nbsp; <a href="<?php echo camp_html_article_url($article, $article->getLanguageId(), "edit.php"); ?>"><?php p(htmlspecialchars($article->getName())); ?></a>
            </td></tr>
            <TR id="article_closed_<?php p($comment->getMessageId()); ?>">
                <td valign="middle">
                    <a href="javascript:void(0);" onclick="HideElement('article_closed_<?php p($comment->getMessageId()); ?>'); ShowElement('article_<?php p($comment->getMessageId()); ?>');"><img src="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/viewmagplus.png" border="0" align="absmiddle"><b><?php putGS("Show article"); ?></b></a>
                </td>
            </tr>
            <tr style="display: none;" id="article_<?php p($comment->getMessageId()); ?>">
                <td>
                    <a href="javascript:void(0);" onclick="HideElement('article_<?php p($comment->getMessageId()); ?>'); ShowElement('article_closed_<?php p($comment->getMessageId()); ?>');"><img src="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/viewmagminus.png" border="0" align="absmiddle"><b><?php putGS("Hide article"); ?></b></a><br>
                    <table bgcolor="#EFEFEF" style="margin: 10px; border: 1px solid #777;" width="100%" cellpadding="0" cellspacing="0">
                    <?php
                        $articleData = $article->getArticleData();
                        // Get article type fields.
                        $dbColumns = $articleData->getUserDefinedColumns(false, true);
                        foreach ($dbColumns as $dbColumn) {
示例#8
0
<?php
$PollAnswerAttachments = PollAnswerAttachment::getPollAnswerAttachments($f_poll_nr, $f_pollanswer_nr);
?>
<center>
<TABLE width="95%" style="border: 1px solid #EEEEEE;">
<TR>
	<TD>
		<TABLE width="100%" bgcolor="#EEEEEE" cellpadding="3" cellspacing="0">
		<TR>
			<TD align="left">
			<STRONG><?php putGS("Files"); ?></STRONG>
			</TD>
			<?php if (($f_edit_mode == "edit") && $g_user->hasPermission('AddFile')) {  ?>
			<TD align="right">
				<IMG src="<?php p($Campsite["ADMIN_IMAGE_BASE_URL"]);?>/add.png" border="0">
				<A href="javascript: void(0);" onclick="window.open('<?php echo camp_html_article_url($articleObj, $f_language_id, "files/popup.php"); ?>', 'attach_file', 'scrollbars=yes, resizable=yes, menubar=no, toolbar=no, width=500, height=400, top=200, left=100');"><?php putGS("Attach"); ?></A>
			</TD>
			<?php } ?>
		</TR>
		</TABLE>
	</TD>
</TR>
<?php
foreach ($PollAnswerAttachments as $PollAnswerAttachment) {
    $file = $PollAnswerAttachment->getAttachment();

	$fileEditUrl = "edit.php?f_publication_id=$f_publication_id&f_issue_number=$f_issue_number&f_section_number=$f_section_number&f_article_number=$f_article_number&f_attachment_id=".$file->getAttachmentId()."&f_language_id=$f_language_id&f_language_selected=$f_language_selected";
	$deleteUrl = "do_del.php?f_poll_nr=$f_poll_nr&amp;f_pollanswer_nr=$f_pollanswer_nr&amp;f_fk_language_id=$f_fk_language_id&amp;f_attachment_id=".$file->getAttachmentId().'&amp;'.SecurityToken::URLParameter();
	$downloadUrl = "/attachment/".basename($file->getStorageLocation())."?g_download=1";
	if (strstr($file->getMimeType(), "image/") && (strstr($_SERVER['HTTP_ACCEPT'], $file->getMimeType()) ||
							(strstr($_SERVER['HTTP_ACCEPT'], "*/*")))) {
示例#9
0
if (!SecurityToken::isValid()) {
    camp_html_display_error(getGS('Invalid security token!'));
    exit;
}

if (!$g_user->hasPermission('CommentModerate')) {
	camp_html_display_error(getGS("You do not have the right to moderate comments." ));
	exit;
}

if (SystemPref::Get("UseDBReplication") == 'Y') {
    $dbReplicationObj = new DbReplication();
    $connectedToOnlineServer = $dbReplicationObj->connect();
    if ($connectedToOnlineServer == false) {
        camp_html_add_msg(getGS("Comments Disabled: you are either offline or not able to reach the Online server"));
        camp_html_goto_page(camp_html_article_url($articleObj, $f_language_selected, "edit.php"));
    }
}

// process all comments
foreach ($_REQUEST as $name => $value) {
    if (strstr($name, "comment_action_")) {
        $parts = explode("_", $name);
        $messageId = $parts[2];
        $comment = new Phorum_message($messageId);
        if (!$comment->exists()) {
            continue;
        }
        switch ($value) {
            case "inbox":
                $comment->setStatus(PHORUM_STATUS_HOLD);
示例#10
0
            <span id="playlist-default-message" <?php 
        if (count($playlistsData)) {
            ?>
style="display:none"<?php 
        }
        ?>
>
			    <?php 
        putGS('Add article to a list');
        ?>
			</span>
			</label>

    		<a class="iframe ui-state-default icon-button right-floated"
    			popup-width="600"
        		href="<?php 
        echo camp_html_article_url($articleObj, $f_language_id, "playlist/popup.php");
        ?>
">
       		<span class="ui-icon ui-icon-pencil"></span><?php 
        putGS('Edit');
        ?>
</a>
       		<?php 
    }
    ?>
		</div>
	</div>
</div>
<?php 
}
示例#11
0
    $color = 0;
    $previousArticleNumber = -1;
    foreach ($articles as $article) {
        $translations = $article->getTranslations();
        foreach ($translations as $translation) {
            echo '<tr ';
            if ($color) {
                $color = 0;
                echo 'class="list_row_even"';
            } else {
                $color = 1;
                echo 'class="list_row_odd"';
            }
            echo '>';
            if ($translation->getArticleNumber() == $previousArticleNumber) {
                echo '<td class="translation_indent">';
            } else {
                echo '<td>';
            }
            echo "<a href=\"" . camp_html_article_url($translation, $translation->getLanguageId(), "edit.php") . '">' . $this->view->escape($translation->getTitle()) . '</a></td>';
            echo "<td>" . $this->view->escape($translation->getLanguageName()) . "</td>";
            echo "</tr>";
            $previousArticleNumber = $translation->getArticleNumber();
        }
    }
    ?>
	</table>

<?php 
}
camp_html_copyright_notice();
示例#12
0
if (!empty($f_image_url)) {
	if (camp_is_valid_url($f_image_url)) {
		$image = Image::OnAddRemoteImage($f_image_url, $attributes, $g_user->getUserId());
	} else {
		camp_html_add_msg(getGS("The URL you entered is invalid: '$1'", htmlspecialchars($f_image_url)));
		camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'images/popup.php'));
	}
} elseif (!empty($_FILES['f_image_file']) && !empty($_FILES['f_image_file']['name'])) {
	$image = Image::OnImageUpload($_FILES['f_image_file'], $attributes, $g_user->getUserId());
} else {
	camp_html_add_msg(getGS("You must select an image file to upload."));
	camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'images/popup.php'));
}

// Check if image was added successfully
if (PEAR::isError($image)) {
	camp_html_add_msg($image->getMessage());
	camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'images/popup.php'));
}

ArticleImage::AddImageToArticle($image->getImageId(), $articleObj->getArticleNumber(), $f_image_template_id);

?>
<script type="text/javascript">
try {
    parent.$.fancybox.reload = true;
    parent.$.fancybox.message = "<?php putGS("Image '$1' added.", addslashes($image->getDescription())); ?>";
    parent.$.fancybox.close();
} catch (e) {}
</script>
示例#13
0
if (empty($userIsBlogger)) {
    ?>
<div class="articlebox" title="<?php 
    putGS('Related Articles');
    ?>
"><div>
<div id="context_box">
    <div id="contextBoxArticlesList" style="display:block; padding-bottom:8px;">

    </div>

    <?php 
    if ($inEditMode && $g_user->hasPermission('ChangeArticle')) {
        ?>
        <a class="iframe ui-state-default icon-button right-floated"
        href="<?php 
        echo camp_html_article_url($articleObj, $f_language_id, "context_box/popup.php");
        ?>
">
        <span class="ui-icon ui-icon-pencil"></span><?php 
        putGS('Edit');
        ?>
</a>
    <?php 
    }
    ?>
</div>
</div></div>
<?php 
}
示例#14
0
} else {
    $articleObj->create($f_article_type, $f_article_name, $publication_id, $issue_number, $section_number);
}
if ($articleObj->exists()) {
    $author = $this->_helper->service('user')->getCurrentUser()->getAuthorId();
    if (empty($author)) {
        $articleObj->setCreatorId($g_user->getUserId());
        $authorObj = new Author($g_user->getRealName());
        if (!$authorObj->exists()) {
            $authorData = Author::ReadName($g_user->getRealName());
            $authorData['email'] = $g_user->getEmail();
            $authorObj->create($authorData);
        }
    } else {
        $authorObj = new Author($author);
    }
    if ($authorObj->exists()) {
        $articleObj->setAuthor($authorObj);
    }
    $articleObj->setIsPublic(true);
    if ($publication_id > 0) {
        $commentDefault = $publicationObj->commentsArticleDefaultEnabled();
        $articleObj->setCommentsEnabled($commentDefault);
    }
    camp_html_add_msg(getGS("Article created."), "ok");
    camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, "edit.php"), false);
    ArticleIndex::RunIndexer(3, 10, true);
    exit;
} else {
    camp_html_display_error("Could not create article.");
}
示例#15
0
	$articleObj->setCreationDate($f_creation_date);
}

// Verify publish date is in the correct format.
// If not, dont change it.
if (preg_match("/\d{4}-\d{2}-\d{2}/", $f_publish_date)) {
	$articleObj->setPublishDate($f_publish_date);
}

foreach ($articleFields as $dbColumnName => $text) {
	$articleTypeObj->setProperty($dbColumnName, $text);
}

$articleObj->setIsLocked(false);

Log::ArticleMessage($articleObj, getGS('Content edited'), $g_user->getUserId(), 37);

if ($f_save_button == "save") {
	camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'edit.php'), false);
} elseif ($f_save_button == "save_and_close") {
	if ($f_publication_id > 0) {
		camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'index.php'), false);
	} else {
		camp_html_goto_page("/$ADMIN/", false);
	}
}

ArticleIndex::RunIndexer(3, 10, true);

?>
示例#16
0
文件: popup.php 项目: nidzix/Newscoop
/add.png" border="0"><b><?php 
    putGS("Attach New Image");
    ?>
</b></a></td>
	<?php 
}
?>

	<td style="padding: 3px; background-color: #EEE; border-top: 1px solid #8baed1; border-right: 1px solid #8baed1; border-left: 1px solid #8baed1; <?php 
if ($f_image_attach_mode != "existing") {
    ?>
border-bottom: 1px solid #8baed1;<?php 
}
?>
"><a href="<?php 
echo camp_html_article_url($articleObj, $f_language_id, "images/popup.php", "", "&f_image_attach_mode=existing");
?>
"><img src="<?php 
p($Campsite['ADMIN_IMAGE_BASE_URL']);
?>
/add.png" border="0"><b><?php 
putGS("Attach Existing Image");
?>
</b></a></td>
</tr>
</table>

<?php 
if ($f_image_attach_mode == "existing") {
    include "search.php";
} else {
示例#17
0
/**
 * Create a HTML HREF link to an article.
 *
 * @param Article $p_articleObj
 *		The article we want to display.
 *
 * @param int $p_sectionLanguageId
 *		The section language ID.
 *
 * @param string $p_targetFileName
 *		Which file in the "articles" directory to call.
 *
 * @param string $p_backLink
 *		I'm not entirely sure what this is for.  I put it in for backward compatibility.
 */
function camp_html_article_link($p_articleObj, $p_interfaceLanguageId, $p_targetFileName = "", $p_backLink = "")
{
    $str = '<A HREF="' . camp_html_article_url($p_articleObj, $p_interfaceLanguageId, $p_targetFileName, $p_backLink) . '">';
    return $str;
}
示例#18
0
            echo '<li>';
            if ($sectionPageAction == 'S') {
                echo $translator->trans('Show on section page');
            }
            if ($sectionPageAction == 'R') {
                echo $translator->trans('Remove from section page');
            }
            echo '</li>';
        }
        ?>
        </ul>
        <?php 
        if ($inEditMode && $g_user->hasPermission('Publish')) {
            ?>
        <a href="<?php 
            p(camp_html_article_url($articleObj, $f_language_id, 'autopublish_del.php', '', '&f_event_id=' . $event->getArticlePublishId(), true));
            ?>
"
          onclick="return confirm('<?php 
            echo $translator->trans("Are you sure you want to remove the event scheduled on \$1?", array('$1' => camp_javascriptspecialchars($event->getActionTime())), 'articles');
            ?>
');"
          class="corner-button"><span class="ui-icon ui-icon-closethick"></span></a>
        <?php 
        }
        ?>
      </li>
      <?php 
    }
    ?>
    </ul>
示例#19
0
		$translations = $article->getTranslations();
		foreach ($translations as $translation) {
			echo '<tr ';
			if ($color) {
				$color=0;
				echo 'class="list_row_even"';
			} else {
				$color=1;
				echo 'class="list_row_odd"';
			}
			echo '>';
			if ($translation->getArticleNumber() == $previousArticleNumber) {
				echo '<td class="translation_indent">';
			}
			else {
				echo '<td>';
			}
			echo "<a href=\"".camp_html_article_url($translation, $translation->getLanguageId(), "edit.php").'">'.htmlspecialchars($translation->getTitle()).'</a></td>';
			echo "<td>".$translation->getLanguageName()."</td>";
			echo "</tr>";
			$previousArticleNumber = $translation->getArticleNumber();
		}
	}
	?>
	</table>
<?php
}

camp_html_copyright_notice();
?>
    <a class="iframe ui-state-default icon-button right-floated"
      href="<?php 
        echo camp_html_article_url($articleObj, $f_language_id, 'locations/preview.php');
        ?>
&focus=default&loader=article"><span
      class="ui-icon ui-icon-zoomin"></span><?php 
        echo $translator->trans('Preview');
        ?>
</a>
  <?php 
    }
} elseif ($canEdit) {
    ?>
    <a class="iframe ui-state-default icon-button right-floated"
      href="<?php 
    echo camp_html_article_url($articleObj, $f_language_id, 'locations/popup.php');
    ?>
"><span
      class="ui-icon ui-icon-plusthick"></span><?php 
    echo $translator->trans('Add');
    ?>
</a>
  <?php 
}
?>
  <?php 
if ($map->exists()) {
    ?>
    <h4 class="geo_map_name"<?php 
    echo $map_name_title;
    ?>
示例#21
0
$commentObj = new Phorum_message();
$commentObj->create($forumId,
                    $f_comment_subject,
                    $f_comment_body,
                    $threadId,
                    $f_comment_parent_id,
                    $f_comment_nickname,
                    $g_user->getEmail(),
                    $g_user->getUserId());
$commentObj->setStatus(PHORUM_STATUS_APPROVED);

// Link the message to the article
$isFirstMessage = ($threadId == 0);
ArticleComment::Link($f_article_number, $f_language_id, $commentObj->getMessageId(), $isFirstMessage);

camp_html_goto_page(camp_html_article_url($articleObj, $f_language_selected, "edit.php")."#add_comment");


/**
 * Create the first message for an article, which is a blank message
 * with the title of the article as the subject.
 *
 * @param Article $p_article
 * @param int $p_forumId
 * @return mixed
 *      The comment created (or the one that already exists) on success,
 *      or false on error.
 */
function camp_comment_first_post($p_article, $p_forumId)
{
    // Check if the first post already exists.
示例#22
0
    p($f_section_number);
    ?>
'" />
          </li>
        </ul>
      </fieldset>
    </div>
  </div>
</div>
<?php 
    camp_html_copyright_notice();
    return;
}
// Get proper URL to switch between modes
if ($articleObj->userCanModify($g_user)) {
    $switchModeUrl = camp_html_article_url($articleObj, $f_language_id, 'edit.php') . '&f_edit_mode=' . ($inEditMode ? 'view' : 'edit');
}
// Display either the "Go to live article" or "Preview" button
// depending on article status
$doPreviewLink = '';
if (isset($publicationObj) && $articleObj->isPublished()) {
    if ($publicationObj->getUrlTypeId() == 2) {
        $previewLinkURL = ShortURL::GetURL($publicationObj->getPublicationId(), $articleObj->getLanguageId(), null, null, $articleObj->getArticleNumber());
        $doPreviewLink = 'live';
        $seoFields = $publicationObj->getSeo();
        $articleEndLink = $articleObj->getSEOURLEnd($seoFields, $articleObj->getLanguageId());
        if (strlen($articleEndLink) > 0) {
            $previewLinkURL .= $articleEndLink;
        }
        if (!is_string($previewLinkURL) && PEAR::isError($previewLinkURL)) {
            $doLiveLink = '';
示例#23
0
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta http-equiv="Expires" content="now" />
  <link rel="stylesheet" type="text/css" href="<?php echo $Campsite['ADMIN_STYLE_URL']; ?>/admin_stylesheet_new.css" />
  <link rel="stylesheet" type="text/css" href="<?php echo $Campsite['ADMIN_STYLE_URL']; ?>/admin_stylesheet.css" />
  <title><?php putGS("Attach Image To Article"); ?></title>
</head>
<body>
<?php camp_html_display_msgs(); ?>
<table style="margin-top: 10px; margin-left: 5px;" cellpadding="0" cellspacing="0">
<tr>
	<?php if ($g_user->hasPermission('AddImage')) { ?>
	<td style="padding: 3px; background-color: #EEE; border-top: 1px solid #8baed1; border-left: 1px solid #8baed1; <?php if ($f_image_attach_mode != "new") { ?>border-bottom: 1px solid #8baed1;<?php } ?>"><a href="<?php echo camp_html_article_url($articleObj, $f_language_id, "images/popup.php", "", "&f_image_attach_mode=new"); ?>"><img src="<?php p($Campsite['ADMIN_IMAGE_BASE_URL']); ?>/add.png" border="0"><b><?php putGS("Attach New Image"); ?></b></a></td>
	<?php } ?>

	<td style="padding: 3px; background-color: #EEE; border-top: 1px solid #8baed1; border-right: 1px solid #8baed1; border-left: 1px solid #8baed1; <?php if ($f_image_attach_mode != "existing") { ?>border-bottom: 1px solid #8baed1;<?php } ?>"><a href="<?php echo camp_html_article_url($articleObj, $f_language_id, "images/popup.php", "", "&f_image_attach_mode=existing"); ?>"><img src="<?php p($Campsite['ADMIN_IMAGE_BASE_URL']); ?>/add.png" border="0"><b><?php putGS("Attach Existing Image"); ?></b></a></td>
</tr>
<tr>
	<td colspan="2" style="background-color: #EEE; padding-top: 5px; border-bottom: 1px solid #8baed1; border-right: 1px solid #8baed1; border-left: 1px solid #8baed1;">
		<?php
		if ($f_image_attach_mode == "existing") {
			include("search.php");
		} else {
			include("add.php");
		}?>
	</td>
</tr>
</table>

</body>
</html>
示例#24
0
    <!-- BEGIN Slideshows -->
    <div id="media-slideshows">
        <?php 
echo $this->view->partial('slideshow-box.phtml', array('articleNumber' => $articleObj->getArticleNumber(), 'slideshows' => $this->_helper->service('package')->findByArticle($articleObj->getArticleNumber())));
?>
    </div>
    <!-- END Slideshows -->

    <div id="media-attachments">
        <?php 
if ($inEditMode && $g_user->hasPermission('AddFile')) {
    ?>
        <a class="iframe ui-state-default icon-button right-floated"
            href="<?php 
    echo camp_html_article_url($articleObj, $f_language_id, "files/popup.php");
    ?>
"><span
            class="ui-icon ui-icon-plusthick"></span><?php 
    echo $translator->trans('Attach');
    ?>
</a>
        <div class="clear"></div>
        <?php 
}
?>

        <ul class="block-list">
            <?php 
foreach ($articleFiles as $file) {
    $fileEditUrl = "/{$ADMIN}/articles/files/edit.php?f_publication_id={$f_publication_id}&f_issue_number={$f_issue_number}&f_section_number={$f_section_number}&f_article_number={$f_article_number}&f_attachment_id=" . $file->getAttachmentId() . "&f_language_id={$f_language_id}&f_language_selected={$f_language_selected}";
示例#25
0
		. "&f_article_number=" . $f_article_number
		. "&f_image_id=" . $f_image_id
		. "&f_language_id=" . $f_language_id
		. "&f_language_selected=" . $f_language_selected
		. "&f_image_template_id=" . $f_orig_image_template_id;

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), null, true);
	exit;
}

$articleObj = new Article($f_language_selected, $f_article_number);

if (!$g_user->hasPermission('ChangeImage') && !$g_user->hasPermission('AttachImageToArticle')) {
	camp_html_add_msg(getGS("You do not have the right to change image information."));
	camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'edit.php'));
}

$imageObj = new Image($f_image_id);

if (!is_null($f_image_description) && $g_user->hasPermission('ChangeImage')) {
	$attributes = array();
	$attributes['Description'] = $f_image_description;
	$attributes['Photographer'] = $f_image_photographer;
	$attributes['Place'] = $f_image_place;
	$attributes['Date'] = $f_image_date;
	$imageObj->update($attributes);
}

if ($g_user->hasPermission('AttachImageToArticle')) {
	if (is_numeric($f_image_template_id) && ($f_image_template_id > 0)) {
示例#26
0
                <strong><?php echo $articleImage->getTemplateId(); ?></strong><br />
                <?php echo htmlspecialchars($image->getDescription()); ?><br />
                <?php echo $imageSize[0], ' x ', $imageSize[1]; ?>

                <?php if (($inEditMode) && $g_user->hasPermission('AttachImageToArticle')) { ?>
                <a class="corner-button" href="<?php p($detachUrl); ?>" onclick="return confirm('<?php putGS("Are you sure you want to remove the image \\'$1\\' from the article?", camp_javascriptspecialchars($image->getDescription())); ?>');"><span class="ui-icon ui-icon-closethick"></span></a>
                <?php } ?>
            </li>
            <?php } ?>
        </ul>
    </div>

    <div id="media-attachments">
        <?php if ($inEditMode && $g_user->hasPermission('AddFile')) {  ?>
        <a class="iframe ui-state-default icon-button right-floated"
            href="<?php echo camp_html_article_url($articleObj, $f_language_id, "files/popup.php"); ?>"><span
            class="ui-icon ui-icon-plusthick"></span><?php putGS('Attach'); ?></a>
        <div class="clear"></div>
        <?php } ?>

        <ul class="block-list">
            <?php foreach ($articleFiles as $file) {
                $fileEditUrl = "/$ADMIN/articles/files/edit.php?f_publication_id=$f_publication_id&f_issue_number=$f_issue_number&f_section_number=$f_section_number&f_article_number=$f_article_number&f_attachment_id=".$file->getAttachmentId()."&f_language_id=$f_language_id&f_language_selected=$f_language_selected";
                $deleteUrl = "/$ADMIN/articles/files/do_del.php?f_publication_id=$f_publication_id&f_issue_number=$f_issue_number&f_section_number=$f_section_number&f_article_number=$f_article_number&f_attachment_id=".$file->getAttachmentId()."&f_language_selected=$f_language_selected&f_language_id=$f_language_id&".SecurityToken::URLParameter();
                $downloadUrl = $file->getAttachmentUrl()."?g_download=1";
                $previewUrl = null;
                if (strstr($file->getMimeType(), "image/") && (strstr($_SERVER['HTTP_ACCEPT'], $file->getMimeType()) ||
                                        (strstr($_SERVER['HTTP_ACCEPT'], "*/*")))) {
                $previewUrl = $Campsite['SUBDIR']."/attachment/".basename($file->getStorageLocation())."?g_show_in_browser=1";
                }
            ?>
示例#27
0
    $crumbs[] = array($title, "");
    echo camp_html_breadcrumbs($crumbs);
}
?>

<?php 
if ($f_mode == "single") {
    ?>
<table cellpadding="1" cellspacing="0" class="action_buttons" style="padding-top: 10px;">
<tr>
	<td><IMG SRC="<?php 
    echo $Campsite["ADMIN_IMAGE_BASE_URL"];
    ?>
/left_arrow.png" BORDER="0"></td>
	<td><a href="<?php 
    echo camp_html_article_url($article, $f_language_id, "edit.php");
    ?>
"><b><?php 
    echo $translator->trans("Back to Edit Article");
    ?>
</b></a></td>
</tr>
</table>
<?php 
}
?>

<?php 
camp_html_display_msgs();
?>
示例#28
0
        }
        if (!$access) {
            camp_html_add_msg($translator->trans("You do not have the right to change this article status. Once submitted an article can only be changed by authorized users.", array(), 'articles'));
            camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, "edit.php"));
        }
        // If the article is not yet categorized, force it to be before publication.
        if (($f_action_workflow == "Y" || $f_action_workflow == 'M') && ($articleObj->getPublicationId() == 0 || $articleObj->getIssueNumber() == 0 || $articleObj->getSectionNumber() == 0)) {
            $args = $_REQUEST;
            $argsStr = camp_implode_keys_and_values($_REQUEST, "=", "&");
            $argsStr .= "&f_article_code[]=" . $f_article_number . "_" . $f_language_selected;
            $argsStr .= "&f_mode=single&f_action=publish";
            camp_html_goto_page("/{$ADMIN}/articles/duplicate.php?" . $argsStr);
        } else {
            if ($f_action_workflow == "S" && ($articleObj->getPublicationId() == 0 || $articleObj->getIssueNumber() == 0 || $articleObj->getSectionNumber() == 0)) {
                $args = $_REQUEST;
                $argsStr = camp_implode_keys_and_values($_REQUEST, "=", "&");
                $argsStr .= "&f_article_code[]=" . $f_article_number . "_" . $f_language_selected;
                $argsStr .= "&f_mode=single&f_action=submit";
                camp_html_goto_page("/{$ADMIN}/articles/duplicate.php?" . $argsStr);
            }
        }
        $articleObj->setWorkflowStatus($f_action_workflow);
        // Make sure that the time stamp is updated.
        $articleObj->setProperty('time_updated', 'NOW()', true, true);
        $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
        $cacheService->clearNamespace('article');
        camp_html_add_msg($translator->trans("Article status set to \$1", array('$1' => $articleObj->getWorkflowDisplayString()), 'articles'), "ok");
    }
    $url = camp_html_article_url($articleObj, $f_language_id, "edit.php");
    camp_html_goto_page($url);
}
示例#29
0
 <?php 
p(count($comments));
?>
                    <br />
                    <?php 
if ($f_show_comments) {
    ?>
                    <a href="<?php 
    echo camp_html_article_url($articleObj, $f_language_selected, "edit.php", "", "&f_show_comments=0");
    ?>
"><?php 
    echo $translator->trans("Hide Comments", array(), 'articles');
    ?>
</a>
                    <?php 
} else {
    ?>
				    <a href="<?php 
    echo camp_html_article_url($articleObj, $f_language_selected, "edit.php", "", "&f_show_comments=1");
    ?>
"><?php 
    echo $translator->trans("Show Comments", array(), 'articles');
    ?>
</a>
				    <?php 
}
?>
                </td>
            </tr>
            </table>
示例#30
0
				<td align="left" width="100%" style="padding-left: 8px;">
                <?php
                if (SystemPref::Get("UseDBReplication") == 'Y') {
                    if ($connectedToOnlineServer) {
                ?>
                    <span class="success_message">
                <?php
                        putGS("Online Server: On");
                    } elseif (isset($connectedToOnlineServer)
                              &&$connectedToOnlineServer == false) {
                ?>
                    <span class="failure_message">
                <?php
                        putGS("Online Server: Off");
                    }
                ?>
                    </span><br />
                <?php
                }
                ?>
                    <?php putGS("Total:"); ?> <?php p(count($comments)); ?>
                    <br />
                    <?php if ($f_show_comments) { ?>
                    <a href="<?php echo camp_html_article_url($articleObj, $f_language_selected, "edit.php", "", "&f_show_comments=0"); ?>"><?php putGS("Hide Comments"); ?></a>
                    <?php } else { ?>
				    <a href="<?php echo camp_html_article_url($articleObj, $f_language_selected, "edit.php", "", "&f_show_comments=1"); ?>"><?php putGS("Show Comments"); ?></a>
				    <?php } ?>
                </td>
            </tr>
            </table>