/**
  * Prints full-screen media manager
  *
  * @see tpl_media()
  */
 function _mod_tpl_media()
 {
     global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf;
     $fullscreen = true;
     require_once DOKU_INC . 'lib/exe/mediamanager.php';
     if ($_REQUEST['image']) {
         $image = cleanID($_REQUEST['image']);
     }
     if (isset($IMG)) {
         $image = $IMG;
     }
     if (isset($JUMPTO)) {
         $image = $JUMPTO;
     }
     if (isset($REV) && !$JUMPTO) {
         $rev = $REV;
     }
     echo '<div id="mediamanager__page">' . NL;
     echo '<h1>' . $lang['btn_media'] . '</h1>' . NL;
     html_msgarea();
     echo '<div class="panel namespaces">' . NL;
     echo '<h2>' . $lang['namespaces'] . '</h2>' . NL;
     echo '<div class="panelHeader">';
     echo $lang['media_namespaces'];
     echo '</div>' . NL;
     echo '<div class="panelContent" id="media__tree">' . NL;
     media_nstree($NS);
     echo '</div>' . NL;
     echo '</div>' . NL;
     echo '<div class="panel filelist">' . NL;
     $this->_mod_tpl_mediaFileList();
     echo '</div>' . NL;
     echo '<div class="panel file">' . NL;
     echo '<h2 class="a11y">' . $lang['media_file'] . '</h2>' . NL;
     tpl_mediaFileDetails($image, $rev);
     echo '</div>' . NL;
     echo '</div>' . NL;
 }
include 'tpl_site_header_nav.php';
?>
    
    <?php 
if ($conf['breadcrumbs'] or $conf['youarehere']) {
    include 'tpl_site_header_breadcrumbs.php';
}
?>


</header><!-- /#dokuwiki__header -->


    <div class="pad">
<?php 
html_msgarea();
?>
            <!--<div class="clearer"></div>-->
        </div><!-- /.headings -->
        <nav class="tools">
            <!-- USER TOOLS -->
            <?php 
if ($conf['useacl'] && $showTools) {
    ?>
                <div id="dokuwiki__usertools">
                    <h3 class="a11y"><?php 
    echo $lang['user_tools'];
    ?>
</h3>
                    <ul>
                        <?php 
Exemplo n.º 3
0
/**
 * Return the content of the right column
 * (image details) for the Mediamanager
 *
 * @author Kate Arzamastseva <*****@*****.**>
 */
function ajax_mediadetails()
{
    global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf, $INPUT;
    $fullscreen = true;
    require_once DOKU_INC . 'lib/exe/mediamanager.php';
    if ($INPUT->has('image')) {
        $image = cleanID($INPUT->str('image'));
    }
    if (isset($IMG)) {
        $image = $IMG;
    }
    if (isset($JUMPTO)) {
        $image = $JUMPTO;
    }
    if (isset($REV) && !$JUMPTO) {
        $rev = $REV;
    }
    html_msgarea();
    tpl_mediaFileDetails($image, $rev);
}
Exemplo n.º 4
0
/**
 * print a message
 *
 * If HTTP headers were not sent yet the message is added
 * to the global message array else it's printed directly
 * using html_msgarea()
 *
 *
 * Levels can be:
 *
 * -1 error
 *  0 info
 *  1 success
 *
 * @author Andreas Gohr <*****@*****.**>
 * @see    html_msgarea
 */
function msg($message, $lvl = 0, $line = '', $file = '')
{
    global $MSG;
    $errors[-1] = 'error';
    $errors[0] = 'info';
    $errors[1] = 'success';
    $errors[2] = 'notify';
    if ($line || $file) {
        $message .= ' [' . basename($file) . ':' . $line . ']';
    }
    if (!headers_sent()) {
        if (!isset($MSG)) {
            $MSG = array();
        }
        $MSG[] = array('lvl' => $errors[$lvl], 'msg' => $message);
    } else {
        $MSG = array();
        $MSG[] = array('lvl' => $errors[$lvl], 'msg' => $message);
        if (function_exists('html_msgarea')) {
            html_msgarea();
        } else {
            print "ERROR({$lvl}) {$message}";
        }
    }
}
Exemplo n.º 5
0
    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
    <title>
        <?php echo hsc($lang['mediaselect'])?>
        [<?php echo strip_tags($conf['title'])?>]
    </title>
    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
    <?php tpl_metaheaders()?>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
    <?php tpl_includeFile('meta.html') ?>
</head>

<body>
    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
    <div id="media__manager" class="dokuwiki">
        <?php html_msgarea() ?>
        <div id="mediamgr__aside"><div class="pad">
            <h1><?php echo hsc($lang['mediaselect'])?></h1>

            <?php /* keep the id! additional elements are inserted via JS here */?>
            <div id="media__opts"></div>

            <?php tpl_mediaTree() ?>
        </div></div>

        <div id="mediamgr__content"><div class="pad">
            <?php tpl_mediaContent() ?>
        </div></div>
    </div>
    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
</body>
Exemplo n.º 6
0
function msg($message, $lvl = 0, $line = '', $file = '', $allow = MSG_PUBLIC)
{
    global $MSG, $MSG_shown;
    $errors[-1] = 'error';
    $errors[0] = 'info';
    $errors[1] = 'success';
    $errors[2] = 'notify';
    if ($line || $file) {
        $message .= ' [' . utf8_basename($file) . ':' . $line . ']';
    }
    if (!isset($MSG)) {
        $MSG = array();
    }
    $MSG[] = array('lvl' => $errors[$lvl], 'msg' => $message, 'allow' => $allow);
    if (isset($MSG_shown) || headers_sent()) {
        if (function_exists('html_msgarea')) {
            html_msgarea();
        } else {
            print "ERROR({$lvl}) {$message}";
        }
        unset($GLOBALS['MSG']);
    }
}
Exemplo n.º 7
0
/**
 * print a message
 *
 * If HTTP headers were not sent yet the message is added 
 * to the global message array else it's printed directly
 * using html_msgarea()
 * 
 *
 * Levels can be: 
 *  
 * -1 error
 *  0 info
 *  1 success
 *  
 * @author Andreas Gohr <*****@*****.**>
 * @see    html_msgarea
 */
function msg($message, $lvl = 0)
{
    global $MSG;
    $errors[-1] = 'error';
    $errors[0] = 'info';
    $errors[1] = 'success';
    if (!headers_sent()) {
        if (!isset($MSG)) {
            $MSG = array();
        }
        $MSG[] = array('lvl' => $errors[$lvl], 'msg' => $message);
    } else {
        $MSG = array();
        $MSG[] = array('lvl' => $errors[$lvl], 'msg' => $message);
        if (function_exists('html_msgarea')) {
            html_msgarea();
        } else {
            print "ERROR({$lvl}) {$message}";
        }
    }
}
Exemplo n.º 8
0
    /**
     * Handle the plugin_move_ns_continue ajax call
     *
     * @param Doku_Event $event The event that is handled
     * @param array $params Optional parameters (unused)
     */
    public function handle_ajax_call(Doku_Event $event, $params) {
        if ($event->data == 'plugin_move_ns_continue') {
            $event->preventDefault();
            $event->stopPropagation();

            /** @var helper_plugin_move $helper */
            $helper = $this->loadHelper('move', false);
            $opts = $helper->get_namespace_move_opts();
            $id = cleanID((string)$_POST['id']);
            $skip = (string)$_POST['skip'];
            if ($opts !== false) {
                if ($skip == 'true') {
                    $helper->skip_namespace_move_item();
                }
                $remaining = $helper->continue_namespace_move();
                $newid = $helper->getNewID($id, $opts['ns'], $opts['newns']);

                $result = array();
                $result['remaining'] = $remaining;
                $result['pages'] = $opts['num_pages'];
                $result['media'] = $opts['num_media'];
                $result['redirect_url'] = wl($newid, '', true);
                ob_start();
                html_msgarea();
                if ($remaining === false) {
                    ptln('<p>'.sprintf($this->getLang('ns_move_error'), $opts['ns'], $opts['newns']).'</p>');
                    echo $helper->getNSMoveButton('tryagain', $id);
                    echo $helper->getNSMoveButton('skip', $id);
                    echo $helper->getNSMoveButton('abort', $id);
                } else {
                    ptln('<p>'.sprintf($this->getLang('ns_move_continued'), $opts['ns'], $opts['newns'], $remaining).'</p>');
                }
                $result['html'] = ob_get_clean();
            } else {
                $result = array();
                $result['remaining'] = 0;
                $result['pages'] = 0;
                $result['media'] = 0;
                $result['redirect_url'] = wl('', '', true);
                $result['html'] = '';
            }
            $json = new JSON();
            echo $json->encode($result);
        }
    }
$showTools = !tpl_getConf('hideTools') || (tpl_getConf('hideTools') && $_SERVER['REMOTE_USER']);
$logged_in = $_SERVER['REMOTE_USER'];

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $conf['lang']; ?>" xml:lang="<?php print $conf['lang']; ?>">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php tpl_pagetitle() ?> | <?php echo strip_tags($conf['title']) ?></title>
	<?php tpl_metaheaders() ?>
	<link rel="shortcut icon" href="<?php echo _tpl_getFavicon() /* DW versions > 2010-11-12 can use the core function tpl_getFavicon() */ ?>" />
	<?php _tpl_include('meta.html') ?>
</head>

<body id="dokuwiki__site" class="mode_<?php echo $ACT; ?> <?php print(($logged_in ? 'not' : '') . 'logged-in'); ?> front page-node no-sidebars layout-main sidebars-both-last font-size-14 grid-type-fluid grid-width-16 fluid-90">
	<?php html_msgarea() // occasional error and info messages on top of the page ?>
	<?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode,
		see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
	<?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
	<div id="page" class="page">
		<div id="page-inner" class="page-inner">
			<div id="skip" class="a11y">
				<a href="#dokuwiki__content"><?php echo tpl_getLang('skip_to_content'); ?></a></li>
			</div>

			<?php if (!$logged_in): ?>
			<!-- The login-box -->
			<div class="header-top-wrapper full-width" id="header-top-wrapper">
				<div class="header-top row grid16-16" id="header-top">
					<div class="header-top-inner inner clearfix" id="header-top-inner">
						<div class="block block-user odd first last fusion-horiz-login grid16-16" id="block-user-0">
Exemplo n.º 10
0
 /**
  * Handle the "partial" action, using the blank template to deliver nothing but the inner page content.
  *
  * @param {Doku_Event} $event - The DokuWiki event object.
  * @param {mixed} $param  - The fifth argument to register_hook().
  */
 public function handle_action(Doku_Event &$event, $param)
 {
     if (!$this->m_inPartial) {
         return;
     }
     global $ACT, $INPUT, $ID;
     // Compare permissions between the current page and the passed-in id.
     $compareid = $INPUT->str('fastwiki_compareid');
     if ($compareid && auth_quickaclcheck($ID) != auth_quickaclcheck($compareid)) {
         echo 'PERMISSION_CHANGE';
     } else {
         if (!$this->m_no_content) {
             if ($ACT == 'show') {
                 tpl_toc();
             }
             // Section save. This won't work, unless I return new "range" inputs for all sections.
             //			$secedit = $ACT == 'show' && $INPUT->str('target') == 'section' && ($INPUT->str('prefix') || $INPUT->str('suffix'));
             //			if ($secedit)
             //				$this->render_text($INPUT->str('wikitext')); //+++ render_text isn't outputting anything.
             //			else
             tpl_content(false);
         }
     }
     // Output error messages.
     html_msgarea();
 }
Exemplo n.º 11
0
function html_head($news_page, $hours = -1)
{
    global $conf;
    global $lang;
    global $UID;
    print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . NL;
    ?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/1">
    <title><? echo $conf['page_title']; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php 
    echo $lang['CHARSET'];
    ?>
" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="-1" />
    <!--[if lt IE 7]>
    <script language="JavaScript" type="text/javascript" src="js/ie7-standard-p.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="style/<?php 
    echo $conf['page_style'];
    ?>
" media="screen" />
    <link rel="stylesheet" type="text/css" href="style/mobile.css" media="handheld" />
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <link rel="alternate" type="application/rss+xml" title="RSS" href="rss.php/<?php 
    echo md5($UID) . '/' . $UID . '.xml';
    ?>
" />
    <script language="JavaScript" type="text/javascript">
    <!--
        var showDetails = false;
        var markID = '' ;
    //-->
    </script>
    <script language="JavaScript" type="text/javascript" src="js/engine.js"></script>
    <?php 
    if ($news_page) {
        ?>
    <script language="JavaScript" type="text/javascript">
    <!--
        var feed = "rss.php/<?php 
        echo md5($UID) . '/' . $UID . '.xml';
        ?>
";
        var hours = <?php 
        echo "{$hours}";
        ?>
;
    //-->
    </script>
<!--    <script language="JavaScript" type="text/javascript" src="js/ajax.js"></script> -->
    <?php 
    }
    ?>
</head>
<body onload="visible_mode(showDetails)">

<?php 
    html_navigation($news_page);
    html_msgarea();
    print '<div id="main">';
}