示例#1
0
/**
 * Draw the files in a table.
 */
function drawFiles($list, &$manager)
{
    global $languageSelected, $Campsite;
    $counter = 0;
    foreach ($list as $entry => $file) {
        $counter++;
        $languageId = $file['attachment']->getLanguageId() ? $file['attachment']->getLanguageId() : $languageSelected;
        $downloadURL = $file['attachment']->getAttachmentUrl() . '?g_download=1';
        ?>
    <td>
      <table width="100" cellpadding="0" cellspacing="0">
      <tr>
        <td class="block" id="block_<?php 
        echo $counter;
        ?>
" onclick="CampsiteAttachmentDialog.select(<?php 
        echo $file['attachment']->getAttachmentId();
        ?>
, '<?php 
        echo $downloadURL;
        ?>
', '<?php 
        echo camp_javascriptspecialchars($file["attachment"]->getDescription($languageId));
        ?>
', '<?php 
        echo $counter;
        ?>
');">
          <a href="javascript:;" onclick="CampsiteAttachmentDialog.select(<?php 
        echo $file['attachment']->getAttachmentId();
        ?>
, '<?php 
        echo $downloadURL;
        ?>
', '<?php 
        echo camp_javascriptspecialchars($file["attachment"]->getDescription($languageId));
        ?>
');" title="<?php 
        echo addslashes($file['attachment']->getDescription($languageId));
        ?>
"><?php 
        echo $file['attachment']->getFileName();
        ?>
</a><br />
       <?php 
        echo htmlspecialchars($file['attachment']->getDescription($languageId));
        ?>
        </td>
      </tr>
      </table>
    </td>
  <?php 
    }
    //foreach
}
示例#2
0
        <?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";
                }
            ?>
            <li>
                <?php if ($inEditMode) { ?>
                <a class="text-link" href="<?php echo $fileEditUrl; ?>"><?php echo wordwrap($file->getFileName(), "25", "<br />", true); ?></a>
                <?php } else { ?>
                <?php echo wordwrap($file->getFileName(), "25", "<br />", true); ?>
                <?php } ?>

                <span class="info"><?php echo htmlspecialchars($file->getDescription($f_language_selected)), ', ', camp_format_bytes($file->getSizeInBytes()); ?></span>
                <a class="link icon-link" href="<?php p($downloadUrl); ?>"><span class="icon ui-icon-arrowthickstop-1-s"></span><?php putGS('Download'); ?></a>

                <?php if ($inEditMode && $g_user->hasPermission('DeleteFile')) { ?>
                <a class="corner-button" href="<?php p($deleteUrl); ?>" onclick="return confirm('<?php putGS("Are you sure you want to remove the file \\'$1\\' from the article?", camp_javascriptspecialchars($file->getFileName())); ?>');"><span class="ui-icon ui-icon-closethick"></span></a>
                <?php } ?>
            </li>
            <?php } ?>
    </div>
</div></div>
示例#3
0
    echo !$file->getLanguageId() ? htmlspecialchars($file->getDescription($f_language_selected)) : htmlspecialchars($file->getDescription($f_language_selected)), ', ', camp_format_bytes($file->getSizeInBytes());
    ?>
</span>
                <a class="link icon-link" href="<?php 
    p($downloadUrl);
    ?>
"><span class="icon ui-icon-arrowthickstop-1-s"></span><?php 
    echo $translator->trans('Download', array(), 'articles');
    ?>
</a>

                <?php 
    if ($inEditMode && $g_user->hasPermission('DeleteFile')) {
        ?>
                <a class="corner-button" href="<?php 
        p($deleteUrl);
        ?>
" onclick="return confirm('<?php 
        echo $translator->trans("Are you sure you want to remove the file \$1 from the article?", array('$1' => camp_javascriptspecialchars($file->getFileName())), 'articles');
        ?>
');"><span class="ui-icon ui-icon-closethick"></span></a>
                <?php 
    }
    ?>
            </li>
            <?php 
}
?>
    </div>
</div></div>
示例#4
0
        p(htmlspecialchars($file->getDescription($f_language_selected)));
    }
    ?>
			</TD>
			<?php 
    if ($g_user->hasPermission('DeleteFile')) {
        ?>
			<TD>
				<A title="<?php 
        putGS("Delete");
        ?>
" href="<?php 
        p($deleteUrl);
        ?>
" onclick="return confirm('<?php 
        putGS("Are you sure you want to remove the file \\'\$1\\' from the debate answer?", camp_javascriptspecialchars($file->getFileName()));
        ?>
');"><IMG src="<?php 
        p($Campsite["ADMIN_IMAGE_BASE_URL"]);
        ?>
/unlink.png" border="0" /></A><BR />
				<?php 
        if (!empty($previewUrl)) {
            ?>
				<A title="<?php 
            putGS("Preview");
            ?>
" href="javascript: void(0);" onclick="window.open('<?php 
            echo $previewUrl;
            ?>
', 'attach_file', 'scrollbars=yes, resizable=yes, menubar=no, toolbar=no, width=500, height=400, top=200, left=100');"><IMG src="<?php 
示例#5
0
/**
 * Campsite Map function plugin
 *
 * Type:     function
 * Name:     map
 * Purpose:  Render a geo map
 *
 * @param array
 *     $p_params List of parameters from template
 * @param object
 *     $p_smarty Smarty template object
 *
 * @return
 *     string The html content
 */
function smarty_function_map($p_params, &$p_smarty)
{
    // the strings are translated via Geo_Preferences::TemplateGeoStrings()
    // if you change some of the strings, put them there too
    camp_load_translation_strings('api');

    // Default text for the reset link
    define('DEFAULT_RESET_TEXT', getGS('Show original map'));

    // get the context variable
    $campsite = $p_smarty->get_template_vars('gimme');
    $html = '';

    // language and article must be set in context
    if (!$campsite->language->defined || !$campsite->article->defined) {
        return;
    }

    // do nothing if article does not have a map
    if ($campsite->article->has_map == FALSE) {
        return;
    }

    // get article and language from context
    $article = (int) $campsite->article->number;
    $language = (int) $campsite->language->number;

    // get show locations list parameter
    $showLocationsList = FALSE;
    if (isset($p_params['show_locations_list'])
            && (strtolower(trim((string) $p_params['show_locations_list'])) == 'true')) {
        $showLocationsList = TRUE;
    }

    // get show reset link parameter
    $showResetLink = TRUE;
    $resetLinkText = DEFAULT_RESET_TEXT;
    if (isset($p_params['show_reset_link'])) {
        $resetLinkText = trim((string) $p_params['show_reset_link']);
        if (strtolower($resetLinkText) == 'false') {
            $showResetLink = FALSE;
        }
    }
    if (strtolower($resetLinkText) == 'true') {
            $resetLinkText = DEFAULT_RESET_TEXT;
    }

    // get map width and height
    $width = isset($p_params['width']) ? (int) $p_params['width'] : 0;
    $height = isset($p_params['height']) ? (int) $p_params['height'] : 0;

    // get core pieces to display the map
    $mapHeader = MetaMap::GetMapTagHeader($article, $language, $width, $height);
    $mapMain = MetaMap::GetMapTagBody($article, $language);

    // build javascript code
    $html = '
        <!-- Begin Map //-->'
        . $mapHeader . '
        <div class="geomap_container">';
    if ($showLocationsList == TRUE) {
        $local = array('map' => getGS('Map'), 'center' => getGS('Center'));
        $mapLocationsList = MetaMap::GetMapTagList($article, $language, $local);
        $html .= '
            <div class="geomap_locations">'
            . $mapLocationsList . '
            </div>';
    }
    if ($showResetLink == TRUE) {
        $mapResetLink = MetaMap::GetMapTagCenter($article, $language);
        $html .= '
            <div class="geomap_menu">
                <a href="#" onClick="' . $mapResetLink . '
                 return false;">' . camp_javascriptspecialchars($resetLinkText) . '</a>
            </div>';
    }
    $html .= '
            <div class="geomap_map">'
            . $mapMain . '
            </div>
        </div>
        <div style="clear:both" ></div>
        <!--End Map //-->
    ';

    return $html;
}
            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>
  <?php 
}
?>
  </div>
示例#7
0
	$downloadUrl = "/attachment/".basename($file->getStorageLocation())."?g_download=1";
	if (strstr($file->getMimeType(), "image/") && (strstr($_SERVER['HTTP_ACCEPT'], $file->getMimeType()) ||
							(strstr($_SERVER['HTTP_ACCEPT'], "*/*")))) {
	$previewUrl = "/attachment/".basename($file->getStorageLocation())."?g_show_in_browser=1";
	}
?>
<TR>
	<TD align="center" width="100%">
		<TABLE>
		<TR>
			<TD align="center" valign="top">
				<?php if ($f_edit_mode == "edit") { ?><a href="<?php p($fileEditUrl); ?>"><?php } p(wordwrap($file->getFileName(), "25", "<br>", true)); ?><?php if ($f_edit_mode == "edit") { ?></a><?php } ?><br><?php p(htmlspecialchars($file->getDescription($f_language_selected))); ?>
			</TD>
			<?php if ($g_user->hasPermission('DeleteFile')) { ?>
			<TD>
				<A title="<?php putGS("Delete"); ?>" href="<?php p($deleteUrl); ?>" onclick="return confirm('<?php putGS("Are you sure you want to remove the file \\'$1\\' from the poll answer?", camp_javascriptspecialchars($file->getFileName())); ?>');"><IMG src="<?php p($Campsite["ADMIN_IMAGE_BASE_URL"]);?>/unlink.png" border="0" /></A><BR />
				<?php if (!empty($previewUrl)) { ?>
				<A title="<?php putGS("Preview"); ?>" href="javascript: void(0);" onclick="window.open('<?php echo $previewUrl; ?>', 'attach_file', 'scrollbars=yes, resizable=yes, menubar=no, toolbar=no, width=500, height=400, top=200, left=100');"><IMG src="<?php p($Campsite["ADMIN_IMAGE_BASE_URL"]);?>/preview-16x16.png" border="0" /></A>
				<?php } ?>
			</TD>
			<?php } ?>
		</TR>
		<TR>
			<TD align="center"><?php p(camp_format_bytes($file->getSizeInBytes())); ?> <A title="<?php putGS("Download"); ?>" href="<?php p($downloadUrl); ?>"><IMG src="<?php p($Campsite["ADMIN_IMAGE_BASE_URL"]);?>/download.png" border="0" /></A></TD>
			<TD></TD>
		</TR>
		</TABLE>
	</TD>
</TR>
<?php } ?>
</TABLE>
            }
            if ($frontPageAction == 'R') {
                putGS('Remove from front page');
            }
            echo '</li>';
        }
        $sectionPageAction = $event->getSectionPageAction();
        if (!empty($sectionPageAction)) {
            echo '<li>';
            if ($sectionPageAction == 'S') {
                putGS('Show on section page');
            }
            if ($sectionPageAction == 'R') {
                putGS('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 putGS("Are you sure you want to remove the event scheduled on $1?", camp_javascriptspecialchars($event->getActionTime())); ?>');"
          class="corner-button"><span class="ui-icon ui-icon-closethick"></span></a>
        <?php } ?>
      </li>
      <?php } ?>
    </ul>
  <?php } ?>
  </div>
</div>
示例#9
0
/**
 * Campsite Map function plugin
 *
 * Type:     function
 * Name:     map
 * Purpose:  Render a geo map
 *
 * @param array
 *     $p_params List of parameters from template
 * @param object
 *     $p_smarty Smarty template object
 *
 * @return
 *     string The html content
 */
function smarty_function_map($p_params, &$p_smarty)
{
    // the strings are translated via Geo_Preferences::TemplateGeoStrings()
    // if you change some of the strings, put them there too
    $translator = \Zend_Registry::get('container')->getService('translator');
    // Default text for the reset link
    define('DEFAULT_RESET_TEXT', $translator->trans('Show original map', array(), 'api'));
    define('DEFAULT_OPEN_TEXT', $translator->trans('Open large map', array(), 'api'));
    // get the context variable
    $campsite = $p_smarty->getTemplateVars('gimme');
    $html = '';
    $map_common_header_set = $campsite->map_common_header_set;
    $map_load_common_header = !$map_common_header_set;
    // get show locations list parameter
    $showLocationsList = FALSE;
    if (isset($p_params['show_locations_list'])) {
        if (is_string($p_params['show_locations_list'])) {
            if (strtolower(trim((string) $p_params['show_locations_list'])) == 'true') {
                $showLocationsList = TRUE;
            }
        }
        if (is_bool($p_params['show_locations_list'])) {
            if ($p_params['show_locations_list']) {
                $showLocationsList = TRUE;
            }
        }
    }
    // get show reset link parameter
    $showResetLink = TRUE;
    $resetLinkText = DEFAULT_RESET_TEXT;
    if (isset($p_params['show_reset_link'])) {
        $resetLinkText_param = trim((string) $p_params['show_reset_link']);
        if ('1' != $resetLinkText_param && '0' != $resetLinkText_param) {
            $resetLinkText = $resetLinkText_param;
        }
        if (strtolower($resetLinkText_param) == 'false') {
            $showResetLink = FALSE;
        }
        if (empty($p_params['show_reset_link'])) {
            $showResetLink = FALSE;
        }
    }
    if (strtolower($resetLinkText) == 'true') {
        $resetLinkText = DEFAULT_RESET_TEXT;
    }
    // get show open link parameter
    $showOpenLink = TRUE;
    $openLinkText = DEFAULT_OPEN_TEXT;
    if (isset($p_params['show_open_link'])) {
        $openLinkText_param = trim((string) $p_params['show_open_link']);
        if ('1' != $openLinkText_param && '0' != $openLinkText_param) {
            $openLinkText = $openLinkText_param;
        }
        if (strtolower($openLinkText) == 'false') {
            $showOpenLink = FALSE;
        }
        if (empty($p_params['show_open_link'])) {
            $showOpenLink = FALSE;
        }
    }
    if (strtolower($openLinkText) == 'true') {
        $openLinkText = DEFAULT_OPEN_TEXT;
    }
    // should be the map a simple one, with opening the large map on any click
    $openMapOnClick = false;
    if (isset($p_params['open_map_on_click'])) {
        $openMapOnClick_param = strtolower(trim((string) $p_params['open_map_on_click']));
        if ('false' != $openMapOnClick_param && '0' != $openMapOnClick_param && !empty($p_params['open_map_on_click'])) {
            $openMapOnClick = true;
        }
    }
    // get map width and height
    $width_dyn = false;
    $height_dyn = false;
    $width = 0;
    $height = 0;
    if (isset($p_params['width'])) {
        $param_width = strtolower(trim((string) $p_params['width']));
        $param_width_arr = explode('%', $param_width);
        if (1 < count($param_width_arr)) {
            $width_dyn = true;
            $width = (int) $param_width_arr[0];
            if (100 < $width) {
                $width = 100;
            }
        } else {
            $width = (int) $p_params['width'];
        }
        if (0 > $width) {
            $width = 0;
        }
    }
    if (isset($p_params['height'])) {
        $param_height = strtolower(trim((string) $p_params['height']));
        $param_height_arr = explode('%', $param_height);
        if (1 < count($param_height_arr)) {
            $height_dyn = true;
            $height = (int) $param_height_arr[0];
            if (100 < $height) {
                $height = 100;
            }
        } else {
            $height = (int) $p_params['height'];
        }
        if (0 > $height) {
            $height = 0;
        }
    }
    $width_large = isset($p_params['popup_width']) ? (int) $p_params['popup_width'] : 800;
    $height_large = isset($p_params['popup_height']) ? (int) $p_params['popup_height'] : 600;
    $max_zoom = isset($p_params['max_zoom']) ? (int) $p_params['max_zoom'] : null;
    $map_margin = isset($p_params['map_margin']) ? (int) $p_params['map_margin'] : null;
    $area_show = isset($p_params['area_show']) ? (string) $p_params['area_show'] : null;
    // if we shall display a multi-map
    if (!is_null($campsite->map_dynamic_points_raw) || !is_null($campsite->map_dynamic_constraints)) {
        // language must be set in context
        if (!$campsite->language->defined) {
            return;
        }
        $offset = 0;
        $limit = $campsite->map_dynamic_max_points;
        if (!$limit) {
            $limit = 2000;
        }
        $multi_map_rank = $campsite->map_dynamic_id_counter;
        $map_language = (int) $campsite->language->number;
        $multi_map_part = "<!-- Begin Map //-->\n";
        $multi_map_body = '';
        $multi_map_header = '';
        $multi_poi_list = '';
        $multi_map_points = $campsite->map_dynamic_points_raw;
        $multi_map_label = $campsite->map_dynamic_map_label;
        $multi_options = array();
        $multi_options['max_zoom'] = $max_zoom;
        $multi_options['map_margin'] = $map_margin;
        $multi_options['load_common'] = $map_load_common_header;
        $multi_options['pois_retrieved'] = false;
        $multi_options['width_dyn'] = $width_dyn;
        $multi_options['height_dyn'] = $height_dyn;
        $multi_options['large_map_on_click'] = $openMapOnClick;
        $multi_options['large_map_open'] = $showOpenLink;
        $multi_options['large_map_width'] = $width_large;
        $multi_options['large_map_height'] = $height_large;
        $multi_options['large_map_label'] = $multi_map_label;
        if ($campsite->map_dynamic_areas) {
            if ('focus' == strtolower($area_show)) {
                $multi_options['area_points'] = $campsite->map_dynamic_areas;
            }
            if ('focus_empty' == strtolower($area_show)) {
                $multi_options['area_points'] = $campsite->map_dynamic_areas;
                $multi_options['area_points_empty_only'] = true;
            }
        }
        if ($multi_map_points) {
            $multi_options['pois_retrieved'] = true;
            $multi_map_header = Geo_Map::GetMultiMapTagHeader($map_language, $multi_map_points, $multi_options, $offset, $limit, $width, $height, $multi_map_rank);
            $multi_poi_list = Geo_Map::GetMultiMapTagList($map_language, $multi_map_points, $multi_options, $multi_map_label, $offset, $limit, $multi_map_rank);
        } else {
            $multi_map_constraints = $campsite->map_dynamic_constraints;
            $multi_map_header = Geo_Map::GetMultiMapTagHeader($map_language, $multi_map_constraints, $multi_options, $offset, $limit, $width, $height, $multi_map_rank);
            $multi_poi_list = Geo_Map::GetMultiMapTagList($map_language, $multi_map_constraints, $multi_options, $multi_map_label, $offset, $limit, $multi_map_rank);
        }
        $multi_map_center = Geo_Map::GetMultiMapTagCenter($map_language, $multi_map_rank);
        $multi_map_open = Geo_Map::GetMultiMapTagOpen($map_language, $multi_map_rank);
        $multi_map_div = Geo_Map::GetMultiMapTagBody($map_language, $multi_map_rank);
        $multi_map_body .= '
        <div class="geomap_container">';
        if ($showLocationsList == TRUE) {
            $multi_map_body .= '
                <div class="geomap_locations">
                    ' . $multi_poi_list . '
                </div>';
        }
        if ($showResetLink == TRUE) {
            $multi_map_body .= '
                <div class="geomap_menu">
                    <a href="#" onClick="' . $multi_map_center . 'return false;">' . camp_javascriptspecialchars($resetLinkText) . '</a>
                </div>';
        }
        if ($showOpenLink == TRUE) {
            $multi_map_body .= '
                <div class="geomap_open_large_map">
                    <a href="#" onClick="' . $multi_map_open . 'return false;">' . camp_javascriptspecialchars($openLinkText) . '</a>
                </div>';
        }
        $multi_map_body .= '
            <div class="geomap_map">
                ' . $multi_map_div . '
            </div>
        </div>
        <div style="clear:both" ></div>
        <!--End Map //-->
';
        $multi_map_part .= $multi_map_header . $multi_map_body;
        $campsite->map_common_header_set = true;
        return $multi_map_part;
    }
    // the end of the multi-map part; the article map is processed below
    // language and article must be set in context
    if (!$campsite->language->defined || !$campsite->article->defined) {
        return;
    }
    // do nothing if article does not have a map
    if ($campsite->article->has_map == FALSE) {
        return;
    }
    // get article and language from context
    $article = (int) $campsite->article->number;
    $language = (int) $campsite->language->number;
    $auto_focus = isset($p_params['auto_focus']) ? (bool) $p_params['auto_focus'] : null;
    // get core pieces to display the map
    $map_options = array();
    $map_options['auto_focus'] = $auto_focus;
    $map_options['max_zoom'] = $max_zoom;
    $map_options['map_margin'] = $map_margin;
    $map_options['load_common'] = $map_load_common_header;
    $map_options['width_dyn'] = $width_dyn;
    $map_options['height_dyn'] = $height_dyn;
    $map_options['large_map_on_click'] = $openMapOnClick;
    $map_options['large_map_open'] = $showOpenLink;
    $map_options['large_map_width'] = $width_large;
    $map_options['large_map_height'] = $height_large;
    $mapHeader = MetaMap::GetMapTagHeader($article, $language, $width, $height, $map_options);
    $mapMain = MetaMap::GetMapTagBody($article, $language);
    // build javascript code
    $html = '
        <!-- Begin Map //-->' . $mapHeader . '
        <div class="geomap_container">';
    if ($showLocationsList == TRUE) {
        $local = array('map' => $translator->trans('Map', array(), 'api'), 'center' => $translator->trans('Center', array(), 'api'));
        $mapLocationsList = MetaMap::GetMapTagList($article, $language, $local);
        $html .= '
            <div class="geomap_locations">' . $mapLocationsList . '
            </div>';
    }
    if ($showResetLink == TRUE) {
        $mapResetLink = MetaMap::GetMapTagCenter($article, $language);
        $html .= '
            <div class="geomap_menu">
                <a href="#" onClick="' . $mapResetLink . '
                 return false;">' . camp_javascriptspecialchars($resetLinkText) . '</a>
            </div>';
    }
    if ($showOpenLink == TRUE) {
        $mapOpenLink = Geo_Map::GetMapTagOpen($article, $language);
        $html .= '
            <div class="geomap_open_large_map">
                <a href="#" onClick="' . $mapOpenLink . 'return false;">' . camp_javascriptspecialchars($openLinkText) . '</a>
            </div>';
    }
    $html .= '
            <div class="geomap_map">' . $mapMain . '
            </div>
        </div>
        <div style="clear:both" ></div>
        <!--End Map //-->
    ';
    $campsite->map_common_header_set = true;
    return $html;
}
示例#10
0
                <td align='center'>
                <?php if ($poll->isExtended()) { ?>
                    <a href="copy.php?f_poll_nr=<?php p($poll->getNumber()); ?>&f_fk_language_id=<?php p($poll->getLanguageId()) ?>" title="<?php putGS('Copy') ?>">
                        <IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/duplicate.png" BORDER="0">
                    </a>
                <?php } ?>
                </td>

                <td align='center'>
                    <a href="result.php?f_poll_nr=<?php p($poll->getNumber()); ?>&f_fk_language_id=<?php p($poll->getLanguageId()); ?>" title="<?php putGS('Result') ?>">
                        <IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/preview.png" BORDER="0">
                    </a>
                </td>

                <td align='center'>
                    <a href="javascript: if (confirm('<?php echo camp_javascriptspecialchars(getGS('Are you sure you want to delete the poll "$1"?', $poll->getProperty('title'))); ?>')) location.href='do_delete.php?f_poll_nr=<?php p($poll->getNumber()); ?>&amp;f_fk_language_id=<?php p($poll->getLanguageId()); ?>&amp;<?php echo SecurityToken::URLParameter(); ?>'">
                        <IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/delete.png" BORDER="0">
                    </a>
                </td>

            </tr>
            <?php
            $counter++;
        }
      ?>
    </table>
</FORM>
<?php
} else {?>
    <BLOCKQUOTE>
    <LI><?php  putGS('No polls.'); ?></LI>
示例#11
0
        if (empty($tmpTopicName)) {
            $tmpTopicName = $tmpArticleTopic->getName(1);
        }
        ?>
        <li><?php 
        p(wordwrap($pathStr, 45, '<br />&nbsp;&nbsp;'));
        ?>
        <?php 
        if ($inEditMode && $g_user->hasPermission('AttachTopicToArticle')) {
            ?>
          <a class="corner-button" href="<?php 
            p($detachUrl);
            ?>
"
            onclick="return checkChanged() && confirm('<?php 
            putGS("Are you sure you want to remove the topic \\'\$1\\' from the article?", camp_javascriptspecialchars($tmpTopicName));
            ?>
');"><span class="ui-icon ui-icon-closethick"></span></a></li>
        <?php 
        }
        ?>
    <?php 
    }
    ?>
      </ul>
    <?php 
}
?>
    </div>
  </div>
</div>
示例#12
0
文件: edit.php 项目: nidzix/Newscoop
    putGS('Delete image $1', htmlspecialchars($imageObj->getDescription()));
    ?>
"></A>
    </TD>
    <TD style="padding-left: 3px;">
        <A HREF="/<?php 
    echo $ADMIN;
    ?>
/media-archive/do_del.php?f_image_id=<?php 
    echo $f_image_id;
    ?>
&<?php 
    echo SecurityToken::URLParameter();
    ?>
" onclick="return confirm('<?php 
    putGS("Are you sure you want to delete the image \\'\$1\\'?", camp_javascriptspecialchars($imageObj->getDescription()));
    ?>
');"><b><?php 
    putGS('Delete');
    ?>
</b></a>
    </TD>
<?php 
}
?>
</tr>
</table>

<?php 
camp_html_display_msgs();
?>
示例#13
0
            if (empty($name)) {
                // For backwards compatibility -
                // get the english translation if the translation
                // doesnt exist for the article's language.
                $name = $element->getName(1);
                if (empty($name)) {
                    $name = '-----';
                }
            }
            $pathStr .= ' / '. htmlspecialchars($name);
        }

        // Get the topic name for the 'detach topic' dialog box, below.
        $tmpTopicName = $tmpArticleTopic->getName($f_language_selected);
        // For backwards compatibility.
        if (empty($tmpTopicName)) {
            $tmpTopicName = $tmpArticleTopic->getName(1);
        }
    ?>
        <li><?php p(wordwrap($pathStr, 45, '<br />&nbsp;&nbsp;')); ?>
        <?php if ($inEditMode && $g_user->hasPermission('AttachTopicToArticle')) { ?>
          <a class="corner-button" href="<?php p($detachUrl); ?>"
            onclick="return checkChanged() && confirm('<?php putGS("Are you sure you want to remove the topic \\'$1\\' from the article?", camp_javascriptspecialchars($tmpTopicName)); ?>');"><span class="ui-icon ui-icon-closethick"></span></a></li>
        <?php } ?>
    <?php } ?>
      </ul>
    <?php } ?>
    </div>
  </div>
</div>
示例#14
0
文件: index.php 项目: nidzix/Newscoop
        p($debate->getLanguageId());
        ?>
" title="<?php 
        putGS('Result');
        ?>
">
                        <IMG SRC="<?php 
        echo $Campsite["ADMIN_IMAGE_BASE_URL"];
        ?>
/preview.png" BORDER="0">
                    </a>
                </td>

                <td align='center'>
                    <a href="javascript: if (confirm('<?php 
        echo camp_javascriptspecialchars(getGS('Are you sure you want to delete the debate "$1"?', $debate->getProperty('title')));
        ?>
')) location.href='do_delete.php?f_debate_nr=<?php 
        p($debate->getNumber());
        ?>
&amp;f_fk_language_id=<?php 
        p($debate->getLanguageId());
        ?>
&amp;<?php 
        echo SecurityToken::URLParameter();
        ?>
'">
                        <IMG SRC="<?php 
        echo $Campsite["ADMIN_IMAGE_BASE_URL"];
        ?>
/delete.png" BORDER="0">
示例#15
0
    echo $translator->trans('Delete image $1', array('$1' => htmlspecialchars($imageObj->getDescription())), 'media_archive');
    ?>
"></A>
    </TD>
    <TD style="padding-left: 3px;">
        <A HREF="/<?php 
    echo $ADMIN;
    ?>
/media-archive/do_del.php?f_image_id=<?php 
    echo $f_image_id;
    ?>
&<?php 
    echo SecurityToken::URLParameter();
    ?>
" onclick="return confirm('<?php 
    echo $translator->trans("Are you sure you want to delete the image \$1?", array('$1' => camp_javascriptspecialchars($imageObj->getDescription())));
    ?>
');"><b><?php 
    echo $translator->trans('Delete');
    ?>
</b></a>
    </TD>
<?php 
}
?>
</tr>
</table>

<?php 
camp_html_display_msgs();
?>
示例#16
0
<table cellpadding="0" cellspacing="0" class="action_buttons">
<tr>
<?php if ($g_user->hasPermission('AddImage')) { ?>
    <td>
    	<A HREF="add.php"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/add.png" BORDER="0" alt="<?php  putGS('Add new image'); ?>"></A>
    </TD>
    <TD style="padding-left: 3px;">
    	<A HREF="add.php"><B><?php  putGS('Add new image'); ?></B></A>
    </TD>
<?php } ?>
<?php if ($g_user->hasPermission('DeleteImage') && !$imageObj->inUse()) { ?>
    <td style="padding-left: 15px;">
		<A HREF="do_del.php?f_image_id=<?php echo $f_image_id; ?>&<?php echo SecurityToken::URLParameter();?>" onclick="return confirm('<?php putGS("Are you sure you want to delete the image \\'$1\\'?", camp_javascriptspecialchars($imageObj->getDescription())); ?>');"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/delete.png" BORDER="0" ALT="<?php putGS('Delete image $1',htmlspecialchars($imageObj->getDescription())); ?>"></A>
    </TD>
    <TD style="padding-left: 3px;">
    	<A HREF="do_del.php?f_image_id=<?php echo $f_image_id; ?>&<?php echo SecurityToken::URLParameter();?>" onclick="return confirm('<?php putGS("Are you sure you want to delete the image \\'$1\\'?", camp_javascriptspecialchars($imageObj->getDescription())); ?>');"><b><?php putGS('Delete'); ?></b></a>
    </TD>
<?php } ?>
</tr>
</table>

<?php camp_html_display_msgs(); ?>
<p></p>
<IMG SRC="<?php echo $imageObj->getImageUrl(); ?>" BORDER="0" ALT="<?php echo htmlspecialchars($imageObj->getDescription()); ?>" style="padding-left:15px">
<P>
<?php if ($g_user->hasPermission('ChangeImage')) { ?>
<FORM NAME="image_edit" METHOD="POST" ACTION="do_edit.php" ENCTYPE="multipart/form-data">
<?php echo SecurityToken::FormParameter(); ?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" class="box_table">
<TR>
	<TD COLSPAN="2">
示例#17
0
        ?>
        <?php 
        if ($inEditMode && $g_user->hasPermission('AttachTopicToArticle')) {
            ?>
          <a class="corner-button" id="detachTopic" data-language="<?php 
            echo $f_language_selected;
            ?>
" data-topicId="<?php 
            echo $tmpArticleTopic->getTopicId();
            ?>
" data-article-number="<?php 
            echo $f_article_number;
            ?>
" href="/admin/topics/detach"
            data-msg="<?php 
            echo $translator->trans("Are you sure you want to remove the topic \$1 from the article?", array('$1' => camp_javascriptspecialchars($tmpTopicName)), 'articles');
            ?>
"><span class="ui-icon ui-icon-closethick"></span></a></li>
        <?php 
        }
        ?>
    <?php 
    }
    ?>
      </ul>
    <?php 
}
?>
    </div>
  </div>
</div>