100+ results for 'php strpos'
Not the results you expected?
User_agent.php (https://github.com/usagi-project/mynets1.git) PHP · 500 lines
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
234 foreach ($this->mobiles as $key => $val)
235 {
236 if (FALSE !== (strpos(strtolower($this->agent), $key)))
237 {
238 $this->is_mobile = TRUE;
registry.php (https://github.com/elinw/joomla-cms.git) PHP · 476 lines
1 <?php
2 /**
3 * @package Joomla.Platform
89 *
90 * @since 12.2
91 * @note The interface is only present in PHP 5.4 and up.
92 */
93 public function jsonSerialize()
167 $result = $default;
169 if (!strpos($path, '.'))
170 {
171 return (isset($this->data->$path) && $this->data->$path !== null && $this->data->$path !== '') ? $this->data->$path : $default;
XmlDescriptor.php (https://gitlab.com/jjpa2018/dashboard) PHP · 247 lines
1 <?php
3 /*
207 $dom->appendChild($objectXML = $dom->createElement('option'));
208 $objectXML->setAttribute('name', '--'.$option->getName());
209 $pos = strpos($option->getShortcut() ?? '', '|');
210 if (false !== $pos) {
211 $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
XmlDescriptor.php (https://github.com/ruudk/symfony.git) PHP · 247 lines
1 <?php
3 /*
207 $dom->appendChild($objectXML = $dom->createElement('option'));
208 $objectXML->setAttribute('name', '--'.$option->getName());
209 $pos = strpos($option->getShortcut(), '|');
210 if (false !== $pos) {
211 $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
smarty_internal_cacheresource_file.php (https://github.com/GuessWho/don-t-enter.git) PHP · 259 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 Smarty::muteExpectedErrors();
65 $cached->timestamp = @filemtime($cached->filepath);
172 $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
173 foreach ($_cache as $_file) {
174 if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
175 // directory ?
176 if ($_file->isDir()) {
223 public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
224 {
225 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
226 clearstatcache(true, $cached->lock_id);
227 } else {
smarty_internal_cacheresource_file.php (https://gitlab.com/billyprice1/php-pastebin-v3) PHP · 264 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 $cached->timestamp = @filemtime($cached->filepath);
65 $cached->exists = !!$cached->timestamp;
177 $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
178 foreach ($_cache as $_file) {
179 if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
180 // directory ?
181 if ($_file->isDir()) {
228 public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
229 {
230 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
231 clearstatcache(true, $cached->lock_id);
232 } else {
Model.class.php (https://github.com/dzx0315/509.git) PHP · 295 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2010 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
13 /**
14 +------------------------------------------------------------------------------
15 * ThinkPHP 简洁模式Model模型类
16 * 只支持原生SQL操作 支持多数据库连接和切换
17 +------------------------------------------------------------------------------
86 }
87 if(!empty($sql)) {
88 if(strpos($sql,'__TABLE__')) {
89 $sql = str_replace('__TABLE__',$this->getTableName(),$sql);
90 }
options-sanitize.php (https://github.com/vauvarin/options-framework-theme.git) PHP · 361 lines
YamlFileLoader.php (https://bitbucket.org/cryofrost/portal.git) PHP · 339 lines
1 <?php
3 /*
129 private function parseDefinition($id, $service, $file)
130 {
131 if (is_string($service) && 0 === strpos($service, '@')) {
132 $this->container->setAlias($id, substr($service, 1));
294 if (is_array($value)) {
295 $value = array_map(array($this, 'resolveServices'), $value);
296 } elseif (is_string($value) && 0 === strpos($value, '@')) {
297 if (0 === strpos($value, '@?')) {
class-mb-custom-taxonomy-register.php (https://gitlab.com/code26/selah) PHP · 235 lines
1 <?php
2 /**
3 * Controls all operations of MB Custom Taxonomy extension for registering custom taxonomy.
111 foreach ( $post_meta as $key => $value ) {
112 if ( false !== strpos( $key, 'label' ) ) {
113 // If post meta has prefix 'label' then add it to $labels.
114 // @codingStandardsIgnoreLine
117 $labels[ str_replace( 'label_', '', $key ) ] = $data;
118 } elseif ( false !== strpos( $key, 'args' ) ) {
119 // If post meta has prefix 'args' then add it to $args.
120 // @codingStandardsIgnoreLine
sfCommandManager.class.php (https://github.com/edse/Elastball.git) PHP · 381 lines
1 <?php
3 /*
15 * @subpackage command
16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17 * @version SVN: $Id: sfCommandManager.class.php 21908 2009-09-11 12:06:21Z fabien $
18 */
19 class sfCommandManager
327 protected function parseLongOption($argument)
328 {
329 if (false !== strpos($argument, '='))
330 {
331 list($name, $value) = explode('=', $argument, 2);
DB_forge.php (https://github.com/andigehle/CodeIgniter.git) PHP · 390 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.2.4 or newer
6 *
7 * NOTICE OF LICENSE
171 else
172 {
173 if (strpos($field, ' ') === FALSE)
174 {
175 show_error('Field information is required for that operation.');
387 }
389 /* End of file DB_forge.php */
390 /* Location: ./system/database/DB_forge.php */
article0004Test.php (https://github.com/elinw/joomla-cms.git) PHP · 196 lines
1 <?php
2 /**
3 * @package Joomla.SystemTest
7 */
9 require_once 'SeleniumJoomlaTestCase.php';
11 /**
149 $this->assertStringStartsWith('Article Categories Module', $this->getTable("//form[@id='adminForm']//table.3.3"));
150 $this->assertStringStartsWith('Articles Category Module', $this->getTable("//form[@id='adminForm']//table.4.3"));
151 $this->assertTrue(strpos($this->getTable("//form[@id='adminForm']//table.2.3"), 'Category: Content Modules') > 0);
152 $this->assertTrue(strpos($this->getTable("//form[@id='adminForm']//table.3.3"), 'Category: Content Modules') > 0);
153 $this->assertTrue(strpos($this->getTable("//form[@id='adminForm']//table.4.3"), 'Category: Content Modules') > 0);
154 $this->jPrint ("Move Archive Module, Content Modules, Article Categories Module to Languages Category\n");
155 $this->click("cb1");
ClassCollectionLoaderTest.php (https://gitlab.com/pr0055/symfonypizza) PHP · 278 lines
19 require_once __DIR__.'/Fixtures/ClassesWithParents/A.php';
21 class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase
22 {
23 public function testTraitDependencies()
166 public function testFixNamespaceDeclarations($source, $expected)
167 {
168 $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
169 }
187 {
188 ClassCollectionLoader::enableTokenizer(false);
189 $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
190 ClassCollectionLoader::enableTokenizer(true);
191 }
221 }
222 spl_autoload_register($r = function ($class) {
223 if (0 === strpos($class, 'Namespaced') || 0 === strpos($class, 'Pearlike_')) {
224 @require_once __DIR__.'/Fixtures/'.str_replace(array('\\', '_'), '/', $class).'.php';
PSR0Locator.php (https://gitlab.com/judielsm/Handora) PHP · 349 lines
3 /*
4 * This file is part of PhpSpec, A php toolset to drive emergent
5 * design by specification.
6 *
179 if ($path && 0 === strpos($path, $this->fullSrcPath)) {
180 $path = $this->fullSpecPath.substr($path, strlen($this->fullSrcPath));
181 $path = preg_replace('/\.php/', 'Spec.php', $path);
183 return $this->findSpecResources($path);
186 if ($path && 0 === strpos($path, $this->srcPath)) {
187 $path = $this->fullSpecPath.substr($path, strlen($this->srcPath));
188 $path = preg_replace('/\.php/', 'Spec.php', $path);
190 return $this->findSpecResources($path);
Model.php (https://github.com/GeekZooTeam/Geek-Zoo-PHP-Library.git) PHP · 402 lines
1 <?php
3 /*
5 *
6 * @copyright (c) 2010 Geek-Zoo Projects More info http://www.geek-zoo.com
7 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License
8 * @author xuanyan <xuanyan@geek-zoo.com>
9 *
141 }
143 if (strpos($sql, 'WHERE') === false) {
144 $select = "SELECT * FROM `$table`";
145 $result = $this->db->getAll($select);
232 $sql = "SELECT * FROM `$table` $sql";
233 if (strpos($sql, '?') !== false) {
234 $result = $this->db->getAll($sql, $params);
235 } else {
ClassCollectionLoaderTest.php (https://gitlab.com/wormen/client.mastodont-engine) PHP · 274 lines
19 require_once __DIR__.'/Fixtures/ClassesWithParents/A.php';
21 class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase
22 {
23 public function testTraitDependencies()
166 public function testFixNamespaceDeclarations($source, $expected)
167 {
168 $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
169 }
187 {
188 ClassCollectionLoader::enableTokenizer(false);
189 $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
190 ClassCollectionLoader::enableTokenizer(true);
191 }
221 }
222 spl_autoload_register($r = function ($class) {
223 if (0 === strpos($class, 'Namespaced') || 0 === strpos($class, 'Pearlike_')) {
224 require_once __DIR__.'/Fixtures/'.str_replace(array('\\', '_'), '/', $class).'.php';
SetCookie.php (https://gitlab.com/wuhang2003/rainloop-webmail) PHP · 410 lines
Bug51Test.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 133 lines
1 <?php
3 require_once 'Swift/Tests/SwiftUnitTestCase.php';
13 $this->skipUnless(
14 is_writable(SWIFT_TMP_DIR),
15 '%s: This test requires tests/acceptance.conf.php to specify a ' .
16 'writable SWIFT_TMP_DIR'
17 );
79 {
80 $encHeader = 'Content-Transfer-Encoding: base64';
81 $base64declaration = strpos($source, $encHeader);
83 $attachmentDataStart = strpos($source, "\r\n\r\n", $base64declaration);
84 $attachmentDataEnd = strpos($source, "\r\n--", $attachmentDataStart);
86 if (false === $attachmentDataEnd)
MockSplFileInfo.php (https://gitlab.com/judielsm/Handora) PHP · 134 lines
MockSplFileInfo.php (https://gitlab.com/Sigpot/AirSpot) PHP · 134 lines
PhpReader.php (https://github.com/kunit/cakephp.git) PHP · 118 lines
12 *
13 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://book.cakephp.org/2.0/en/development/configuration.html#loading-configuration-files CakePHP(tm) Configuration
15 * @package Cake.Configure
16 * @since CakePHP(tm) v 2.0
22 * files containing simple PHP arrays.
23 *
24 * Files compatible with PhpReader should define a `$config` variable, that
25 * contains all of the configuration data contained in the file.
26 *
61 */
62 public function read($key) {
63 if (strpos($key, '..') !== false) {
64 throw new ConfigureException(__d('cake_dev', 'Cannot load configuration files with ../ in them.'));
65 }
session.php (https://github.com/LamCiuLoeng/BookShare.git) PHP · 178 lines
TemperatureTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 447 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: TemperatureTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Measure_TemperatureTest::main');
28 * Zend_Measure_Temperature
29 */
30 require_once 'Zend/Measure/Temperature.php';
32 /**
oauth.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 144 lines
cat_supplier_update.php (https://gitlab.com/ptisky/API_prestashop) PHP · 449 lines
AbstractHtmlElement.php (https://github.com/zucchi/zf2.git) PHP · 128 lines
SystemException.php (https://github.com/sajgak/cookiteasy.git) PHP · 102 lines
48 private function process_error(){
49 $severity = ( ! isset($this->error_levels[$this->errno])) ? $this->errno : $this->error_levels[$this->errno];
50 if (FALSE !== strpos($this->errfile, DIRECTORY_SEPARATOR)){
51 $x = explode('/', $this->errfile);
52 $filepath = $x[count($x)-3].DIRECTORY_SEPARATOR.$x[count($x)-2].DIRECTORY_SEPARATOR.end($x);
53 }
54 if (($this->errno & error_reporting()) == $this->errno)
55 $this->show_php_error($severity, $this->errstr, $filepath, $this->errline);
56 if($this->base->config('main')->log_errors)
57 $this->log($severity, $this->errstr, $this->errfile, $this->errline);
64 }
66 private function show_php_error($severity, $message, $filepath, $line){
67 echo '<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
68 <h4>A PHP Error was encountered</h4>
StringStartsWith.php (https://github.com/fmake/adv.git) PHP · 97 lines
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * @package PHPUnit
38 * @subpackage Framework_Constraint
39 * @author Sebastian Bergmann <sebastian@phpunit.de>
41 * @copyright 2001-2012 Sebastian Bergmann <sebastian@phpunit.de>
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
43 * @link http://www.phpunit.de/
49 * given prefix.
50 *
51 * @package PHPUnit
52 * @subpackage Framework_Constraint
53 * @author Sebastian Bergmann <sebastian@phpunit.de>
59 * @since Class available since Release 3.4.0
60 */
61 class PHPUnit_Framework_Constraint_StringStartsWith extends PHPUnit_Framework_Constraint
62 {
63 /**
TraitUsageGenerator.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 353 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
158 // Validations
159 if (false === strpos($traitAndMethod, "::")) {
160 throw new Exception\InvalidArgumentException(
161 'Invalid Format: $method must be in the format of trait::method'
224 // Validations
225 if (false === strpos($traitAndMethod, "::")) {
226 throw new Exception\InvalidArgumentException(
227 'Invalid Format: $method must be in the format of trait::method'
docmanager.class.php (https://github.com/modxcms-jp/evolution-jp.git) PHP · 109 lines
1 <?php
3 class DocManager {
29 $docmanager_lang_dir = MODX_BASE_PATH.'assets/modules/docmanager/lang/';
30 include MODX_CORE_PATH.'lang/english.inc.php';
31 include $docmanager_lang_dir . 'english.inc.php';
32 if($managerLanguage !== 'english') {
33 if(is_file(MODX_CORE_PATH . 'lang/' . $managerLanguage . '.inc.php')) {
34 include MODX_CORE_PATH . 'lang/' . $managerLanguage . '.inc.php';
35 }
36 if(is_file($docmanager_lang_dir . $managerLanguage . '.inc.php')) {
37 include $docmanager_lang_dir . $managerLanguage . '.inc.php';
rebuildFullTextIndex.php (https://github.com/clyfe/DEXonline.git) PHP · 117 lines
1 <?php
2 require_once('../phplib/util.php');
3 ini_set('max_execution_time', '3600');
4 ini_set('memory_limit', '256M');
5 assert_options(ASSERT_BAIL, 1);
7 log_scriptLog('Running rebuildFullTextIndex.php.');
8 if (!Lock::acquire(LOCK_FULL_TEXT_INDEX)) {
9 OS::errorAndExit('Lock already exists!');
70 log_scriptLog('WARNING: could not release lock!');
71 }
72 log_scriptLog('rebuildFullTextIndex.php completed successfully ' .
73 '(against all odds)');
85 $chars = AdminStringUtil::unicodeExplode($text);
86 foreach ($chars as $c) {
87 if (strpos($alphabet, $c) !== false) {
88 $currentWord .= $c;
89 } else {
StringStartsWith.php (https://github.com/masicek/XSLT-Benchmarking-XSLTMark-II.git) PHP · 97 lines
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * @package PHPUnit
38 * @subpackage Framework_Constraint
39 * @author Sebastian Bergmann <sebastian@phpunit.de>
41 * @copyright 2002-2011 Sebastian Bergmann <sebastian@phpunit.de>
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
43 * @link http://www.phpunit.de/
49 * given prefix.
50 *
51 * @package PHPUnit
52 * @subpackage Framework_Constraint
53 * @author Sebastian Bergmann <sebastian@phpunit.de>
59 * @since Class available since Release 3.4.0
60 */
61 class PHPUnit_Framework_Constraint_StringStartsWith extends PHPUnit_Framework_Constraint
62 {
63 /**
RestrictedCodeTest.php (https://gitlab.com/axeltizon/magento-demopoweraccess) PHP · 120 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
12 use Magento\Framework\Component\ComponentRegistrar;
14 class RestrictedCodeTest extends \PHPUnit_Framework_TestCase
15 {
16 /**@#+
34 public static function setUpBeforeClass()
35 {
36 self::_loadData(self::$_classes, 'restricted_classes*.php');
37 }
70 /**
71 * Test that restricted entities are not used in PHP files
72 * @return void
73 */
Google_BatchRequest.php (https://gitlab.com/ngochuynh1991/cuacuon) PHP · 110 lines
display-fields.php (https://gitlab.com/lamovible/grand-regis) PHP · 318 lines
1 <?php if ( ! defined( 'ABSPATH' ) ) exit;
2 /**
3 * Outputs the HTML for each field within a given form_id.
4 * It is attached to the ninja_forms_display_fields hook which is excuted by ninja_forms_display_form() in display-form.php
5 **/
6 add_action('init', 'ninja_forms_register_display_fields');
100 do_action( 'ninja_forms_display_before_opening_field_wrap', $field_id, $data );
101 ?>
102 <div class="<?php echo $field_wrap_class;?>" <?php echo $display_style;?> id="ninja_forms_field_<?php echo $field_id;?>_div_wrap" data-visible="<?php echo $visible;?>">
103 <?php
142 ?>
143 </div>
144 <?php
145 do_action( 'ninja_forms_display_after_closing_field_wrap', $field_id, $data );
146 }
PhpReader.php (https://bitbucket.org/00firestar00/ejfirestar.com.git) PHP · 116 lines
10 *
11 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
12 * @link http://book.cakephp.org/2.0/en/development/configuration.html#loading-configuration-files CakePHP(tm) Configuration
13 * @package Cake.Configure
14 * @since CakePHP(tm) v 2.0
15 * @license http://www.opensource.org/licenses/mit-license.php MIT License
16 */
19 * PHP Reader allows Configure to load configuration values from
20 * files containing simple PHP arrays.
21 *
22 * Files compatible with PhpReader should define a `$config` variable, that
25 * @package Cake.Configure
26 */
27 class PhpReader implements ConfigReaderInterface {
29 /**
ParameterElement.php (https://github.com/timglabisch/pimcore.git) PHP · 334 lines
12 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
13 * @link http://pear.php.net/package/PHP_CodeSniffer
14 */
31 * @link http://pear.php.net/package/PHP_CodeSniffer
32 */
33 class PHP_CodeSniffer_CommentParser_ParameterElement extends PHP_CodeSniffer_CommentParser_AbstractDocElement
34 {
86 * that make up
87 * this element.
88 * @param PHP_CodeSniffer_File $phpcsFile The file that
89 * this element
90 * is in.
93 $previousElement,
94 $tokens,
95 PHP_CodeSniffer_File $phpcsFile
96 ) {
97 parent::__construct($previousElement, $tokens, 'param', $phpcsFile);
BatchRequest.php (https://bitbucket.org/rdcli/php-google-api-client.git) PHP · 116 lines
test_environment.php (https://github.com/martinnemitz/Mage-Minify.git) PHP · 100 lines
1 <?php
3 if (__FILE__ === realpath($_SERVER['SCRIPT_FILENAME'])) {
15 }
17 require_once '_inc.php';
19 function test_environment()
30 );
31 $containsThisFile = assertTrue(
32 0 === strpos(realpath(__FILE__), realpath($_SERVER['DOCUMENT_ROOT']))
33 ,'environment : DOCUMENT_ROOT should contain this test file'
34 );
35 if (! $noSlash || ! $isRealPath || ! $containsThisFile) {
36 echo "\nDOCUMENT_ROOT is set to: '{$_SERVER['DOCUMENT_ROOT']}'. If you "
37 . "cannot modify this, consider setting \$min_documentRoot in config.php\n\n";
38 }
39 if (isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) {
help.php (https://github.com/gnomeontherun/joomla-cms.git) PHP · 154 lines
1 <?php
2 /**
3 * @package Joomla.Administrator
120 if ($help_search)
121 {
122 if (JString::strpos(JString::strtolower(strip_tags($buffer)), JString::strtolower($help_search)) !== false) {
123 // Add an item in the Table of Contents
124 $this->toc[$file] = $title;
146 {
147 if (!$this->latest_version_check) {
148 $override = 'http://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:Joomla_Version_{major}_{minor}_{maintenance}';
149 $this->latest_version_check = JHelp::createUrl('JVERSION', false, $override);
150 }
ParameterElement.php (https://github.com/r1zib/salesforce.git) PHP · 335 lines
13 * @version CVS: $Id: ParameterElement.php 270281 2008-12-02 02:38:34Z squiz $
14 * @link http://pear.php.net/package/PHP_CodeSniffer
15 */
32 * @link http://pear.php.net/package/PHP_CodeSniffer
33 */
34 class PHP_CodeSniffer_CommentParser_ParameterElement extends PHP_CodeSniffer_CommentParser_AbstractDocElement
35 {
87 * that make up
88 * this element.
89 * @param PHP_CodeSniffer_File $phpcsFile The file that
90 * this element
91 * is in.
94 $previousElement,
95 $tokens,
96 PHP_CodeSniffer_File $phpcsFile
97 ) {
98 parent::__construct($previousElement, $tokens, 'param', $phpcsFile);
DelegatingValidator.php (https://github.com/omarali/symfony.git) PHP · 267 lines
mosloadposition.php (https://github.com/Arkadiy-Sedelnikov/joostina-1.4.git) PHP · 101 lines
1 <?php
2 /**
3 * @package Joostina
4 * @copyright Авторские права (C) 2008-2010 Joostina team. Все права защищены.
5 * @license Лицензия http://www.gnu.org/licenses/gpl-2.0.htm GNU/GPL, или help/license.php
6 * Joostina! - свободное программное обеспечение распространяемое по условиям лицензии GNU/GPL
7 * Для получения информации о используемых расширениях и замечаний об авторском праве, смотрите файл help/copyright.php.
22 // simple performance check to determine whether bot should process further
23 if(strpos($row->text, 'mosloadposition') === false){
24 return true;
25 }
comment.php (https://github.com/purushoth85/wildflower.git) PHP · 115 lines
1 <?php
2 class Comment extends AppModel {
51 $this->data[$this->name]['url'] = trim($this->data[$this->name]['url']);
52 $httpPrefix = 'http://';
53 if (strpos($this->data[$this->name]['url'], $httpPrefix) !== 0) {
54 $this->data[$this->name]['url'] = $httpPrefix . $this->data[$this->name]['url'];
55 }
function.math.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 108 lines
1 <?php
2 /**
3 * Smarty plugin
14 * Purpose: handle math computations in template
15 *
16 * @link http://www.smarty.net/manual/en/language.function.math.php {math}
17 * (Smarty online manual)
18 * @author Monte Ohrt <monte at ohrt dot com>
46 // disallow backticks
47 if (strpos($equation, '`') !== FALSE) {
48 trigger_error("math: backtick character not allowed in equation", E_USER_WARNING);
53 // also disallow dollar signs
54 if (strpos($equation, '$') !== FALSE) {
55 trigger_error("math: dollar signs not allowed in equation", E_USER_WARNING);
wp-cache-phase1.php (https://github.com/brandonburke/WordPress-Plugin-Baseline.git) PHP · 125 lines
1 <?php
2 // Pre-2.6 compatibility
3 if( !defined('WP_CONTENT_DIR') )
4 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
6 if( !include( WP_CONTENT_DIR . '/wp-cache-config.php' ) )
7 return;
8 if( !defined( 'WPCACHEHOME' ) )
9 define('WPCACHEHOME', dirname(__FILE__).'/');
11 include( WPCACHEHOME . 'wp-cache-base.php');
13 $mutex_filename = 'wp_cache_mutex.lock';
17 // Don't change variables behind this point
19 $plugins = glob( WPCACHEHOME . 'plugins/*.php' );
20 if( is_array( $plugins ) ) {
21 foreach ( $plugins as $plugin ) {
StringStartsWith.php (https://github.com/grandison/budo16.git) PHP · 101 lines
39 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
40 * @copyright 2002-2010 Sebastian Bergmann <sb@sebastian-bergmann.de>
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
42 * @link http://www.phpunit.de/
44 */
46 require_once 'PHPUnit/Framework.php';
47 require_once 'PHPUnit/Util/Filter.php';
49 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
51 /**
62 * @since Class available since Release 3.4.0
63 */
64 class PHPUnit_Framework_Constraint_StringStartsWith extends PHPUnit_Framework_Constraint
65 {
66 /**
QuickCreate.php (https://github.com/joshbhamilton/sugarcrm_dev.git) PHP · 77 lines
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
39 require_once('include/EditView/EditView.php');
41 class QuickCreate extends EditView {
64 $time_separator = $match[1];
65 }
66 $t23 = strpos($time_format, '23') !== false ? '%H' : '%I';
67 if(!isset($match[2]) || $match[2] == '') {
68 $this->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M");
Content.php (https://bitbucket.org/astrikovd/plumproject.git) PHP · 92 lines
citext.sql.in (https://github.com/gurjeet/postgres.git) Autoconf · 488 lines
446 CREATE OR REPLACE FUNCTION regexp_matches( citext, citext, text ) RETURNS TEXT[] AS $$
447 SELECT pg_catalog.regexp_matches( $1::pg_catalog.text, $2::pg_catalog.text, CASE WHEN pg_catalog.strpos($3, 'c') = 0 THEN $3 || 'i' ELSE $3 END );
448 $$ LANGUAGE SQL IMMUTABLE STRICT;
454 CREATE OR REPLACE FUNCTION regexp_replace( citext, citext, text, text ) returns TEXT AS $$
455 SELECT pg_catalog.regexp_replace( $1::pg_catalog.text, $2::pg_catalog.text, $3, CASE WHEN pg_catalog.strpos($4, 'c') = 0 THEN $4 || 'i' ELSE $4 END);
456 $$ LANGUAGE SQL IMMUTABLE STRICT;
462 CREATE OR REPLACE FUNCTION regexp_split_to_array( citext, citext, text ) RETURNS TEXT[] AS $$
463 SELECT pg_catalog.regexp_split_to_array( $1::pg_catalog.text, $2::pg_catalog.text, CASE WHEN pg_catalog.strpos($3, 'c') = 0 THEN $3 || 'i' ELSE $3 END );
464 $$ LANGUAGE SQL IMMUTABLE STRICT;
Literal.php (https://github.com/noose/zf2.git) PHP · 126 lines
DocBlockScanner.php (https://github.com/leerbag/zf2.git) PHP · 375 lines
1 <?php
3 namespace Zend\Code\Scanner;
223 } else {
224 if ($annotationMode) {
225 $currentWord = (($matches = strpos($currentLine, ' ')) !== false) ? substr($currentLine, 0, $matches) : $currentLine;
226 } else {
227 $currentWord = strtok($currentLine, " \n\t\r");
311 /*
312 if ($currentChar === '@' && $annotationMode && ($startOfAnnotation = strpos($currentWord, '(')) !== false) {
313 $MACRO_TOKEN_SET_TYPE('DOCBLOCK_ANNOTATION_NAME');
314 $MACRO_TOKEN_APPEND_WORD_PARTIAL($startOfAnnotation);
scripts.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 397 lines
1 <?php
2 /**
3 *
81 # galleria hompage check
82 if( strpos( $options['homepage_teaser_text'], '[galleria' ) === false &&
83 strpos( $options['extra_header'], '[galleria' ) === false &&
84 strpos( $options['teaser_button_text'], '[galleria' ) === false &&
85 strpos( $options['content'], '[galleria' ) === false &&
86 strpos( $options['homepage_footer_teaser'], '[galleria' ) === false ) { $galleria_unset = true; }
88 # cluetip hompage check
89 if( strpos( $options['homepage_teaser_text'], '[tooltip' ) === false &&
90 strpos( $options['extra_header'], '[tooltip' ) === false &&
PwTemplateCompilerPage.php (https://gitlab.com/wuhang2003/phpwind) PHP · 119 lines
1 <?php
2 Wind::import('WIND:viewer.AbstractWindTemplateCompiler');
3 /**
7 * 支持参数类型:<code>
8 * 模板名称,当前页,总条数,每页显示多少条,url
9 * <page tpl='' current='' count='' per='' url='read.php?tid=$tid&page=' args='' />
10 * </code>
11 * @author Qiong Wu <papa0924@gmail.com>
12 * @copyright ©2003-2103 phpwind.com
13 * @license http://www.windframework.com
14 * @version $Id: PwTemplateCompilerPage.php 3580 2012-05-25 03:34:14Z yishuo $
63 protected $args = 'array()';
65 /* (non-PHPdoc)
66 * @see AbstractWindTemplateCompiler::compile()
67 */
DocBlockScanner.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 326 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
205 $currentWord = (preg_match('#( +)#', $currentLine, $matches) === 1) ? $matches[1] : $currentLine;
206 } else {
207 $currentWord = (($matches = strpos($currentLine, ' ')) !== false) ? substr($currentLine, 0, $matches) : $currentLine;
208 }
post-xml.php (https://github.com/bobzhai/Flexigrid.git) PHP · 112 lines
1 <?php
2 $page = isset($_POST['page']) ? $_POST['page'] : 1;
3 $rp = isset($_POST['rp']) ? $_POST['rp'] : 10;
70 */
71 if(!isset($usingSQL)){
72 include dirname(__FILE__).'/countryArray.inc.php';
73 if($qtype && $query){
74 $query = strtolower(trim($query));
75 foreach($rows AS $key => $row){
76 if(strpos(strtolower($row[$qtype]),$query) === false){
77 unset($rows[$key]);
78 }
79 }
80 }
81 //Make PHP handle the sorting
82 $sortArray = array();
83 foreach($rows AS $key => $row){
Ip.delivery.php (https://github.com/orchestra-io/sample-openx.git) PHP · 86 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: Ip.delivery.php 33995 2009-03-18 23:04:15Z chris.nutting $
26 */
33 */
35 require_once MAX_PATH . '/lib/max/Delivery/limitations.delivery.php';
37 /**
56 return (true);
58 if (!strpos($limitation, '/')) {
59 $net = explode('.', $limitation);
Ip.delivery.php (https://github.com/orchestra-io/sample-openx.git) PHP · 86 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: Ip.delivery.php 30054 2008-12-15 13:19:46Z chris.nutting $
26 */
33 */
35 require_once MAX_PATH . '/lib/max/Delivery/limitations.delivery.php';
37 /**
56 return (true);
58 if (!strpos($limitation, '/')) {
59 $net = explode('.', $limitation);
oauth.php (https://bitbucket.org/ke2083/transfans.co.uk-website.git) PHP · 133 lines
csv_api.php (https://github.com/osarrat/sigmah-website.git) PHP · 399 lines
1 <?php
2 # MantisBT - a php based bugtracking system
76 # enclose strings with separators with quotaiton marks
77 if( strpos( $p_str, csv_get_separator() ) !== false ) {
78 $p_str = '"' . str_replace( '"', '""', $p_str ) . '"';
79 }
81 # enclose multi-line strings with quotaiton marks
82 if( strpos( $p_str, "\n" ) !== false ) {
83 $p_str = '"' . str_replace( '"', '""', $p_str ) . '"';
84 }
Headers.php (https://gitlab.com/suresh.b/TTC) PHP · 104 lines
1 <?php
2 /**
3 * Slim - a micro PHP 5 framework
56 'CONTENT_TYPE',
57 'CONTENT_LENGTH',
58 'PHP_AUTH_USER',
59 'PHP_AUTH_PW',
60 'PHP_AUTH_DIGEST',
61 'AUTH_TYPE'
62 );
72 foreach ($data as $key => $value) {
73 $key = strtoupper($key);
74 if (strpos($key, 'X_') === 0 || strpos($key, 'HTTP_') === 0 || in_array($key, static::$special)) {
75 if ($key === 'HTTP_CONTENT_TYPE' || $key === 'HTTP_CONTENT_LENGTH') {
76 continue;
CEmailValidator.php (https://github.com/sassman/django-benchmark.git) PHP · 94 lines
1 <?php
2 /**
3 * CEmailValidator class file.
13 *
14 * @author Qiang Xue <qiang.xue@gmail.com>
15 * @version $Id: CEmailValidator.php 1840 2010-02-26 04:34:30Z qiang.xue $
16 * @package system.validators
17 * @since 1.0
39 /**
40 * @var boolean whether to check the MX record for the email address.
41 * Defaults to false. To enable it, you need to make sure the PHP function 'checkdnsrr'
42 * exists in your PHP installation.
85 $valid=is_string($value) && (preg_match($this->pattern,$value) || $this->allowName && preg_match($this->fullPattern,$value));
86 if($valid)
87 $domain=rtrim(substr($value,strpos($value,'@')+1),'>');
88 if($valid && $this->checkMX && function_exists('checkdnsrr'))
89 $valid=checkdnsrr($domain,'MX');
update.php (https://github.com/gbds/revolution.git) PHP · 89 lines
sfOAuth.class.php (https://github.com/sglessard/OAuthBase.git) PHP · 1353 lines
stylies.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 347 lines
1 <?php
2 defined('JPATH_BASE') or die();
34 $aryParams = explode("\n",$paramsConfigObj[0]->params);
35 foreach($aryParams as $item){
36 $posStyle = strpos(trim($item),'layout_style=');
37 if($posStyle === false){
38 } else {
124 var jvMaju = $$('.jv_slide_stylemaju');
125 var jvStyle7 = $$('.jv_slide_style7');
126 var layout = "<?php echo $layoutStyle; ?>";
127 var selectStyle = function(style){
128 switch(style){
342 });
343 </script>
344 <?php
345 return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', $class, 'value', 'text', $value, $control_name.$name);
346 }
YamlDumper.php (https://gitlab.com/Snizer/PI-DEV-TUNISIAMALL3A6-WEB) PHP · 336 lines
EmailValidator.php (https://gitlab.com/Marwamimo/Crowdrise_Web) PHP · 126 lines
builtins_typed_php.ml (https://github.com/facebook/pfff.git) OCaml · 392 lines
14 *)
16 open Env_typing_php
17 module Env = Env_typing_php
18 module GEnv = Typing_helpers_php.GEnv
20 (*****************************************************************************)
61 fun_ [string; string; array (int, string); int; int] int
63 let strpos =
64 fun_ [string; string; int] (or_ [pint; pstring])
314 add "preg_match" preg_match;
315 add "preg_replace" preg_replace;
316 add "strpos" strpos;
317 add "time" (fun_ [] int);
318 add "array_keys" array_keys;
AppTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 257 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5 *
8 *
9 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
10 * @link https://cakephp.org CakePHP(tm) Project
11 * @since 2.0.0
12 * @license https://opensource.org/licenses/mit-license.php MIT License
57 return $existsInBase;
58 }
59 $checkCake = (!$existsInBase || strpos('.', $class));
60 if ($checkCake) {
61 return (bool)$expected;
PhpReferenceCompatibility.php (https://gitlab.com/x33n/ImpressPages) PHP · 433 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
20 *
21 * This ArrayObject is a rewrite of the implementation to fix
22 * issues with php's implementation of ArrayObject where you
23 * are unable to unset multi-dimensional arrays because you
24 * need to fetch the properties / lists as references.
25 */
26 abstract class PhpReferenceCompatibility implements IteratorAggregate, ArrayAccess, Serializable, Countable
27 {
28 /**
363 }
365 if (strpos($class, '\\') === 0) {
366 $class = '\\' . $class;
367 if (class_exists($class)) {
smarty_internal_config.php (https://github.com/raphaelbastide/berta.git) PHP · 270 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Config
52 if (empty($config_resource))
53 return false;
54 if (strpos($config_resource, ':') === false) {
55 // no resource given, use default
56 $this->config_resource_type = $this->smarty->default_config_type;
76 {
77 foreach((array)$this->smarty->config_dir as $_config_dir) {
78 if (strpos('/\\', substr($_config_dir, -1)) === false) {
79 $_config_dir .= DS;
80 }
150 $_compile_dir .= DS;
151 }
152 return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . '.php';
153 }
154 /**
SubscriptionDAO.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 474 lines
1 <?php
3 /**
4 * SubscriptionDAO.inc.php
5 *
6 * Copyright (c) 2003-2004 The Public Knowledge Project
12 * Operations for retrieving and modifying Subscription objects.
13 *
14 * $Id: SubscriptionDAO.inc.php,v 1.6 2005/05/03 17:45:25 alec Exp $
15 */
394 while (list(, $curIPString) = each($ipRanges)) {
395 // Parse and check single IP string
396 if (strpos($curIPString, SUBSCRIPTION_IP_RANGE_RANGE) === false) {
398 // Check for wildcards in IP
navigation.php (https://gitlab.com/Riky_Lesmana/SugarSweetCakes) PHP · 126 lines
42 <?php $is_submenu_active = is_active_menu($menu_item, $active_section); ?>
44 <li class="<?php if($is_submenu_active === TRUE){ ?>active open<?php } ?>">
45 <a href="<?php echo current_url(); ?>#" class="dropdown-toggle">
61 ?>
63 <li class="<?php if(strpos($this->uri->uri_string(), $uri) === 0){ ?>active open<?php } ?>">
65 <a href="<?php echo site_url($uri); ?>">
92 <?php $is_section_active = is_active_menu($section_uri, $active_section); ?>
93 <li class="<?php if($is_section_active){ ?>active<?php } ?>">
94 <a href="<?php echo site_url($section_uri); ?>">
114 <?php }else{ ?>
116 <li class="<?php if(strpos($this->uri->uri_string(), $menu_item) === 0){ ?>active open<?php } ?>">
117 <a href="<?php echo base_url() . $menu_item; ?>">
HelperBroker.php (https://github.com/bhaumik25/zend-framework.git) PHP · 336 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Controller_Action_Exception */
23 require_once 'Zend/Controller/Action/Exception.php';
25 /** Zend_Controller_Action_Helper_Abstract */
26 require_once 'Zend/Controller/Action/Helper/Abstract.php';
28 /** Zend_Loader **/
29 require_once 'Zend/Loader.php';
31 /**
DbTable.php (https://github.com/bhaumik25/zend-framework.git) PHP · 316 lines
1 <?php
3 /**
26 * @see Zend_Auth_Adapter_Interface
27 */
28 require_once 'Zend/Auth/Adapter/Interface.php';
32 * @see Zend_Db_Adapter_Abstract
33 */
34 require_once 'Zend/Db/Adapter/Abstract.php';
252 * @see Zend_Auth_Adapter_Exception
253 */
254 require_once 'Zend/Auth/Adapter/Exception.php';
255 throw new Zend_Auth_Adapter_Exception($exception);
256 }
TraversableContains.php (https://gitlab.com/Japang-Jawara/jawara-penilaian) PHP · 123 lines
1 <?php
2 /*
3 * This file is part of PHPUnit.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
13 * a given value.
14 */
15 class PHPUnit_Framework_Constraint_TraversableContains extends PHPUnit_Framework_Constraint
16 {
17 /**
35 * @param bool $checkForNonObjectIdentity
36 *
37 * @throws PHPUnit_Framework_Exception
38 */
39 public function __construct($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
APICObject.php (https://gitlab.com/ElvisAns/tiki) PHP · 134 lines
1 <?php
3 //this script may only be included - so its better to die if called directly.
4 if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
5 header("location: index.php");
9 /*
10 This file is part of J4PHP - Ensembles de propriétés et méthodes permettant le developpment rapide d'application web modulaire
11 Copyright (c) 2002-2004 @PICNet
34 * @version 1.0
35 * @author diogène MOULRON <logiciel@apicnet.net>
36 * @see ErrorManager.php
37 */
38 class APICObject {
TikiPayment.php (https://gitlab.com/ElvisAns/tiki) PHP · 117 lines
1 <?php
3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
9 //this script may only be included - so its better to die if called directly.
10 if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
11 header('location: index.php');
16 * Class Table_Settings_TikiPayment
17 *
18 * Tablesorter settings for the table listings of payments at tiki-payments.php
19 *
20 * @package Tiki
27 'ajax' => [
28 'url' => [
29 'file' => 'tiki-payment.php',
30 ],
31 ],
BaseQuestionTag.php (https://github.com/mori-dev/emacs-symfony.git) PHP · 560 lines
1 <?php
72 if ($format === null) {
73 return $ts;
74 } elseif (strpos($format, '%') !== false) {
75 return strftime($format, $ts);
76 } else {
330 public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
331 {
332 $pos = QuestionTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
361 public function toArray($keyType = BasePeer::TYPE_PHPNAME)
362 {
363 $keys = QuestionTagPeer::getFieldNames($keyType);
layout.class.php (https://github.com/snowstrypes/shimmie2.git) PHP · 136 lines
Buffer.php (https://gitlab.com/Rushaway/sourcebanspp) PHP · 199 lines
1 <?php
2 /**
3 * @author Pavel Djundik <sourcequery@xpaw.me>
4 *
5 * @link https://xpaw.me
6 * @link https://github.com/xPaw/PHP-Source-Query
7 *
8 * @license GNU Lesser General Public License, version 2.1
184 public function GetString( )
185 {
186 $ZeroBytePosition = StrPos( $this->Buffer, "\0", $this->Position );
188 if( $ZeroBytePosition === false )
utils.php (https://gitlab.com/tunisiano187/PhpNuget) PHP · 144 lines
1 <?php
2 class Utils
3 {
6 return com_create_guid();
7 }else{
8 mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
9 $charid = strtoupper(md5(uniqid(rand(), true)));
10 $hyphen = chr(45);// "-"
68 if($haystack==null) return false;
69 if(strlen($needle)>strlen($haystack))return false;
70 return strpos($haystack, $needle) !== false;
71 }
85 function indexOf($mystring, $findme)
86 {
87 $pos = strpos($mystring, $findme);
88 if ($pos === false) {
89 return -1;
getlist.php (https://gitlab.com/haque.mdmanzurul/nga-loyaltymatters) PHP · 110 lines
1 <?php
3 //if (!$modx->hasPermission('quip.thread_list')) return $modx->error->failure($modx->lexicon('access_denied'));
76 $chunk->setContent($filter['getlistwhere']);
77 $where = $chunk->process($scriptProperties);
78 $where = strpos($where, '{') === 0 ? $modx->fromJson($where) : $where;
80 $c->where($where);
wp-trackback.php (https://github.com/holsinger/openfloor.git) PHP · 111 lines
vfsStream.php (https://github.com/pago/pantr.git) PHP · 141 lines
1 <?php
2 /**
3 * Some utility methods for vfsStream.
4 *
5 * @package bovigo_vfs
6 * @version $Id: vfsStream.php 132 2009-07-13 19:13:25Z google@frankkleine.de $
7 */
8 /**
9 * @ignore
10 */
11 require_once dirname(__FILE__) . '/vfsStreamWrapper.php';
12 /**
13 * Some utility methods for vfsStream.
103 }
105 $firstSlash = strpos($name, '/');
106 if (false === $firstSlash) {
107 return new vfsStreamDirectory($name, $permissions);
String.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 263 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: String.php 23775 2011-03-01 17:25:24Z ralph $
20 */
23 /** Zend_Pdf_Element */
24 require_once 'Zend/Pdf/Element.php';
26 /**
173 while ($offset < strlen($str)) {
174 // Searche for the next escaped character/sequence
175 $escapeCharOffset = strpos($str, '\\', $offset);
176 if ($escapeCharOffset === false || $escapeCharOffset == strlen($str) - 1) {
177 // There are no escaped characters or '\' char has came at the end of string
PageAssets.php (https://gitlab.com/x33n/ImpressPages) PHP · 241 lines
1 <?php
2 /**
3 * @package ImpressPages
125 foreach ($cssFiles as &$file) {
126 if (strpos($file['value'], $themeAssetsUrl) === 0) {
127 $pathinfo = pathinfo($file['value']);
140 if ($file['cacheFix']) {
141 $file['value'] .= (strpos($file['value'], '?') !== false ? '&' : '?') . $cacheVersion;
142 }
143 }
145 foreach ($cssFiles as &$file) {
146 if ($file['cacheFix']) {
147 $file['value'] .= (strpos($file['value'], '?') !== false ? '&' : '?') . $cacheVersion;
148 }
149 }
check_ifpresent.php (https://github.com/sherdog/GitWitty.git) PHP · 78 lines
1 <?php
2 /**
3 * @file check_ifpresent.php
4 * @brief Checks if a file is present.
5 * Is used to test if the 'define_multisites.php' file is present.
6 *
7 * @version 1.2.10
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 * A full text version of the GNU GPL version 2 can be found in the LICENSE.php file.
25 * @par History:
26 * - V1.0.0 14-JUL-2008: Initial version
27 * - V1.1.0 07-NOV-2008: Deploy the patch.
28 * With V1.1.0, the file multisites.php is added and must be deployed
29 * even when define_multisites.php is already present.
simplerouter.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 360 lines
1 <?php defined('SYSPATH') or die('No direct access allowed.');
2 /**
3 * @package Simpleroute
167 // find the first occurance of ( and if there that is our offset
168 if ($pos = strpos($pattern, '('))
169 {
170 $exten .= ':' .$pos;
193 public static function conditionPermutations($pattern)
194 {
195 if ($pos = strpos($pattern, '?'))
196 {
197 $patternWith = substr($pattern, 0, $pos) .substr($pattern, $pos+1);
report.class.php (https://github.com/easysoft/zentaopms.git) PHP · 542 lines
lavaPages.php (https://github.com/volcanicpixels/Privacy-Plugin.git) PHP · 360 lines
1 <?php
2 /**
3 * The lavaPages class
322 if( !empty( $path ) )
323 {
324 if( strpos( $path, 'http' ) === false ) {
325 $path = plugins_url( $path, $this->_file() );
326 }
334 if( !empty( $path ) )
335 {
336 if( strpos( $path, "http" ) === false ) {
337 $path = plugins_url( $path, $this->_file() );
338 }
table_torch.php (https://github.com/splitfeed/Table-Torch.git) PHP · 374 lines
1 <?php
3 if (! defined('BASEPATH')) exit('No direct script access');
20 'key'=>'' );
22 //php 5 constructor
23 function __construct() {
363 foreach( $segs as $segment){
365 if( strpos( $segment, PARAM_DILEM ) !== FALSE ){
366 $arr = explode( PARAM_DILEM, $segment );
367 $this->url_vals[ $arr[ 0 ] ] = $arr[ 1 ];
HelperBroker.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 381 lines
1 <?php
2 /**
3 * Zend Framework
24 * @see Zend_Controller_Action_HelperBroker_PriorityStack
25 */
26 // require_once 'Zend/Controller/Action/HelperBroker/PriorityStack.php';
28 /**
29 * @see Zend_Loader
30 */
31 // require_once 'Zend/Loader.php';
33 /**
68 {
69 if ((null !== $loader) && (!$loader instanceof Zend_Loader_PluginLoader_Interface)) {
70 // require_once 'Zend/Controller/Action/Exception.php';
71 throw new Zend_Controller_Action_Exception('Invalid plugin loader provided to HelperBroker');
72 }
Name.php (https://github.com/Zefiryn/graduationprojects.git) PHP · 161 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Name.php 23775 2011-03-01 17:25:24Z ralph $
20 */
23 /** Zend_Pdf_Element */
24 require_once 'Zend/Pdf/Element.php';
52 {
53 settype($val, 'string');
54 if (strpos($val,"\x00") !== false) {
55 require_once 'Zend/Pdf/Exception.php';
top_menu.php (https://github.com/nadavkav/MoodleTAO.git) PHP · 110 lines
1 <?php
2 //----------------------------------------------------------------------------------------------
3 // Desc: Rafl top menu
15 // Append url variable
16 if (strpos($arg_config_file, '?')) {
17 $config_url = $arg_config_file . '&this_url=' . urlencode($_SERVER['REQUEST_URI']);
18 } else {
23 $config_url = urlencode('../includes/top_menu/' . $config_url);
25 // Base path for config path and amfphp
26 $base_url = "main/";
70 so.addParam("allowScriptAccess", "always");
71 so.addParam("movie", "main/rtool/rtool_menubar");
72 so.addParam("FlashVars", "<?php echo $flashVarString; ?>");
73 so.addParam("wmode","transparent");
74 so.write("divFlashContent");
Connection.php (https://github.com/bate/zf2.git) PHP · 370 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
88 if (isset($connectionParameters['dsn'])) {
89 $this->driverName = substr($connectionParameters['dsn'], 0,
90 strpos($connectionParameters['dsn'], ':')
91 );
92 } elseif (isset($connectionParameters['pdodriver'])) {
179 case 'driver':
180 $value = strtolower($value);
181 if (strpos($value, 'pdo') === 0) {
182 $pdoDriver = strtolower(substr(str_replace(array('-', '_', ' '), '', $value), 3));
183 }
Definition.php (https://github.com/Zeelot/kohana-dependencies.git) PHP · 177 lines
String.php (https://github.com/kervin/kyzstudio.git) PHP · 263 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: String.php 21542 2010-03-18 08:56:40Z bate $
20 */
23 /** Zend_Pdf_Element */
24 #require_once 'Zend/Pdf/Element.php';
26 /**
173 while ($offset < strlen($str)) {
174 // Searche for the next escaped character/sequence
175 $escapeCharOffset = strpos($str, '\\', $offset);
176 if ($escapeCharOffset === false || $escapeCharOffset == strlen($str) - 1) {
177 // There are no escaped characters or '\' char has came at the end of string
index.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 97 lines
1 <?php // $Id: index.php,v 1.15.2.5 2009/10/09 11:07:22 exe-cutor Exp $
2 // Designed to be redirected from moodle/login/index.php
4 require('../../config.php');
6 if (isloggedin() && $USER->username != 'guest') { // Nothing to do
7 if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
8 $urltogo = $SESSION->wantsurl; /// Because it's an address in this site
9 unset($SESSION->wantsurl);
52 $SESSION->justloggedin = true;
54 add_to_log(SITEID, 'user', 'login', "view.php?id=$USER->id&course=".SITEID, $USER->id, 0, $USER->id);
56 if (user_not_fully_set_up($USER)) {
filestore_dojoxdata.php
(http://enginey.googlecode.com/svn/trunk/)
PHP · 180 lines
✨ Summary
This PHP script is a file service that handles HTTP requests for retrieving files and directories. It accepts query parameters to filter results, sort files, and paginate output. If a specific file path is provided, it returns the file’s metadata in JSON format. Otherwise, it returns a list of matching files with optional filtering and sorting.
This PHP script is a file service that handles HTTP requests for retrieving files and directories. It accepts query parameters to filter results, sort files, and paginate output. If a specific file path is provided, it returns the file’s metadata in JSON format. Otherwise, it returns a list of matching files with optional filtering and sorting.
1 <?php
2 //Define the root directory to use for this service.
3 //All file lookups are relative to this path.
4 $rootDir = "../..";
6 require_once("filestore_funcs.php");
8 //Extract the query, if any.
124 //Make sure the path isn't trying to walk out of the rooted directory
125 //As defined by $rootDir in the top of the php script.
126 $rootPath = realPath($rootDir);
127 $fullPath = realPath($rootPath."/".$path);
129 if ($fullPath !== false) {
130 if (strpos($fullPath,$rootPath) === 0) {
131 //Root the path into the tree cleaner.
132 if (strlen($fullPath) == strlen($rootPath)) {