示例#1
0
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
OCP\User::checkAdminUser();
$htaccessWorking = getenv('htaccessWorking') == 'true';
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size));
if ($_POST && OC_Util::isCallRegistered()) {
    if (isset($_POST['maxUploadSize'])) {
        if (($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) {
            $maxUploadFilesize = OCP\Util::humanFileSize($setMaxSize);
        }
    }
}
OCP\App::setActiveNavigationEntry("files_administration");
$htaccessWritable = is_writable(OC::$SERVERROOT . '/.htaccess');
$tmpl = new OCP\Template('files', 'admin');
/* 
示例#2
0
		<link rel="stylesheet" href="<?php 
p(\OCP\Util::linkTo('imprint', 'css/content.css'));
?>
" type="text/css" media="screen" />
		<link rel="stylesheet" href="<?php 
p(\OCP\Util::linkTo('imprint', 'css/imprint.css'));
?>
" type="text/css" media="screen" />
	</head>
	<body id="imprint-content">
		<div class="imprint-factoid">    <?php 
p($l->t("Nothing here yet") . "!");
?>
</div>
		<div class="imprint-suggestion"> <?php 
p($l->t("The content of the legal notice has to be configured first") . ".");
?>
</div>
		<div class="imprint-explanation">
			<?php 
if (OCP\User::checkAdminUser()) {
    p($l->t("That configuration is done in the administration section."));
} else {
    p($l->t("That configuration has to be done by the system administration."));
}
?>
			</a>
		</div>
	</body>
</html>