PageRenderTime 666ms queryTime 50ms sortTime 40ms getByIdsTime 299ms findMatchingLines 200ms

100+ results results for 'php filesize' (666 ms)

Not the results you expected?
SplFileInfo.php https://github.com/tstarling/hiphop-php.git | PHP | 432 lines
                    
4/**
                    
5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )
                    
6 *
                    
18  /**
                    
19   * ( excerpt from http://php.net/manual/en/splfileinfo.construct.php )
                    
20   *
                    
279  /**
                    
280   * ( excerpt from http://php.net/manual/en/splfileinfo.isfile.php )
                    
281   *
                    
293  /**
                    
294   * ( excerpt from http://php.net/manual/en/splfileinfo.isdir.php )
                    
295   *
                    
411  /**
                    
412   * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )
                    
413   *
                    
                
web.php https://github.com/XioNoX/Benevolus.git | PHP | 509 lines
                    
1<?php
                    
2
                    
3/**
                    
4	Web pack for the PHP Fat-Free Framework
                    
5
                    
70			$stats['FILES']['minified']
                    
71				[basename($file)]=filesize($path.$file);
                    
72			// Rewrite relative URLs in CSS
                    
205		if ($echo) {
                    
206			if (PHP_SAPI!='cli' && !headers_sent())
                    
207				header(self::HTTP_Content.': '.$mime[$ext[1]].'; '.
                    
295				self::HTTP_Agent.': Mozilla/5.0 '.
                    
296					'(compatible;'.PHP_OS.')'.self::EOL.
                    
297				($reqhdrs?
                    
330					self::$vars['HEADERS'][]=$hdr;
                    
331					if (PHP_SAPI!='cli' && $forward)
                    
332						// Forward HTTP header
                    
                
UploadHandler.php https://github.com/zikula-modules/Reviews.git | PHP | 404 lines
                    
1<?php
                    
2/**
                    
36     */
                    
37    protected $allowedFileSizes;
                    
38
                    
45        $this->imageFileTypes = array('gif', 'jpeg', 'jpg', 'png', 'swf');
                    
46        $this->forbiddenFileTypes = array('cgi', 'pl', 'asp', 'phtml', 'php', 'php3', 'php4', 'php5', 'exe', 'com', 'bat', 'jsp', 'cfm', 'shtml');
                    
47        $this->allowedFileSizes = array('review' => array('coverUpload' => 102400));
                    
142        // validate file size
                    
143        $maxSize = $this->allowedFileSizes[$objectType][$fieldName];
                    
144        if ($maxSize > 0) {
                    
144        if ($maxSize > 0) {
                    
145            $fileSize = filesize($file['tmp_name']);
                    
146            if ($fileSize > $maxSize) {
                    
325                break;
                    
326            case UPLOAD_ERR_INI_SIZE: //uploaded file exceeds the upload_max_filesize directive in php.ini
                    
327                $errmsg = __('File too big', $dom);
                    
                
file_helper.php https://github.com/smswz/SmartFridge.git | PHP | 479 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
60		$data = '';
                    
61		if (filesize($file) > 0)
                    
62		{
                    
62		{
                    
63			$data =& fread($fp, filesize($file));
                    
64		}
                    
214 * Reads the specified directory and builds an array containing the filenames,
                    
215 * filesize, dates, and permissions
                    
216 *
                    
240
                    
241			// foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast
                    
242			while (FALSE !== ($file = readdir($fp)))
                    
                
import.php https://bitbucket.org/hudsonite/concrete5.git | PHP | 317 lines
                    
67		<div class="help-block" style="margin-top: 11px">
                    
68		<?=t('Upload Max: %s.', ini_get('upload_max_filesize'))?>
                    
69		<?=t('Post Max: %s', ini_get('post_max_size'))?>
                    
72
                    
73<h3><?php echo t('Upload Multiple Files')?></h3>
                    
74
                    
75<?
                    
76$umf = ini_get('upload_max_filesize');
                    
77$umf = str_ireplace(array('M', 'K', 'G'), array(' MB', 'KB', ' GB'), $umf);
                    
96		upload_url : "<?=REL_DIR_FILES_TOOLS_REQUIRED?>/files/importers/multiple",
                    
97		post_params: {'ccm-session' : "<?php echo session_id(); ?>",'searchInstance': '<?=$searchInstance?>', 'ocID' : '<?=$ocID?>', 'ccm_token' : '<?=$valt->generate("upload")?>'},
                    
98		file_size_limit : "<?=$umf?>",
                    
100		button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,
                    
101		file_types_description : "<?php echo t('All Files') ?>",
                    
102		file_upload_limit : 100,
                    
                
General.php https://bitbucket.org/jokusafet/magento2.git | PHP | 344 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
152        if ($this->_isThemeEditable) {
                    
153            $maxImageSize = Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSizeInMb();
                    
154            if ($maxImageSize) {
                    
                
imageupload.php https://gitlab.com/haque.mdmanzurul/nga-loyaltymatters | PHP | 287 lines
                    
1<?php
                    
2
                    
48    $allowedExtensions = empty($allowedExtensions) ? 'jpg,jpeg,png,gif' : $allowedExtensions;
                    
49    $maxFilesizeMb = $modx->getOption('maxFilesizeMb', $sourceProperties, '8');
                    
50    $maxFiles = $modx->getOption('maxFiles', $sourceProperties, '0');
                    
68
                    
69    include_once AIU_BASE_PATH . 'includes/fileuploader/fileuploader.class.php';
                    
70
                    
74
                    
75    // default: &language=`english` &allowedExtensions=`jpg,jpeg,png,gif` &maxFilesizeMb=`8` &uid=`site-specific` &maxFiles=`3` &thumbX=`100` &=`100` &mode=`form` &ajaxId=`0`
                    
76
                    
81    if (!function_exists('includeFile')) {
                    
82        function includeFile($name, $type = 'config', $defaultName = 'default', $fileType = '.inc.php') {
                    
83            $folder = (substr($type, -1) != 'y') ? $type . 's/' : substr($folder, 0, -1) . 'ies/';
                    
106
                    
107    include_once AIU_BASE_PATH . 'includes/PhpThumbFactory/ThumbLib.inc.php';
                    
108    // delete uploaded images
                    
                
Filesystem.php https://gitlab.com/Ltaimao/wecenter | PHP | 364 lines
                    
1<?php
                    
2/**
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25//require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
120            if (file_exists($path)) {
                    
121                //require_once 'Zend/Search/Lucene/Exception.php';
                    
122                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
124                if (!self::mkdirs($path)) {
                    
125                    //require_once 'Zend/Search/Lucene/Exception.php';
                    
126                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
184        unset($this->_fileHandlers[$filename]);
                    
185        //require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
186        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
209
                    
210        global $php_errormsg;
                    
211        $trackErrors = ini_get('track_errors');
                    
                
Filesystem.php https://github.com/grjones/qframe.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
attachments.php https://github.com/naderman/phpbb-orchestra.git | PHP | 174 lines
                    
1<?php
                    
2/**
                    
7* @version $Id$
                    
8* @copyright (c) 2005 phpBB Group
                    
9* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
15*/
                    
16if (!defined('IN_PHPBB'))
                    
17{
                    
40	'ACP_EXTENSION_GROUPS_EXPLAIN'		=> 'Here you can add, delete, modify or disable your extension groups. Further options include the assignment of a special category to them, changing the download mechanism and defining an upload icon which will be displayed in front of the attachment which belongs to the group.',
                    
41	'ACP_MANAGE_EXTENSIONS_EXPLAIN'		=> 'Here you can manage your allowed extensions. To activate your extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as <code>php</code>, <code>php3</code>, <code>php4</code>, <code>phtml</code>, <code>pl</code>, <code>cgi</code>, <code>py</code>, <code>rb</code>, <code>asp</code>, <code>aspx</code>, and so forth…).',
                    
42	'ACP_ORPHAN_ATTACHMENTS_EXPLAIN'	=> 'Here you are able to see orphaned files. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post ID, you have to determine this ID by yourself. This will assign the already uploaded attachment to the post you entered.',
                    
58	'ATTACH_ID'							=> 'ID',
                    
59	'ATTACH_MAX_FILESIZE'				=> 'Maximum file size',
                    
60	'ATTACH_MAX_FILESIZE_EXPLAIN'		=> 'Maximum size of each file, with 0 being unlimited.',
                    
60	'ATTACH_MAX_FILESIZE_EXPLAIN'		=> 'Maximum size of each file, with 0 being unlimited.',
                    
61	'ATTACH_MAX_PM_FILESIZE'			=> 'Maximum file size messaging',
                    
62	'ATTACH_MAX_PM_FILESIZE_EXPLAIN'	=> 'Maximum size of each file, with 0 being unlimited, attached to a private message.',
                    
                
Filesystem.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 364 lines
                    
1<?php
                    
2/**
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25#require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
120            if (file_exists($path)) {
                    
121                #require_once 'Zend/Search/Lucene/Exception.php';
                    
122                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
124                if (!self::mkdirs($path)) {
                    
125                    #require_once 'Zend/Search/Lucene/Exception.php';
                    
126                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
184        unset($this->_fileHandlers[$filename]);
                    
185        #require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
186        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
209
                    
210        global $php_errormsg;
                    
211        $trackErrors = ini_get('track_errors');
                    
                
system_preferences.php https://github.com/harriswong/ATutor.git | PHP | 106 lines
                    
1<?php require('../common/body_header.inc.php'); $lm = '$LastChangedDate$'; ?>
                    
2
                    
11			<dt>Default Language</dt>
                    
12			<dd>The default language to use if the client's browser settings cannot be detected. Must be one of the languages already installed. See the <a href="languages.php">Languages</a> section on installing and managing existing languages.</dd>
                    
13
                    
20			<dt>Maximum File Size</dt>
                    
21			<dd>Maximum allowable file size in Bytes that can be uploaded to the course's File Manager. This does not override the value set for <kbd>upload_max_filesize</kbd> in <kbd>php.ini</kbd>.</dd>
                    
22
                    
44			<dt>Allow the use of CAPTCHA</dt>
                    
45			<dd>This requires the GD library installed (FreeType library is recommanded to have for better effect).  If enabled, users will be asked to enter an additional field for the alphanumeric sequence of the CAPTCHA image.  The CAPTCHA image can be mended in various ways depending on your need, please visit <a href="http://www.phpcaptcha.org/captcha-gallery/" target="_new">phpCaptcha</a> for more details.</dd>
                    
46
                    
63			<dt>Theme Specific Categories</dt>
                    
64			<dd>Theme specific categories allows for the association between themes and categories. Courses belonging to a specific category will always be presented using that category's associated theme. This option disables the personalised theme preference. Use the <a href="categories.php">Categories</a> section to create and manage course categories, and the <a href="themes.php">Themes</a> section to install and manage themes.</dd>
                    
65
                    
105
                    
106<?php require('../common/body_footer.inc.php'); ?>
                    
                
FilesystemTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 240 lines
                    
1<?php
                    
2
                    
120     */
                    
121    public function testRemoveDirectoryPhp()
                    
122    {
                    
127        $fs = new Filesystem;
                    
128        $this->assertTrue($fs->removeDirectoryPhp($tmp . "/composer_testdir"));
                    
129        $this->assertFalse(file_exists($tmp . "/composer_testdir/level1/level2/hello.txt"));
                    
131
                    
132    public function testFileSize()
                    
133    {
                    
                
Filesystem.php https://gitlab.com/techniconline/kmc | PHP | 426 lines
                    
1<?php namespace Illuminate\Filesystem;
                    
2
                    
207    {
                    
208        return filesize($path);
                    
209    }
                    
                
mail.php https://bitbucket.org/allanxyh/uniquemall.git | PHP | 406 lines
                    
1<?php
                    
2class Mail {
                    
95		$header .= 'Return-Path: ' . $this->from . $this->newline;
                    
96		$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
                    
97		//$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
                    
127				
                    
128				$content = fread($handle, filesize($attachment));
                    
129				
                    
158			} else {
                    
159				if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
160					socket_set_timeout($handle, $this->timeout, 0);
                    
358					foreach ($results as $result) {
                    
359						if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
360							fputs($handle, $result . $this->crlf);
                    
                
mail.php https://gitlab.com/2202Programming/navxmxp | PHP | 406 lines
                    
1<?php
                    
2class Mail {
                    
95		$header .= 'Return-Path: ' . $this->from . $this->newline;
                    
96		$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
                    
97		$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
                    
127				
                    
128				$content = fread($handle, filesize($attachment));
                    
129				
                    
158			} else {
                    
159				if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
160					socket_set_timeout($handle, $this->timeout, 0);
                    
358					foreach ($results as $result) {
                    
359						if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
360							fputs($handle, $result . $this->crlf);
                    
                
DataTest.php https://bitbucket.org/jokusafet/magento2.git | PHP | 134 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
24 * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
                    
25 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
26 */
                    
27
                    
28class Mage_Sitemap_Helper_DataTest extends PHPUnit_Framework_TestCase
                    
29{
                    
56     */
                    
57    public function testGetMaximumFileSize()
                    
58    {
                    
58    {
                    
59        $this->assertEquals(10485760, $this->_helper->getMaximumFileSize(Mage_Core_Model_App::ADMIN_STORE_ID));
                    
60        $this->assertEquals(1024, $this->_helper->getMaximumFileSize(Mage_Core_Model_App::DISTRO_STORE_ID));
                    
                
Logger.php https://gitlab.com/hoanghung.dev/phunuvadoisong.com | PHP | 456 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Logger.php
                    
4 *
                    
416
                    
417		// Check filesize
                    
418		$roll = false;
                    
419		if (file_exists($logFile)) {
                    
420			$size = filesize($logFile);
                    
421
                    
                
file_details.php https://github.com/cj/Project-Pier.git | PHP | 107 lines
                    
31<?php if ($file->isPrivate()) { ?>
                    
32  <div class="private" title="<?php echo lang('private file') ?>"><span><?php echo lang('private file') ?></span></div>
                    
33<?php } // if ?>
                    
41<?php if ($folder instanceof ProjectFolder) { ?>
                    
42      <div id="fileFolder"><span class="propertyName"><?php echo lang('folder') ?>:</span> <a href="<?php echo $folder->getBrowseUrl() ?>"><?php echo clean($folder->getName()) ?></a></div>
                    
43<?php } // if ?>
                    
57$options = array();
                    
58if ($file->canDownload(logged_user())) $options[] = '<a href="' . $file->getDownloadUrl() . '" class="downloadLink">' . lang('download') . ' <span>(' . format_filesize($file->getFilesize()) . ')</span></a>';
                    
59if ($file->canEdit(logged_user())) $options[] = '<a href="' . $file->getEditUrl() . '">' . lang('edit') . '</a>';
                    
75<?php $counter++; ?>
                    
76  <div class="revision <?php echo $counter % 2 ? 'even' : 'odd' ?> <?php echo $counter == 1 ? 'lastRevision' : '' ?>" id="revision<?php echo $revision->getId() ?>">
                    
77    <div class="revisionName">
                    
89  if ($revision->canDownload(logged_user())) {
                    
90    $options[] = '<a href="' . $revision->getDownloadUrl() . '" class="downloadLink">' . lang('download') . ' <span>(' . format_filesize($revision->getFileSize()) . ')</span></a>';
                    
91  }
                    
                
noutrace.class.php https://bitbucket.org/lordgnu/xdebug-trace-gui.git | PHP | 443 lines
                    
1<?php
                    
2
                    
13  public $customNamespace = 'Corretge\\';
                    
14  public $filesize;
                    
15  protected $defFN;
                    
129
                    
130      $this->filesize = filesize($this->logDirectory . '/' . $this->file);
                    
131    }
                    
154    /**
                    
155     * recuperem la llista de funcions, les pròpies de PHP hi
                    
156     * seran sota ['internal']
                    
208    {
                    
209      throw new Exception("xdebug.trace_format in /etc/php5/conf.d/xdebug.ini must be 1");
                    
210    }
                    
348          echo '<span class="line">';
                    
349          echo "<a href='trace-code.php?file={$jData[8]}&line={$jData[9]}' target='trace-code'>$jData[9]</a>";
                    
350          echo "</span>";
                    
                
pwp.c https://bitbucket.org/wallwizz/imagemagick-6.8.4-for-bb10.git | C | 319 lines
                    
25%                                                                             %
                    
26%    http://www.imagemagick.org/script/license.php                            %
                    
27%                                                                             %
                    
148  size_t
                    
149    filesize,
                    
150    length;
                    
209    (void) length;
                    
210    filesize=65535UL*magick[2]+256L*magick[1]+magick[0];
                    
211    for (i=0; i < (ssize_t) filesize; i++)
                    
                
OAuth.php https://gitlab.com/wuhang2003/core | PHP | 216 lines
                    
1<?php
                    
2
                    
8 * @author Evert Pot (http://www.rooftopsolutions.nl/) 
                    
9 * @license http://code.google.com/p/dropbox-php/wiki/License MIT
                    
10 */
                    
82     */
                    
83    protected $inFileSize = null;
                    
84    
                    
161            $stat = fstat($file);
                    
162            $this->inFileSize = $stat['size'];
                    
163        } else if (is_string($file) && is_readable($file)) {
                    
163        } else if (is_string($file) && is_readable($file)) {
                    
164            $this->inFileSize = filesize($file);
                    
165            $file = fopen($file, 'rb');
                    
                
filebrowser.php https://bitbucket.org/chiamingyen/cmsimple-and-plugins.git | PHP | 431 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @version $Id: filebrowser.php 292 2012-09-21 16:24:11Z cmb69 $
                    
5 */
                    
21    var $allowedExtensions = array();
                    
22    var $maxFilesizes = array();
                    
23    var $view;
                    
250// 設法在 Windows 能夠儲存中文命名檔案
                    
251if (substr(php_uname(), 0, 7) == "Windows")
                    
252{
                    
273                $this->view->error('error_not_uploaded', $file['name']);
                    
274                $this->view->error('error_file_too_big', array('?',  ini_get('upload_max_filesize')));
                    
275                return;
                    
284        // $type = $this->linkType == 'images' ? 'images' : 'downloads';
                    
285        if (isset($this->maxFilesizes[$type])) {
                    
286           if ($file['size'] > $this->maxFilesizes[$type]) {
                    
                
Filesystem.php https://github.com/ParveenArora/AddressHunter.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
external_test.php https://bitbucket.org/moodle/moodle.git | PHP | 250 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
34
                    
35require_once($CFG->libdir . '/externallib.php');
                    
36require_once($CFG->dirroot . '/webservice/tests/helpers.php');
                    
96        $this->assertEquals($deployedfile['mimetype'], $result['files'][0]['mimetype']);
                    
97        $this->assertEquals($deployedfile['filesize'], $result['files'][0]['filesize']);
                    
98        $this->assertEquals($deployedfile['timemodified'], $result['files'][0]['timemodified']);
                    
121        // Create a non-local URL.
                    
122        $urlnonlocal = 'http://www.google.com/pluginfile.php/644/block_html/content/arithmetic-quiz-1-1.h5p';
                    
123        $result = external::get_trusted_h5p_file($urlnonlocal, 0, 0, 0, 0);
                    
196        $this->assertEquals($deployedfile['mimetype'], $result['files'][0]['mimetype']);
                    
197        $this->assertEquals($deployedfile['filesize'], $result['files'][0]['filesize']);
                    
198        $this->assertEquals($deployedfile['timemodified'], $result['files'][0]['timemodified']);
                    
244        $this->assertEquals($deployedfile['mimetype'], $result['files'][0]['mimetype']);
                    
245        $this->assertEquals($deployedfile['filesize'], $result['files'][0]['filesize']);
                    
246        $this->assertEquals($deployedfile['timemodified'], $result['files'][0]['timemodified']);
                    
                
extension.cache.sqlite3.php https://gitlab.com/x33n/ampache | PHP | 265 lines
                    
167		$filetime = filemtime($filename);
                    
168		$filesize = filesize($filename);
                    
169		// this will be saved for a quick directory lookup of analized files
                    
190		$stmt->bindValue(':dirname', $dirname, SQLITE3_TEXT);
                    
191		$stmt->bindValue(':filesize', $filesize, SQLITE3_INTEGER);
                    
192		$stmt->bindValue(':filetime', $filetime, SQLITE3_INTEGER);
                    
249			case 'get_id3_data':
                    
250				return "SELECT val FROM $this->table WHERE filename = :filename AND filesize = :filesize AND filetime = :filetime";
                    
251				break;
                    
252			case 'cache_file':
                    
253				return "INSERT INTO $this->table (filename, dirname, filesize, filetime, analyzetime, val) VALUES (:filename, :dirname, :filesize, :filetime, :atime, :val)";
                    
254				break;
                    
255			case 'make_table':
                    
256				return "CREATE TABLE IF NOT EXISTS $this->table (filename VARCHAR(255) NOT NULL DEFAULT '', dirname VARCHAR(255) NOT NULL DEFAULT '', filesize INT(11) NOT NULL DEFAULT '0', filetime INT(11) NOT NULL DEFAULT '0', analyzetime INT(11) NOT NULL DEFAULT '0', val text not null, PRIMARY KEY (filename, filesize, filetime))";
                    
257				break;
                    
                
Filesystem.php https://github.com/ayamyau/concrete5.git | PHP | 363 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 23964 2011-05-03 14:20:58Z adamlundrigan $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
FileValidatorTest.php https://github.com/Exercise/symfony.git | PHP | 324 lines
                    
1<?php
                    
2
                    
18
                    
19abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase
                    
20{
                    
316        if (class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) {
                    
317            $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array('{{ limit }}' => UploadedFile::getMaxFilesize() . ' bytes'));
                    
318        }
                    
                
Tar.php https://bitbucket.org/acidel/buykoala.git | PHP | 372 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
56     * Skip first level parent directory. Example:
                    
57     *   use test/fip.php instead test/test/fip.php;
                    
58     *
                    
137            $data = $this->_readFile($file);
                    
138            $data = str_pad($data, floor(((is_dir($file) ? 0 : filesize($file)) + 512 - 1) / 512) * 512, "\0");
                    
139        }
                    
183        $header['8-gid']          = $long || $infoFile['gid']==0?"\0\0\0\0\0\0\0":sprintf("%07o", $infoFile['gid']);
                    
184        $header['12-size']        = $long?sprintf("%011o", strlen($nameFile)):sprintf("%011o", is_dir($file) ? 0 : filesize($file));
                    
185        $header['12-mtime']       = $long?'00000000000':sprintf("%011o", $infoFile['mtime']);
                    
                
Filesystem.php https://github.com/tedkulp/cmsmadesimple-2-0.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 18954 2009-11-12 20:01:33Z alexander $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
index.php https://github.com/atutor/AChecker.git | PHP | 294 lines
                    
53			<td>Case Sensitivity</td>
                    
54			<td><?php if (file_exists('../include/classes/AccessibilityValidator.class.php') && file_exists('../include/classes/accessibilityvalidator.class.php')) {
                    
55						echo 'Ignored</td><td align="center">';
                    
117			<td><kbd>upload_max_filesize</kbd> &gt;= 2 MB</td>
                    
118			<td><?php echo $filesize = ini_get('upload_max_filesize'); ?></td>
                    
119			<td align="center"><?php 
                    
154				$filesize_int = intval($filesize);
                    
155				if ("$filesize_int" == $filesize) {
                    
156					// value is in Bytes
                    
232						We strongly encourage you to install the 'mbstring' library before continuing, however, if you choose not to install the library from PHP, a third party library within AChecker will be used.  <br/><br/>
                    
233						For production systems, we strongly encourage you to install the PHP with <a href="http://ca.php.net/manual/en/ref.mbstring.php" target="php_site">mbstring</a> support.  <br/><br/>
                    
234						You may choose to by pass the mbstring check for the installation at your own risk by clicking <a href="javascript:void(0);" onclick="javascript:document.form.next.disabled=false;">continue</a>.</strong></td>
                    
293
                    
294<?php require(AC_INCLUDE_PATH.'footer.inc.php'); ?>
                    
295
                    
                
import_mainte.php https://github.com/shoitokazu/GNS-idemitsu-Job.git | PHP | 167 lines
                    
1<?php
                    
2include 'header.php';
                    
2include 'header.php';
                    
3include '../../include/config_fields.php';
                    
4
                    
91	case UPLOAD_ERR_INI_SIZE:
                    
92		$errorMessage = '値: 1; アップロードされたファイルは、php.ini の upload_max_filesize ディレクティブの値を超えています。';
                    
93		break;
                    
103	case UPLOAD_ERR_NO_TMP_DIR:
                    
104		$errorMessage =  '値: 6; テンポラリフォルダがありません。PHP 4.3.10 と PHP 5.0.3 で導入されました。';
                    
105		break;
                    
121
                    
122<?php
                    
123if ( $mode == 'ins' ) {
                    
166</html>
                    
167<?php include 'footer.php';?>
                    
                
MassSaveAjax.php https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git | PHP | 263 lines
                    
1<?php
                    
2/*+***********************************************************************************
                    
179					$filetype = $existingAttachInfo['type'];
                    
180					$filesize = $existingAttachInfo['size'];
                    
181
                    
                
LzmaCompress.c https://gitlab.com/envieidoc/Clover | C | 382 lines
                    
11  which accompanies this distribution.  The full text of the license may be found at
                    
12  http://opensource.org/licenses/bsd-license.php
                    
13
                    
99
                    
100static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 fileSize)
                    
101{
                    
102  SRes res;
                    
103  size_t inSize = (size_t)fileSize;
                    
104  Byte *inBuffer = 0;
                    
126  // we allocate 105% of original size + 64KB for output buffer
                    
127  outSize = (size_t)fileSize / 20 * 21 + (1 << 16);
                    
128  outBuffer = (Byte *)MyAlloc(outSize);
                    
136    for (i = 0; i < 8; i++)
                    
137      outBuffer[i + LZMA_PROPS_SIZE] = (Byte)(fileSize >> (8 * i));
                    
138  }
                    
                
filespec_test.php https://github.com/VSEphpbb/phpbb.git | PHP | 338 lines
                    
5*
                    
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
                    
7* @license GNU General Public License, version 2 (GPL-2.0)
                    
13
                    
14require_once __DIR__ . '/../../phpBB/includes/functions.php';
                    
15require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
                    
133		$filespec->file_moved = true;
                    
134		$filespec->filesize = $filespec->get_filesize($this->path . $filename);
                    
135
                    
297	{
                    
298		// Global $phpbb_root_path and $phpEx are required by phpbb_chmod
                    
299		global $phpbb_root_path, $phpEx;
                    
303		$upload = new phpbb_mock_fileupload();
                    
304		$upload->max_filesize = self::UPLOAD_MAX_FILESIZE;
                    
305
                    
                
model.php https://gitlab.com/edgarze188/sunrise | PHP | 280 lines
                    
1<?php
                    
2/**
                    
149          }
                    
150          $file_size_kb = (int)(filesize($parent_dir . '/' . $file_name) / 1024);
                    
151          // $file_size_mb = (int)($file_size_kb / 1024);
                    
206          }
                    
207          $file_size_kb = (int)(@filesize($parent_dir . '/' . $file_meta['file']) / 1024);
                    
208          if (!$file_size_kb) continue;
                    
231
                    
232        $size_of_a = filesize($p_dir . '/' . $a);
                    
233        $size_of_b = filesize($p_dir . '/' . $b);
                    
                
index.php https://bitbucket.org/viktorfabry/banditos.git | PHP | 120 lines
                    
1<div id="upload-box">
                    
2	<h2><?php echo lang('files:upload'); ?><span class="close ui-icon ui-icon-closethick"><?php echo lang('buttons.close'); ?></span></h2>
                    
3	<?php echo form_open_multipart('admin/wysiwyg/upload'); ?>
                    
23				<?php echo form_submit('button_action', lang('buttons.save'), 'class="button"'); ?>
                    
24				<a href="<?php echo current_url(); ?>#" class="btn cancel"><?php echo lang('buttons.cancel'); ?></a>
                    
25			</li>
                    
34		<?php if ( ! $folder->parent_id): ?>
                    
35			<li id="folder-id-<?php echo $folder->id; ?>" class="<?php echo $current_folder && $current_folder->id == $folder->id ? 'current' : ''; ?>">
                    
36				<?php echo anchor("admin/wysiwyg/image/index/{$folder->id}", $folder->name, 'title="'.$folder->slug.'"'); ?>
                    
93					<tr class="<?php echo alternator('', 'alt'); ?>">
                    
94						<td class="image"><img class="pyro-image" src="<?php echo base_url($image->location === 'local' ? 'files/thumb/'.$image->id.'/50/50' : 'files/cloud_thumb/'.$image->id); ?>" alt="<?php echo $image->name; ?>" width="50" onclick="javascript:insertImage('<?php echo $image->id."', '".htmlentities($image->name)."', '".$image->location."', '".$image->path; ?>');" /></td>
                    
95						<td class="name-description">
                    
104						<td class="meta height"><?php echo $image->height; ?></td>
                    
105						<td class="meta size"><?php echo $image->filesize; ?></td>
                    
106					</tr>
                    
                
weixin.php https://gitlab.com/Ltaimao/wecenter | PHP | 430 lines
                    
1<?php
                    
2/*
                    
200
                    
201                case 'upload_invalid_filesize':
                    
202                    die("{'error':'文件尺寸过大, 最大允许尺寸为 " . get_setting('upload_size_limit') .  " KB'}");
                    
                
example09_forms.php https://gitlab.com/varsha_evonix/intranet | PHP | 204 lines
                    
1<?php
                    
2
                    
6define('_MPDF_PATH','../');
                    
7include("../mpdf.php");
                    
8
                    
180	header("Content-Type: text/plain");
                    
181	header("Content-Length: ". filesize($file));
                    
182	header("Content-Disposition: attachment; filename='".$file."'");
                    
                
file.php https://github.com/andergmartins/joomla-platform.git | PHP | 540 lines
                    
1<?php
                    
2/**
                    
321
                    
322		if ($fsize = @ filesize($filename))
                    
323		{
                    
415	 *
                    
416	 * @param   string   $src          The name of the php (temporary) uploaded file
                    
417	 * @param   string   $dest         The path (including filename) to move the uploaded file to
                    
                
module.graphic.jpg.php https://gitlab.com/gregtyka/wimppy1 | PHP | 344 lines
                    
1<?php
                    
2/////////////////////////////////////////////////////////////////
                    
9//                                                             //
                    
10// module.graphic.jpg.php                                      //
                    
11// module for analyzing JPEG Image files                       //
                    
11// module for analyzing JPEG Image files                       //
                    
12// dependencies: PHP compiled with --enable-exif (optional)    //
                    
13//               module.tag.xmp.php (optional)                 //
                    
34		//list($width, $height, $type) = getid3_lib::GetDataImageSize(fread($this->getid3->fp, $info['filesize']), $imageinfo);
                    
35		list($width, $height, $type) = getimagesize($info['filenamepath'], $imageinfo); // http://www.getid3.org/phpBB3/viewtopic.php?t=1474
                    
36
                    
38		if (isset($imageinfo['APP13'])) {
                    
39			// http://php.net/iptcparse
                    
40			// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/IPTC.html
                    
67						if (substr($imageinfo['APP1'], 0, 4) == 'Exif') {
                    
68//$info['warning'][] = 'known issue: https://bugs.php.net/bug.php?id=62523';
                    
69//return false;
                    
                
flexuploader.js https://gitlab.com/LisovyiEvhenii/ismextensions | JavaScript | 372 lines
                    
8 * It is also available through the world-wide-web at this URL:
                    
9 * http://opensource.org/licenses/afl-3.0.php
                    
10 * If you did not receive a copy of the license and are unable to
                    
22 * @copyright   Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
23 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
                    
24 */
                    
152            this.files = event.getData().files;
                    
153            this.checkFileSize();
                    
154            this.updateFiles();
                    
299        },
                    
300        checkFileSize: function() {
                    
301            newFiles = [];
                    
313                alert(
                    
314                    this.translate('Maximum allowed file size for upload is')+' '+maxUploadFileSize+".\n"+this.translate('Please check your server PHP settings.')
                    
315                );
                    
                
Zip.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 484 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
43 * This class is based on a library I found at Zend:
                    
44 * http://www.zend.com/codex.php?id=696&single=1
                    
45 *
                    
182			.pack('V', 0) // crc32
                    
183			.pack('V', 0) // compressed filesize
                    
184			.pack('V', 0) // uncompressed filesize
                    
189			.pack('V', 0) // crc32
                    
190			.pack('V', 0) // compressed filesize
                    
191			.pack('V', 0); // uncompressed filesize
                    
197			.pack('V',0) // crc32
                    
198			.pack('V',0) // compressed filesize
                    
199			.pack('V',0) // uncompressed filesize
                    
                
function.imap-mail-compose.html https://bitbucket.org/thncr/manuals.git | HTML | 104 lines
                    
11 <div class="up"><a href="ref.imap.html">IMAP 函数</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="function.imap-mail-compose" class="refentry">
                    
15  <h1 class="refname">imap_mail_compose</h1>
                    
16  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imap_mail_compose</span> &mdash; <span class="dc-title">Create a MIME message based on given envelope and body sections</span></p>
                    
17
                    
89<div class="phpcode"><code><span style="color: #000000">
                    
90<span style="color: #0000BB">&lt;?php<br /><br />$envelope</span><span style="color: #007700">[</span><span style="color: #DD0000">"from"</span><span style="color: #007700">]=&nbsp;</span><span style="color: #DD0000">"joe@example.com"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$envelope</span><span style="color: #007700">[</span><span style="color: #DD0000">"to"</span><span style="color: #007700">]&nbsp;&nbsp;=&nbsp;</span><span style="color: #DD0000">"foo@example.com"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$envelope</span><span style="color: #007700">[</span><span style="color: #DD0000">"cc"</span><span style="color: #007700">]&nbsp;&nbsp;=&nbsp;</span><span style="color: #DD0000">"bar@example.com"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$part1</span><span style="color: #007700">[</span><span style="color: #DD0000">"type"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">TYPEMULTIPART</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part1</span><span style="color: #007700">[</span><span style="color: #DD0000">"subtype"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"mixed"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/tmp/imap.c.gz"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"r"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$contents&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fread</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">filesize</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"type"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">TYPEAPPLICATION</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"encoding"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">ENCBINARY</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"subtype"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"octet-stream"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"description"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"contents.data"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$contents</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"type"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">TYPETEXT</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"subtype"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"plain"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"description"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"description3"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"contents.data"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"contents.data3\n\n\n\t"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$body</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$part1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$body</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$part2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$body</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$part3</span><span style="color: #007700">;<br /><br />echo&nbsp;</span><span style="color: #0000BB">nl2br</span><span style="color: #007700">(</span><span style="color: #0000BB">imap_mail_compose</span><span style="color: #007700">(</span><span style="color: #0000BB">$envelope</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$body</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span>
                    
91</span>
                    
102 <div class="up"><a href="ref.imap.html">IMAP 函数</a></div>
                    
103 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
104</div></body></html>
                    
                
interface.php https://bitbucket.org/mrmustarde/manhattan-beach.git | PHP | 293 lines
                    
71		function hmbkp_safe_mode_warning() {
                    
72			echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on.', 'hmbkp' ), '<code>PHP</code>', sprintf( '<a href="%1$s">%2$s</a>', __( 'http://php.net/manual/en/features.safe-mode.php', 'hmbkp' ), __( 'Safe Mode', 'hmbkp' ) ), '<code>' . __( 'Safe Mode', 'hmbkp' ) . '</code>' ) . '</p></div>';
                    
73		}
                    
119	if ( isset( $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php'] ) )
                    
120		$plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] = str_replace( 'Once activated you\'ll find me under <strong>Tools &rarr; Backups</strong>', 'Find me under <strong><a href="' . admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG ) . '">Tools &rarr; Backups</a></strong>', $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] );
                    
121
                    
244	
                    
245	<span class="hmbkp-status"><?php echo $schedule->get_status() ? $schedule->get_status() : __( 'Starting Backup', 'hmbkp' ); ?> <a href="<?php echo add_query_arg( array( 'action' => 'hmbkp_cancel', 'hmbkp_schedule_id' => $schedule->get_id() ), HMBKP_ADMIN_URL ); ?>"><?php _e( 'cancel', 'hmbkp' ); ?></a></span>
                    
246
                    
251	<?php if ( $schedule->get_type() !== 'database' ) { ?>
                    
252		<a class="fancybox" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_edit_schedule_excludes_load', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Excludes', 'hmbkp' ); ?></a>  |
                    
253	<?php } ?>
                    
254
                    
255		<a class="hmbkp-run" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_run_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Run now', 'hmbkp' ); ?></a>  |
                    
256
                    
                
Image.php https://gitlab.com/geeta7/drupal | PHP | 227 lines
                    
1<?php
                    
2
                    
40   */
                    
41  protected $fileSize;
                    
42
                    
58      if ($this->getToolkit()->parseFile()) {
                    
59        $this->fileSize = filesize($this->source);
                    
60      }
                    
87   */
                    
88  public function getFileSize() {
                    
89    return $this->fileSize;
                    
132      clearstatcache(TRUE, $destination);
                    
133      $this->fileSize = filesize($destination);
                    
134      $this->source = $destination;
                    
212   * @param int $mode
                    
213   *   Integer value for the permissions. Consult PHP chmod() documentation for
                    
214   *   more information.
                    
                
theme-editor.php https://gitlab.com/Gashler/dp | PHP | 246 lines
                    
170?>
                    
171	<h3><?php _e('Templates'); ?></h3>
                    
172	<?php if ( $theme->parent() ) : ?>
                    
172	<?php if ( $theme->parent() ) : ?>
                    
173	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
174	<?php endif; ?>
                    
189?>
                    
190		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
191<?php
                    
211		<?php echo $docs_select; ?>
                    
212		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
213		</div>
                    
217		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
218			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
219			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
                
elfinder.fr.js https://github.com/codemotion/cogear.git | JavaScript | 192 lines
                    
25		'Select at least one file to upload'    : 'Sélectionner au moins un fichier a envoyer',
                    
26		'File exceeds the maximum allowed filesize' : 'Le fichier excède la taille maximale autorisée',
                    
27		'Data exceeds the maximum allowed size' : 'Les données excèdent la taille maximale autorisée',
                    
127		'Javascript application'            : 'Application Javascript',
                    
128		'PHP source'                        : 'Document PHP',
                    
129		'HTML document'                     : 'Document HTML',
                    
177		'Donate to support project development' : 'Donner et encourager le développement du projet',
                    
178		'Javascripts/PHP programming: Dmitry (dio) Levashov, dio@std42.ru' : 'Javascripts/PHP programming: Dmitry (dio) Levashov, dio@std42.ru',
                    
179		'Python programming, techsupport: Troex Nevelin, troex@fury.scancode.ru' : 'Python programming, techsupport: Troex Nevelin, troex@fury.scancode.ru',
                    
                
theme-editor.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 256 lines
                    
79		} else {
                    
80			$location = "theme-editor.php?file=$file&theme=$theme&scrollto=$scrollto";
                    
81		}
                    
162	<ul>
                    
163<?php
                    
164	$template_mapping = array();
                    
184	?>
                    
185		<li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>&amp;dir=theme"><?php echo $filedesc ?></a></li>
                    
186<?php endwhile; ?>
                    
202		?>
                    
203		<li><a href="theme-editor.php?file=<?php echo "$style_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>&amp;dir=style"><?php echo $filedesc ?></a></li>
                    
204<?php endwhile; ?>
                    
220		<?php echo $docs_select; ?>
                    
221		<input type="button" class="button" value=" <?php esc_attr_e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
222		</div>
                    
                
frmresourceslist.html https://github.com/pteyssandier/Silverpeas-Core.git | HTML | 382 lines
                    
5 * Licensed under the terms of the GNU Lesser General Public License:
                    
6 * 		http://www.opensource.org/licenses/lgpl-license.php
                    
7 * 
                    
80
                    
81oListManager.AddFile = function ( fileName, fileUrl, fileSize, imageEditable )
                    
82{
                    
105	// Build the link to view the file.
                    
106	var sLink = '<a href="#" title="Size: ' + fileSize + 'kb" onclick="OpenFile(\'' + escape(fileUrl) + '\');return false;">' ;
                    
107	var dLink = '<a href="#" title="Delete file" onclick="DeleteFile(\'' + escape(fileName) + '\');return false;">' ;
                    
261			var sFileName = oNodes[i].attributes.getNamedItem('name').value ;
                    
262			var sFileSize = oNodes[i].attributes.getNamedItem('size').value ;
                    
263			var iEditable = oNodes[i].attributes.getNamedItem('editable') ;
                    
269			
                    
270			oListManager.AddFile( sFileName, sCurrentFolderUrl + sFileName, sFileSize, iEditable ) ;
                    
271		}
                    
                
Size.php https://bitbucket.org/alexandretaz/maniac_divers.git | PHP | 365 lines
                    
1<?php
                    
2/**
                    
23     */
                    
24    const TOO_BIG   = 'fileSizeTooBig';
                    
25    const TOO_SMALL = 'fileSizeTooSmall';
                    
25    const TOO_SMALL = 'fileSizeTooSmall';
                    
26    const NOT_FOUND = 'fileSizeNotFound';
                    
27
                    
257        ErrorHandler::start();
                    
258        $size = sprintf("%u", filesize($file));
                    
259        ErrorHandler::stop();
                    
                
utils.php https://gitlab.com/elasa/shop2.elasa.ir | PHP | 313 lines
                    
1<?php
                    
2
                    
44    if(image_check_memory_usage($imgfile,$newwidth,$newheight)){
                    
45	require_once('php_image_magician.php');
                    
46	$magicianObj = new imageLib($imgfile);
                    
55    if(image_check_memory_usage($imgfile,$newwidth,$newheight)){
                    
56	require_once('php_image_magician.php');
                    
57	$magicianObj = new imageLib($imgfile);
                    
88            else {
                    
89                $size = filesize($currentFile);
                    
90                $total_size += $size;
                    
                
flexuploader.js https://bitbucket.org/sevenly/magento-ce.git | JavaScript | 372 lines
                    
8 * It is also available through the world-wide-web at this URL:
                    
9 * http://opensource.org/licenses/afl-3.0.php
                    
10 * If you did not receive a copy of the license and are unable to
                    
22 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
                    
23 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
                    
24 */
                    
152            this.files = event.getData().files;
                    
153            this.checkFileSize();
                    
154            this.updateFiles();
                    
299        },
                    
300        checkFileSize: function() {
                    
301            newFiles = [];
                    
313                alert(
                    
314                    this.translate('Maximum allowed file size for upload is')+' '+maxUploadFileSize+".\n"+this.translate('Please check your server PHP settings.')
                    
315                );
                    
                
user_add3.php https://bitbucket.org/droidzone/i-mscp.git | PHP | 456 lines
                    
177		$backup, $dns, $software_allowed, $phpini_system, $phpini_al_allow_url_fopen,
                    
178		$phpini_al_display_errors, $phpini_al_disable_functions, $phpini_post_max_size,
                    
179		$phpini_upload_max_filesize, $phpini_max_execution_time,
                    
182
                    
183	$php = preg_replace("/\_/", '', $php);
                    
184	$cgi = preg_replace("/\_/", '', $cgi);
                    
250			    `domain_php`, `domain_cgi`, `allowbackup`, `domain_dns`,
                    
251			    `domain_software_allowed`, `phpini_perm_system`, `phpini_perm_allow_url_fopen`,
                    
252				`phpini_perm_display_errors`, `phpini_perm_disable_functions`, `domain_external_mail`
                    
286		$phpini->setData('phpiniPostMaxSize', $phpini_post_max_size);
                    
287		$phpini->setData('phpiniUploadMaxFileSize', $phpini_upload_max_filesize);
                    
288		$phpini->setData('phpiniMaxExecutionTime', $phpini_max_execution_time);
                    
289		$phpini->setData('phpiniMaxInputTime', $phpini_max_input_time);
                    
290		$phpini->setData('phpiniMemoryLimit', $phpini_memory_limit);
                    
291
                    
                
structure.php https://github.com/DMeganoski/Gallery-Designer.git | PHP | 322 lines
                    
1<?php if (!defined('APPLICATION')) exit();
                    
2/*
                    
80   ->Column('TestedWith', 'text', NULL)
                    
81   ->Column('FileSize', 'int', NULL)
                    
82   ->Column('MD5', 'varchar(32)')
                    
                
sitemaps.php https://github.com/chemicaloliver/codeigniter-sitemaps.git | PHP | 453 lines
                    
1<?php
                    
2
                    
119
                    
120            //ignore all files that don't end .php
                    
121            if ($ext != 'php' || in_array($class, $this->ignore)) continue;
                    
206
                    
207            if ($this->CI->config->item('sitemaps_filesize_error') && filesize($file_name) > 1024 * 1024 * 10)
                    
208            {
                    
297
                    
298            if ($this->CI->config->item('sitemaps_filesize_error') && filesize($file_name) > 1024 * 1024 * 10)
                    
299            {
                    
                
recorded.php https://github.com/fracmak/mythweb.git | PHP | 233 lines
                    
48    <td><select name="recgroup">
                    
49        <option value=""><?php echo t('All groups') ?></option><?php
                    
50        foreach($Groups as $recgroup => $count) {
                    
97    <th class="x-length"><?php        echo get_sort_link('length',    t('Length')) ?></td>
                    
98    <th class="x-filesize"><?php echo get_sort_link('file_size', t('File Size')) ?></td>
                    
99</tr><?php
                    
160    <td class="x-length"><?php echo nice_length($show->length) ?></td>
                    
161    <td class="x-filesize"><?php echo nice_filesize($show->filesize) ?></td>
                    
162    <td class="x-commands" rowspan="2"><?php
                    
167        }
                    
168        ?><a href="<?php echo root_url ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>"
                    
169            title="<?php echo html_entities(t('Delete $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
                    
170            ><?php echo t('Delete') ?></a>
                    
171        <a href="<?php echo root_url ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>&forget_old=yes"
                    
172            title="<?php echo html_entities(t('Delete and rerecord $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
                    
                
Jail.php https://gitlab.com/wuhang2003/core | PHP | 489 lines
                    
92	/**
                    
93	 * see http://php.net/manual/en/function.is_dir.php
                    
94	 *
                    
133	/**
                    
134	 * see http://php.net/manual/en/function.filesize.php
                    
135	 * The result for filesize when called on a folder is required to be 0
                    
256	/**
                    
257	 * see http://php.net/manual/en/function.rename.php
                    
258	 *
                    
312	/**
                    
313	 * see http://php.net/manual/en/function.free_space.php
                    
314	 *
                    
332	/**
                    
333	 * see http://php.net/manual/en/function.touch.php
                    
334	 * If the backend does not support the operation, false should be returned
                    
                
d936d632ec23c697576ecc385563ecddbef3c795.file.ajax.tpl.php https://gitlab.com/nghiep5890/prestashop | PHP | 263 lines
                    
38[]"<?php if (isset($_smarty_tpl->tpl_vars['url']->value)) {?> data-url="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
                    
39"<?php }?><?php if (isset($_smarty_tpl->tpl_vars['multiple']->value)&&$_smarty_tpl->tpl_vars['multiple']->value) {?> multiple="multiple"<?php }?> style="width:0px;height:0px;" />
                    
40		<button class="btn btn-default" data-style="expand-right" data-size="s" type="button" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?>
                    
41-add-button">
                    
42			<i class="icon-folder-open"></i> <?php if (isset($_smarty_tpl->tpl_vars['multiple']->value)&&$_smarty_tpl->tpl_vars['multiple']->value) {?><?php echo smartyTranslate(array('s'=>'Add files...'),$_smarty_tpl);?>
                    
43<?php } else { ?><?php echo smartyTranslate(array('s'=>'Add file...'),$_smarty_tpl);?>
                    
53		<span class="ladda-label"><i class="icon-check"></i> <?php if (isset($_smarty_tpl->tpl_vars['multiple']->value)&&$_smarty_tpl->tpl_vars['multiple']->value) {?><?php echo smartyTranslate(array('s'=>'Upload files'),$_smarty_tpl);?>
                    
54<?php } else { ?><?php echo smartyTranslate(array('s'=>'Upload file'),$_smarty_tpl);?>
                    
55<?php }?></span>
                    
107			singleFileUploads: true,
                    
108			maxFileSize: <?php echo $_smarty_tpl->tpl_vars['post_max_size']->value;?>
                    
109,
                    
123				if (data.result) {
                    
124					if (typeof data.result.<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['name']->value, ENT_QUOTES, 'UTF-8', true);?>
                    
125 !== 'undefined') {
                    
                
tlAttachment.class.php https://github.com/viglesiasce/testlink.git | PHP | 342 lines
                    
1<?php
                    
2/**
                    
8 * @copyright 	2007-2009, TestLink community 
                    
9 * @version    	CVS: $Id: tlAttachment.class.php,v 1.2 2009/12/28 08:53:37 franciscom Exp $
                    
10 * @link 		http://www.teamst.org/index.php
                    
13/** parenthal class */
                    
14require_once( 'object.class.php' );
                    
15
                    
54	/**
                    
55	 * @var int $fSize the filesize (uncompressed)
                    
56	 */
                    
154	 * @param string $fType the mime-type of the file
                    
155	 * @param int $fSize the filesize (uncompressed)
                    
156	 * @param string $title the title used for the attachment
                    
                
backupdb.php https://gitlab.com/Conors99/ppm-1.8 | PHP | 484 lines
                    
1<?php
                    
2/**
                    
52
                    
53$page->add_breadcrumb_item($lang->database_backups, "index.php?module=tools-backupdb");
                    
54
                    
61		flash_message($lang->error_file_not_specified, 'error');
                    
62		admin_redirect("index.php?module=tools-backupdb");
                    
63	}
                    
78		header("Content-type: ".$ext);
                    
79		header("Content-length: ".filesize(MYBB_ADMIN_DIR.'backups/'.$file));
                    
80
                    
90		flash_message($lang->error_invalid_backup, 'error');
                    
91		admin_redirect("index.php?module=tools-backupdb");
                    
92	}
                    
98	{
                    
99		admin_redirect("index.php?module=tools-backupdb");
                    
100	}
                    
                
filestore_funcs.php https://github.com/Nerutiz/trades.git | PHP | 366 lines
                    
1<?php
                    
2/**
                    
154	$fObj["directory"] = is_dir($fullPath);
                    
155	$fObj["size"] = filesize($fullPath);
                    
156	$fObj["modified"] = $atts[9];
                    
365}
                    
366// No closing PHP tag on purpose.  Do not want it to print whitepace and thus not allow setting headers later.
                    
367
                    
                
2-1-migration-guide.rst https://gitlab.com/albertkeba/docs | ReStructuredText | 363 lines
                    
69    CakeSession no longer sets the P3P header, as this is the responsibility of your application.
                    
70    More info see ticket `#2515 <http://cakephp.lighthouseapp.com/projects/42648/tickets/2515-cakephp-20-session-p3p-header-doesnt-work-in-an-iframe>`_ in lighthouse
                    
71
                    
232
                    
233- :php:meth:`TextHelper::autoLink()`, :php:meth:`TextHelper::autoLinkUrls()`,
                    
234  :php:meth:`TextHelper::autoLinkEmails()` now HTML escape their input by
                    
250- :term:`plugin syntax` support has been added for
                    
251  :php:meth:`HtmlHelper::script()`, :php:meth:`HtmlHelper::css()`, :php:meth:`HtmlHelper::image()`.
                    
252  You can now easily link to plugin assets using ``Plugin.asset``.
                    
277
                    
278Two new view classes have been added to CakePHP. A new :php:class:`JsonView`
                    
279and :php:class:`XmlView` allow you to easily generate XML and JSON views. You
                    
311Two new callbacks have been added to Helpers.
                    
312:php:meth:`Helper::beforeRenderFile()` and :php:meth:`Helper::afterRenderFile()`
                    
313these new callbacks are fired before/after every view fragment is rendered.
                    
                
flexuploader.js https://github.com/rgranadino/magento-mirror.git | JavaScript | 372 lines
                    
8 * It is also available through the world-wide-web at this URL:
                    
9 * http://opensource.org/licenses/afl-3.0.php
                    
10 * If you did not receive a copy of the license and are unable to
                    
22 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
23 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
                    
24 */
                    
152            this.files = event.getData().files;
                    
153            this.checkFileSize();
                    
154            this.updateFiles();
                    
299        },
                    
300        checkFileSize: function() {
                    
301            newFiles = [];
                    
313                alert(
                    
314                    this.translate('Maximum allowed file size for upload is')+' '+maxUploadFileSize+".\n"+this.translate('Please check your server PHP settings.')
                    
315                );
                    
                
admin.php https://github.com/uitto/pyrocms.git | PHP | 422 lines
                    
1<?php defined('BASEPATH') OR exit('No direct script access allowed');
                    
2/**
                    
170					'mimetype' => $img['upload_data']['file_type'],
                    
171					'filesize' => $img['upload_data']['file_size'],
                    
172					'width' => (int) $img['upload_data']['image_width'],
                    
285						'mimetype' => $img['upload_data']['file_type'],
                    
286						'filesize' => $img['upload_data']['file_size'],
                    
287						'width' => (int) $img['upload_data']['image_width'],
                    
420
                    
421/* End of file admin.php */
                    
422/* Location: ./system/pyrocms/modules/files/controllers/admin.php */
                    
                
Ftp.php https://gitlab.com/endomorphosis/jeffersonsmithmayor | PHP | 373 lines
                    
1<?php
                    
2
                    
11
                    
12require_once W3TC_LIB_W3_DIR . '/Cdn/Base.php';
                    
13
                    
25    /**
                    
26     * PHP5 Constructor
                    
27     *
                    
44    /**
                    
45     * PHP4 Constructor
                    
46     *
                    
195            if (!$force_rewrite) {
                    
196                $size = @filesize($local_path);
                    
197                $ftp_size = @ftp_size($this->_ftp, $remote_file);
                    
                
de_DE.js https://gitlab.com/wuhang2003/core | JavaScript | 123 lines
                    
10    "There is no error, the file uploaded with success" : "Es ist kein Fehler aufgetreten. Die Datei wurde erfolgreich hochgeladen.",
                    
11    "The uploaded file exceeds the upload_max_filesize directive in php.ini: " : "Die hochgeladene Datei überschreitet die upload_max_filesize-Vorgabe in php.ini",
                    
12    "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe erlaubt, die im HTML-Formular spezifiziert ist",
                    
104    "Save" : "Speichern",
                    
105    "With PHP-FPM it might take 5 minutes for changes to be applied." : "Bei PHP-FPM kann es 5 Minuten dauern, bis Änderungen angewendet sind.",
                    
106    "Missing permissions to edit from here." : "Fehlende Berechtigungen um von hier aus zu bearbeiten.",
                    
                
Filesystem.php https://gitlab.com/RonLab1987/YupePlusClear | PHP | 354 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 24593 2012-01-05 20:35:02Z matthew $
                    
21 */
                    
23/** Zend_Search_Lucene_Storage_Directory */
                    
24require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
25
                    
114            if (file_exists($path)) {
                    
115                require_once 'Zend/Search/Lucene/Exception.php';
                    
116                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
118                if (!self::mkdirs($path)) {
                    
119                    require_once 'Zend/Search/Lucene/Exception.php';
                    
120                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
178        unset($this->_fileHandlers[$filename]);
                    
179        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
180        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
externallib.php https://github.com/lazydaisy/moodle.git | PHP | 281 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
28
                    
29require_once("$CFG->libdir/externallib.php");
                    
30
                    
141            } else {
                    
142                $versionpath = core_component::get_component_directory($function->component).'/version.php';
                    
143                if (is_readable($versionpath)) {
                    
143                if (is_readable($versionpath)) {
                    
144                    // We store the component version once retrieved (so we don't load twice the version.php).
                    
145                    if (!isset($componentversions[$function->component])) {
                    
153                } else {
                    
154                    // Function component should always have a version.php,
                    
155                    // otherwise the function should have been described with component => 'moodle'.
                    
190        if (!has_capability('moodle/user:ignoreuserquota', $context)) {
                    
191            $siteinfo['userquota'] = (int) $CFG->userquota; // Cast to int to ensure value is not higher than PHP_INT_MAX.
                    
192        }
                    
                
welcome.static.php https://github.com/gunf/novo-isaak.local.git | PHP | 230 lines
                    
1<?php if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the MODx Content Manager instead of accessing this file directly.");
                    
2
                    
6    // seems to be a new install - send the user to the configuration page
                    
7    echo '<script type="text/javascript">document.location.href="index.php?a=17";</script>';
                    
8    exit;
                    
13        function hideConfigCheckWarning(key){
                    
14            var myAjax = new Ajax('index.php?a=118', {
                    
15                method: 'post',
                    
38if($modx->hasPermission('messages')) {
                    
39		include_once MODX_MANAGER_PATH.'includes/messageCount.inc.php';
                    
40		$_SESSION['nrtotalmessages'] = $nrtotalmessages;
                    
42
                    
43    $msg = '<a href="index.php?a=10"><img src="'.$_style['icons_mail_large'].'" /></a>
                    
44    <span style="color:#909090;font-size:15px;font-weight:bold">&nbsp;'.$_lang["inbox"].($_SESSION['nrnewmessages']>0 ? " (<span style='color:red'>".$_SESSION['nrnewmessages']."</span>)":"").'</span><br />
                    
50if($modx->hasPermission('new_user')||$modx->hasPermission('edit_user')) { 
                    
51    $icon = '<a class="hometblink" href="index.php?a=75"><img src="'.$_style['icons_security_large'].'" width="32" height="32" alt="'.$_lang['user_management_title'].'" /><br />'.$_lang['security'].'</a>';     
                    
52    $modx->setPlaceholder('SecurityIcon',$icon);
                    
                
module.tag.lyrics3.php https://github.com/KenBoyer/CompactCMS.git | PHP | 282 lines
                    
1<?php
                    
2/////////////////////////////////////////////////////////////////
                    
9///                                                            //
                    
10// module.tag.lyrics3.php                                      //
                    
11// module for analyzing Lyrics3 tags                           //
                    
11// module for analyzing Lyrics3 tags                           //
                    
12// dependencies: module.tag.apetag.php (optional)              //
                    
13//                                                            ///
                    
22
                    
23		if (!getid3_lib::intValueSupported($ThisFileInfo['filesize'])) {
                    
24			$ThisFileInfo['warning'][] = 'Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';
                    
37			$lyrics3size    = 5100;
                    
38			$lyrics3offset  = $ThisFileInfo['filesize'] - 128 - $lyrics3size;
                    
39			$lyrics3version = 1;
                    
45			$lyrics3size    = $lyrics3lsz + 6 + strlen('LYRICS200');
                    
46			$lyrics3offset  = $ThisFileInfo['filesize'] - 128 - $lyrics3size;
                    
47			$lyrics3version = 2;
                    
                
import_test.php https://github.com/harriswong/ATutor.git | PHP | 339 lines
                    
1<?php
                    
2/************************************************************************/
                    
13define('AT_INCLUDE_PATH', '../../../include/');
                    
14require(AT_INCLUDE_PATH.'vitals.inc.php');
                    
15require_once(AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php'); /* for clr_dir() and preImportCallBack and dirsize() */
                    
15require_once(AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php'); /* for clr_dir() and preImportCallBack and dirsize() */
                    
16require(AT_INCLUDE_PATH.'../mods/_core/imsqti/lib/qti.inc.php'); 
                    
17require(AT_INCLUDE_PATH.'classes/pclzip.lib.php');
                    
17require(AT_INCLUDE_PATH.'classes/pclzip.lib.php');
                    
18//require(AT_INCLUDE_PATH.'classes/QTI/QTIParser.class.php');	
                    
19require(AT_INCLUDE_PATH.'../mods/_core/imsqti/classes/QTIImport.class.php');
                    
36	$msg->addFeedback('IMPORT_CANCELLED');
                    
37	header('Location: index.php');
                    
38	exit;
                    
100
                    
101		header('Location: ./index.php');
                    
102		exit;
                    
                
upload.php https://github.com/harriswong/ATutor.git | PHP | 179 lines
                    
31					
                    
32/* get this courses MaxQuota and MaxFileSize: */
                    
33$sql	= "SELECT max_quota, max_file_size FROM ".TABLE_PREFIX."courses WHERE course_id=$_SESSION[course_id]";
                    
41	}
                    
42	if ($my_MaxFileSize == AT_FILESIZE_DEFAULT) {
                    
43		$my_MaxFileSize = $MaxFileSize;
                    
44	} else if ($my_MaxFileSize == AT_FILESIZE_SYSTEM_MAX) {
                    
45		$my_MaxFileSize = megabytes_to_bytes(substr(ini_get('upload_max_filesize'), 0, -1));
                    
46	}
                    
111				if (!$result) {
                    
112					require(AT_INCLUDE_PATH.'header.inc.php');
                    
113					$msg->printErrors('FILE_NOT_SAVED');
                    
126						if ($alter)
                    
127							header('Location: '.$_base_href.'editor/edit_content.php?cid='.$_REQUEST['cid'].SEP . 'pathext='.$_POST['pathext'].SEP. 'popup='.$_GET['popup'].SEP. 'tab='.$_REQUEST['tab']);
                    
128						else
                    
                
Size.php https://github.com/lanmediaservice/lms-tplib.git | PHP | 404 lines
                    
1<?php
                    
2/**
                    
18 * @license   http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version   $Id: Size.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
20 */
                    
24 */
                    
25//*** require_once 'Zend/Validate/Abstract.php';
                    
26
                    
39     */
                    
40    const TOO_BIG   = 'fileSizeTooBig';
                    
41    const TOO_SMALL = 'fileSizeTooSmall';
                    
41    const TOO_SMALL = 'fileSizeTooSmall';
                    
42    const NOT_FOUND = 'fileSizeNotFound';
                    
43    /**#@-*/
                    
63    /**
                    
64     * Minimum filesize
                    
65     * @var integer
                    
                
webcontent_.php https://gitlab.com/wildanoo/E-procurement | PHP | 387 lines
                    
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
103		    header('Pragma: public');
                    
104		    header('Content-Length: ' . filesize($file));
                    
105		    readfile($file);
                    
385
                    
386/* End of file auth.php */
                    
387/* Location: ./application/controllers/auth.php */
                    
                
_FancyUpload.tpl https://github.com/grandison/budo16.git | Smarty Template | 263 lines
                    
1<?php
                    
2/**
                    
13
                    
14<?php
                    
15$this->headScript()
                    
25    '{name} already added.',
                    
26    '{name} ({size}) is too small, the minimal file size is {fileSizeMin}.',
                    
27    '{name} ({size}) is too big, the maximal file size is {fileSizeMax}.',
                    
28    '{name} could not be added, amount of {fileListMax} files exceeded.',
                    
29    '{name} ({size}) is too big, overall filesize of {fileListSizeMax} exceeded.',
                    
30    'Server returned HTTP-Status <code>#{code}</code>',
                    
37var uploadCount = 0;
                    
38var extraData = <?php echo $this->jsonInline($this->data); ?>;
                    
39//var extraData = {"classified_id":15};
                    
53    // path to the SWF file
                    
54    path: '<?php echo $this->baseUrl() . '/externals/fancyupload/Swiff.Uploader.swf';?>',
                    
55
                    
                
class-comment-image-reloaded.php https://gitlab.com/wp-puzzle/comment-images-reloaded | PHP | 398 lines
                    
117			//CIR VARIOUS FUNCTIONS
                    
118			require_once (plugin_dir_path(__FILE__).'functions/cir-functions.php');
                    
119			$functions = new CIR_Functions();
                    
206
                    
207	private function set_limit_filesize(){
                    
208		// set maximum allowed file size get php.ini settings / CIR option / default 5MB
                    
208		// set maximum allowed file size get php.ini settings / CIR option / default 5MB
                    
209		$phpini_limit = self::getMaxFilesize(); // in bytes
                    
210		$opt = ( isset(self::$options['max_filesize']) ) ? self::$options['max_filesize'] : 5; // in MBytes
                    
349	//
                    
350	// get max filesize (in bytes) allowed in php.ini
                    
351	//
                    
374	/* ==================================================================================== */
                    
375	// filesize & php.ini
                    
376	/* ==================================================================================== */
                    
                
FieldInstancePerFormDisplayTest.php https://gitlab.com/reasonat/test8 | PHP | 184 lines
                    
1<?php
                    
2
                    
95        'bundle' => 'user',
                    
96        'data' => 'a:6:{s:5:"label";s:4:"File";s:6:"widget";a:5:{s:6:"weight";s:1:"8";s:4:"type";s:12:"file_generic";s:6:"module";s:4:"file";s:6:"active";i:1;s:8:"settings";a:1:{s:18:"progress_indicator";s:8:"throbber";}}s:8:"settings";a:5:{s:14:"file_directory";s:0:"";s:15:"file_extensions";s:3:"txt";s:12:"max_filesize";s:0:"";s:17:"description_field";i:0;s:18:"user_register_form";i:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"file_default";s:8:"settings";a:0:{}s:6:"module";s:4:"file";s:6:"weight";i:0;}}s:8:"required";i:0;s:11:"description";s:0:"";}',
                    
97        'deleted' => '0',
                    
                
BinaryFileResponse.php https://gitlab.com/jjpa2018/dashboard | PHP | 363 lines
                    
1<?php
                    
2
                    
20 * @author Niklas Fiekas <niklas.fiekas@tu-clausthal.de>
                    
21 * @author stealth35 <stealth35-php@live.fr>
                    
22 * @author Igor Wiedler <igor@wiedler.ch>
                    
204
                    
205        if (false === $fileSize = $this->file->getSize()) {
                    
206            return $this;
                    
207        }
                    
208        $this->headers->set('Content-Length', $fileSize);
                    
209
                    
249
                    
250                    $end = ('' === $end) ? $fileSize - 1 : (int) $end;
                    
251
                    
252                    if ('' === $start) {
                    
253                        $start = $fileSize - $end;
                    
254                        $end = $fileSize - 1;
                    
                
SCP.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 360 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * Pure-PHP implementation of SCP.
                    
5 *
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
7 *
                    
8 * The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}.
                    
9 *
                    
11 * <code>
                    
12 * <?php
                    
13 *    include 'Net/SCP.php';
                    
13 *    include 'Net/SCP.php';
                    
14 *    include 'Net/SSH2.php';
                    
15 *
                    
                
insert_image.php https://github.com/shafiqissani/ASTRA-College-Website.git | PHP | 395 lines
                    
18
                    
19<?php 
                    
20readfile('popup'.(!empty($_GET['type'])?'_'.$_GET['type']:'').'.js');
                    
30
                    
31var img_params=["f_url","f_width","f_height"<?php if($_GET['basic']!=true) {echo ',"f_alt","f_border","f_align","f_vert","f_horiz"';} ?>];
                    
32
                    
89	var premess=nwidth+"x"+nheight+" pixels";
                    
90	if (pre_image.fileSize) premess+=" &bull; "+Math.ceil(pre_image.fileSize>>10)+"KB ("+Math.ceil(pre_image.fileSize/5000)+"s@56K)";
                    
91	if ((factor=Math.min(228/nheight,304/nwidth))<1) {
                    
102
                    
103	<?php if($_GET['basic']!=true) echo 'document.getElementById("f_alt").focus();'; ?>	
                    
104}
                    
122	}
                    
123	<?php if($_GET['basic']!=true) echo 'checkSize();'; ?>
                    
124}
                    
                
default.php https://github.com/wiktorm/projekt-awr.git | PHP | 213 lines
                    
1<?php
                    
2defined('_JEXEC') or die('Restricted access'); 
                    
9	if ($this->tmpl['display_up_icon'] == 1) {
                    
10		//echo '<div class="pdtop"><a title="'.JText::_('Category').'" href="'. JRoute::_('index.php?option=com_phocadownload&view=category&id='.$this->category[0]->id.':'.$this->category[0]->alias. $this->tmpl['limitstarturl'] . '&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'" >'.JHTML::_('image', 'components/com_phocadownload/assets/images/up.png', JText::_('Up')).  '</a></div>';
                    
11
                    
74				$details .= PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
                    
75				//if ($fileSize !='') {
                    
76				//	$details .= ' <small style="color:#ccc">('.$fileSize.')</small>';
                    
98			
                    
99			// FILESIZE
                    
100			if ($valueDoc->filename !='') {
                    
103				{
                    
104					$fileSize = PhocaDownloadHelper::getFileSizeReadable(filesize($absFile));
                    
105				} else {
                    
105				} else {
                    
106					$fileSize = '';
                    
107				}
                    
                
document.inc.php https://bitbucket.org/frchico/chamilo_openshift.git | PHP | 106 lines
                    
1<?php
                    
2/*
                    
25$langGroupForumLink = "กลุ่มอภิปราย";
                    
26$langZipNoPhp = "ไฟล์ zip ไม่สามารถบรรจุ PHP filesได้";
                    
27$langUncompress = "ขยายไฟล์บีบอัดบนเครื่องแม่ข่าย";
                    
32$langFileError = "ไฟล์ที่จะโอนย้ายขึ้นระบบ(Upload)ไม่ถูกต้องสมบูรณ์";
                    
33$langMaxFileSize = "ขนาดไฟล์ใหญ่สุดคือ";
                    
34$langFileName = "ชื่อไฟล์";
                    
                
mediamosa_integrity_check.php https://github.com/www-madcap-nl/mediamosa.git | PHP | 303 lines
                    
1<?php
                    
2// $Id$
                    
28 * @file
                    
29 * Integrity check PHP file
                    
30 */
                    
80      $mediafile_id = $mediafile['mediafile_id'];
                    
81      $filesize = mediamosa_asset_mediafile_metadata::get_mediafile_metadata_int($mediafile_id, mediamosa_asset_mediafile_metadata::FILESIZE);
                    
82      $mime_type = mediamosa_asset_mediafile_metadata::get_mediafile_metadata_char($mediafile_id, mediamosa_asset_mediafile_metadata::MIME_TYPE);
                    
101          ':changed' => $mediafile['changed'],
                    
102          ':details' => (!$filesize || $filesize == '') ? 'Never succesfully analysed...' : 'Mime-type: ' . $mime_type,
                    
103      ));
                    
194      $mediafile_id = $still['mediafile_id'];
                    
195      $filesize = mediamosa_asset_mediafile_metadata::get_mediafile_metadata_int($mediafile_id, mediamosa_asset_mediafile_metadata::FILESIZE);
                    
196      $mime_type = mediamosa_asset_mediafile_metadata::get_mediafile_metadata_char($mediafile_id, mediamosa_asset_mediafile_metadata::MIME_TYPE);
                    
215          ':changed' => $still['changed'],
                    
216          ':details' => (!$filesize || $filesize == '') ? 'Never succesfully analysed...' : 'Mime-type: ' . $mime_type,
                    
217      ));
                    
                
vfsStream.php https://bitbucket.org/areeves42/openfisma.git | PHP | 374 lines
                    
1<?php
                    
2/**
                    
9 */
                    
10require_once dirname(__FILE__) . '/vfsStreamWrapper.php';
                    
11require_once dirname(__FILE__) . '/visitor/vfsStreamVisitor.php';
                    
114     * <code>
                    
115     * array('Core' = array('AbstractFactory' => array('test.php'    => 'some text content',
                    
116     *                                                 'other.php'   => 'Some more text content',
                    
119     *                      'AnEmptyFolder'   => array(),
                    
120     *                      'badlocation.php' => 'some bad content',
                    
121     *                )
                    
126     * \- Core
                    
127     *  |- badlocation.php
                    
128     *  |- AbstractFactory
                    
128     *  |- AbstractFactory
                    
129     *  | |- test.php
                    
130     *  | |- other.php
                    
                
file.php https://github.com/boluak/lifefm-github.git | PHP | 379 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: file.php 10707 2008-08-21 09:52:47Z eddieajau $
                    
4 * @package		Joomla.Framework
                    
6 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
                    
7 * @license		GNU/GPL, see LICENSE.php
                    
8 * Joomla! is free software. This version may have been modified pursuant
                    
11 * other free or open source software licenses.
                    
12 * See COPYRIGHT.php for copyright notices and details.
                    
13 */
                    
244		if($offset) fseek($fh, $offset);
                    
245		if ($fsize = @ filesize($filename)) {
                    
246			if($amount && $fsize > $amount) {
                    
304	 *
                    
305	 * @param string $src The name of the php (temporary) uploaded file
                    
306	 * @param string $dest The path (including filename) to move the uploaded file to
                    
                
graminfo.php https://github.com/Oreolek/Togataltu.git | PHP | 338 lines
                    
88 
                    
89abstract class phpMorphy_GramInfo implements phpMorphy_GramInfo_Interace {
                    
90    const HEADER_SIZE = 128;
                    
208
                    
209class phpMorphy_GramInfo_Decorator implements phpMorphy_GramInfo_Interace {
                    
210    protected $info;
                    
250
                    
251class phpMorphy_GramInfo_Proxy_WithHeader extends phpMorphy_GramInfo_Proxy {
                    
252    protected
                    
291
                    
292class phpMorphy_GramInfo_RuntimeCaching extends phpMorphy_GramInfo_Decorator {
                    
293    protected
                    
307
                    
308class phpMorphy_GramInfo_AncodeCache extends phpMorphy_GramInfo_Decorator {
                    
309    public
                    
                
dmFormEmbedMediaTest.php https://github.com/xdade/diem.git | PHP | 275 lines
                    
73$t->is($media1->file, $media1FileName, 'Post media filename is '.$media1FileName);
                    
74$t->is($media1->size, filesize($media1FullPath), 'Post media size is '.filesize($media1FullPath));
                    
75
                    
101$t->is($post->Image->file, $media1FileName, 'Post media filename is '.$media1FileName);
                    
102$t->is($post->Image->size, filesize($media1FullPath), 'Post media size is '.filesize($media1FullPath));
                    
103
                    
166$t->is($post->Image->file, $expected = str_replace('.jpg', '_1.jpg', $media1FileName), 'Post media filename is '.$expected);
                    
167$t->is($post->Image->size, filesize($media1FullPath), 'Post media size is '.filesize($media1FullPath));
                    
168
                    
212$t->is($media2->file, $media2FileName, 'Post media filename is '.$media2FileName);
                    
213$t->is($media2->size, filesize($media2FullPath), 'Post media size is '.filesize($media2FullPath));
                    
214
                    
259$t->is($media3->file, $expected = str_replace('.jpg', '_1.jpg', $media3FileName), 'Post media filename is '.$expected);
                    
260$t->is($media3->size, filesize($media3FullPath), 'Post media size is '.filesize($media3FullPath));
                    
261
                    
                
Cache_File.php https://gitlab.com/karlen/ayo_wp | PHP | 455 lines
                    
1<?php
                    
2namespace W3TC;
                    
117		@fputs( $fp, pack( 'L', $expires_at ) );
                    
118		@fputs( $fp, '<?php exit; ?>' );
                    
119		@fputs( $fp, @serialize( $var ) );
                    
315
                    
316		$path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );
                    
317
                    
347				} else {
                    
348					$size['bytes'] += @filesize( $full_path );
                    
349
                    
409		@fputs( $fp, pack( 'L', $expires_at ) );
                    
410		@fputs( $fp, '<?php exit; ?>' );
                    
411		@fputs( $fp, (int)$value );
                    
                
md_funcs.php https://bitbucket.org/hanutimes/hanutimes.git | PHP | 406 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Chamilo metadata/md_funcs.php -->
                    
4 * 2006/12/15
                    
11*
                    
12*   This script requires xmd.lib.php and xht.lib.php (Chamilo inc/lib).
                    
13*
                    
15*
                    
16*   ! and ~ and ,   are handled by xmd_update, see xmd.lib.php
                    
17*   ~~ !! ; and =   are handled here; note that = excludes newlines in value
                    
42function fgc($filename) {
                    
43    $fp = fopen($filename, 'rb'); $buffer = fread($fp, filesize($filename));
                    
44    fclose($fp); return $buffer; // file_get_contents: PHP >= 4.3.0
                    
                
spots.inc.php https://github.com/caddyladdy/spotweb.git | PHP | 188 lines
                    
11	$show_comments = ($settings->get('retrieve_comments') && $tplHelper->allowed(SpotSecurity::spotsec_view_comments, ''));
                    
12	$show_filesize = $currentSession['user']['prefs']['show_filesize'];
                    
13	$show_multinzb_checkbox = ($tplHelper->allowed(SpotSecurity::spotsec_retrieve_nzb, '') && ($currentSession['user']['prefs']['show_multinzb']));
                    
20							<th class='category'> <a href="<?php echo $tplHelper->makeSortUrl('index', 'category', ''); ?>" title="Sorteren op Categorie">Cat.</a> </th> 
                    
21							<th class='title'> <span class="sortby"><a class="up" href="<?php echo $tplHelper->makeSortUrl('index', 'title', 'ASC'); ?>" title="Sorteren op Titel [0-Z]"> </a> <a class="down" href="<?php echo $tplHelper->makeSortUrl('index', 'title', 'DESC'); ?>" title="Sorteren op Titel [Z-0]"> </a></span> Titel </th> 
                    
22							<?php if ($show_watchlist_button) { ?>
                    
29							<th class='poster'> <span class="sortby"><a class="up" href="<?php echo $tplHelper->makeSortUrl('index', 'poster', 'ASC'); ?>" title="Sorteren op Afzender [0-Z]"> </a> <a class="down" href="<?php echo $tplHelper->makeSortUrl('index', 'poster', 'DESC'); ?>" title="Sorteren op Afzender [Z-0]"> </a></span> Afzender </th> 
                    
30							<th class='date'> <span class="sortby"><a class="up" href="<?php echo $tplHelper->makeSortUrl('index', 'stamp', 'DESC'); ?>" title="Sorteren op Leeftijd [oplopend]"> </a> <a class="down" href="<?php echo $tplHelper->makeSortUrl('index', 'stamp', 'ASC'); ?>" title="Sorteren op Leeftijd [aflopend]"> </a></span> <?php echo ($currentSession['user']['prefs']['date_formatting'] == 'human') ? "Leeftijd" : "Datum"; ?> </th> 
                    
31<?php if ($show_filesize) { ?>
                    
31<?php if ($show_filesize) { ?>
                    
32							<th class='filesize'> <span class="sortby"><a class="up" href="<?php echo $tplHelper->makeSortUrl('index', 'filesize', 'DESC'); ?>" title="Sorteren op Omvang [aflopend]"> </a> <a class="down" href="<?php echo $tplHelper->makeSortUrl('index', 'filesize', 'ASC'); ?>" title="Sorteren op Omvang [oplopend]"> </a></span> Size </th> 
                    
33<?php } ?>
                    
108		if ($show_filesize) {
                    
109			echo "<td class='filesize'>" . $tplHelper->format_size($spot['filesize']) . "</td>";
                    
110		} 
                    
                
AdminAttachmentsController.php https://gitlab.com/A.Julien/sendstockbymail-module-prestashop | PHP | 256 lines
                    
1<?php
                    
2/*
                    
9* It is also available through the world-wide-web at this URL:
                    
10* http://opensource.org/licenses/osl-3.0.php
                    
11* If you did not receive a copy of the license and are unable to
                    
22*  @copyright  2007-2016 PrestaShop SA
                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
125            if (file_exists(_PS_DOWNLOAD_DIR_.$obj->file)) {
                    
126                $size = round(filesize(_PS_DOWNLOAD_DIR_.$obj->file) / 1024);
                    
127            }
                    
235                } elseif (array_key_exists('file', $_FILES) && (int)$_FILES['file']['error'] === 1) {
                    
236                    $max_upload = (int)ini_get('upload_max_filesize');
                    
237                    $max_post = (int)ini_get('post_max_size');
                    
                
flexuploader.js https://github.com/weburnit/magento-lite.git | JavaScript | 372 lines
                    
8 * It is also available through the world-wide-web at this URL:
                    
9 * http://opensource.org/licenses/afl-3.0.php
                    
10 * If you did not receive a copy of the license and are unable to
                    
22 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
                    
23 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
                    
24 */
                    
152            this.files = event.getData().files;
                    
153            this.checkFileSize();
                    
154            this.updateFiles();
                    
299        },
                    
300        checkFileSize: function() {
                    
301            newFiles = [];
                    
313                alert(
                    
314                    this.translate('Maximum allowed file size for upload is')+' '+maxUploadFileSize+".\n"+this.translate('Please check your server PHP settings.')
                    
315                );
                    
                
assoc_panel.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 273 lines
                    
1<?php
                    
2
                    
57		$open = fopen($fichier, "r");
                    
58		$retour = fread($open, filesize($fichier) );
                    
59		$css =  "<style id='style_assoc_panel'>".$retour."</style>";
                    
67			$open = fopen($fichier, "r");
                    
68			$retour .= fread($open, filesize($fichier) );
                    
69			fclose($open);
                    
78			$open = fopen($fichier, "r");
                    
79			$retour = fread($open, filesize($fichier) );
                    
80			fclose($open);
                    
                
_utilities.class.php https://github.com/tinypay/KO3-Fusion.git | PHP | 475 lines
                    
1<?php
                    
2/**
                    
85 	 * Examples:
                    
86 	 * 	example::utilities/to_query_string.phpt:
                    
87	 */
                    
106 	 * Examples:
                    
107 	 * 	example::utilities/to_signable_string.phpt:
                    
108	 */
                    
153 	 * Examples:
                    
154 	 * 	example::utilities/query_to_array.phpt:
                    
155 	 * 	example::utilities/query_to_array2.phpt:
                    
291 	 * 	example::utilities/try_these4.phpt:
                    
292 	 * 	example::utilities/try_these5.phpt:
                    
293	 */
                    
354	 * Author:
                    
355	 * 	http://us2.php.net/manual/en/function.json-encode.php#82904
                    
356	 *
                    
                
plugin.php https://github.com/JamieLomas/pyrocms.git | PHP | 300 lines
                    
1<?php defined('BASEPATH') OR exit('No direct script access allowed');
                    
2/**
                    
47	 * {height}
                    
48	 * {filesize}
                    
49	 * {date_added}
                    
299
                    
300/* End of file plugin.php */
                    
                
PhotoMenu.cs https://github.com/AnthonyNystrom/GenXSource.git | C# | 293 lines
                    
80
                    
81            string fileSize = Utility.GetFileSize(FileName);
                    
82
                    
87            string[] fn = FileName.Split('\\');
                    
88            Program.Title.Text = "File: " + fn[fn.Length - 1] + " Resolution: " + Program.Photo.Width.ToString() + " x " + Program.Photo.Height.ToString() + " Size: " + fileSize;
                    
89            Program.FileName = FileName;
                    
281            this.Hide();
                    
282            System.Diagnostics.Process.Start("http://www.genetibase.com/nugenimageworks.php");
                    
283            this.Close();
                    
                
helper.php https://gitlab.com/wuhang2003/core | PHP | 297 lines
                    
33	/**
                    
34	 * @dataProvider phpFileSizeProvider
                    
35	 */
                    
35	 */
                    
36	public function testPhpFileSize($expected, $input)
                    
37	{
                    
37	{
                    
38		$result = OC_Helper::phpFileSize($input);
                    
39		$this->assertEquals($expected, $result);
                    
41
                    
42	public function phpFileSizeProvider()
                    
43	{
                    
57	 */
                    
58	function testComputerFileSize($expected, $input) {
                    
59		$result = OC_Helper::computerFileSize($input);
                    
                
nusoapmime.php https://bitbucket.org/ferOnti/processmaker.git | PHP | 478 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3$Id: nusoapmime.php,v 1.7 2005/07/27 19:24:42 snichol Exp $
                    
4
                    
4
                    
5NuSOAP - Web Services Toolkit for PHP
                    
6
                    
33
                    
34/*require_once('nusoap.php');*/
                    
35/* PEAR Mail_MIME library */
                    
35/* PEAR Mail_MIME library */
                    
36require_once('Mail/mimeDecode.php');
                    
37require_once('Mail/mimePart.php');
                    
44* @author	Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list
                    
45* @version  $Id: nusoapmime.php,v 1.7 2005/07/27 19:24:42 snichol Exp $
                    
46* @access   public
                    
                
media.php https://github.com/ot2sen/Molajo.git | PHP | 185 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: media.php 21389 2011-05-26 17:28:26Z dextercowley $
                    
4 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
                    
81			if (in_array($format, $images)) { // if its an image run it through getimagesize
                    
82				// if tmp_name is empty, then the file was bigger than the PHP limit
                    
83				if (!empty($file['tmp_name'])) {
                    
133		if ($size < 1024) {
                    
134			return JText::sprintf('COM_MEDIA_FILESIZE_BYTES', $size);
                    
135		}
                    
136		elseif ($size < 1024 * 1024) {
                    
137			return JText::sprintf('COM_MEDIA_FILESIZE_KILOBYTES', sprintf('%01.2f', $size / 1024.0));
                    
138		}
                    
139		else {
                    
140			return JText::sprintf('COM_MEDIA_FILESIZE_MEGABYTES', sprintf('%01.2f', $size / (1024.0 * 1024)));
                    
141		}
                    
                
FileController.php https://bitbucket.org/posinsk/poadminbundle.git | PHP | 272 lines
                    
1<?php
                    
2
                    
60                'name' => $filename,
                    
61                'size' => filesize($dir . '/' . $filename),
                    
62                'mtime' => filemtime($dir . '/' . $filename)
                    
                
file_scope.h https://github.com/kevlund/hiphop-php.git | C Header | 291 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
6   +----------------------------------------------------------------------+
                    
7   | This source file is subject to version 3.01 of the PHP license,      |
                    
8   | that is bundled with this package in the file LICENSE, and is        |
                    
9   | available through the world-wide-web at the following url:           |
                    
10   | http://www.php.net/license/3_01.txt                                  |
                    
11   | If you did not receive a copy of the PHP license and are unable to   |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
13   | license@php.net so we can mail you a copy immediately.               |
                    
14   +----------------------------------------------------------------------+
                    
26
                    
27namespace HPHP {
                    
28///////////////////////////////////////////////////////////////////////////////
                    
                
Links.php https://bitbucket.org/acidel/buykoala.git | PHP | 305 lines
                    
1<?php

                    
2/**

                    
9 * It is also available through the world-wide-web at this URL:

                    
10 * http://opensource.org/licenses/osl-3.0.php

                    
11 * If you did not receive a copy of the license and are unable to

                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

                    
25 */

                    
190                        'name' => $name,

                    
191                        'size' => filesize($file),

                    
192                        'status' => 'old'

                    
202                        'name' => Mage::helper('downloadable/file')->getFileFromPathFile($item->getSampleFile()),

                    
203                        'size' => filesize($sampleFile),

                    
204                        'status' => 'old'

                    
                
DirectFilesystem.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 500 lines
                    
1<?php
                    
2
                    
5 *
                    
6 * @file DirectFilesystem.php
                    
7 * @ingroup Deployment
                    
17/**
                    
18 * Filesystem class for direct PHP file and folder manipulation.
                    
19 * 
                    
311		wfSuppressWarnings();
                    
312		$result = filesize( $file );
                    
313		wfRestoreWarnings();		
                    
426	public function makeDir( $path, $chmod = false, $chown = false, $chgrp = false ) {
                    
427		// Safe mode fails with a trailing slash under certain PHP versions.
                    
428		$path = rtrim( $path, '/' );
                    
                
import.php https://github.com/rii-J/concrete5-de.git | PHP | 281 lines
                    
1<?php 
                    
2defined('C5_EXECUTE') or die("Access Denied.");
                    
19<ul class="ccm-dialog-tabs" id="ccm-file-import-tabs">
                    
20<li class="ccm-nav-active"><a href="javascript:void(0)" id="ccm-file-upload-multiple"><?php echo t('Upload Multiple')?></a></li>
                    
21<li><a href="javascript:void(0)" id="ccm-file-add-incoming"><?php echo t('Add Incoming')?></a></li>
                    
65		upload_url : "<?php echo REL_DIR_FILES_TOOLS_REQUIRED?>/files/importers/multiple",
                    
66		post_params: {'ccm-session' : "<?php  echo session_id(); ?>",'searchInstance': '<?php echo $searchInstance?>', 'ocID' : '<?php echo $ocID?>', 'ccm_token' : '<?php echo $valt->generate("upload")?>'},
                    
67		file_size_limit : "<?php echo $umf?>",
                    
196<div class="ccm-note">
                    
197	<strong><?php echo t('Upload Max File Size: %s', ini_get('upload_max_filesize'))?></strong><br/>
                    
198	<strong><?php echo t('Post Max Size: %s', ini_get('post_max_size'))?></strong><br/>
                    
231					<?php  if($fh->extension($file_array['name'])) { ?>
                    
232						<input type="checkbox" name="send_file<?php echo $filenum?>" class="ccm-file-select-incoming" value="<?php echo $file_array['name']?>" />
                    
233					<?php  } ?>
                    
236				<td width="45%" valign="middle"><?php echo $file_array['name']?></td>
                    
237				<td width="25%" valign="middle" class="center"><?php echo $file_array['size']?><?php echo t('Kb')?></div>
                    
238			</tr>
                    
                
 

Source

Language