本文整理汇总了PHP中check_use_watermark函数的典型用法代码示例。如果您正苦于以下问题:PHP check_use_watermark函数的具体用法?PHP check_use_watermark怎么用?PHP check_use_watermark使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_use_watermark函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_search
?>
">
<?php
if ($feedback_resource_select) {
?>
<h2><?php
echo $lang["selectedresources"];
?>
:</h2><?php
# Show thumbnails and allow the user to select resources.
$result = do_search("!collection" . $collection);
for ($n = 0; $n < count($result); $n++) {
$ref = $result[$n]["ref"];
$access = get_resource_access($ref);
$use_watermark = check_use_watermark($ref);
$title = $ref . " : " . htmlspecialchars(tidy_trim(i18n_get_translated($result[$n]["field" . $view_title_field]), 60));
if (isset($collection_feedback_display_field)) {
$displaytitle = htmlspecialchars(get_data_by_field($ref, $collection_feedback_display_field));
} else {
$displaytitle = $title;
}
?>
<!--Resource Panel-->
<div class="ResourcePanelShell" id="ResourceShell<?php
echo $ref;
?>
">
<div class="ResourcePanel">
示例2: getvalescaped
include "../../../include/resource_functions.php";
include "../../../include/collections_functions.php";
include "../../../include/search_functions.php";
# Get variables and check key is valid.
$ref = getvalescaped("ref", "");
$key = getvalescaped("key", "");
$size = getvalescaped("size", "pre");
$transition = (int) getvalescaped("transition", 4);
$width = getvalescaped("width", "");
$player_width = $width;
# Check key is valid
if (!check_access_key_collection($ref, $key)) {
exit($lang["embedslideshow_notavailable"]);
}
# Load watermark settings
$use_watermark = check_use_watermark();
?>
<html>
<head>
<link href="../css/embedslideshow.css" rel="stylesheet" type="text/css" media="screen,projection,print" />
<script src="../../../lib/js/jquery-1.7.2.min.js" type="text/javascript"></script>
</head>
<body>
<div class="embedslideshow_player">
<div class="embedslideshow_preview" id="embedslideshow_preview" style="width:<?php
echo $width;
?>
px;height:<?php
echo $width + 8;
?>
示例3: HookAnnotateViewRenderinnerresourcepreview
function HookAnnotateViewRenderinnerresourcepreview()
{
global $baseurl_short, $ajax, $ref, $ffmpeg_preview_extension, $resource, $k, $search, $offset, $order_by, $sort, $archive, $lang, $download_multisize, $baseurl, $annotate_ext_exclude, $annotate_rt_exclude, $annotate_public_view, $annotate_pdf_output;
if (in_array($resource['file_extension'], $annotate_ext_exclude)) {
return false;
}
if (in_array($resource['resource_type'], $annotate_rt_exclude)) {
return false;
}
if (!($k == "") && !$annotate_public_view) {
return false;
}
$download_multisize = true;
$flvfile = get_resource_path($ref, true, "pre", false, $ffmpeg_preview_extension);
if (file_exists($flvfile)) {
return false;
}
if ($resource["has_image"] == 1) {
?>
<script type="text/javascript">
button_ok = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["ok"]));
?>
";
button_cancel = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["cancel"]));
?>
";
button_delete = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-delete"]));
?>
";
button_add = "> <?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-add_note"]));
?>
";
button_toggle = "> <?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-toggle-on"]));
?>
";
button_toggle_off = "> <?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-toggle-off"]));
?>
";
error_saving = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-saving"]));
?>
";
error_deleting = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-deleting"]));
?>
";
</script>
<script>
jQuery.noConflict();
</script><?php
$use_watermark = check_use_watermark($resource['ref']);
$imagepath = get_resource_path($ref, true, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
if (!file_exists($imagepath)) {
$imagepath = get_resource_path($ref, true, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
$imageurl = get_resource_path($ref, false, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
} else {
$imageurl = get_resource_path($ref, false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
}
if (!file_exists($imagepath)) {
return false;
}
$sizes = getimagesize($imagepath);
$w = $sizes[0];
$h = $sizes[1];
if (file_exists($imagepath)) {
$page_count = get_page_count($resource);
$multipage_document = FALSE;
if ($page_count > 1) {
$multipage_document = TRUE;
}
?>
<div id="wrapper" class="annotate-view-wrapper">
<div>
<img id="toAnnotate" onload="annotate(<?php
echo $ref;
?>
,'<?php
echo $k;
?>
','<?php
echo $w;
?>
','<?php
echo $h;
?>
',<?php
echo getvalescaped("annotate_toggle", true);
?>
);" src="<?php
echo $imageurl;
//.........这里部分代码省略.........
示例4: HookMagictouchViewReplacerenderinnerresourcepreview
function HookMagictouchViewReplacerenderinnerresourcepreview()
{
global $baseurl, $plugins, $lang, $search, $offset, $archive, $order_by, $sort, $plugins, $download_multisize, $k, $access, $ref, $resource, $watermark;
global $magictouch_account_id;
if ($magictouch_account_id == "") {
return false;
}
// This hooks runs outside of the renderinnerresourcepreview hook,
// and if MTFAIL is defined, annotate will know not to include a Zoom link.
// annotate plugin compatibility
global $plugins;
if (in_array("annotate", $plugins)) {
global $annotate_ext_exclude;
global $annotate_rt_exclude;
if (in_array($resource['file_extension'], $annotate_ext_exclude)) {
return false;
}
if (in_array($resource['resource_type'], $annotate_rt_exclude)) {
return false;
}
if (getval("annotate", "") != "") {
return false;
}
}
// exclusions
global $magictouch_rt_exclude;
global $magictouch_ext_exclude;
if (in_array($resource['resource_type'], $magictouch_rt_exclude)) {
define("MTFAIL", true);
return false;
}
if (in_array($resource['file_extension'], $magictouch_ext_exclude)) {
define("MTFAIL", true);
return false;
}
$download_multisize = true;
if ($resource["has_image"] != 1) {
define("MTFAIL", true);
return false;
}
// watermark check
$access = get_resource_access($ref);
$use_watermark = check_use_watermark($ref);
// paths
$imageurl = get_resource_path($ref, false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
global $magictouch_view_page_sizes;
foreach ($magictouch_view_page_sizes as $mtpreviewsize) {
$largeurl = get_resource_path($ref, false, $mtpreviewsize, false, "jpg", -1, 1, $use_watermark);
$largeurl_path = get_resource_path($ref, true, $mtpreviewsize, false, "jpg", -1, 1, $use_watermark);
if (file_exists($largeurl_path)) {
break;
}
}
if (!file_exists($largeurl_path)) {
define("MTFAIL", true);
return false;
# Requires an original large JPEG file.
}
?>
<div style="float:left;">
<div class="Picture">
<a href="<?php
echo $largeurl;
?>
" class="MagicTouch"><img src="<?php
echo $imageurl;
?>
" GALLERYIMG="no" id="previewimage" /></a>
</div><br />
<?php
// annotate plugin compatibility
if (in_array("annotate", $plugins) && $k == "") {
?>
<a style="display:inline;clear:left;float:left;" href="<?php
echo $baseurl;
?>
/pages/view.php?ref=<?php
echo $ref;
?>
&search=<?php
echo urlencode($search);
?>
&offset=<?php
echo $offset;
?>
&order_by=<?php
echo $order_by;
?>
&sort=<?php
echo $sort;
?>
&archive=<?php
echo $archive;
?>
&k=<?php
echo $k;
?>
&annotate=true" onClick="return CentralSpaceLoad(this);">> <?php
//.........这里部分代码省略.........
示例5: HookAnnotateViewRenderinnerresourcepreview
function HookAnnotateViewRenderinnerresourcepreview()
{
global $ref, $ffmpeg_preview_extension, $resource, $k, $search, $offset, $order_by, $sort, $archive, $lang, $download_multisize, $baseurl, $annotate_ext_exclude, $annotate_rt_exclude, $annotate_public_view, $annotate_pdf_output;
if (in_array($resource['file_extension'], $annotate_ext_exclude)) {
return false;
}
if (in_array($resource['resource_type'], $annotate_rt_exclude)) {
return false;
}
if (!($k == "") && !$annotate_public_view) {
return false;
}
$download_multisize = true;
$flvfile = get_resource_path($ref, true, "pre", false, $ffmpeg_preview_extension);
if (file_exists($flvfile)) {
return false;
}
if ($resource["has_image"] == 1) {
?>
<style type="text/css" media="all">@import "<?php
echo $baseurl;
?>
/plugins/annotate/lib/jquery/css/annotation.css";</style>
<script type="text/javascript" src="<?php
echo $baseurl;
?>
/plugins/annotate/lib/jquery/js/jquery.annotate.js"></script>
<script type="text/javascript">
button_ok = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["ok"]));
?>
";
button_cancel = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["cancel"]));
?>
";
button_delete = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-delete"]));
?>
";
button_add = "> <?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-add_note"]));
?>
";
error_saving = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-saving"]));
?>
";
error_deleting = "<?php
echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-deleting"]));
?>
";
</script>
<script>
jQuery.noConflict();
</script><?php
$use_watermark = check_use_watermark($resource['ref']);
$imagepath = get_resource_path($ref, true, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
if (!file_exists($imagepath)) {
$imagepath = get_resource_path($ref, true, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
$imageurl = get_resource_path($ref, false, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
} else {
$imageurl = get_resource_path($ref, false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
}
if (!file_exists($imagepath)) {
return false;
}
$sizes = getimagesize($imagepath);
$w = $sizes[0];
$h = $sizes[1];
if (file_exists($imagepath)) {
?>
<div id="wrapper" style="display:block;clear:none;float:left;margin: 0px 10px 10px 0px;">
<div>
<img id="toAnnotate" src="<?php
echo $imageurl;
?>
" id="previewimage" class="Picture" GALLERYIMG="no" style="display:block;" />
</div>
<div style="padding-top:10px;">
<a style="display:inline;" href="preview.php?<?php
if (getval("annotate", "") != "") {
?>
annotate=true&<?php
}
?>
ref=<?php
echo $ref;
?>
&ext=<?php
echo $resource["preview_extension"];
?>
&k=<?php
echo $k;
?>
&search=<?php
//.........这里部分代码省略.........