本文整理汇总了PHP中Image::getDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP Image::getDescription方法的具体用法?PHP Image::getDescription怎么用?PHP Image::getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image
的用法示例。
在下文中一共展示了Image::getDescription方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Article
$articleObj = new Article($f_language_selected, $f_article_number);
if (!$articleObj->exists()) {
camp_html_display_error(getGS('Article does not exist.'), null, true);
exit;
}
$imageObj = new Image($f_image_id);
if (!$imageObj->exists()) {
camp_html_display_error(getGS('Image does not exist.'), null, true);
exit;
}
// This file can only be accessed if the user has the right to change articles
// or the user created this article and it hasnt been published yet.
if (!$g_user->hasPermission('AttachImageToArticle')) {
camp_html_display_error(getGS("You do not have the right to attach images to articles."), null, true);
exit;
}
ArticleImage::AddImageToArticle($f_image_id, $f_article_number);
?>
<script>
try {
parent.$.fancybox.reload = true;
parent.$.fancybox.message = "<?php putGS("Image '$1' added.", addslashes($imageObj->getDescription())); ?>";
parent.$.fancybox.close();
} catch (e) {}
</script>
示例2: Image
$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)) {
$articleImageObj = new ArticleImage($f_article_number, $f_image_id);
$updated = $articleImageObj->setTemplateId($f_image_template_id);
if ($updated == false) {
camp_html_add_msg(getGS("Image number '$1' already exists", $f_image_template_id));
camp_html_goto_page($backLink);
}
}
}
camp_html_add_msg(getGS("Image '$1' updated.", $imageObj->getDescription()), "ok");
?>
<script type="text/javascript">
window.location.href='<?php echo "/$ADMIN/articles/edit.php?f_language_id=$f_language_id&f_article_number=$f_article_number"; ?>'
</script>
示例3: if
?>
<p></p>
<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(); ?>
示例4: Image
<?php
camp_load_translation_strings("article_images");
require_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/articles/article_common.php");
require_once($GLOBALS['g_campsiteDir'].'/classes/Image.php');
$f_backlink = Input::Get('Back', 'string', '');
$f_image_id = Input::Get('f_image_id', 'int', 0);
if (!Input::IsValid()) {
camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), $_SERVER['REQUEST_URI'], true);
exit;
}
$imageObj = new Image($f_image_id);
// Add extra breadcrumb for image list.
?>
<P>
<div class="indent">
<a href="<?php p($f_backlink); ?>"><?php putGS("Back"); ?>
<p>
<IMG SRC="<?php echo $imageObj->getImageUrl(); ?>" BORDER="0" ALT="<?php echo htmlspecialchars($imageObj->getDescription()); ?>">
</a>
</div>
<p>
示例5: htmlspecialchars
require_once $GLOBALS['g_campsiteDir'] . '/classes/Image.php';
$translator = \Zend_Registry::get('container')->getService('translator');
$f_backlink = Input::Get('Back', 'string', '');
$f_image_id = Input::Get('f_image_id', 'int', 0);
if (!Input::IsValid()) {
camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), $_SERVER['REQUEST_URI'], true);
exit;
}
$imageObj = new Image($f_image_id);
// Add extra breadcrumb for image list.
?>
<P>
<div class="indent">
<a href="<?php
p($f_backlink);
?>
"><?php
echo $translator->trans("Back");
?>
<p>
<IMG SRC="<?php
echo $imageObj->getImageUrl();
?>
" BORDER="0" ALT="<?php
echo htmlspecialchars($imageObj->getDescription());
?>
">
</a>
</div>
<p>
示例6: confirm
<?php
}
if ($g_user->hasPermission('DeleteImage') && !$imageObj->inUse()) {
?>
<td style="padding-left: 15px;">
<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())));
?>
');"><IMG SRC="<?php
echo $Campsite["ADMIN_IMAGE_BASE_URL"];
?>
/delete.png" BORDER="0" ALT="<?php
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;
示例7: Article
exit;
}
$articleObj = new Article($f_language_selected, $f_article_number);
if (!$articleObj->exists()) {
camp_html_display_error($translator->trans('Article does not exist.'), null, true);
exit;
}
$imageObj = new Image($f_image_id);
if (!$imageObj->exists()) {
camp_html_display_error($translator->trans('Image does not exist.'), null, true);
exit;
}
// This file can only be accessed if the user has the right to change articles
// or the user created this article and it hasnt been published yet.
if (!$g_user->hasPermission('AttachImageToArticle')) {
camp_html_display_error($translator->trans("You do not have the right to attach images to articles.", array(), 'article_images'), null, true);
exit;
}
ArticleImage::AddImageToArticle($f_image_id, $f_article_number);
?>
<script>
try {
parent.$.fancybox.reload = true;
parent.$.fancybox.message = "<?php
echo $translator->trans("Image \$1 added.", array('$1' => addslashes($imageObj->getDescription())), 'article_images');
?>
";
parent.$.fancybox.close();
} catch (e) {}
</script>
示例8: Image
}
$f_image_id = Input::Get('f_image_id', 'int', 0);
if (!Input::IsValid() || ($f_image_id <= 0)) {
camp_html_goto_page("/$ADMIN/media-archive/index.php");
}
$imageObj = new Image($f_image_id);
// This file can only be accessed if the user has the right to delete images.
if (!$g_user->hasPermission('DeleteImage')) {
camp_html_goto_page("/$ADMIN/logout.php");
}
if ($imageObj->inUse()) {
camp_html_add_msg(getGS("Image is in use, it cannot be deleted."));
camp_html_goto_page("/$ADMIN/media-archive/index.php");
}
$imageDescription = $imageObj->getDescription();
$result = $imageObj->delete();
if (PEAR::isError($result)) {
camp_html_add_msg($result->getMessage());
} else {
// Go back to article image list.
camp_html_add_msg(getGS("Image '$1' deleted.", $imageDescription), "ok");
}
camp_html_goto_page("/$ADMIN/media-archive/index.php");
?>
示例9: getFormMask
private function getFormMask()
{
global $Campsite;
$data = $this->m_data;
$exists = $this->exists();
if (!empty($data['fk_image_id'])) {
$Image = new Image($data['fk_image_id']);
$image_description = $Image->getDescription();
}
$mask = array(
array(
'element' => 'action',
'type' => 'hidden',
'constant' => 'interview_edit'
),
SecurityToken::SECURITY_TOKEN => array(
'element' => SecurityToken::SECURITY_TOKEN,
'type' => 'hidden',
'constant' => SecurityToken::GetToken()
),
$exists ? array(
'element' => 'f_interview_id',
'type' => 'hidden',
'constant' => $data['interview_id']
) : null,
array(
'element' => 'f_language_id',
'type' => 'select',
'label' => getGS('Language'),
'default' => $data['fk_language_id'],
'options' => self::GetCampLanguagesList(),
'required' => true,
),
array(
'element' => 'f_moderator_user_id',
'type' => 'select',
'label' => getGS('Moderator'),
'default' => $data['fk_moderator_user_id'],
'options' => self::getUsersHavePermission('plugin_interview_moderator'),
'required' => true,
'attributes' => array('onChange' => 'activate_fields("moderator")')
),
/*
array(
'element' => 'f_moderator_new_user_login',
'type' => 'text',
'label' => getGS('Create new Moderator'),
'default' => $data['f_moderator_new_user_login'],
'attributes' => $_REQUEST['f_moderator_user_id'] == '__new__' ? null : array('disabled'),
),
array(
'element' => 'f_moderator_new_user_email',
'type' => 'text',
'label' => getGS('New Moderator Email'),
'default' => $data['f_moderator_new_user_email'],
'attributes' => $_REQUEST['f_moderator_user_id'] == '__new__' ? null : array('disabled'),
),
*/
array(
'element' => 'f_guest_user_id',
'type' => 'select',
'label' => getGS('Guest'),
'default' => $data['fk_guest_user_id'],
'options' => array('' => getGS('Please select:'))
+ self::getUsersHavePermission('plugin_interview_guest')
+ array('__new__' => getGS('Create new one...')),
'required' => true,
'attributes' => array('onChange' => 'activate_fields("guest")')
),
array(
'element' => 'f_guest_new_user_login',
'type' => 'text',
'label' => getGS('Guest Login'),
'default' => $data['f_guest_new_user_login'],
'attributes' => $_REQUEST['f_guest_user_id'] == '__new__' ? null : array('disabled'),
),
array(
'element' => 'f_guest_new_user_email',
'type' => 'text',
'label' => getGS('Guest Email'),
'default' => $data['f_guest_new_user_email'],
'attributes' => $_REQUEST['f_guest_user_id'] == '__new__' ? null : array('disabled'),
),
array(
'element' => 'f_title',
'type' => 'text',
'label' => getGS('Title'),
'default' => $data['title'],
'required' => true,
),
array(
'element' => 'f_image',
'type' => 'file',
'label' => getGS('Image')
),
array(
'element' => 'f_image_description',
//.........这里部分代码省略.........
示例10: confirm
<?php
}
if ($g_user->hasPermission('DeleteImage') && !$imageObj->inUse()) {
?>
<td style="padding-left: 15px;">
<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()));
?>
');"><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="/<?php
echo $ADMIN;
?>
/media-archive/do_del.php?f_image_id=<?php
echo $f_image_id;
示例11: array
$crumbs[] = array(getGS("Images"), "");
$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>
<?php camp_html_display_msgs("0.25em", "0.25em"); ?>
<P>
<div class="indent">
<IMG SRC="<?php echo $imageObj->getImageUrl(); ?>" BORDER="0" ALT="<?php echo htmlspecialchars($imageObj->getDescription()); ?>">
</div>
<p>
<FORM NAME="dialog" METHOD="POST" ACTION="do_edit.php" >
<?php echo SecurityToken::FormParameter(); ?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" class="box_table">
<TR>
<TD COLSPAN="2">
<B><?php p($title); ?></B>
<HR NOSHADE SIZE="1" COLOR="BLACK">
</TD>
</TR>
<TR>
<TD ALIGN="RIGHT" ><?php putGS('Number'); ?>:</TD>
<TD>
<?php if ($g_user->hasPermission('AttachImageToArticle')) { ?>