PageRenderTime 343ms queryTime 30ms sortTime 1ms getByIdsTime 170ms findMatchingLines 48ms

100+ results results for 'php readdir repo:smf-portal/SMF2.1' (343 ms)

Not the results you expected?
MaildirFolderTest.php git://github.com/zendframework/zf2.git | PHP | 0 lines
                    
1<?php
                    
2/**
                    
36 */
                    
37class MaildirFolderTest extends \PHPUnit_Framework_TestCase
                    
38{
                    
64            $dh = opendir($this->_tmpdir);
                    
65            while (readdir($dh) !== false) {
                    
66                ++$count;
                    
87                $dh = opendir($this->_originalDir . $dir . '/' . $subdir);
                    
88                while (($entry = readdir($dh)) !== false) {
                    
89                    $entry = $dir . '/' . $subdir . '/' . $entry;
                    
107                $dh = opendir($this->_tmpdir . $dir . '/' . $subdir);
                    
108                while (($entry = readdir($dh)) !== false) {
                    
109                    $entry = $this->_tmpdir . $dir . '/' . $subdir . '/' . $entry;
                    
203        try {
                    
204            // explicit call of __toString() needed for PHP < 5.2
                    
205            $this->assertEquals($mail->getFolders()->subfolder->__toString(), 'subfolder');
                    
                
admin.media.php http://miacms.googlecode.com/svn/trunk/ | PHP | 360 lines
                    
1<?php
                    
2/**
                    
4* @subpackage Media Manager
                    
5* @author MiaCMS see README.php
                    
6* @copyright see README.php
                    
6* @copyright see README.php
                    
7* See COPYRIGHT.php for copyright notices and details.
                    
8* @license GNU/GPL Version 2, see LICENSE.php
                    
19		| $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_media' ))) {
                    
20	mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') );
                    
21}
                    
38if (is_int(strpos ($listdir, "..")) && $listdir<>'') {
                    
39	mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], T_("NO HACKING PLEASE") );
                    
40	}
                    
50		if (ini_get('safe_mode')=="On") {
                    
51			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], T_("Directory creation not allowed while running in SAFE MODE as this can cause problems.") );
                    
52			}
                    
                
file_helper.php git://github.com/philsturgeon/codeigniter-restserver.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 *
                    
130
                    
131		while (FALSE !== ($filename = @readdir($current_dir)))
                    
132		{
                    
188
                    
189			while (FALSE !== ($file = readdir($fp)))
                    
190			{
                    
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)))
                    
334 *
                    
335 * Translates a file extension into a mime type based on config/mimes.php.
                    
336 * Returns FALSE if it can't determine the type, or open the mime config file
                    
                
Zip.php git://github.com/EllisLab/CodeIgniter.git | PHP | 530 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 * https://www.zend.com/codex.php?id=696&single=1
                    
45 *
                    
366
                    
367		while (FALSE !== ($file = readdir($fp)))
                    
368		{
                    
                
MaildirFolderTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
12 */
                    
13require_once 'Zend/Mail/Storage/Folder/Maildir.php';
                    
14
                    
17 */
                    
18require_once 'Zend/Config.php';
                    
19
                    
20/**
                    
21 * PHPUnit test case
                    
22 */
                    
22 */
                    
23require_once 'PHPUnit/Framework/TestCase.php';
                    
24
                    
58            $dh = opendir($this->_tmpdir);
                    
59            while (readdir($dh) !== false) {
                    
60                ++$count;
                    
                
ChainedBlockStream.php https://PHPExcel.svn.codeplex.com/svn | PHP | 235 lines
                    
1<?php
                    
2/**
                    
21 * @category   PHPExcel
                    
22 * @package    PHPExcel_Shared_OLE
                    
23 * @copyright  Copyright (c) 2006 - 2007 Christian Schmidt
                    
27
                    
28/** PHPExcel root directory */
                    
29if (!defined('PHPEXCEL_ROOT')) {
                    
35
                    
36require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/OLE.php';
                    
37
                    
42 * for PHP's stream_wrapper_register(). For creating streams using this
                    
43 * wrapper, use PHPExcel_Shared_OLE_PPS_File::getStream().
                    
44 *
                    
171		$eof = $this->pos >= strlen($this->data);
                    
172		// Workaround for bug in PHP 5.0.x: http://bugs.php.net/27508
                    
173		if (version_compare(PHP_VERSION, '5.0', '>=') &&
                    
                
MaildirMessageOldTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: MaildirMessageOldTest.php 23772 2011-02-28 21:35:29Z ralph $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Mail/Storage/Maildir.php';
                    
27
                    
30 */
                    
31require_once 'Zend/Config.php';
                    
32
                    
58 */
                    
59class Zend_Mail_MaildirMessageOldTest extends PHPUnit_Framework_TestCase
                    
60{
                    
84            $dh = opendir($this->_tmpdir);
                    
85            while (readdir($dh) !== false) {
                    
86                ++$count;
                    
                
file.php git://github.com/phpbb/phpbb3.git | PHP | 730 lines
                    
21*/
                    
22class phpbb_cache_driver_file extends phpbb_cache_driver_base
                    
23{
                    
82				global $phpbb_root_path;
                    
83				include($phpbb_root_path . 'includes/functions.' . $phpEx);
                    
84			}
                    
243	{
                    
244		global $phpEx;
                    
245
                    
698				global $phpbb_root_path;
                    
699				include($phpbb_root_path . 'includes/functions.' . $phpEx);
                    
700			}
                    
717			global $phpbb_root_path, $phpEx;
                    
718			include($phpbb_root_path . 'includes/functions.' . $phpEx);
                    
719		}
                    
                
git.class.php git://github.com/patrikf/glip.git | PHP | 438 lines
                    
1<?php
                    
2/*
                    
20
                    
21require_once('binary.class.php');
                    
22require_once('git_object.class.php');
                    
22require_once('git_object.class.php');
                    
23require_once('git_blob.class.php');
                    
24require_once('git_commit.class.php');
                    
24require_once('git_commit.class.php');
                    
25require_once('git_commit_stamp.class.php');
                    
26require_once('git_tree.class.php');
                    
98        if ($dh !== FALSE) {
                    
99            while (($entry = readdir($dh)) !== FALSE)
                    
100                if (preg_match('#^pack-([0-9a-fA-F]{40})\.idx$#', $entry, $m))
                    
201                        /* packfile > 2 GB. Gee, you really want to handle this
                    
202                         * much data with PHP?
                    
203                         */
                    
                
common_functions.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 314 lines
                    
1<?php
                    
2
                    
56			'name' => $myts->makeTboxData4Show( $pipe_row['name'] ) ,
                    
57			'url' => 'index.php?page=eachpipe&amp;pipe_id='.$pipe_id ,
                    
58		) ;
                    
90		if( $handler = @opendir( $classes_base ) ) {
                    
91			while( ( $file = readdir( $handler ) ) !== false ) {
                    
92				if( substr( $file , 0 , 1 ) == '.' ) continue ;
                    
94				if( file_exists( $classes_base . '/' . $file ) ) {
                    
95					$ret = strtolower( substr( $file , strlen( 'D3pipes'.$joint_type ) , - strlen( '.class.php' ) ) ) ;
                    
96					break ;
                    
122	if( $handler = @opendir( $basedir ) ) {
                    
123		while( ( $file = readdir( $handler ) ) !== false ) {
                    
124			if( strncmp( $file , $prefix , $prefix_length ) === 0 ) {
                    
147{
                    
148	require_once dirname(dirname(__FILE__)).'/joints/clip/D3pipesClipModuledb.class.php' ;
                    
149
                    
                
MaildirTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2
                    
12 */
                    
13require_once 'Zend/Mail/Storage/Maildir.php';
                    
14
                    
17 */
                    
18require_once 'Zend/Config.php';
                    
19
                    
20/**
                    
21 * PHPUnit test case
                    
22 */
                    
22 */
                    
23require_once 'PHPUnit/Framework/TestCase.php';
                    
24
                    
30 */
                    
31class Zend_Mail_MaildirTest extends PHPUnit_Framework_TestCase
                    
32{
                    
                
captcha_helper.php git://github.com/EllisLab/CodeIgniter.git | PHP | 384 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
136			$current_dir = @opendir($img_path);
                    
137			while ($filename = @readdir($current_dir))
                    
138			{
                    
164
                    
165			// PHP7 or a suitable polyfill
                    
166			if (function_exists('random_int'))
                    
267		// Create image
                    
268		// PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
269		$im = function_exists('imagecreatetruecolor')
                    
360			// I don't see an easier way to get the image contents without writing to file
                    
361			$buffer = fopen('php://memory', 'wb+');
                    
362			imagepng($im, $buffer);
                    
                
functions_report_admin.php http://torrentpier2.googlecode.com/svn/trunk/ | PHP | 569 lines
                    
1<?php
                    
2
                    
68		if (!class_exists("report_module"))
                    
69			include(INC_DIR . "report_module.php");
                    
70
                    
78
                    
79		while ($file = @readdir($dir))
                    
80		{
                    
80		{
                    
81			if (!preg_match('#(.*)\.' . bb_preg_quote('php', '#') . '$#', $file, $matches))
                    
82			{
                    
98
                    
99			$lang_file = LANG_ROOT_DIR ."lang_{$bb_cfg['default_lang']}/report_hack/lang_$module_name.php";
                    
100			if (file_exists($lang_file))
                    
                
narsykle.php http://mightmedia.googlecode.com/svn/trunk/ | PHP | 135 lines
                    
1<?php
                    
2if (!defined("LEVEL") || LEVEL < 30 || !defined("OK")) { header('location: ?home'); }
                    
6    $host = "?id,46;a,8"; // pagrindinis
                    
7    $denny = "conf.php|localhost.php";
                    
8    // knopkes
                    
65       if ($dh = opendir($path)) {
                    
66           while (($file = readdir($dh)) !== false) {
                    
67               if (($file == ".") || ($file == "..")) continue;
                    
                
onupdate.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 147 lines
                    
1<?php
                    
2
                    
24        $template_dir = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/templates';
                    
25        include_once XOOPS_ROOT_PATH . '/class/template.php';
                    
26        $msgs[] = 'Updating templates...';
                    
27        if ($dir_handler = @opendir($template_dir . '/')) {
                    
28            while (($template_file = readdir($dir_handler)) !== false) {
                    
29                if (substr($template_file, 0, 1) == '.') continue;
                    
                
cache.class.php http://wikiplot.googlecode.com/svn/trunk/ | PHP | 182 lines
                    
1<?php
                    
2/*
                    
28*/
                    
29require_once("WikiPlotSettings.php");
                    
30
                    
60	*
                    
61	* Removes old files from the cache, see LocalSettings.php for settings.
                    
62	*
                    
70			$MaxFileAge = time() - (WikiPlotCacheAge * 24 * 60 * 60);
                    
71			while (false !== ($file = readdir($cache)))
                    
72			{
                    
91	*
                    
92	* Removes old unused files from the cache, see LocalSettings.php for settings.
                    
93	* This functions indentifies files as unused if they havn't been accessed for a long time. 
                    
102			$MaxFileAge = time() - (WikiPlotMaxUnusedAge * 24 * 60 * 60);
                    
103			while (false !== ($file = readdir($cache)))
                    
104			{
                    
                
Transformer.php git://github.com/mvriel/Docblox.git | PHP | 490 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP Version 5
                    
6 *
                    
10 * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
                    
11 * @license   http://www.opensource.org/licenses/mit-license.php MIT
                    
12 * @link      http://docblox-project.org
                    
21 * @author   Mike van Riel <mike.vanriel@naenius.com>
                    
22 * @license  http://www.opensource.org/licenses/mit-license.php MIT
                    
23 * @link     http://docblox-project.org
                    
55     * class that starts with HTML_QuickForm2_ to a (defined) URL
                    
56     * i.e. http://pear.php.net/package/HTML_QuickForm2/docs/
                    
57     * latest/HTML_QuickForm2/${class}.html
                    
386
                    
387        while (false !== ($file = readdir($dir))) {
                    
388            if (($file != '.') && ($file != '..')) {
                    
                
file.class.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 315 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * file.class.php
                    
4 *
                    
22
                    
23require_once dirname(__FILE__) . "/../pfccontainerinterface.class.php";
                    
24
                    
65        
                    
66        // test the filemtime php function because it doesn't work on special filesystem
                    
67        // example : NFS, VZFS
                    
80            if ($time2 - $time1 != $timetowait)
                    
81                $errors[] = "filemtime php fuction is not usable on your filesystem. Please do not use the 'file' container (try the 'mysql' container) or swith to another filesystem type.";
                    
82        }
                    
151                $dh = opendir($dir);
                    
152                while (false !== ($file = readdir($dh)))
                    
153                {
                    
                
Tweetr.php http://tweetr.googlecode.com/svn/trunk/ | PHP | 326 lines
                    
1<?php
                    
2/**
                    
29     * Creates a Tweetr Proxy Instance
                    
30     * @param (array) $options  Associative Array containing optional values see http://code.google.com/p/tweetr/wiki/PHPProxyUsage
                    
31     */
                    
221     * Log Method that you can overwrite with your own logging stuff.
                    
222     * FirePHP is my personal recommendation though ;)
                    
223     * @param $obj  Whatever you are trying to log
                    
226    {
                    
227        //require_once('fire/fb.php');
                    
228        //FB::log($obj);
                    
307		$dir_handle = @opendir($this->cacheDirectory) or die('Unable to open '.$this->cacheDirectory);
                    
308		while ($file = readdir($dir_handle))
                    
309		{
                    
                
files_cron.php http://xtraupload.googlecode.com/svn/trunk/ | PHP | 25 lines
                    
1<?php
/**
 * XtraUpload
 *
 * A turn-key open source web 2.0 PHP file uploading package requiring PHP v5
 *
 * @package		XtraUpload
 * @author		Matthew Glinski
 * @copyright	Copyright (c) 2006, XtraFile.com
 * @license		http://xtrafile.com/docs/license
 * @link		http://xtrafile.com
 * @since		Version 2.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * XtraUpload Cron Item
 *
 * @package		XtraUpload
 * @subpackage	Controllers
 * @category	Controllers
 * @author		Matthew Glinski
 * @link		http://xtrafile.com/docs/cron
 */

// ------------------------------------------------------------------------

class Files_cron 
{
	private $server = false;
	private $CI = '';
                    
2	private $debug = false;
                    
11	    if(!defined('IN_CRON'))
		{
			return false;
		}
                    
12	    
		// delete file without a DB entry, IE: deleted or baned
		$this->_pruneDatabaseFiles();
		
		// Delete database entries without files, edge case
		$this->_pruneDatabaseFiles();
		
		// delete files that have expired
		$this->_pruneExpiredFiles();
		
		// delete file without a DB entry, IE: deleted or baned
		$this->_pruneFolderFiles('./filestore');
		
		// clear temp folder
		$this->_clearTemp();
	}
	
	private function _pruneFolderFiles($dir)
	{
		$fh = @opendir($dir);
		while ($file = @readdir($fh))
		{
			if (($file != '..' && $file != '.' && $file != 'index.php' && $file != 'index.html' && $file != '.DS_Store' && $file != '.htaccess'))
			{
				if(is_dir($dir . '/' . $file) and $file != '.svn')
				{
					$this->_pruneFolderFiles($dir.'/'.$file);
				}
				else
				{
					$q = $this->CI->db->join('files', 'refrence.link_id = files.id')->get_where('refrence', array('filename' => str_replace('./', '', $dir.'/'.$file), 'server' => $this->server), 1, 0);
					$num = $q->num_rows();
					if($num == '0' and $file != '.svn')
					{
						$file_obj = $q->row();						
						if(!empty($file_obj->thumb))
						{
							unlink($file_obj->thumb);
						}
                    
13						
                    
24				}
                    
25				
				$this->CI->files_db->deleteFile($file->file_id, $file->secid, $file->link_name);
			}
		}
	}

	private function _clearTemp()
	{
		$temp = @opendir('./temp/');
		while ($file = @readdir($temp))
		{
			if (($file != 'index.php' && $file != 'index.html' && $file != '.DS_Store' && $file != '.htaccess' && !is_dir('./temp/' . $file)))
			{
				unlink('./temp/'.$file);
			}
		}
		@closedir ($temp);
	}
}
?>
                    
                
onupdate.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 117 lines
                    
1<?php
                    
2
                    
63	if( $handler = @opendir( $tpl_path . '/' ) ) {
                    
64		while( ( $file = readdir( $handler ) ) !== false ) {
                    
65			if( substr( $file , 0 , 1 ) == '.' ) continue ;
                    
84					// generate compiled file
                    
85					include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
                    
86					include_once XOOPS_ROOT_PATH.'/class/template.php' ;
                    
96	}
                    
97	include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
                    
98	include_once XOOPS_ROOT_PATH.'/class/template.php' ;
                    
                
upgrade.php http://phpwcms.googlecode.com/svn/trunk/ | PHP | 343 lines
                    
64        <tr>
                    
65          <td valign="top" class="navtext">PHPWCMS UPGRADE VERSION&nbsp;<?php echo $phpwcms['release'].', RELEASE '.$phpwcms['release_date'] ?></td>
                    
66          <td align="right" valign="top" class="navtext"><a href="../index.php" target="_top">HOME</a> |
                    
66          <td align="right" valign="top" class="navtext"><a href="../index.php" target="_top">HOME</a> |
                    
67            <a href="setup.php">SETUP</a> | <a href="index.php" target="_top">LICENCE</a> | <a href="<?php echo PHPWCMS_URL.get_login_file() ?>" target="_top">LOGIN</a></td>
                    
68        </tr>
                    
132					echo 'On';
                    
133					echo isset($_phpinfo['gd']['GD Version']) ? ' -&gt; '.$_phpinfo['gd']['GD Version'] : '';
                    
134				} else {
                    
197		@mysql_query($value, $db);
                    
198		$value = "SET NAMES '".$phpwcms['db_charset']."'".(empty($phpwcms['db_collation']) ? '' : " COLLATE '".$phpwcms['db_collation']."'");
                    
199		@mysql_query($value, $db);
                    
236
                    
237if(empty($phpwcms['db_charset']) || empty($phpwcms['db_collation']) || empty($phpwcms['db_version'])) {
                    
238
                    
                
PhpThumb.inc.php git://github.com/masterexploder/PHPThumb.git | PHP | 248 lines
                    
2/**
                    
3 * PhpThumb Library Definition File
                    
4 * 
                    
7 * PHP Version 5 with GD 2.0+
                    
8 * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com>
                    
9 * Copyright (c) 2009, Ian Selby/Gen X Design
                    
17 * @copyright Copyright (c) 2009 Gen X Design
                    
18 * @link http://phpthumb.gxdlabs.com
                    
19 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
                    
27/**
                    
28 * PhpThumb Object
                    
29 * 
                    
36 * can't create one via the new keyword):
                    
37 * <code>$pt = PhpThumb::getInstance();</code>
                    
38 * 
                    
                
dialog.php http://pixie-cms.googlecode.com/svn/trunk/ | PHP | 237 lines
                    
1<?php
                    
2header('Content-Type: text/html; charset=UTF-8');
                    
37if (defined('DIRECT_ACCESS')) {
                    
38	require_once '../../../../lib/lib_misc.php';
                    
39	pixieExit();
                    
42define('DIRECT_ACCESS', 1);
                    
43require_once '../../../../lib/lib_misc.php';
                    
44/* perform basic sanity checks */
                    
50if (($refering['host'] == $_SERVER['HTTP_HOST'])) {
                    
51	if ((is_readable('../../../../lib/geshi.php'))) {
                    
52		$path = '../../../../lib/';
                    
52		$path = '../../../../lib/';
                    
53	} elseif ((is_readable('geshi.php'))) {
                    
54		$path = './';
                    
72<li>Copy the folder geshi/geshi/ into Pixie's lib directory admin/lib/</li>
                    
73<li>Copy the file geshi/geshi.php into Pixie's lib directory admin/lib/</li>
                    
74<li>Close this dialogue by clicking cancel</li>
                    
                
modules.php http://68kb.googlecode.com/svn/trunk/ | PHP | 197 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
27 * @link		http://68kb.com/user_guide/developer/modules.html
                    
28 * @version 	$Id: modules.php 172 2009-12-11 16:18:32Z suzkaw68 $
                    
29 */
                    
178		$query->free_result();
                    
179		if (file_exists(KBPATH .'my-modules/'.$name.'/config.php'))
                    
180		{
                    
181			$opendir = opendir(KBPATH .'my-modules/'.$name);
                    
182			while (false !== ($module = readdir($opendir)))
                    
183			{
                    
195
                    
196/* End of file modules.php */
                    
197/* Location: ./upload/includes/application/controllers/admin/modules.php */ 
                    
                
file_helper.php git://github.com/EllisLab/CodeIgniter.git | PHP | 433 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
116
                    
117		while (FALSE !== ($filename = @readdir($current_dir)))
                    
118		{
                    
126				}
                    
127				elseif ($htdocs !== TRUE OR ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename))
                    
128				{
                    
169
                    
170			while (FALSE !== ($file = readdir($fp)))
                    
171			{
                    
221			// Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast
                    
222			while (FALSE !== ($file = readdir($fp)))
                    
223			{
                    
                
extractdata.pl https://freedict.svn.sourceforge.net/svnroot/freedict | Perl | 479 lines
                    
82	For FreeDict download:
                    
83	http://sourceforge.net/project/showfiles.php?group_id=1419
                    
84
                    
248  opendir $dir, $dirname;
                    
249  while($entry = readdir($dir))
                    
250  {
                    
                
dev-stats.php http://jfxcms.googlecode.com/svn/ | PHP | 107 lines
                    
1<?php
                    
2###############   COPYLEFT GPLv3 LICENSE   ###############
                    
27
                    
28$numFiles = countFiles($dir, 'php');
                    
29
                    
34
                    
35$numLines = countLines($dir, 'php');
                    
36
                    
47    $dh = opendir($dir);
                    
48    while($file = readdir($dh)){
                    
49        if($file == '.' || $file == '..') continue;
                    
84
                    
85    while($file = readdir($dh)){
                    
86        if($file == '.' || $file == '..') continue;
                    
                
control.php http://textmotion.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2
                    
18 * @lastmodified    $Date: 2008-10-29 10:41:55 +1100 (Wed, 29 Oct 2008) $
                    
19 * @license         http://www.opensource.org/licenses/mit-license.php The MIT License
                    
20 *
                    
232
                    
233      while (($file = readdir($dh)) !== false) {
                    
234        if ($file != '.' && $file != '..') {
                    
                
field.inc http://leaguerunner.googlecode.com/svn/trunk/ | PHP | 214 lines
                    
1<?php
                    
2class Field extends LeaguerunnerObject
                    
45			if ($dh = opendir($permit_dir)) {
                    
46				while (($file = readdir($dh)) !== false) {
                    
47					if( fnmatch( $this->code . "*", $file) ) {
                    
                
FtpbatchAction.class.php http://iiccms.googlecode.com/svn/trunk/ | PHP | 360 lines
                    
1<?php
                    
2/**
                    
66			if ($dh = opendir( $dir)) {
                    
67				while (($file = readdir($dh)) !== false) {
                    
68					$file=auto_charset($file,'gbk','utf-8');
                    
173			if ($dh = opendir($dir)) {
                    
174				while (($file = readdir($dh)) !== false) {
                    
175					if($file != "." && $file !=".."){
                    
283		$handle = opendir($directory);
                    
284		while (($file = readdir($handle)) !== false)
                    
285		{
                    
324		$handle = opendir($directory);
                    
325		while (($file = readdir($handle)) !== false)
                    
326		{
                    
333		}
                    
334		if (readdir($handle) == false)
                    
335		{
                    
                
build.php https://PHPExcel.svn.codeplex.com/svn | PHP | 336 lines
                    
4 *
                    
5 * Copyright (c) 2006 - 2008 PHPExcel
                    
6 *
                    
20 *
                    
21 * @copyright  Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
22 * @license    http://www.gnu.org/licenses/lgpl.txt	LGPL
                    
26/**
                    
27 * This file creates a build of PHPExcel
                    
28 */
                    
55@mkdir($sAPIDocumentation);
                    
56echo "Please, generate API documentation using phpDocumentor.\r\n";
                    
57
                    
94echo date('H:i:s') . " Set archive comment...\n";
                    
95$objZip->setArchiveComment('PHPExcel - http://www.codeplex.com/PHPExcel');
                    
96
                    
                
build.php https://PHPExcel.svn.codeplex.com/svn | PHP | 336 lines
                    
4 *
                    
5 * Copyright (c) 2006 - 2007 PHPExcel
                    
6 *
                    
20 *
                    
21 * @copyright  Copyright (c) 2006 - 2007 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
22 * @license    http://www.gnu.org/licenses/lgpl.txt	LGPL
                    
26/**
                    
27 * This file creates a build of PHPExcel
                    
28 */
                    
55@mkdir($sAPIDocumentation);
                    
56echo "Please, generate API documentation using phpDocumentor.\r\n";
                    
57
                    
94echo date('H:i:s') . " Set archive comment...\n";
                    
95$objZip->setArchiveComment('PHPExcel - http://www.codeplex.com/PHPExcel');
                    
96
                    
                
islenska.php https://code.google.com/p/mwenhanced/ | PHP | 323 lines
                    
29	"opendir"		=> "Gat ekki opna? möppuna.",
                    
30	"readdir"		=> "Gat ekki lesi? möppuna.",
                    
31
                    
96	'chmodlink'		=> 'Breyta (chmod) A?gangsstýringum (möppu/skrá(a))', // new mic
                    
97	'mossysinfolink'	=> 'eXtplorer upplýsingar (eXtplorer, Server, PHP, mySQL)', // new mic
                    
98	'logolink'		=> 'Fara á heimasí?u joomlaXplorer (new window)', // new mic
                    
185	'siphpversion'		=> 'PHP útgáfa',
                    
186	'siphpupdate'		=> 'Upplýsingar: <span style="color: red;">PHP sem ?ú ert a? nota er <strong>ekki</strong> raunverulega!</span><br />To guarantee all functions and features of eXtplorer and addons,<br />you should use as minimum <strong>PHP.Version 4.3</strong>!',
                    
187	'siwebserver'		=> 'Webserver',
                    
187	'siwebserver'		=> 'Webserver',
                    
188	'siwebsphpif'		=> 'WebServer - PHP Interface',
                    
189	'simamboversion'	=> 'eXtplorer útgáfa',
                    
207	'siphpinfo'			=> 'PHP Info',
                    
208	'siphpinformation'	=> 'PHP Information',
                    
209	'sipermissions'		=> 'Permissions',
                    
                
Command.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 452 lines
                    
9 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
                    
10 * the PHP License and are unable to obtain it through the web, please
                    
11 * send a note to license@php.net so we can mail you a copy immediately.
                    
14 * @package    PEAR
                    
15 * @author     Stig Bakken <ssb@php.net>
                    
16 * @author     Greg Beaver <cellog@php.net>
                    
17 * @copyright  1997-2008 The PHP Group
                    
18 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
19 * @version    CVS: $Id: Command.php 137 2009-11-09 13:24:37Z vanpouckesven $
                    
27require_once 'PEAR.php';
                    
28require_once 'PEAR/Frontend.php';
                    
29require_once 'PEAR/XMLParser.php';
                    
101 * @copyright  1997-2008 The PHP Group
                    
102 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
103 * @version    Release: 1.7.2
                    
                
common.php http://miacms.googlecode.com/svn/trunk/ | PHP | 93 lines
                    
1<?php
                    
2/**
                    
4* @package MiaCMS
                    
5* @author MiaCMS see README.php
                    
6* @copyright see README.php
                    
6* @copyright see README.php
                    
7* See COPYRIGHT.php for copyright notices and details.
                    
8* @license GNU/GPL Version 2, see LICENSE.php
                    
19
                    
20require_once('../includes/phpgettext/phpgettext.class.php');
                    
21
                    
68	    $dh = opendir($path);
                    
69	    while ($file = readdir($dh)) {
                    
70	        if ($file != '.' && $file != '..') {
                    
                
Rfc2231EncoderAcceptanceTest.php git://github.com/swiftmailer/swiftmailer.git | PHP | 50 lines
                    
1<?php
                    
2
                    
2
                    
3class Swift_Encoder_Rfc2231EncoderAcceptanceTest extends \PHPUnit\Framework\TestCase
                    
4{
                    
16        $sampleFp = opendir($this->samplesDir);
                    
17        while (false !== $encodingDir = readdir($sampleFp)) {
                    
18            if ('.' == substr($encodingDir, 0, 1)) {
                    
30                $fileFp = opendir($sampleDir);
                    
31                while (false !== $sampleFile = readdir($fileFp)) {
                    
32                    if ('.' == substr($sampleFile, 0, 1)) {
                    
                
CacheFile.class.php http://iiccms.googlecode.com/svn/trunk/ | PHP | 247 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
108            }
                    
109            $filename	=	$dir.$this->prefix.$name.'.php';
                    
110        }else{
                    
110        }else{
                    
111            $filename	=	$this->prefix.$name.'.php';
                    
112        }
                    
192        }
                    
193        $data    = "<?php\n//".sprintf('%012d',$expire).$check.$data."\n?>";
                    
194        $result  =   file_put_contents($filename,$data);
                    
                
phpThumb.demo.gallery.php git://github.com/Datawalke/Coordino.git | PHP | 99 lines
                    
6<body>
                    
7This is a demo of how you can use <a href="http://phpthumb.sourceforge.net">phpThumb()</a> in an image gallery.<br>
                    
8<hr>
                    
10//////////////////////////////////////////////////////////////
                    
11///  phpThumb() by James Heinrich <info@silisoftware.com>   //
                    
12//        available at http://phpthumb.sourceforge.net     ///
                    
14///                                                         //
                    
15// phpThumb.demo.gallery.php                                //
                    
16// James Heinrich <info@silisoftware.com>                   //
                    
17//                                                          //
                    
18// Demo showing basic usage of phpThumb in a photo gallery  //
                    
19//                                                          //
                    
24$thumb   = '/demo/phpThumb.php';                    // webroot-relative path to "phpThumb.php"
                    
25$popup   = '/demo/demo/phpThumb.demo.showpic.php';  // webroot-relative path to "phpThumb.demo.showpic.php" (only used if $use_popup == true)
                    
26$thumbnailsize = 120;                               // size of thumbnails in pixels when browsing gallery
                    
                
TranslateController.php http://wolfcms.googlecode.com/svn/trunk/ | PHP | 203 lines
                    
1<?php
                    
2/*
                    
17 *
                    
18 * @version $Id: TranslateController.php 311 2010-11-18 21:30:29Z martijn.niji@gmail.com $
                    
19 */
                    
165            $fh = opendir($start_dir);
                    
166            while (($file = readdir($fh)) !== false) {
                    
167                # loop through the files, skipping . and .., and recursing if necessary
                    
176                    else {
                    
177                        if (!strpos($filepath, 'I18n') && strpos($filepath, '.php', strlen($filepath) - 5) || strpos($filepath, '.phtml', strlen($filepath) - 7)) {
                    
178                            array_push($files, $filepath);
                    
186                    else {
                    
187                        if (!strpos($filepath, 'I18n') && strpos($filepath, '.php', strlen($filepath) - 5) || strpos($filepath, '.phtml', strlen($filepath) - 7)) {
                    
188                            array_push($files, $filepath);
                    
                
themeroller.php git://github.com/gallery/gallery3-contrib.git | PHP | 205 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");/**
                    
2 * Gallery - a web based photo album viewer and editor
                    
30    } else if (extension_loaded("zlib")) {
                    
31      require_once(MODPATH . "themeroller/libraries/pclzip.lib.php");
                    
32      $archive = new PclZip($zipfile);
                    
60    if ($handle = opendir($extract_path . "/css")) {
                    
61      while (false !== ($file = readdir($handle))) {
                    
62        if ($file[0] !== ".") {
                    
116    $parameters["icon_mask"] = MODPATH . "themeroller/data/masks/css/themeroller/ui-icons_mask_256x240.png";
                    
117    $parameters["views"] = $is_admin ? glob(MODPATH . "themeroller/data/admin_views/*.html.php") :
                    
118      glob(MODPATH . "themeroller/data/views/*.html.php");
                    
                
phpThumb.demo.random.php git://github.com/Datawalke/Coordino.git | PHP | 95 lines
                    
1<?php
                    
2//////////////////////////////////////////////////////////////
                    
2//////////////////////////////////////////////////////////////
                    
3///  phpThumb() by James Heinrich <info@silisoftware.com>   //
                    
4//        available at http://phpthumb.sourceforge.net     ///
                    
6///                                                         //
                    
7// phpThumb.demo.random.php                                 //
                    
8// James Heinrich <info@silisoftware.com>                   //
                    
20	if ($dh = opendir($dirname)) {
                    
21		while ($file = readdir($dh)) {
                    
22			if (is_file($dirname.'/'.$file) && eregi('\.(jpg|jpeg|gif|png|tiff|bmp)$', $file)) {
                    
78		}
                    
79		header('Location: ../phpThumb.php?src='.urlencode($randomSRC).'&'.implode('&', $otherParams));
                    
80		exit;
                    
87
                    
88	echo '<html><body>Usage: <b>'.basename($_SERVER['PHP_SELF']).'?dir=<i>&lt;directory&gt;</i>&amp;<i>&lt;phpThumb parameters&gt;</i></b>&amp;o=<i>(P|L|S)</i><br><br>Examples:<ul>';
                    
89	echo '<li>'.basename($_SERVER['PHP_SELF']).'?./images/&o=L <i>(landscape images only)</i></li>';
                    
                
functions_admin.php http://torrentpier2.googlecode.com/svn/trunk/ | PHP | 394 lines
                    
1<?php
                    
2
                    
174		{
                    
175			while ($file = @readdir($dirname))
                    
176			{
                    
176			{
                    
177				if ($file != 'index.php' && $file != '.htaccess' && !is_dir($upload_dir . '/' . $file) && !is_link($upload_dir . '/' . $file))
                    
178				{
                    
217
                    
218			if ($dirinfo[0] != 1 && $dirinfo[4] != 'index.php' && $dirinfo[4] != '.htaccess')
                    
219			{
                    
                
irclog.php https://quake.svn.sourceforge.net/svnroot/quake | PHP | 74 lines
                    
3-->
                    
4<?php
                    
5// Default Web Page for groups that haven't setup their page yet
                    
7//
                    
8// $Id: irclog.php 192 2000-01-03 03:41:11Z palisade $
                    
9//
                    
24			<SPAN class=maintitlebar>&nbsp;&nbsp;
                    
25				<A class=maintitlebar href="http://sourceforge.net/about.php"><B>About</B></A> | <A class=maintitlebar href="http://sourceforge.net/contact.php"><B>Contact Us</B></A>
                    
26			</SPAN>
                    
56			<CENTER><BR>
                    
57			<H1>Welcome to http://<?php print $headers[Host]; ?>/</H1>
                    
58			<P>QuakeForge Project IRC Logs</P><BR>
                    
59			<img src="quake2_infantry_anim.gif"><br><br>
                    
60<?php
                    
61                                $handle=opendir('irclog');
                    
                
configure.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 180 lines
                    
11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
12 * @version $Id: configure.php 12592 2007-08-20 15:16:24Z bouchon $
                    
13 * @package squirrelmail
                    
18// Must be run from the command line
                    
19// Should be compatible with PHP 4.2
                    
20if(getenv('SERVER_NAME') || php_sapi_name() != 'cli')
                    
24
                    
25// PHP 4.2 compatible, no effect on PHP 4.3+
                    
26if(!defined('STDIN'))
                    
27{
                    
28 define('STDIN',fopen("php://stdin","r")); 
                    
29 define('STDOUT',fopen("php://stdout","r")); 
                    
29 define('STDOUT',fopen("php://stdout","r")); 
                    
30 define('STDERR',fopen("php://stderr","r")); 
                    
31}
                    
                
Pop3Test.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Pop3Test.php 23772 2011-02-28 21:35:29Z ralph $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Mail/Storage/Pop3.php';
                    
27
                    
30 */
                    
31require_once 'Zend/Mail/Protocol/Pop3.php';
                    
32
                    
35 */
                    
36require_once 'Zend/Config.php';
                    
37
                    
45 */
                    
46class Zend_Mail_Pop3Test extends PHPUnit_Framework_TestCase
                    
47{
                    
                
settings.php https://code.google.com/p/mytinytodo/ | PHP | 260 lines
                    
69	{
                    
70		if(preg_match('/(.+)\.php$/', $file, $m) && $file != 'class.default.php') {
                    
71			$a[$m[1]] = $m[1];
                    
174<tr>
                    
175<th><?php _e('set_smartsyntax');?>:<br/><span class="descr"><?php _e('set_smartsyntax_descr');?></span></th>
                    
176<td>
                    
184 <label><input type="radio" name="autotag" value="1" <?php if(_c('autotag')) echo 'checked="checked"'; ?> /><?php _e('set_enabled');?></label> <br/>
                    
185 <label><input type="radio" name="autotag" value="0" <?php if(!_c('autotag')) echo 'checked="checked"'; ?> /><?php _e('set_disabled');?></label>
                    
186</td></tr>
                    
190<td>
                    
191 <label><input type="radio" name="session" value="default" <?php if(_c('session')=='default') echo 'checked="checked"'; ?> /><?php _e('set_sessions_php');?></label> <br/>
                    
192 <label><input type="radio" name="session" value="files" <?php if(_c('session')=='files') echo 'checked="checked"'; ?> /><?php _e('set_sessions_files');?></label> <span class="descr">(&lt;mytinytodo_dir&gt;/tmp/sessions)</span>
                    
247 <label><input type="radio" name="showdate" value="1" <?php if(_c('showdate')) echo 'checked="checked"'; ?> /><?php _e('set_enabled');?></label> <br/>
                    
248 <label><input type="radio" name="showdate" value="0" <?php if(!_c('showdate')) echo 'checked="checked"'; ?> /><?php _e('set_disabled');?></label>
                    
249</td>
                    
                
misc.func.php http://domuslink.googlecode.com/svn/trunk/ | PHP | 161 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * domus.Link :: PHP Web-based frontend for Heyu (X10 Home Automation)
                    
4 * Copyright (c) 2007, Istvan Hubay Cebrian (istvan.cebrian@domus.link.co.pt)
                    
32
                    
33	while($fn = readdir($dn)) {
                    
34		if ($fn == $exclude[0] || $fn == $exclude[1] || $fn == $exclude[2] || $fn == $exclude[3]) continue;
                    
93	$_SESSION['errors'] = array_reverse($rs);
                    
94	header("Location: ".$config['url_path']."/error.php");
                    
95}
                    
                
rotator.php http://oregon-caspages.googlecode.com/svn/trunk/ | PHP | 186 lines
                    
1<?php
                    
2/*
                    
4 * File Name:
                    
5 *              rotator.php
                    
6 *              Save pictures in ../rotator folder
                    
12*/ 
                    
13include 'editor_conf.php';
                    
14chdir($sourcepath);
                    
14chdir($sourcepath);
                    
15include 'check_cookie.php';
                    
16chdir($curpath);
                    
21
                    
22require_once('array_storage.php');
                    
23$array_storage = new array_storage(); 
                    
76
                    
77<form name="form1" method="post" action="rotator.php">';
                    
78
                    
                
path.php https://bitbucket.org/joomla/joomla-platform/ | PHP | 257 lines
                    
1<?php
                    
2/**
                    
12/** boolean True if a Windows based host */
                    
13define('JPATH_ISWIN', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'));
                    
14
                    
15/** boolean True if a Mac based host */
                    
16define('JPATH_ISMAC', (strtoupper(substr(PHP_OS, 0, 3)) === 'MAC'));
                    
17
                    
73
                    
74			while ($file = readdir($dh)) {
                    
75				if ($file != '.' && $file != '..') {
                    
183	 * @param	string	Path to check ownership
                    
184	 * @return	boolean	True if the php script owns the path passed
                    
185	 * @since	11.1
                    
                
InstallQuery.php https://bitbucket.org/mstetson/obiblio/ | PHP | 142 lines
                    
1<?php
                    
2/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
                    
5 
                    
6require_once("../shared/global_constants.php");
                    
7require_once("../classes/Query.php");
                    
93      if ($dh = opendir($dir)) {
                    
94        while (($filename = readdir($dh)) !== false) {
                    
95          if(preg_match('/\\.sql$/', $filename)) {
                    
                
DeleteFolder.php http://miacms.googlecode.com/svn/trunk/ | PHP | 85 lines
                    
1<?php 
                    
2/*
                    
11 * 
                    
12 * File Name: DeleteFolder.php
                    
13 * 	Implements the DeleteFolder command to delete a folder
                    
20class DeleteFolder {
                    
21	var $fckphp_config;
                    
22	var $type;
                    
27	function DeleteFolder($fckphp_config,$type,$cwd) {
                    
28		$this->fckphp_config=$fckphp_config;
                    
29		$this->type=$type;
                    
30		$this->raw_cwd=$cwd;
                    
31		$this->actual_cwd=str_replace("//","/",($this->fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd));
                    
32		$this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd));
                    
51<Connector command="DeleteFolder" resourceType="<?php echo $this->type; ?>">
                    
52	<CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" />
                    
53	<Error number="<?php echo "".$err_no; ?>" />
                    
                
flat2sql.pl https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | Perl | 433 lines
                    
13# This script is licensed under the GNU Public License (GPL).
                    
14# See: http://opensource.org/licenses/gpl-license.php
                    
15# $Id: flat2sql.pl 14249 2012-01-02 02:09:17Z pdontthink $
                    
124
                    
125  while ( $filename = readdir DIR ) {
                    
126
                    
                
Maildir.php git://github.com/zendframework/zf2.git | PHP | 214 lines
                    
1<?php
                    
2/**
                    
92
                    
93        while (($entry = readdir($dh)) !== false) {
                    
94            // maildir++ defines folders must start with .
                    
                
MediaSelector.hx http://poko.googlecode.com/svn/trunk/ | Haxe | 205 lines
                    
7import haxe.Md5;
                    
8import php.FileSystem;
                    
9import php.io.File;
                    
9import php.io.File;
                    
10import php.Lib;
                    
11import php.Session;
                    
11import php.Session;
                    
12import php.Web;
                    
13import poko.form.elements.Button;
                    
110		var galleries = new List();
                    
111		var dir = php.FileSystem.readDirectory(imageRoot);
                    
112		for (d in dir)
                    
162		{
                    
163			var dir = php.FileSystem.readDirectory(imageRoot + "/" + gallery);
                    
164			for (d in dir)
                    
                
MboxFolderTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: MboxFolderTest.php 23772 2011-02-28 21:35:29Z ralph $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Mail/Storage/Folder/Mbox.php';
                    
27
                    
30 */
                    
31require_once 'Zend/Config.php';
                    
32
                    
41 */
                    
42class Zend_Mail_MboxFolderTest extends PHPUnit_Framework_TestCase
                    
43{
                    
63            $dh = opendir($this->_tmpdir);
                    
64            while (readdir($dh) !== false) {
                    
65                ++$count;
                    
                
DocumentTest.php git://github.com/zendframework/zf2.git | PHP | 316 lines
                    
1<?php
                    
2/**
                    
29/**
                    
30 * PHPUnit test case
                    
31 */
                    
40 */
                    
41class DocumentTest extends \PHPUnit_Framework_TestCase
                    
42{
                    
51        $dir = opendir($dirName);
                    
52        while (($file = readdir($dir)) !== false) {
                    
53            if (!is_dir($dirName . '/' . $file)) {
                    
91
                    
92        if (PHP_OS == 'AIX') {
                    
93            return; // tests below here not valid on AIX
                    
                
Keditor.class.php http://iiccms.googlecode.com/svn/trunk/ | PHP | 233 lines
                    
1<?php
                    
2/*
                    
133			$i = 0;
                    
134			while ( false !== ($filename = readdir ( $handle )) ) {
                    
135				if ($filename {0} == '.')
                    
                
extend.php http://xtraupload.googlecode.com/svn/trunk/ | PHP | 1 lines
                    
1<?php
/**
 * XtraUpload
 *
 * A turn-key open source web 2.0 PHP file uploading package requiring PHP v5
 *
 * @package		XtraUpload
 * @author		Matthew Glinski
 * @copyright	Copyright (c) 2006, XtraFile.com
 * @license		http://xtrafile.com/docs/license
 * @link		http://xtrafile.com
 * @since		Version 2.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * XtraUpload Extend Page Controller
 *
 * @package		XtraUpload
 * @subpackage	Controllers - Admin
 * @category	Controllers
 * @author		Matthew Glinski
 * @link		http://xtrafile.com/docs/pages/admin/extend
 */

// ------------------------------------------------------------------------

class Extend extends Controller 
{
	private $installed='';
	private $not_installed='';
	
	// ------------------------------------------------------------------------
	
	public function Extend()
	{
		parent::Controller();		
		$this->load->model('admin_access');
		$this->load->helper('string');
		$this->load->helper('text');
	}
	
	// ------------------------------------------------------------------------s
	
	public function index()
	{
		redirect('admin/extend/view');
	}
	
	// ------------------------------------------------------------------------
	
	public function view()
	{
		$this->_getInstalledPlugins();
		$this->_getNotInstalledPlugins();
		
		$data['installed']=array();
		$data['not_installed']=array();
		
		foreach($this->installed as $name)
		{
			$data['installed'][$name] = simplexml_load_file(APPPATH."extend/".$name."/".$name.'.xml');
		}
		
		foreach($this->not_installed as $name)
		{
			$data['not_installed'][$name] = simplexml_load_file(APPPATH."extend/".$name."/".$name.'.xml');
		}
		
		$data['flashMessage'] = '';
		if($this->session->flashdata('msg'))
		{
			$data['flashMessage'] = '<span class="info"><b>'.$this->session->flashdata('msg').'</b></span>';
		}
		
		$this->load->view($this->startup->skin.'/header', array('headerTitle' => 'Plugin Manager'));
		$this->load->view($this->startup->skin.'/admin/extend/view', $data);
		$this->load->view($this->startup->skin.'/footer');
	}
	
	// ------------------------------------------------------------------------
	
	public function install($name)
	{
		$name = str_replace(array('../', '..'), '', $name);
		$num_rows = $this->db->get_where('extend', array('file_name' => $name))->num_rows();
		if(file_exists(APPPATH."extend/".$name.'/'.$name.'.php') and file_exists(APPPATH."extend/".$name."/".$name.'.xml') and $num_rows == 0)
		{
			$xml = simplexml_load_file(APPPATH."extend/".$name."/".$name.'.xml');
			$data = array(
				'data' => serialize($xml),
				'file_name' => $name,
				'date' => time(),
				'active' => '1',
				'uid' => $this->session->userdata('id'),
			);
			
			$this->db->insert('extend', $data);
			
			$this->load->extention($name);			
			$this->$name->install();
			
			$this->session->set_flashdata('msg', 'Plugin "'.ucwords(str_replace('_', ' ', $name)).'" Installed');
		}
		$this->_updateCache();
		redirect('admin/extend/view');
	}
	
	// ------------------------------------------------------------------------
	
	public function remove($name)
	{
		$this->load->extention($name);
		$this->$name->uninstall();
		
		$this->db->delete('extend', array('file_name' => $name));
		$this->session->set_flashdata('msg', 'Plugin "'.ucwords(str_replace('_', ' ', $name)).'" Uninstalled');
		$this->_updateCache();
		redirect('admin/extend/view');
	}
	
	// ------------------------------------------------------------------------
	
	public function turn_on($name)
	{
		$this->db->where('file_name', $name)->update('extend', array('active' => 1));
		$this->session->set_flashdata('msg', 'Plugin "'.ucwords(str_replace('_', ' ', $name)).'" Activated');
		$this->_updateCache();
		redirect('admin/extend/view');
	}
	
	// ------------------------------------------------------------------------
	
	public function turn_off($name)
	{
		$this->db->where('file_name', $name)->update('extend', array('active' => 0));
		$this->session->set_flashdata('msg', 'Plugin "'.ucwords(str_replace('_', ' ', $name)).'" Deactivated');
		$this->_updateCache();
		redirect('admin/extend/view');
	}
	
	// ------------------------------------------------------------------------
	
	private function _updateCache()
	{
		$extend_file_name = md5($this->config->config['encryption_key'].'extend');
		
		$data = array();
		$db1 = $this->db->get_where('extend', array('active' => 1));
		foreach($db1->result() as $plugin)
		{
			$data[] = $plugin->file_name;
		}
		
		if(empty($data))
		{
			@unlink(CACHEPATH . $extend_file_name);
		}
		else
		{
			$final = base64_encode(serialize($data));
			file_put_contents(CACHEPATH . $extend_file_name, $final);
		}
		
		$this->load->library('remote_server_xml_rpc');
		$this->remote_server_xml_rpc->update_cache();
	}
	
	// ------------------------------------------------------------------------
	
	private function _getInstalledPlugins()
	{
		if(is_array($this->installed))
		{
			return $this->installed;
		}
		
		$this->installed = array();
		$db1 = $this->db->get('extend');
		foreach($db1->result() as $plugin)
		{
			$this->installed[] = $plugin->file_name;
		}
		return $this->installed;
	}
	
	// ------------------------------------------------------------------------
	
	private function _getNotInstalledPlugins()
	{
		if(is_array($this->not_installed))
		{
			return $this->not_installed;
		}
		
		$this->not_installed = array();
		$dir = APPPATH."extend/";

		// Open a known directory, and proceed to read its contents
		if (is_dir($dir)) 
		{
			if ($dh = opendir($dir)) 
			{
				while (($file = readdir($dh)) !== false) 
				{
					if(is_dir($dir . $file) and $file != '.' and $file != '..' and $file != '.svn' and !in_array($file, $this->installed) )
					{
						$this->not_installed[] = $file;
					}
				}
				closedir($dh);
			}
		}
		return $this->not_installed;
	}
}
                    
                
collector.php http://noserub.googlecode.com/svn/trunk/ | PHP | 122 lines
                    
1<?php
                    
2/**
                    
8 * @subpackage UnitTester
                    
9 * @version $Id: collector.php 807 2008-09-10 06:38:58Z dhofstet $
                    
10 */
                    
44        if ($handle = opendir($path)) {
                    
45            while (($entry = readdir($handle)) !== false) {
                    
46                if ($this->_isHidden($entry)) {
                    
100     * @param string $pattern   Perl compatible regex to test name against
                    
101     *  See {@link http://us4.php.net/manual/en/reference.pcre.pattern.syntax.php PHP's PCRE}
                    
102     *  for full documentation of valid pattern.s
                    
103     */
                    
104    function SimplePatternCollector($pattern = '/php$/i') {
                    
105        $this->_pattern = $pattern;
                    
                
wordpress.js git://github.com/jquery/plugins.jquery.com.git | JavaScript | 534 lines
                    
459
                    
460				setMeta( info.insertId, "_wp_page_template", "post-receive.php", this );
                    
461			},
                    
468
                    
469				fs.readdir( path.resolve( __dirname, "../pages" ), this );
                    
470			},
                    
512				pageIds.forEach(function( id ) {
                    
513					setMeta( id, "_wp_page_template", "blank-page.php", group() );
                    
514				});
                    
                
Proprietes.php http://ajax-browser.googlecode.com/svn/trunk/ | PHP | 112 lines
                    
35			<td>
                    
36				<a href="<?php echo $lst[0];?>"><img class="cadre" src="<?php echo CreatMini($item,$_SESSION['AJAX-B']['mini_dir'],$_SESSION['AJAX-B']['mini_size']);?>"></a>
                    
37			</td>
                    
49			<td>
                    
50				<img class="cadre" src="<?php echo INSTAL_DIR; ?>icones/type-<?php echo FileIco($item);?>.png">
                    
51			</td>
                    
61						<tr><td colspan=2><hr/></td></tr>
                    
62						<tr><td>Taille:</td><td><?php echo SizeConvert($arrayinfo['size']).' ('.$arrayinfo['size'].')';?></td></tr>
                    
63						<tr><td>Type:</td><td><?php echo $arrayinfo['type'];?></td></tr>
                    
63						<tr><td>Type:</td><td><?php echo $arrayinfo['type'];?></td></tr>
                    
64						<?php if (is_dir($item)) {?><tr><td></td><td><?php echo $arrayinfo['content0'].' dossier(s), '.$arrayinfo['content1'].' fichier(s)';?></td></tr><?php }?>
                    
65						<tr><td>Derničre modification:</td><td><?php echo $arrayinfo['filemtime'];?></td></tr>
                    
102		{?>
                    
103<tr><td colspan=2>relativ URL (<IMG onclick="PopBox('mode=request&infos=<?php echo $item;?>','OpenBox(request.responseText);');" src="<?php echo INSTAL_DIR; ?>icones/Infos.png" title="Propriete de cet element."/>) :<?php echo '<a href="'.ereg_replace('^'.realpath('./'),'.',realpath(decode64($item))).'">'.decode64($item);?></td></tr>
                    
104<?php	}?>
                    
                
path.php http://gutuma.googlecode.com/svn/trunk/ | PHP | 160 lines
                    
1<?php
                    
2/************************************************************************
                    
24	/**
                    
25	 * Converts to a string, only called automatically in PHP 5.2.0+
                    
26	 */
                    
97		if ($dh = @opendir($this->path)) {
                    
98			while (($item = readdir($dh)) !== FALSE) {
                    
99				if ($item != '.' && $item != '..' && ($inc_hidden || $item[0] != '.'))
                    
109	/**
                    
110	 * Canonizes the path, even if it doesn't exist. From http://uk2.php.net/realpath
                    
111	 * @return string The canonized path
                    
                
reportService.php http://openbiz-cubi.googlecode.com/svn/trunk/ | PHP | 173 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHPOpenBiz Framework
                    
4 *
                    
11 * @copyright Copyright (c) 2005-2011, Rocky Swen
                    
12 * @license   http://www.opensource.org/licenses/bsd-license.php
                    
13 * @link      http://www.phpopenbiz.org/
                    
13 * @link      http://www.phpopenbiz.org/
                    
14 * @version   $Id: reportService.php 2553 2010-11-21 08:36:48Z mr_a_ton $
                    
15 */
                    
149        $dirHandle = opendir($dir);
                    
150        while($file = readdir($dirHandle))
                    
151        {
                    
                
gertrude.php http://gertrude.googlecode.com/svn/trunk/ | PHP | 133 lines
                    
1<?php
                    
2
                    
99   $dh = opendir(".");
                    
100   while (false !== ($file = readdir($dh))) {
                    
101     if (substr($file, 0, strlen($prefix)) == $prefix && substr($file, 0-strlen($suffix), strlen($suffix)) == $suffix) {
                    
                
commands.php http://oregon-caspages.googlecode.com/svn/trunk/ | PHP | 223 lines
                    
1<?php
                    
2/*
                    
21 *
                    
22 * This is the File Manager Connector for PHP.
                    
23 */
                    
34
                    
35	while ( $sFile = readdir( $oCurrentFolder ) )
                    
36	{
                    
64
                    
65	while ( $sFile = readdir( $oCurrentFolder ) )
                    
66	{
                    
                
dircopy.php http://festos.googlecode.com/svn/trunk/ | PHP | 66 lines
                    
1<?php
                    
2function dir_copy($srcdir, $dstdir, $offset = '', $verbose = false)
                    
5    // nonexisting or newer files. Function returns number of files copied.
                    
6    // This function is PHP implementation of Windows xcopy  A:\dir1\* B:\dir2 /D /E /F /H /R /Y
                    
7    // Syntaxis: [$returnstring =] dircopy($sourcedirectory, $destinationdirectory [, $offset] [, $verbose]);
                    
11    // Linux compatibility by marajax.
                    
12    // ([danbrown AT php DOT net): *NIX-compatibility noted by Belandi.]
                    
13    // Offset count added for the possibilty that it somehow miscounts your files.  This is NOT required.
                    
26    if($curdir = opendir($srcdir)) {
                    
27        while($file = readdir($curdir)) {
                    
28            if($file != '.' && $file != '..') {
                    
                
get-file-details.php http://cmsfromscratch.googlecode.com/svn/trunk/ | PHP | 128 lines
                    
32	header("Content-type: text/xml") ;
                    
33	require "../cmsfns.php" ;
                    
34	
                    
68		*/
                    
69		if (getFileExtension($liveFile) == "php") {
                    
70			$xmlr .= '<localchildincludes>' ;
                    
94		$localPreviewDirHandle = opendir($localPreviewDir) ;
                    
95		while (False !== ($lciFile = readdir($localPreviewDirHandle))) {
                    
96			if ($lciFile != '.' & $lciFile != '..' && !is_dir($localPreviewDir . '/' . $lciFile)) {
                    
115		$lciDirHandle = opendir($lciDir) ;
                    
116		while (False !== ($lciFile = readdir($lciDirHandle))) {
                    
117			if ($lciFile != '.' & $lciFile != '..' && !is_dir($lciDir . '/' . $lciFile)) {
                    
                
MenuBrowser.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 289 lines
                    
1<?php
                    
2/**
                    
6 *
                    
7 * LICENSE: This source file is subject to version 3.01 of the PHP license
                    
8 * that is available through the world-wide-web at the following URI:
                    
8 * that is available through the world-wide-web at the following URI:
                    
9 * http://www.php.net/license/3_01.txt If you did not receive a copy of
                    
10 * the PHP License and are unable to obtain it through the web, please
                    
10 * the PHP License and are unable to obtain it through the web, please
                    
11 * send a note to license@php.net so we can mail you a copy immediately.
                    
12 *
                    
14 * @package     HTML_Menu
                    
15 * @author      Ulf Wendel <ulf.wendel@phpdoc.de>
                    
16 * @author      Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
18 * @copyright   2001-2007 The PHP Group
                    
19 * @license     http://www.php.net/license/3_01.txt PHP License 3.01
                    
20 * @version     CVS: $Id: MenuBrowser.php 137 2009-11-09 13:24:37Z vanpouckesven $
                    
                
Skin.php https://code.google.com/p/ecartcommerce/ | PHP | 64 lines
                    
1<?php
                    
2/**
                    
44    	$skins = array();
                    
45    	while (($file = readdir($dh))) {
                    
46    		if ($file[0] == '.')
                    
                
read-dir.php http://cmsfromscratch.googlecode.com/svn/trunk/ | PHP | 116 lines
                    
24	header("Content-type: text/xml") ;
                    
25	require 'check-login.php' ;
                    
26	require '../cmsfns.php' ;
                    
39	
                    
40	while (false !== ($file = readdir($handle))) {
                    
41		if (!in_array($file,$reserved_filenames) && !in_array(DIR.'/'.$file, $reserved_filenames)) {
                    
73		if (
                    
74			strstr($arrFile, 'phpthumb')
                    
75			|| strstr($arrFile, 'phpThumb')
                    
98		
                    
99		if (getFileExtension($arrFile) == "php") {
                    
100			$xmlr .= '<page><name>' ;
                    
                
setup_xoops_trust_path.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 66 lines
                    
1<?php
                    
2
                    
5
                    
6include '../../mainfile.php' ;
                    
7
                    
21		if( ! empty( $dh ) ) {
                    
22			while( ( $file = readdir( $dh ) ) !== false ) {
                    
23				if( substr( $file , 0 , 1 ) == '.' ) continue ;
                    
56<h1>Set up XOOPS_TRUST_PATH</h1>
                    
57<p>You missed inserting a line defining XOOPS_TRUST_PATH in mainfile.php</p>
                    
58<p>Insert it by yourself, or follow the procedures</p>
                    
62</form>
                    
63<?php if($hint) echo 'Edit mainfile.php like this: <blockquote style="border: black solid 1px;">'.$hint.'</blockquote>' ?>
                    
64</body>
                    
                
functions.php http://snaptest.googlecode.com/svn/trunk/ | PHP | 113 lines
                    
1<?php
                    
2
                    
84    $handle = opendir($path);
                    
85    while (false !== ($file = readdir($handle))) {
                    
86        if (substr($file, 0, 1) == '.') {
                    
                
MboxFolderTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: MboxFolderTest.php 11973 2008-10-15 16:00:56Z matthew $
                    
21 */
                    
26 */
                    
27require_once dirname(__FILE__) . '/../../TestHelper.php';
                    
28
                    
31 */
                    
32require_once 'Zend/Mail/Storage/Folder/Mbox.php';
                    
33
                    
36 */
                    
37require_once 'Zend/Config.php';
                    
38
                    
46 */
                    
47class Zend_Mail_MboxFolderTest extends PHPUnit_Framework_TestCase
                    
48{
                    
                
files.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 296 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * files.php
                    
5 *
                    
9 * @copyright 2008-2012 The SquirrelMail Project Team
                    
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
11 * @version $Id: files.php 14249 2012-01-02 02:09:17Z pdontthink $
                    
34
                    
35    // using PHP >= 4.3.2 we can be truly atomic here
                    
36    $filemods = check_php_version(4, 3, 2) ? 'x' : 'w';
                    
66/**
                    
67  * PHP's is_writable() is broken in some versions due to either
                    
68  * safe_mode or because of problems correctly determining the
                    
222    //
                    
223    while (($file = readdir($DIR)) !== false) {
                    
224
                    
                
header.inc https://kfem.svn.sourceforge.net/svnroot/kfem | PHP | 109 lines
                    
6      $handle=opendir("http://download.sourceforge.net/kfem");
                    
7      while($entry = readdir($handle)) {
                    
8      if (strcmp($entry,".") != 0 && strcmp($entry,"..") != 0 && strcmp($entry,"CVS") != 0) 
                    
30$relative_path_to_top_dir ?>/"><B>Home</B></A>|<A class="maintitlebar"
                    
31href="<? echo $relative_path_to_top_dir ?>/news.php?news=1"><B>News</B></A></span>
                    
32	</td>
                    
43	<td align="right" width="165" &gt;<a href="<? echo $relative_path_to_top_dir
                    
44	?>/index.php"><u>KFEM Team</u></a></td>
                    
45      </tr>
                    
61	      <td align="right" class="menus">
                    
62		<A class="menus" HREF="<? echo $relative_path_to_top_dir ?>/index.php">Home</A><br>
                    
63		<A  class="menus" HREF="<? echo $relative_path_to_top_dir
                    
63		<A  class="menus" HREF="<? echo $relative_path_to_top_dir
                    
64		?>/news.php?news=1">News</A><br>
                    
65		<A  class="menus" HREF="<? echo $relative_path_to_top_dir ?>/snapshot.php">Screenshots</A><br>
                    
                
Zip.php git://github.com/philsturgeon/codeigniter-restserver.git | PHP | 423 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 *
                    
21 * This class is based on a library I found at Zend:
                    
22 * http://www.zend.com/codex.php?id=696&single=1
                    
23 *
                    
289
                    
290		while (FALSE !== ($file = readdir($fp)))
                    
291		{
                    
421
                    
422/* End of file Zip.php */
                    
423/* Location: ./system/libraries/Zip.php */
                    
                
oninstall.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2
                    
43
                    
44		if( file_exists( XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ) ) {
                    
45			include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ;
                    
47		} else {
                    
48			include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php' ;
                    
49			$sqlutil =& new SqlUtility ;
                    
79	if( $handler = @opendir( $tpl_path . '/' ) ) {
                    
80		while( ( $file = readdir( $handler ) ) !== false ) {
                    
81			if( substr( $file , 0 , 1 ) == '.' ) continue ;
                    
100					// generate compiled file
                    
101					include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
                    
102					include_once XOOPS_ROOT_PATH.'/class/template.php';
                    
112	}
                    
113	include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
                    
114	include_once XOOPS_ROOT_PATH.'/class/template.php' ;
                    
                
install.php http://jfxcms.googlecode.com/svn/ | PHP | 164 lines
                    
1<?php
                    
2###############   COPYLEFT GPLv3 LICENSE   ###############
                    
99        $dh = opendir($CONFIG->modulesDir);
                    
100        while($file = readdir($dh)){
                    
101            if($file=='.' || $file=='..' || !is_dir($CONFIG->modulesDir.'/'.$file)) continue;
                    
                
directory_helper.php git://github.com/philsturgeon/codeigniter-restserver.git | PHP | 80 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 *
                    
51
                    
52			while (FALSE !== ($file = readdir($fp)))
                    
53			{
                    
78
                    
79/* End of file directory_helper.php */
                    
80/* Location: ./system/helpers/directory_helper.php */
                    
                
acm_file.php http://seo-phpbb.googlecode.com/svn/trunk/ | PHP | 504 lines
                    
1<?php
                    
2/**
                    
4* @package acm
                    
5* @version $Id: acm_file.php 8479 2008-03-29 00:22:48Z naderman $
                    
6* @copyright (c) 2005 phpBB Group
                    
6* @copyright (c) 2005 phpBB Group
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
8*
                    
13*/
                    
14if (!defined('IN_PHPBB'))
                    
15{
                    
37	{
                    
38		global $phpbb_root_path;
                    
39		$this->cache_dir = $phpbb_root_path . 'cache/';
                    
46	{
                    
47		global $phpEx;
                    
48		if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
                    
                
Functions.php http://jfxcms.googlecode.com/svn/ | PHP | 207 lines
                    
1<?php
                    
2###############   COPYLEFT GPLv3 LICENSE   ###############
                    
24    if(class_exists($classname, false)) return;
                    
25    $filename = str_replace('_', '/', $classname).'.php';
                    
26    if(file_exists($CONFIG->classesDir.'/'.$filename)){
                    
31        $moduleKey = str_replace('jfx_module_', '', strtolower($classname));
                    
32        if(is_dir($CONFIG->modulesDir.'/'.$moduleKey) && is_readable($CONFIG->modulesDir.'/'.$moduleKey.'/'.$moduleKey.'.module.php')){
                    
33            require_once($CONFIG->modulesDir.'/'.$moduleKey.'/'.$moduleKey.'.module.php');
                    
35            else throw new exception('Class not found in file: '.
                    
36                    $CONFIG->modulesDir.'/'.$moduleKey.'/'.$moduleKey.'.module.php
                    
37                    '.$className);
                    
41        $themeKey = str_replace('jfx_theme_', '', strtolower($classname));
                    
42        if(is_dir($CONFIG->themesDir.'/'.$themeKey) && is_readable($CONFIG->themesDir.'/'.$themeKey.'/'.$themeKey.'.theme.php')){
                    
43            require_once($CONFIG->themesDir.'/'.$themeKey.'/'.$themeKey.'.theme.php');
                    
45            else throw new exception('Class not found in file: '.
                    
46                    $CONFIG->modulesDir.'/'.$moduleKey.'/'.$moduleKey.'.module.php
                    
47                    '.$className);
                    
                
onupdate.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 101 lines
                    
1<?php
                    
2
                    
46	if( $handler = @opendir( $tpl_path . '/' ) ) {
                    
47		while( ( $file = readdir( $handler ) ) !== false ) {
                    
48			if( substr( $file , 0 , 1 ) == '.' ) continue ;
                    
67					// generate compiled file
                    
68					require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php' ;
                    
69					altsys_clear_templates_c() ;
                    
69					altsys_clear_templates_c() ;
                    
70					/*include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
                    
71					if( ! xoops_template_touch( $tplid ) ) {
                    
80	}
                    
81	include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
                    
82	include_once XOOPS_ROOT_PATH.'/class/template.php' ;
                    
                
Role.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 310 lines
                    
10 * @copyright  1997-2009 The Authors
                    
11 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
12 * @version    CVS: $Id: Role.php 278552 2009-04-10 19:42:49Z dufuz $
                    
12 * @version    CVS: $Id: Role.php 278552 2009-04-10 19:42:49Z dufuz $
                    
13 * @link       http://pear.php.net/package/PEAR
                    
14 * @since      File available since Release 1.4.0a1
                    
28 * @version    Release: 1.9.1
                    
29 * @link       http://pear.php.net/package/PEAR
                    
30 * @since      Class available since Release 1.4.0a1
                    
174     * PackageName/filepath
                    
175     * so a tests file tests/file.phpt is installed into PackageName/tests/filepath.php
                    
176     * @param bool clear cache
                    
275        {
                    
276            return PEAR :: raiseError("registerRoles: opendir($dir) failed: $php_errmsg");
                    
277        }
                    
                
admin.mostlydbadmin.html.php http://miacms.googlecode.com/svn/trunk/ | PHP | 243 lines
                    
1<?php
                    
2/**
                    
3 * @package MiaCMS
                    
4 * @author MiaCMS see README.php
                    
5 * @copyright see README.php
                    
28		</table>
                    
29		<form action="<?php echo htmlentities('index2.php?option=com_mostlydbadmin&task=doBackup'); ?>" method="post">
                    
30		<table  align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
                    
94		</table>
                    
95		<form action="<?php echo htmlentities('index2.php?option=com_mostlydbadmin&task=doRestore'); ?>" method="post" <?php echo $enctype;?>>
                    
96		<table  align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
                    
105		?>
                    
106		<tr><td>&nbsp;</td><td><strong><?php echo T_('Backup File Name'); ?></strong></td><td><strong><?php echo T_('Created Date/Time'); ?></strong></td></tr>
                    
107		<?php
                    
145			<td>&nbsp;<br />
                    
146			<input type="submit" class="button" value="<?php echo T_('Perform the Restore'); ?>" />&nbsp;&nbsp; <input type="reset" class="button" value="<?php echo T_('Reset'); ?>" /></td>
                    
147			<td>&nbsp;</td>
                    
                
Pop3Test.php git://github.com/zendframework/zf2.git | PHP | 0 lines
                    
1<?php
                    
2/**
                    
36 */
                    
37class Pop3Test extends \PHPUnit_Framework_TestCase
                    
38{
                    
68        $dh = opendir($dir);
                    
69        while (($entry = readdir($dh)) !== false) {
                    
70            if ($entry == '.' || $entry == '..') {
                    
86        $dh = opendir($dir);
                    
87        while (($entry = readdir($dh)) !== false) {
                    
88            if ($entry == '.' || $entry == '..' || $entry == '.svn') {
                    
                
FUPluginManager.cpp http://o3d.googlecode.com/svn/trunk/ | C++ | 233 lines
                    
5	
                    
6	MIT License: http://www.opensource.org/licenses/mit-license.php
                    
7*/
                    
134		dirent* directoryEntry;
                    
135		while ((directoryEntry = readdir(directory)) != NULL)
                    
136		{
                    
                
makeallttffonts.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 75 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : makeallttffonts.php
                    
4// Begin       : 2008-12-07
                    
58$handle = opendir('.');
                    
59while ($file = readdir($handle))
                    
60{
                    
65        exec('./ttf2ufm -a -F ' . $path_parts['basename'] . '');
                    
66        exec('php -q makefont.php ' . $path_parts['basename'] . ' ' . $path_parts['filename'] . '.ufm');
                    
67    }
                    
                
Hdinstaller_Controller.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 394 lines
                    
1<?php
                    
2/**
                    
6 *  @package    Hdinstaller
                    
7 *  @version    $Id: app.controller.php 695 2009-01-20 13:24:16Z sotarok $
                    
8 */
                    
22/** including application library. */
                    
23require_once 'Curaga/Ethna.php';
                    
24require_once 'Hdinstaller_Error.php';
                    
25require_once 'Hdinstaller_ActionClass.php';
                    
26require_once 'Hdinstaller_ActionForm.php';
                    
27require_once 'Hdinstaller_ViewClass.php';
                    
27require_once 'Hdinstaller_ViewClass.php';
                    
28require_once 'Hdinstaller_ClassFactory.php';
                    
29require_once 'Hdinstaller_Plugin.php';
                    
122    var $ext = array(
                    
123        'php'           => 'php',
                    
124        'tpl'           => 'php',
                    
                
fuse_impl.cc git://github.com/fujimoto/flare.git | C++ | 553 lines
                    
5 *
                    
6 *	@author	Masaki Fujimoto <fujimoto@php.net>
                    
7 *
                    
117
                    
118int fuse_impl_readdir(const char* path, void* buf, fuse_fill_dir_t d, off_t o, struct fuse_file_info* f) {
                    
119	return fuse_obj->readdir(path, buf, d, o, f);
                    
214	fo.opendir			= fuse_impl_opendir;
                    
215	fo.readdir			= fuse_impl_readdir;
                    
216	fo.fsyncdir			= fuse_impl_fsyncdir;
                    
471/**
                    
472 *	readdir
                    
473 */
                    
473 */
                    
474int fuse_impl::readdir(const char* path, void* buf, fuse_fill_dir_t filler, off_t o, struct fuse_file_info* fi) {
                    
475	log_debug("readdir() (path=%s, offset=%d)", path, o);
                    
                
clean-xheditor.php http://lazycms.googlecode.com/svn/trunk/ | PHP | 275 lines
                    
1<?php
                    
2// ??????
                    
251    if ($dh=@opendir($path)) {
                    
252        while (false !== ($file=readdir($dh))) {
                    
253            if ($file != "." && $file != "..") {
                    
                
file-edit.php http://vanilla-journal.googlecode.com/svn/trunk/ | PHP | 234 lines
                    
44
                    
45<?php
                    
46   if($_POST['submit'] && $_POST['action'] == "edit") {
                    
56      if(file_exists($filename.".bak")) {
                    
57	 echo "<p>?????????????????<a href=\"file-edit.php?page=".$page.".bak\">??????????</a>?????????</p>";
                    
58      }
                    
73   <form action="file-edit.php" method="post">
                    
74   <p><strong>????</strong>? <?php echo $page ?> ?<strong>????</strong>?<?php echo mime_content_type($filename) ?></p>
                    
75   <input type="hidden" value="<?php echo $page; ?>" name="page" id="page" /> 
                    
162      echo "<tr><th>??</th><th>??????</th><th>??????</th><th>??</th><th>??</th><th>??</th></tr>";
                    
163      while($f = readdir($d)) {
                    
164	 $fullpath = $themes.$f;
                    
195      <p>??????????? <strong><?php echo $config['theme'] ?></strong>???????????????????????? PHP ?????? CSS ????</p>
                    
196      <p>???????????? PHP ?????? PHP ?????????????????????????????????????????????????????????????????????????????????????????????</p>
                    
197      <p>?????????????</p>
                    
                
collector.php git://github.com/swiftmailer/swiftmailer.git | PHP | 122 lines
                    
1<?php
                    
2/**
                    
8 * @subpackage UnitTester
                    
9 * @version $Id: collector.php 1784 2008-04-26 13:07:14Z pp11 $
                    
10 */
                    
44        if ($handle = opendir($path)) {
                    
45            while (($entry = readdir($handle)) !== false) {
                    
46                if ($this->isHidden($entry)) {
                    
100     * @param string $pattern   Perl compatible regex to test name against
                    
101     *  See {@link http://us4.php.net/manual/en/reference.pcre.pattern.syntax.php PHP's PCRE}
                    
102     *  for full documentation of valid pattern.s
                    
103     */
                    
104    function __construct($pattern = '/php$/i') {
                    
105        $this->pattern = $pattern;
                    
                
settings.php http://lilina.googlecode.com/svn/trunk/lilina/ | PHP | 302 lines
                    
1<?php
                    
2/**
                    
58		//Go through all entries
                    
59		while (false !== ($dir = readdir($handle))) {
                    
60			// just skip the reference to current and parent directory
                    
                
MaildirMessageOldTest.php git://github.com/zendframework/zf2.git | PHP | 0 lines
                    
1<?php
                    
2/**
                    
53 */
                    
54class MaildirMessageOldTest extends \PHPUnit_Framework_TestCase
                    
55{
                    
79            $dh = opendir($this->_tmpdir);
                    
80            while (readdir($dh) !== false) {
                    
81                ++$count;
                    
94            $dh = opendir($this->_originalMaildir . $dir);
                    
95            while (($entry = readdir($dh)) !== false) {
                    
96                $entry = $dir . '/' . $entry;
                    
109            $dh = opendir($this->_tmpdir . $dir);
                    
110            while (($entry = readdir($dh)) !== false) {
                    
111                $entry = $this->_tmpdir . $dir . '/' . $entry;
                    
                
make-pt-from-page.php http://cmsfromscratch.googlecode.com/svn/trunk/ | PHP | 83 lines
                    
23 
                    
24	require 'check-login.php' ;
                    
25	require '../cmsfns.php' ;
                    
75	$handle = opendir($pageLCIs) ;
                    
76	while (False !== ($file = readdir($handle))) {
                    
77		if ($file == '..' || $file == '.') continue ;
                    
                
admin.mostlydbadmin.html.php http://miacms.googlecode.com/svn/trunk/ | PHP | 243 lines
                    
1<?php
                    
2/**
                    
3* @package MiaCMS
                    
4* @author MiaCMS see README.php
                    
5* @copyright see README.php
                    
28		</table>
                    
29		<form action="<?php echo htmlentities('index2.php?option=com_mostlydbadmin&task=doBackup'); ?>" method="post">
                    
30		<table  align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
                    
94		</table>
                    
95		<form action="<?php echo htmlentities('index2.php?option=com_mostlydbadmin&task=doRestore'); ?>" method="post" <?php echo $enctype;?>>
                    
96		<table  align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
                    
105		?>
                    
106		<tr><td>&nbsp;</td><td><strong><?php echo T_('Backup File Name'); ?></strong></td><td><strong><?php echo T_('Created Date/Time'); ?></strong></td></tr>
                    
107		<?php
                    
145			<td>&nbsp;<br />
                    
146			<input type="submit" class="button" value="<?php echo T_('Perform the Restore'); ?>" />&nbsp;&nbsp; <input type="reset" class="button" value="<?php echo T_('Reset'); ?>" /></td>
                    
147			<td>&nbsp;</td>
                    
                
save.action.php http://miacms.googlecode.com/svn/trunk/ | PHP | 200 lines
                    
1<?php
                    
2/**
                    
4* @subpackage Languages
                    
5* @author MiaCMS see README.php
                    
6* @copyright see README.php
                    
6* @copyright see README.php
                    
7* See COPYRIGHT.php for copyright notices and details.
                    
8* @license GNU/GPL Version 2, see LICENSE.php
                    
75        $language->authoremail = 'translation@miacms.org';
                    
76        $language->copyright = 'Refer to copyright.php';
                    
77        $language->license = 'http://www.gnu.org/copyleft/gpl.html GNU/GPL';
                    
83        $charset = $language->charset;
                    
84        $langfiles  = mosReadDirectory($untranslated,'.pot$');
                    
85        @mkdir($dir);
                    
87
                    
88        //$gettext_admin = new PHPGettextAdmin();
                    
89        foreach ($langfiles as $domain)  {
                    
                
convert.php http://kandidat-cms.googlecode.com/svn/trunk/ | PHP | 145 lines
                    
1<?php
                    
2$path=substr(str_replace('\\','/',dirname(__FILE__)),0,-6);
                    
2$path=substr(str_replace('\\','/',dirname(__FILE__)),0,-6);
                    
3include $path.'/admin/adminses.php';
                    
4include CONF.'photoconf.php';
                    
4include CONF.'photoconf.php';
                    
5if(3>getpermision())header('LOCATION:index.php');
                    
6
                    
8	$dir = opendir($directory);
                    
9	while(($file = readdir($dir))){
                    
10		if ( is_file ($directory."/".$file)){
                    
64
                    
65$myFile=ENGINE.'guestbookdb.php';
                    
66if(file_exists("$myFile")){
                    
83}
                    
84$myFile=ENGINE.'newsdb.php';
                    
85if(file_exists("$myFile")){
                    
                
compilehookadmin.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 282 lines
                    
2// ------------------------------------------------------------------------- //
                    
3//                       compilehookadmin.php (altsys)                       //
                    
4//                    - XOOPS templates admin module -                       //
                    
8require_once dirname(__FILE__).'/class/AltsysBreadcrumbs.class.php' ;
                    
9include_once dirname(__FILE__).'/include/gtickets.php' ;
                    
10include_once dirname(__FILE__).'/include/altsys_functions.php' ;
                    
45	'hooksavevars' => array(
                    
46		'pre' => '<?php include_once "'.XOOPS_TRUST_PATH.'/libs/altsys/include/compilehook.inc.php" ; tplsadmin_save_tplsvars(\'%s\',$this) ; ?>' ,
                    
47		'post' => '' ,
                    
79	if( $handler = opendir( XOOPS_COMPILE_PATH . '/' ) ) {
                    
80		while( ( $file = readdir( $handler ) ) !== false ) {
                    
81
                    
82			if( ! empty( $_POST['clearcache'] ) ) {
                    
83				// judging template cache '*.php'
                    
84				if( substr( $file , -4 ) !== '.php' ) continue ;
                    
                
captcha_helper.php http://xtraupload.googlecode.com/svn/trunk/ | PHP | 1 lines
                    
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * XtraUpload
 *
 * A turn-key open source web 2.0 PHP file uploading package requiring PHP v5
 *
 * @package		XtraUpload
 * @author		Matthew Glinski
 * @copyright	Copyright (c) 2006, XtraFile.com
 * @license		http://xtrafile.com/docs/license
 * @link		http://xtrafile.com
 * @since		Version 2.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * XtraUpload Captcha Image Helper
 *
 * @package		XtraUpload
 * @subpackage	Helper
 * @category	Helper
 * @author		Matthew Glinski
 * @link		http://xtrafile.com/docs/pages/files
 */

// ------------------------------------------------------------------------

function create_captcha($aCfg)
{
    // check, whether we do have a config-array given
    if(!is_array($aCfg))
    {
        // no config given!
        return FALSE;
    }    
    
    if (( !isset($aCfg['img_path']) or $aCfg['img_path'] == '') or (!isset($aCfg['img_url']) or $aCfg['img_url'] == ''))
	{
		return FALSE;
	}

	if ( ! @is_dir($aCfg['img_path']))
	{
		return FALSE;
	}
	
	if ( ! is_writable($aCfg['img_path']))
	{
		return FALSE;
	}
			
	if ( ! extension_loaded('gd'))
	{
		return FALSE;
	}		
	
	// the length of the word
    if ( !isset($aCfg['length']) or $aCfg['length'] == '')
	    $aCfg['length'] = 5;
	
	// Do we have a "word" yet?
    if ( !isset($aCfg['word']) or $aCfg['word'] == '')
    {
    	$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    	$str = '';
    	for ($i = 0; $i < $aCfg['length']; $i++)
    	{
    		$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
    	}
    	$aCfg['word'] = $str;
    }
    
    // where to find the fonts
    if( !isset($aCfg['font_path']) or $aCfg['font_path'] == '')
        $aCfg['font_path'] = BASEPATH.'fonts/';
    
    // what fonts to use in captcha image
    if( !isset($aCfg['fonts']) or !is_array($aCfg['fonts']) or $aCfg['fonts'] == '')
        $aCfg['fonts'] = array('texb.ttf');

    // fontsize in PT
    if( !isset($aCfg['font_size']) or $aCfg['font_size'] == '')    
        $aCfg['font_size'] = 18;  
    
    // width if the image in PX
    if( !isset($aCfg['img_width']) or $aCfg['img_width'] == '')
        $aCfg['img_width'] = 170; 
    
    // height of the image in PX
    if( !isset($aCfg['img_heigtht']) or $aCfg['img_height'] == '')
        $aCfg['img_height'] = 30;

    if(!isset($aCfg['expiration']) or $aCfg['expiration'] == '')
        $aCfg['expiration'] = 7200;

    // Set the enviroment variable for GD
    putenv('GDFONTPATH='.realpath('.')); 
    
    
	// Remove old images	
	list($usec, $sec) = explode(" ", microtime());
	$now = ((float)$usec + (float)$sec);
	$current_dir = opendir($aCfg['img_path']);
	while($filename = readdir($current_dir))
	{
		if ($filename != "." and $filename != ".." and $filename != ".svn" and $filename != "index.html")
		{
			$name = str_replace(".jpg", "", $filename);
		
			if (($name + $aCfg['expiration']) < $now)
			{
				unlink($aCfg['img_path'].$filename);
			}
		}
	}
	closedir($current_dir);
		
		
	
    // create a empty image
    $img = imagecreatetruecolor($aCfg['img_width'], $aCfg['img_height']);

    // get a random color 
    $col = imagecolorallocate($img, rand(170, 255), rand(170, 255), rand(170, 255));

    // fill this image with the random color
    imagefill($img, 0, 0, $col);
    
    
	//  Create the spiral pattern
	$x_axis = rand(6, (360/$aCfg['length'])-16);			
	$y_axis = rand(6, $aCfg['img_height']);
	$grid_color = imagecolorallocate($img, 255, 182, 182);
	$theta		= 1;
	$thetac		= 7;
	$radius		= 20;
	$circles	    = 17;
	$points		= 20;
	for ($i = 0; $i < ($circles * $points) - 1; $i++)
	{
		$theta = $theta + $thetac;
		$rad = $radius * ($i / $points );
		$x = ($rad * cos($theta)) + $x_axis;
		$y = ($rad * sin($theta)) + $y_axis;
		$theta = $theta + $thetac;
		$rad1 = $radius * (($i + 1) / $points);
		$x1 = ($rad1 * cos($theta)) + $x_axis;
		$y1 = ($rad1 * sin($theta )) + $y_axis;
		imageline($img, $x, $y, $x1, $y1, $grid_color);
		$theta = $theta - $thetac;
	}
	
	
    // the x-coordinate of the first char
    $x = 10; 

    // draw the chars
    for($i = 0; $i < $aCfg['length']; $i++) 
    {
        // get the current processed char from the word
        $chr = substr($aCfg['word'], $i, 1);
        
        // get a random color
        $col = imagecolorallocate($img, rand(0, 199), rand(0, 199), rand(0, 199)); 
        
        // get a random font from the list
        $font = $aCfg['fonts'][rand(0, count($aCfg['fonts']) - 1)]; 
        $font = $aCfg['font_path'].$font;

        // set the y-coordinate plus a random-value
        $y = 20 + rand(0, 10); 
        
        // get a random angle between 0 and 50 degrees
        $angle = rand(0, 50); 

        // check whether to use the current font or not...
        $use_font = ($font != '' AND file_exists($font) AND function_exists('imagettftext')) ? TRUE : FALSE;
        
        if ($use_font == FALSE)
		{
		    // draw a normal character to the image, not using TTF
			imagestring($img, $aCfg['font_size'], $x, $y, $chr, $col);
            
			$x += 20;
		}
		else
		{		
			// draw the char with the color and angle into the image , using a font
            imagettftext($img, $aCfg['font_size'], $angle, $x, $y, $col, $font, $chr);
            
            // calculate the dimensions of the char
            $dim = @imagettfbbox($aCfg['font_size'], $angle, $font, $chr);
        
            // set the new x-coordinate to the calculated width of the chars + a value
            $x += $dim[4] + abs($dim[6]) + 4;
		}
    }
    
	//  Create the border
	$border_color	= imagecolorallocate ($img, 153, 102, 102);
	imagerectangle($img, 0, 0, $aCfg['img_width']-1, $aCfg['img_height']-1, $border_color);		

	//  Generate the image
	$img_name = $now.'.jpg';
	ImageJPEG($img, $aCfg['img_path'].$img_name);
	
	$imgHtml = "<img src=\"".$aCfg['img_url'].$img_name."\" width=\"".$aCfg['img_width']."\" height=\"".$aCfg['img_height']."\" class=\"nb\" alt=\"\" id=\"t_".$now."\" />";

    ImageDestroy($img);
		
	return array('word' => $aCfg['word'], 'time' => $now, 'image' => $imgHtml);
}
?>

                    
                
duplicate.php http://xoopscube-modules.googlecode.com/svn/trunk/ | PHP | 111 lines
                    
1#!/usr/bin/php -q
                    
2<?php
                    
70    $reg = preg_replace(array('/\./', '/\*/'), array('\.', '.*'), $pat);
                    
71    while ($file = readdir($dh)) {
                    
72	if ($file=='.' || $file=='..') continue;
                    
88if (!function_exists('file_put_contents')) {
                    
89    // php 4.3.11 no have?
                    
90    function file_put_contents($file, $text) {
                    
                
mod_theme.php http://pixie-cms.googlecode.com/svn/trunk/ | PHP | 74 lines
                    
1<?php
                    
2if (!defined('DIRECT_ACCESS')) {
                    
56		if ($fd) {
                    
57			while (($part = @readdir($fd)) == true) {
                    
58				if ($part != "." && $part != "..") {
                    
60					if (is_dir($newdir) && preg_match('/^[A-Za-z].*[A-Za-z]$/', $part)) {
                    
61						include "themes/$part/settings.php";
                    
62						if ($part == $site_theme) {
                    
                
Galleries.hx http://poko.googlecode.com/svn/trunk/ | Haxe | 77 lines
                    
29
                    
30import php.FileSystem;
                    
31import site.cms.modules.media.Index;
                    
48		galleries = new List();
                    
49		var dir = FileSystem.readDirectory(imageRoot);
                    
50		for (d in dir)
                    
                
usercp_confirm.php https://code.google.com/p/torrentpier/ | PHP | 302 lines
                    
1<?php
                    
2/***************************************************************************
                    
2/***************************************************************************
                    
3 *                            usercp_confirm.php
                    
4 *                            -------------------
                    
5 *   begin                : Saturday, Jan 15, 2003
                    
6 *   copyright            : (C) 2001 The phpBB Group
                    
7 *   email                : support@phpbb.com
                    
8 *
                    
9 *   $Id: usercp_confirm.php,v 1.1.2.2 2005/12/29 11:51:11 acydburn Exp $
                    
10 *
                    
21
                    
22if ( !defined('IN_PHPBB') )
                    
23{
                    
66		if ($handle = opendir($fontsdir_absolute)) {
                    
67			while (false !== ($file = readdir($handle))) {
                    
68				if (preg_match('/\.png$/i', $file)) {
                    
                
backend_content_regression_test.php git://github.com/ezsystems/ezpublish.git | PHP | 370 lines
                    
23 * In the constructor:
                    
24 * - ./siteaccess/site.ini.append.php.replace is copied over site.ini.append.php,
                    
25 *   with certain values replaced dynamically (@ezc_siteaccess@ and
                    
53        $replace['@ezc_siteaccess@']  = $siteaccess;
                    
54        $replace['@ezc_db_phptype@']  = $dsn->phptype;
                    
55        $replace['@ezc_db_server@']   = $dsn->server;
                    
83        // load tests
                    
84        $this->readDirRecursively( dirname( __FILE__ ) . '/regression', $this->files, 'request' );
                    
85
                    
118        // Not sure if these 2 values are needed
                    
119        $_SERVER['SCRIPT_FILENAME'] = eZSys::rootDir() . DIRECTORY_SEPARATOR . 'index.php';
                    
120        $_SERVER['DOCUMENT_ROOT'] = eZSys::rootDir();
                    
238     *    will be used further on
                    
239     *  - initialize the WebDAV system like in webdav.php (it does NOT go through webdav.php)
                    
240     *  - create an eZWebDAVContentBackend object and use ezcWebdavServer to handle the
                    
                
chmod.php http://kandidat-cms.googlecode.com/svn/trunk/ | PHP | 85 lines
                    
1<?php
                    
2$path=substr(str_replace('\\','/',dirname(__FILE__)),0,-6);
                    
2$path=substr(str_replace('\\','/',dirname(__FILE__)),0,-6);
                    
3include $path.'/admin/adminses.php';
                    
4if(3>getpermision())header('LOCATION:index.php');
                    
4if(3>getpermision())header('LOCATION:index.php');
                    
5include CONF.'photoconf.php';
                    
6$inst = (isset($_GET['inst'])) ? (int)$_GET['inst'] : 0;
                    
38	$dir = opendir($directory);
                    
39	while(($file = readdir($dir))){
                    
40		if ( is_file ($directory.'/'.$file)){
                    
58	full_chmod_dir($localpath.'templates',$perm_dir,$perm_file);
                    
59	header('LOCATION: chmod.php');
                    
60}
                    
80if($allok)$contentcenter.='<span style="color: rgb(255, 0, 51);">????? ?? ????????????? ?????????. ????????? ?????????</span>&nbsp;
                    
81	<a title="?????? ?????????" href="../admin/chmod.php?inst=1">?????????? ?????</a>';
                    
82else $contentcenter.='????? ????????????? ?????????';
                    
                
templateeditor.php http://kandidat-cms.googlecode.com/svn/trunk/ | PHP | 99 lines
                    
1<?php
                    
2$path=substr(str_replace('\\','/',dirname(__FILE__)),0,-6);
                    
2$path=substr(str_replace('\\','/',dirname(__FILE__)),0,-6);
                    
3include $path.'/admin/adminses.php';
                    
4if(3>getpermision())header('LOCATION:index.php');
                    
9
                    
10@$fedit = (isset($_GET["file"]))?$_GET["file"]:"template.php";
                    
11@$fedit = preg_replace("/..\//i","",$fedit);
                    
28	$dir = opendir($directory);
                    
29	while(($file = readdir($dir)))
                    
30	  	if ( is_file ($directory."/".$file))
                    
33	closedir($dir);
                    
34	$url=$_SERVER['PHP_SELF'];
                    
35	$ext=getftype($fedit);
                    
35	$ext=getftype($fedit);
                    
36	$ext=(preg_match("/php|html|htm|css|js/i",$ext)?$ext:"php");
                    
37	@$contentcenter .=<<<EOT
                    
                
SpaceInfo.php http://arlicle.googlecode.com/svn/trunk/ | PHP | 145 lines
                    
1<?php defined('SYSPATH') OR die('No direct access allowed.');
                    
2/**
                    
42        if(@$handle = opendir($dir)) {
                    
43            while(false !== ($file = readdir($handle))) {
                    
44                if ($file != "." && $file != "..") {
                    
                
Maildir.php http://openbiz-cubi.googlecode.com/svn/trunk/ | PHP | 266 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Maildir.php 18951 2009-11-12 16:26:19Z alexander $
                    
21 */
                    
26 */
                    
27// require_once 'Zend/Mail/Storage/Folder.php';
                    
28
                    
31 */
                    
32// require_once 'Zend/Mail/Storage/Folder/Interface.php';
                    
33
                    
36 */
                    
37// require_once 'Zend/Mail/Storage/Maildir.php';
                    
38
                    
92             */
                    
93            // require_once 'Zend/Mail/Storage/Exception.php';
                    
94            throw new Zend_Mail_Storage_Exception('no valid dirname given in params');
                    
                
error_log_destroy.php http://nuke-viet.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2
                    
28	{
                    
29		while (($file = readdir($dh)) !== false)
                    
30		{
                    
49	{
                    
50		while (($file = readdir($dh)) !== false)
                    
51		{
                    
67	{
                    
68		while (($file = readdir($dh)) !== false)
                    
69		{
                    
88	{
                    
89		while (($file = readdir($dh)) !== false)
                    
90		{
                    
                
 

Source

Language