* @package assetlib
* @version $Id: docview.html.php 4952 2021-06-30 09:18:58Z tsj $
* @link https://www.zentao.net
*/
?>
getModuleRoot() . 'common/view/header.html.php';?>
getModuleRoot() . 'common/view/kindeditor.html.php';?>
doc->confirmDelete);?>
' . $lang->goback, '', 'class="btn btn-secondary"');?>
title;?>
id"), '', '', "title='{$lang->assetlib->edit}' class='btn btn-link'");
if(common::hasPriv('assetlib', $approveMethod) and $doc->status == 'draft') echo html::a($this->inlink($approveMethod, "docID=$doc->id", '', true), '', '', "title='{$lang->assetlib->approve}' class='btn btn-link iframe'");
if(common::hasPriv('assetlib', $removeMethod))
{
$deleteURL = $this->createLink('assetlib', $removeMethod, "docID=$doc->id&confirm=no");
echo html::a($deleteURL, '', 'hiddenwin', "title='{$lang->assetlib->remove}' class='btn btn-link'");
}
?>
type == 'url')
{
$url = $doc->content;
if(!preg_match('/^https?:\/\//', $doc->content)) $url = 'http://' . $url;
$urlIsHttps = strpos($url, 'https://') === 0;
$serverIsHttps = ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') or (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https'));
if(($urlIsHttps and $serverIsHttps) or (!$urlIsHttps and !$serverIsHttps))
{
echo "
";
}
else
{
$parsedUrl = parse_url($url);
$urlDomain = $parsedUrl['scheme'] . '://' . $parsedUrl['host'];
$title = '';
$response = common::http($url);
preg_match_all('/
(.*)<\/title>/Ui', $response, $out);
if(isset($out[1][0])) $title = $out[1][0];
echo "";
echo "
";
echo "
";
echo "
{$title}
";
echo "
" . html::a($url, $url, '_target') . "
";
echo "
";
}
}
elseif($doc->contentType == 'markdown')
{
echo "";
}
else
{
echo $doc->content;
}
?>
files as $file):?>
extension, $config->file->imageExtensions)):?>
id}");?>" alt="title?>" title="title;?>">
createLink('file', 'download', 'fileID=' . $file->id);
$downloadLink .= strpos($downloadLink, '?') === false ? '?' : '&';
$downloadLink .= $sessionString;
?>
", '', "class='btn-icon' style='margin-right: 10px;' title=\"{$lang->doc->download}\"");?>
", '', "class='btn-icon' title=\"{$lang->doc->deleteFile}\" onclick='deleteFile($file->id)'");?>
files[$file->id]);?>
fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true', 'object' => $doc));?>
createLink('action', 'comment', "objectType=doc&objectID=$doc->id");?>
getModuleRoot() . 'common/view/action.html.php';?>
contentType == 'markdown'):?>
content));?>
getModuleRoot() . 'common/view/footer.html.php';?>