100+ results results for 'php stripos repo:sezuan/core' (459 ms)
1<?php 2/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net> 18/** 19 * \file htdocs/core/class/openid.class.php 20 * \ingroup core 46 47 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps 48 /** 55 { 56 // phpcs:enable 57 $this->URLs['openid_server'] = $a; 59 60 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps 61 /** 68 { 69 // phpcs:enable 70 $this->URLs['trust_root'] = $a;func.php http://snowcms.googlecode.com/svn/trunk/ | PHP | 272 lines
1<?php 2//////////////////////////////////////////////////////////////////////////// 65 'mail' => 'mb_send_mail', 66 'stripos' => create_function('$haystack, $needle, $offset = 0', ' 67 // This function doesn\'t exist until PHP 5.2.0 >= 67 // This function doesn\'t exist until PHP 5.2.0 >= 68 if(function_exists(\'mb_stripos\')) 69 return mb_stripos($haystack, $needle, $offset); 73 'stristr' => create_function('$haystack, $needle, $part = false', ' 74 // Same as mb_stripos, this doesn\'t exist until 5.2.0 as well. 75 if(function_exists(\'mb_stristr\')) 109 'mail' => 'mail', 110 'stripos' => 'stripos', 111 'stristr' => 'stristr',Svn.php git://github.com/composer/composer.git | PHP | 381 lines
1<?php 2 18/** 19 * @author Till Klampaeckel <till@php.net> 20 * @author Jordi Boggiano <j.boggiano@seld.be> 158 // the error is not auth-related 159 if (false === stripos($fullOutput, 'Could not authenticate to server:') 160 && false === stripos($fullOutput, 'authorization failed') 160 && false === stripos($fullOutput, 'authorization failed') 161 && false === stripos($fullOutput, 'svn: E170001:') 162 && false === stripos($fullOutput, 'svn: E215004:')) { 332 333 $host = parse_url($this->url, PHP_URL_HOST); 334 if (isset($authConfig[$host])) {admin.php git://github.com/q2a/question2answer.git | PHP | 692 lines
1<?php 2/* 18 19 More about this license: http://www.question2answer.org/license.php 20*/ 44 if (defined('QA_MYSQL_USERS_PREFIX')) { // check if one of the prefixes is a prefix itself of the other 45 if (stripos(QA_MYSQL_USERS_PREFIX, QA_MYSQL_TABLE_PREFIX) === 0) 46 $prefixes = array(QA_MYSQL_TABLE_PREFIX); 46 $prefixes = array(QA_MYSQL_TABLE_PREFIX); 47 elseif (stripos(QA_MYSQL_TABLE_PREFIX, QA_MYSQL_USERS_PREFIX) === 0) 48 $prefixes = array(QA_MYSQL_USERS_PREFIX);Parsedown.php git://github.com/QuickAppsCMS/QuickApps-CMS.git | PHP | 1197 lines
1<?php 2 147 148 if (stripos($line, $contextData['start']) !== false) { 149 # opening tag 153 154 if (stripos($line, $contextData['end']) !== false) { 155 # closing tagResults.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 4765 lines
1<?php 2 4 5namespace PhpMyAdmin\Display; 6 6 7use PhpMyAdmin\Config\SpecialSchemaLinks; 8use PhpMyAdmin\Core; 8use PhpMyAdmin\Core; 9use PhpMyAdmin\DatabaseInterface; 10use PhpMyAdmin\FieldMetadata; 10use PhpMyAdmin\FieldMetadata; 11use PhpMyAdmin\Html\Generator; 12use PhpMyAdmin\Index; 12use PhpMyAdmin\Index; 13use PhpMyAdmin\Message; 14use PhpMyAdmin\Plugins\Transformations\Output\Text_Octetstream_Sql;Routines.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 1612 lines
1<?php 2 4 5namespace PhpMyAdmin\Database; 6 6 7use PhpMyAdmin\Charsets; 8use PhpMyAdmin\Charsets\Charset; 8use PhpMyAdmin\Charsets\Charset; 9use PhpMyAdmin\DatabaseInterface; 10use PhpMyAdmin\Html\Generator; 10use PhpMyAdmin\Html\Generator; 11use PhpMyAdmin\Message; 12use PhpMyAdmin\ResponseRenderer; 12use PhpMyAdmin\ResponseRenderer; 13use PhpMyAdmin\SqlParser\Parser; 14use PhpMyAdmin\SqlParser\Statements\CreateStatement;Qbe.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 1830 lines
1<?php 2/** 7 8namespace PhpMyAdmin\Database; 9 9 10use PhpMyAdmin\DatabaseInterface; 11use PhpMyAdmin\Html\Generator; 11use PhpMyAdmin\Html\Generator; 12use PhpMyAdmin\Message; 13use PhpMyAdmin\Relation; 13use PhpMyAdmin\Relation; 14use PhpMyAdmin\SavedSearches; 15use PhpMyAdmin\Table; 15use PhpMyAdmin\Table; 16use PhpMyAdmin\Template; 17use PhpMyAdmin\Util;Table.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 2713 lines
1<?php 2 4 5namespace PhpMyAdmin; 6 6 7use PhpMyAdmin\Html\Generator; 8use PhpMyAdmin\Html\MySQLDocumentation; 8use PhpMyAdmin\Html\MySQLDocumentation; 9use PhpMyAdmin\Plugins\Export\ExportSql; 10use PhpMyAdmin\Query\Compatibility; 10use PhpMyAdmin\Query\Compatibility; 11use PhpMyAdmin\Query\Generator as QueryGenerator; 12use PhpMyAdmin\SqlParser\Components\Expression; 12use PhpMyAdmin\SqlParser\Components\Expression; 13use PhpMyAdmin\SqlParser\Components\OptionsArray; 14use PhpMyAdmin\SqlParser\Context;StorageEngine.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 547 lines
1<?php 2 4 5namespace PhpMyAdmin; 6 6 7use PhpMyAdmin\Engines\Bdb; 8use PhpMyAdmin\Engines\Berkeleydb; 8use PhpMyAdmin\Engines\Berkeleydb; 9use PhpMyAdmin\Engines\Binlog; 10use PhpMyAdmin\Engines\Innobase; 10use PhpMyAdmin\Engines\Innobase; 11use PhpMyAdmin\Engines\Innodb; 12use PhpMyAdmin\Engines\Memory; 12use PhpMyAdmin\Engines\Memory; 13use PhpMyAdmin\Engines\Merge; 14use PhpMyAdmin\Engines\MrgMyisam;InsertEdit.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 2582 lines
1<?php 2/** 7 8namespace PhpMyAdmin; 9 9 10use PhpMyAdmin\Html\Generator; 11use PhpMyAdmin\Plugins\TransformationsPlugin; 11use PhpMyAdmin\Plugins\TransformationsPlugin; 12use PhpMyAdmin\Utils\Gis; 13 30use function max; 31use function mb_stripos; 32use function mb_strlen; 53/** 54 * PhpMyAdmin\InsertEdit class 55 */Import.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 1794 lines
1<?php 2 4 5namespace PhpMyAdmin; 6 6 7use PhpMyAdmin\SqlParser\Parser; 8use PhpMyAdmin\SqlParser\Statements\DeleteStatement; 8use PhpMyAdmin\SqlParser\Statements\DeleteStatement; 9use PhpMyAdmin\SqlParser\Statements\InsertStatement; 10use PhpMyAdmin\SqlParser\Statements\ReplaceStatement; 10use PhpMyAdmin\SqlParser\Statements\ReplaceStatement; 11use PhpMyAdmin\SqlParser\Statements\UpdateStatement; 12use PhpMyAdmin\SqlParser\Utils\Query; 25use function mb_ord; 26use function mb_stripos; 27use function mb_strlen;DatabaseInterface.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 2436 lines
1<?php 2/** 7 8namespace PhpMyAdmin; 9 10use mysqli_result; 11use PhpMyAdmin\Database\DatabaseList; 12use PhpMyAdmin\Dbal\DatabaseName; 12use PhpMyAdmin\Dbal\DatabaseName; 13use PhpMyAdmin\Dbal\DbalInterface; 14use PhpMyAdmin\Dbal\DbiExtension; 14use PhpMyAdmin\Dbal\DbiExtension; 15use PhpMyAdmin\Dbal\DbiMysqli; 16use PhpMyAdmin\Dbal\Warning; 16use PhpMyAdmin\Dbal\Warning; 17use PhpMyAdmin\Html\Generator; 18use PhpMyAdmin\Query\Cache;Config.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 1384 lines
179 * Determines platform (OS), browser and version of the user 180 * Based on a phpBuilder article: 181 * 181 * 182 * @see http://www.phpbuilder.net/columns/tim20000821.php 183 */ 313 314 if (stripos(PHP_OS, 'win') !== false && stripos(PHP_OS, 'darwin') === false) { 315 // Is it some version of Windows 316 $this->set('PMA_IS_WINDOWS', true); 317 } elseif (stripos(PHP_OS, 'OS/2') !== false) { 318 // Is it OS/2 (No file permissions like Windows) 436 $userPreferences = new UserPreferences(); 437 // index.php should load these settings, so that phpmyadmin.css.php 438 // will have everything available in session cachePdosqlite.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 473 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/* 100 { 101 if (stripos($column, ' AS ') !== FALSE) 102 {comment.php http://lazycms.googlecode.com/svn/trunk/ | PHP | 358 lines
1<?php 2/** 223 // ?????? 224 if (stripos($html,'{pagelist') !== false) { 225 $html = preg_replace('/\{(pagelist)[^\}]*\/\}/isU','{$pagelist}', $html);ConnectionTest.php https://bitbucket.org/hfab/webservice.git | PHP | 451 lines
1<?php 2/** 2/** 3 * ArangoDB PHP client testsuite 4 * File: ConnectionTest.php 23class ConnectionTest extends 24 \PHPUnit_Framework_TestCase 25{ 32 try { 33 $this->collectionHandler->drop('ArangoDB_PHP_TestSuite_TestTracer'); 34 } catch (\Exception $e) { 267 if ($type === 'send') { 268 static::assertNotFalse(stripos($data, 'Connection: Close')); 269 $done = true; 292 if ($type === 'send') { 293 static::assertNotFalse(stripos($data, 'Connection: Keep-Alive')); 294 $done = true;EregToPregFixer.php git://github.com/fabpot/PHP-CS-Fixer.git | PHP | 171 lines
1<?php 2 3/* 4 * This file is part of PHP CS Fixer. 5 * 168 // just searching for "ereg" or "split" will do, since all the function names start with either of them 169 return false !== stripos($content, 'ereg') || false !== stripos($content, 'split'); 170 }Services_Format_Parsing.php git://github.com/spotweb/spotweb.git | PHP | 556 lines
1<?php 2 33 // find the element entries 34 $startElem = stripos($xmlStr, '<'.$elementName.'>'); 35 $endElem = stripos($xmlStr, '</'.$elementName.'>');VersionedOwnershipTest.php git://github.com/silverstripe/sapphire.git | PHP | 810 lines
1<?php 2 33 foreach($fixtures as $name => $id) { 34 if(stripos($name, '_published') !== false) { 35 /** @var Versioned|DataObject $object */engine.php git://github.com/moodle/moodle.git | PHP | 1484 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 124 $curlversion = curl_version(); 125 if (isset($curlversion['version']) && stripos($curlversion['version'], '7.35.') === 0) { 126 // There is a flaw with curl 7.35.0 that causes problems with client reuse.PhabricatorDaemonManagementWorkflow.php git://github.com/facebook/phabricator.git | PHP | 611 lines
1<?php 2 43 foreach ($symbols as $symbol) { 44 if (stripos($symbol, $substring) !== false) { 45 if (strtolower($symbol) == strtolower($substring)) { 238 echo pht( 239 "ERROR: The PHP extension '%s' is not installed. You must ". 240 "install it to run daemons on this machine.\n", 249 echo pht( 250 "ERROR: The PHP function %s is disabled. You must ". 251 "enable it to run daemons on this machine.\n",Fuel_assets_model.php git://github.com/daylightstudio/FUEL-CMS.git | PHP | 553 lines
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 2/** 150 (!empty($this->filters['name']) AND 151 (stripos($files[$key]['name'], $this->filters['name']) !== FALSE || stripos($key, $this->filters['name']) !== FALSE))) 152 {Filesystem.php git://github.com/fabpot/symfony.git | PHP | 740 lines
1<?php 2 38 { 39 $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://'); 40 if ($originIsLocal && !is_file($originFile)) { 46 $doCopy = true; 47 if (!$overwriteNewerFiles && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) { 48 $doCopy = filemtime($originFile) > filemtime($targetFile); 51 if ($doCopy) { 52 // https://bugs.php.net/64634 53 if (false === $source = @fopen($originFile, 'r')) { 116 { 117 $maxPathLength = PHP_MAXPATHLEN - 2; 118 274 if (is_dir($origin)) { 275 // See https://bugs.php.net/54097 & https://php.net/rename#113943 276 $this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);wizard.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 1129 lines
1<?php 2/** 11 * 12 * PHP version 5 13 * LICENSE: This source file is subject to LGPL license 212 // Get the installation directory 213 $site_domain = substr(substr($request_uri, 0, stripos($request_uri, '/installer/')) ,1); 214 303 { 304 // Create database.php 305 self::_create_database_config(); 306 307 // Modify the .htaccess and config.php 308 self::_set_base_path(); 309 310 // Modify encrypt.php and auth.php 311 self::_set_security_params();getid3.php git://github.com/wordpress/wordpress.git | PHP | 2190 lines
23} 24if (!defined('ENT_SUBSTITUTE')) { // PHP5.3 adds ENT_IGNORE, PHP5.4 adds ENT_SUBSTITUTE 25 define('ENT_SUBSTITUTE', (defined('ENT_IGNORE') ? ENT_IGNORE : 8)); 28/* 29https://www.getid3.org/phpBB3/viewtopic.php?t=2114 30If you are running into a the problem where filenames with special characters are being handled 263 if (version_compare(PHP_VERSION, $required_php_version, '<')) { 264 $this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION."\n"; 265 return; 295 // getID3 cannot run when string functions are overloaded. It doesn't matter if mail() or ereg* functions are overloaded since getID3 does not use those. 296 $this->startup_error .= 'WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", getID3 cannot run with this setting (bitmask 2 (string functions) cannot be set). Recommended to disable entirely.'."\n"; // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated 297 } 308 if (function_exists('get_magic_quotes_gpc')) { 309 if (get_magic_quotes_gpc()) { // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_gpcDeprecated 310 $this->startup_error .= 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).'."\n";script-loader.php git://github.com/wordpress/wordpress.git | PHP | 2565 lines
1<?php 2/** 19/** WordPress Dependency Class */ 20require ABSPATH . WPINC . '/class-wp-dependency.php'; 21 22/** WordPress Dependencies Class */ 23require ABSPATH . WPINC . '/class.wp-dependencies.php'; 24 25/** WordPress Scripts Class */ 26require ABSPATH . WPINC . '/class.wp-scripts.php'; 27 28/** WordPress Scripts Functions */ 29require ABSPATH . WPINC . '/functions.wp-scripts.php'; 30 31/** WordPress Styles Class */ 32require ABSPATH . WPINC . '/class.wp-styles.php'; 33pluggable.php git://github.com/wordpress/wordpress.git | PHP | 2833 lines
160 * 161 * @global PHPMailer $phpmailer 162 * 212 // (Re)create it, if it's gone missing. 213 if ( ! ( $phpmailer instanceof PHPMailer ) ) { 214 require_once ABSPATH . WPINC . '/class-phpmailer.php'; 215 require_once ABSPATH . WPINC . '/class-smtp.php'; 216 $phpmailer = new PHPMailer( true ); 217 } 481 * 482 * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference). 483 */ 483 */ 484 do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) ); 485db_tools_test.php git://github.com/phpbb/phpbb.git | PHP | 477 lines
1<?php 2/** 3* 4* This file is part of the phpBB Forum Software package. 5* 5* 6* @copyright (c) phpBB Limited <https://www.phpbb.com> 7* @license GNU General Public License, version 2 (GPL-2.0) 13 14class phpbb_dbal_db_tools_test extends phpbb_database_test_case 15{ 15{ 16 /** @var \phpbb\db\driver\driver_interface */ 17 protected $db; 17 protected $db; 18 /** @var \phpbb\db\tools\tools_interface */ 19 protected $tools;class-wp-ms-themes-list-table.php git://github.com/wordpress/wordpress.git | PHP | 797 lines
1<?php 2/** 209 210 if ( false !== stripos( $theme->get_stylesheet(), $term ) ) { 211 return true; 213 214 if ( false !== stripos( $theme->get_template(), $term ) ) { 215 return true; 349 if ( $this->is_site_themes ) { 350 $url = 'site-themes.php?id=' . $this->site_id; 351 } else { 351 } else { 352 $url = 'themes.php'; 353 } 412 <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" /> 413 <label class="screen-reader-text" for="<?php echo $checkbox_id; ?>" ><?php _e( 'Select' ); ?> <?php echo $theme->display( 'Name' ); ?></label> 414 <?phpclass-wp-filesystem-ftpext.php git://github.com/wordpress/wordpress.git | PHP | 738 lines
1<?php 2/** 36 if ( ! extension_loaded( 'ftp' ) ) { 37 $this->errors->add( 'no_ftp_ext', __( 'The ftp PHP extension is not available' ) ); 38 return; 566 if ( is_null( $is_windows ) ) { 567 $is_windows = stripos( ftp_systype( $this->link ), 'win' ) !== false; 568 }acp_database.php git://github.com/phpbb/phpbb.git | PHP | 716 lines
3* 4* This file is part of the phpBB Forum Software package. 5* 5* 6* @copyright (c) phpBB Limited <https://www.phpbb.com> 7* @license GNU General Public License, version 2 (GPL-2.0) 31 global $cache, $db, $user, $template, $table_prefix, $request; 32 global $phpbb_root_path, $phpbb_container, $phpbb_log, $table_prefix; 33 178 { 179 throw new \phpbb\exception\runtime_exception('CANNOT_OPEN_FILE'); 180 } 197 } 198 catch (\phpbb\exception\runtime_exception $e) 199 {class-wp-filesystem-base.php git://github.com/wordpress/wordpress.git | PHP | 831 lines
1<?php 2/** 177 178 if ( stripos( $this->method, 'ftp' ) !== false ) { 179 $constant_overrides = array( 200 } 201 if ( 0 === stripos( $folder, $dir ) ) { // $folder starts with $dir. 202 $potential_folder = preg_replace( '#^' . preg_quote( $dir, '#' ) . '/#i', trailingslashit( constant( $constant ) ), $folder ); 320 * 321 * From the PHP documentation page for fileperms(). 322 * 322 * 323 * @link https://www.php.net/manual/en/function.fileperms.php 324 * 390 * 391 * @link https://www.php.net/manual/en/function.chmod.php#49614 392 *functions_upload.php git://github.com/phpbb/phpbb.git | PHP | 1119 lines
5* 6* @copyright (c) phpBB Limited <https://www.phpbb.com> 7* @license GNU General Public License, version 2 (GPL-2.0) 16*/ 17if (!defined('IN_PHPBB')) 18{ 50 * The plupload object 51 * @var \phpbb\plupload\plupload 52 */ 56 * phpBB Mimetype guesser 57 * @var \phpbb\mimetype\guesser 58 */ 64 */ 65 function filespec($upload_ary, $upload_namespace, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null) 66 {form_helper.php git://github.com/ci-bonfire/Bonfire.git | PHP | 1055 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 6 * 80 81 if (stripos($attributes, 'method=') === FALSE) 82 { 85 86 if (stripos($attributes, 'accept-charset=') === FALSE) 87 { 101 // Add CSRF field if enabled, but leave it out for GET requests and requests to external websites 102 if ($CI->config->item('csrf_protection') === TRUE && strpos($action, $CI->config->base_url()) !== FALSE && ! stripos($form, 'method="get"')) 103 { 341 $extra = _attributes_to_string($extra); 342 if (stripos($extra, 'multiple') === FALSE) 343 {class.FlxMapPlugin.php https://gitlab.com/lobsterhands/OctaveHigherEast.git | PHP | 490 lines
1<?php 2/** 35 // kick off the admin handling 36 require FLXMAP_PLUGIN_ROOT . 'class.FlxMapAdmin.php'; 37 new FlxMapAdmin($this); 67 public function filterCleanURL($url) { 68 if (stripos($url, $this->urlBase . 'i18n/') !== false) { 69 return "$url' charset='utf-8";functions.php http://thinksns-2.googlecode.com/svn/trunk/ | PHP | 831 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// +---------------------------------------------------------------------- 29 $url = APP_NAME.'://'.$url; 30 if(stripos($url,'@?')) { // ??????? 31 $url = str_replace('@?','@think?',$url); 31 $url = str_replace('@?','@think?',$url); 32 }elseif(stripos($url,'@')) { // ??????? 33 $url = $url.MODULE_NAME; 266 +---------------------------------------------------------- 267 * ??????ThinkPHP?????????model?Action?? 268 * ????????????function.base.php http://marocmall.googlecode.com/svn/trunk/ | PHP | 1225 lines
1<?php 2 /** 4 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn) 5 * @link www.phpletter.com 6 * @since 22/April/2007 8 */ 9require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "config.php"); 10/** 10/** 11 * force to ensure existence of stripos 12 */ 12 */ 13if (!function_exists("stripos")) 14{ 14{ 15 function stripos($str,$needle,$offset=0) 16 {other.php http://rapidleech36b.googlecode.com/svn/trunk/ | PHP | 1757 lines
81 82function create_hosts_file($host_file = "hosts.php") { 83 global $L; 118 foreach ($ul as $user => $pass) { 119 if ($_SERVER['PHP_AUTH_USER'] == $user && $_SERVER['PHP_AUTH_PW'] == $pass) { 120 return true; 126 if ($options['login_cgi']) { 127 list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = @explode(':', base64_decode(substr((isset($_SERVER['HTTP_AUTHORIZATION']) ? $_SERVER['HTTP_AUTHORIZATION'] : $_SERVER['REDIRECT_HTTP_AUTHORIZATION']), 6)), 2); 128 } 145function is_notpresent($lpage, $mystr, $strerror, $head = 0) { 146 if (stripos($lpage, $mystr) === false) { 147 html_error($strerror, $head); 176function pause_download() { 177 global $pathWithName, $PHP_SELF, $_GET, $nn, $bytesReceived, $fs, $fp; 178 $status = connection_status();DbMysql.class.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 432 lines
1<?php 2// +---------------------------------------------------------------------- 2// +---------------------------------------------------------------------- 3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] 4// +---------------------------------------------------------------------- 4// +---------------------------------------------------------------------- 5// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved. 6// +---------------------------------------------------------------------- 10// +---------------------------------------------------------------------- 11// $Id: DbMysql.class.php 2929 2012-05-02 06:45:47Z liu21st@gmail.com $ 12 22 * @author liu21st <liu21st@gmail.com> 23 * @version $Id: DbMysql.class.php 2929 2012-05-02 06:45:47Z liu21st@gmail.com $ 24 +------------------------------------------------------------------------------ 115 public function query($str) { 116 if(0===stripos($str, 'call')){ // ???????? 117 $this->close();DipteraCentralAmericaAPI.php https://github.com/EOL/eol_php_code.git | PHP | 310 lines
1<?php 2namespace php_active_record; 116 $url = ""; 117 if(is_numeric(stripos($line, "href="))) 118 { 144 { 145 if(is_numeric(stripos($name, " sp"))) return str_ireplace(" ", "_", $name); 146 else return str_ireplace(" ", "_", Functions::canonical_form($name));common_tests.inc.php http://pixie-cms.googlecode.com/svn/trunk/ | PHP | 144 lines
1<?php if (!defined('BB2_CORE')) die('I said no cheating!'); 2 8 // Always run this test; we should never see Expect: 9 if (array_key_exists('Expect', $package['headers_mixed']) && stripos($package['headers_mixed']['Expect'], "100-continue") !== FALSE) { 10 return "a0105122"; 58 if ($settings['strict'] && array_key_exists('Range', $package['headers_mixed']) && strpos($package['headers_mixed']['Range'], "=0-") !== FALSE) { 59 if (strncmp($ua, "MovableType", 11) && strncmp($ua, "URI::Fetch", 10) && strncmp($ua, "php-openid/", 11)) { 60 return "7ad04a8a"; 79 if (array_key_exists('Via', $package['headers_mixed'])) { 80 if (stripos($package['headers_mixed']['Via'], "pinappleproxy") !== FALSE || stripos($package['headers_mixed']['Via'], "PCNETSERVER") !== FALSE || stripos($package['headers_mixed']['Via'], "Invisiware") !== FALSE) { 81 return "939a6fbb";PocketsTest.php https://github.com/vanilla/vanilla.git | PHP | 258 lines
1<?php 2/** 65 $value .= ' '.$dt->format(\DateTime::RSS); 66 } elseif (stripos($key, 'id') === strlen($key) - 2) { 67 $value++;ban_client.php https://github.com/delete66/sikevux-s-tracker.git | PHP | 357 lines
1<?php 2// ***************************************************************** 5// 6// Filename: ban_client.php 7// Parent: details.php 7// Parent: details.php 8// Requires: bittorrent.php, banned_clients.php 9// Author: Petr1fied 23// ***************************************************************** 24require_once ("include/bittorrent.php"); 25require_once("include/bbcode_functions.php"); 25require_once("include/bbcode_functions.php"); 26require_once("include/user_functions.php"); 27dbconn(false); 33// moddifed logginorreturn by retro//Remember to change the following line to match your server 34print("<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 (xxxxx) Server at ".$_SERVER['SERVER_NAME']." Port 80</address></body></html>\n"); 35die();tableExtractor.php http://openirudi.googlecode.com/svn/trunk/ | PHP | 383 lines
1<?php 2 5 =============== 6 Table extractor is a php class that can extract almost any table 7 from any html document/page, and then convert that html table into 7 from any html document/page, and then convert that html table into 8 a php array. 9 10 Version 1.3 11 Compatibility: PHP 4.4.1 + 12 Copyright Jack Sleight - www.reallyshiny.com 53 54 // php 4 compatibility functions 55 if(!function_exists('stripos')) { 55 if(!function_exists('stripos')) { 56 function stripos($haystack,$needle,$offset = 0) { 57 return(strpos(strtolower($haystack),strtolower($needle),$offset));framework_helpers.php http://personal-home-page-framework.googlecode.com/svn/trunk/ | PHP | 403 lines
8 else { 9 require(CONTROLLERS_PATH . "$class_name.php"); 10 } 12 13function php_fw_exception_handler($e) { 14 echo $e->getMessage(); 133 /* User-generated error message. 134 * This is like an E_ERROR, except it is generated in PHP code by 135 * using the PHP function trigger_error(). 141 /* User-generated warning message. 142 * This is like an E_WARNING, except it is generated in PHP code by 143 * using the PHP function trigger_error(). 180 /* User-generated warning message. This is like an E_DEPRECATED, except it 181 * is generated in PHP code by using the PHP function trigger_error(). 182 */Quicky_compiler.class.php http://quicky.googlecode.com/svn/trunk/ | PHP | 1016 lines
1<?php 2/**************************************************************************/ 7/* 8/* Quicky_compiler.class.php: Template compiler 9/**************************************************************************/ 23 public $template_defined_functions = array(); 24 public $allowed_php_tokens = array('array','date','strtotime','isset','empty','is_empty','count', 'sizeof', 'shuffle', 25 'is_array','is_int','is_float','is_long','is_numeric','is_object', 258 } 259 if (!isset($this->prefs['allow_php_native']) or !$this->prefs['allow_php_native']) 260 { 260 { 261 $source = preg_replace('~<\?(?:php)?|\?>~i','<?php echo \'$0\'; ?>',$source); 262 } 308 $this->template_from = $old_template_from; 309 $source = preg_replace('~^(<\?php.*?)\?><\?php~si','$1',$header.$source.$footer); 310 return $source;search.php http://collectgame.googlecode.com/svn/trunk/ | PHP | 506 lines
323 <!-- <span id="mianbaoxie" class="list_centtopspan">?????<a href="?">??</a>=><a href="<?php //echo $selfPageLink ;?>">????</a></span> --> 324 <span id="soso_result" class="list_centtopspan"> ??<?php echo $res['total_found']; ?></>????? ????:"<?php echo $res['time']?>" </span> 325 <!-- ???????? --> 351 <span class="list_img" style="text-align: center;"><a href="<?php echo $postLink; ?>"> 352 <img id="<?php echo $delayImgId;?>" src="<?php echo $loadUrl ?>" width="50" height="50" style="padding-top:12px;" onerror="this.src='<?php echo $siteurl?>/images/onerror.jpg'" alt="<?php echo $titleHtml; ?>" title="<?php echo $titleHtml; ?>" /> 353 </a></span> 353 </a></span> 354 <h3 class="list_title"><a href="<?php echo $postLink; ?>"><?php echo $titleHtml;//$mypost->post_title; ?></a></h3> 355 <span class="list_cat"> 405 ?> 406 <a href="<?php echo $pagedLink."&paged=".(intval($paged)-1); ?>" ><img src="<?php echo $siteurl ?>/images/next-top.gif" alt="???" title="???" class="f_l"/></a> 407 <?php 475 ?> 476 <a href="<?php echo $pagedLink."&paged=".($indexPage[$index]-1); ?>" class="linkstyle03"><?php echo $indexPage[$index];?></a> 477 <?phpCDbCommandBuilder.php http://chenjin.googlecode.com/svn/trunk/ | PHP | 735 lines
1<?php 2/** 17 * @author Qiang Xue <qiang.xue@gmail.com> 18 * @version $Id: CDbCommandBuilder.php 242 2012-03-29 15:18:01Z mole1230 $ 19 * @package system.db.schema 132 { 133 if(is_string($criteria->select) && stripos($criteria->select,'count')===0) 134 $sql="SELECT ".$criteria->select;functions_install.php git://github.com/phpbb/phpbb.git | PHP | 546 lines
203{ 204 global $phpbb_root_path, $phpEx, $config, $lang; 205 212 // Check that we actually have a database name before going any further..... 213 if ($dbms_details['DRIVER'] != 'phpbb\db\driver\sqlite' && $dbms_details['DRIVER'] != 'phpbb\db\driver\sqlite3' && $dbms_details['DRIVER'] != 'phpbb\db\driver\oracle' && $dbname === '') 214 { 219 // Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea 220 if (($dbms_details['DRIVER'] == 'phpbb\db\driver\sqlite' || $dbms_details['DRIVER'] == 'phpbb\db\driver\sqlite3') && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0) 221 { 535*/ 536function phpbb_check_installation_exists($phpbb_root_path, $php_ext) 537{ 540 { 541 include($phpbb_root_path . 'config.' . $php_ext); 542 }textwheel.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 618 lines
1<?php 2 8 * This library of code is meant to be a fast and universal replacement 9 * for any and all text-processing systems written in PHP 10 * 24 25require_once dirname(__FILE__) . "/textwheelruleset.php"; 26 62 ## apply each in order 63 foreach ($rules as $name => $rule) #php4+php5 64 { 66 } 67 #foreach ($this->rules as &$rule) #smarter &reference, but php5 only 68 # $this->apply($rule, $t); 489 ## apply each in order 490 foreach ($rules as $name => $rule) #php4+php5 491 {porte_plume_fonctions.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 988 lines
1<?php 2/** 172 'display', 173 // donner un identifiant unique au bouton (pour le php) 174 'id', 212 // si markupset, on boucle sur les items 213 if (stripos($nom, 'markupSet') !== false) { 214 foreach ($params as $i => $v) {BasesController.php https://bitbucket.org/hfab/webservice.git | PHP | 665 lines
1<?php 2 65 66 if((strlen(\Input::get('header_html')) > 0 or strlen(\Input::get('header_html')) > 0) and (stripos(\Input::get('footer_html'),'[unsubscribelink]') === false)) { 67 return view('base.create_new') 162 163 if(stripos(\Input::get('header_html'),'[unsubscribelink]') === false and stripos(\Input::get('footer_html'),'[unsubscribelink]') === false) { 164 $message = 'La variable [unsubscribelink] du lien de désinscription est manquante.';CalendarDataController.php git://github.com/modolabs/Kurogo-Mobile-Web.git | PHP | 194 lines
1<?php 2/** 183 if ($this->contentFilter) { 184 if ( (stripos($occurrence->get_description(), $this->contentFilter)!==FALSE) || (stripos($occurrence->get_summary(), $this->contentFilter)!==FALSE)) { 185 $events[] = $occurrence;File.php git://github.com/zyxist/Trinity.git | PHP | 253 lines
1<?php 2/* 225 } 226 if(stripos($this->_discoveryData, '/'.$area['path']) === 0) 227 {translations.php https://github.com/wpms/wp-sqlsrv.git | PHP | 1537 lines
1<?php 2require_once(dirname(__FILE__) . '/fields_map.php'); 3 148 * 149 * PHP5 style constructor for compatibility with PHP5. 150 * 274 // SQL_MODE NO EQUIV 275 if ( stripos($query, "SHOW VARIABLES LIKE 'sql_mode'" ) === 0) { 276 $query = ''; 343 // the field_mapping to revert column types back to their mysql equiv to fool WP. 344 if ( stripos($query, 'DESCRIBE ') === 0 ) { 345 return $query; 350 // DROP TABLES 351 if ( stripos($query, 'DROP TABLE IF EXISTS ') === 0 ) { 352 $table = substr($query, 21, strlen($query) - 21);translations.php https://github.com/wpms/wp-sqlsrv.git | PHP | 1537 lines
1<?php 2require_once(dirname(__FILE__) . '/fields_map.php'); 3 148 * 149 * PHP5 style constructor for compatibility with PHP5. 150 * 181 182 if ( stripos($query, 'DELETE') === 0 ) { 183 $this->delete_query = true; 296 // SHOW COLUMNS 297 if ( stripos($query, 'SHOW COLUMNS FROM ') === 0 ) { 298 $end_pos = strlen($query); 318 // USE INDEX 319 if ( stripos($query, 'USE INDEX (') !== FALSE) { 320 $start_pos = stripos($query, 'USE INDEX (');nggSmooth.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 487 lines
1<?php 2/* 30// Restrictions 31 if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } 32 32 33include "nggSmoothSharedFunctions.php"; 34 45 function nggSmoothFindStringBetween($text, $begin, $end) { 46 if ( ($posBegin = stripos($text, $begin )) === false) return Array($text, ""); 47 if ( ($posEnd = stripos($text, $end, $posBegin)) === false) return Array($text, ""); 97 98 $frame_url = "/wp-content/plugins/". plugin_basename( dirname(__FILE__)) ."/nggSmoothFrame.php?galleryID=".$info["galleryID"]."&width=".$info["width"]."&height=".$info["height"]."&timed=".$info["timed"]."&showArrows=".$info["showArrows"]."&showCarousel=".$info["showCarousel"]."&embedLinks=".$info["embedLinks"]."&delay=".$info["delay"]."&defaultTransition=".$info["defaultTransition"]."&showInfopane=".$info["showInfopane"]."&textShowCarousel=".$info["textShowCarousel"]."&showCarouselOpen=".$info["showCarouselOpen"]."&margin=&align="; // margin and align goes to the IFrame 99 117 <li>Smooth with Wordpress Gallery </li> 118 <li>Smooth with PHP array </li> 119 <li>Thumbnail Generator </li>adodb-ado5.inc.php http://tinkerportal.googlecode.com/svn/trunk/ | PHP | 716 lines
1<?php 2/* 10 11 Microsoft ADO data driver. Requires ADO. Works only on MS Windows. PHP5 compat version. 12*/ 52 { 53 if (PHP_VERSION >= 5) return $this->_affectedRows; 54 72 if ($argDBorProvider) $argProvider = $argDBorProvider; 73 else if (stripos($argHostname,'PROVIDER') === false) /* full conn string is not in $argHostname */ 74 $argProvider = 'MSDASQL'; 112 if ($this->debug) ADOConnection::outp( "Host=".$argHostname."<BR>\n version=$dbc->version"); 113 // @ added below for php 4.0.1 and earlier 114 @$dbc->Open((string) $argHostname); 230 { 231 try { // In PHP5, all COM errors are exceptions, so to maintain old behaviour... 232sfCoreAutoload.class.php http://cachoncr.googlecode.com/svn/trunk/ | PHP | 522 lines
1<?php 2 18 * 19 * This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances 20 * of the same class (why?). 24 * @author Fabien Potencier <fabien.potencier@symfony-project.com> 25 * @version SVN: $Id: sfCoreAutoload.class.php 32415 2011-03-30 16:09:00Z Kris.Wallsmith 26 $ 162 $file = str_replace(DIRECTORY_SEPARATOR, '/', $file); 163 $class = basename($file, false === strpos($file, '.class.php') ? '.php' : '.class.php'); 164 165 $contents = file_get_contents($file); 166 if (false !== stripos($contents, 'class '.$class) || false !== stripos($contents, 'interface '.$class)) 167 { 304 'sfi18nmoduleextract' => 'i18n/extract/sfI18nModuleExtract.class.php', 305 'sfi18nphpextractor' => 'i18n/extract/sfI18nPhpExtractor.class.php', 306 'sfi18nyamlextractor' => 'i18n/extract/sfI18nYamlExtractor.class.php',ServiceController.php https://code.google.com/p/ontowiki/ | PHP | 1197 lines
1<?php 2/** 5 * @copyright Copyright (c) 2011, {@link http://aksw.org AKSW} 6 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL) 7 */ 89 foreach ($namespacesFlipped as $prefix => $uri) { 90 if (stripos($prefix, $match) === 0) { 91 $nsFilter[] = 'FILTER (regex(str(?' . $type . '), "' . $uri . '"))'; 100 ?s ?p ?o. 101 ' . implode(PHP_EOL, $nsFilter) . ' 102 }'SilvercartShoppingCart.php https://bitbucket.org/silvercart/silvercart/ | PHP | 1898 lines
1<?php 2/** 181 if (array_key_exists('url', $_REQUEST)) { 182 if (stripos($_REQUEST['url'], '/dev/build') !== false) { 183 return;object.php http://webprojecthelper.googlecode.com/svn/trunk/ | PHP | 509 lines
1<?php 2 43 // Check if name is valid 44 if (!PHP::valid_name($name)) { throw new Exception('The name <b>'.$name.'</b> for an object is not permitted'); } 45 394 public function hasOption($option) { 395 return $this->options != null && stripos($this->options,$option) !== false; 396 }functions.php https://bitbucket.org/mikestivala/vinciarchitects.git | PHP | 6143 lines
93 if(stripos( $post_content, 'nectar_portfolio') !== FALSE || stripos( $portfolio_extra_content, 'nectar_portfolio') !== FALSE || 94 stripos( $post_content, 'nectar_blog') !== FALSE || stripos( $portfolio_extra_content, 'nectar_blog') !== FALSE || 95 stripos( $post_content, 'vc_gallery type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'vc_gallery type="image_grid"') !== FALSE || 95 stripos( $post_content, 'vc_gallery type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'vc_gallery type="image_grid"') !== FALSE || 96 stripos( $post_content, "vc_gallery type='image_grid'") !== FALSE || stripos( $portfolio_extra_content, "vc_gallery type='image_grid'") !== FALSE || 97 stripos( $post_content, 'type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'type="image_grid"') !== FALSE || 97 stripos( $post_content, 'type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'type="image_grid"') !== FALSE || 98 stripos( $post_content, "type='image_grid'") !== FALSE || stripos( $portfolio_extra_content, "type='image_grid'") !== FALSE || 99 is_page_template('template-portfolio.php') || is_archive() || is_home() || is_search()) { 137 stripos( $post_content, 'gallery_style="5"') !== FALSE || stripos( $portfolio_extra_content, 'gallery_style="5"') !== FALSE || 138 stripos( $post_content, "project_style='3'") !== FALSE || stripos( $portfolio_extra_content, "project_style='3'") !== FALSE || 139 stripos( $post_content, "project_style='5'") !== FALSE || stripos( $portfolio_extra_content, "project_style='5'") !== FALSE || 241 || stripos($post_content, 'script="flickity"') !== FALSE || stripos( $portfolio_extra_content, 'script="flickity"') !== FALSE 242 || stripos($post_content, 'style="multiple_visible_minimal"') !== FALSE || stripos( $portfolio_extra_content, 'style="multiple_visible_minimal"') !== FALSE 243 || stripos($post_content, 'style="slider"') !== FALSE || stripos( $portfolio_extra_content, 'style="slider"') !== FALSE) {Filesystem.php https://bitbucket.org/tippycracker/autokraitis.git | PHP | 644 lines
1<?php 2 39 { 40 $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://'); 41 if ($originIsLocal && !is_file($originFile)) { 47 $doCopy = true; 48 if (!$overwriteNewerFiles && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) { 49 $doCopy = filemtime($originFile) > filemtime($targetFile); 52 if ($doCopy) { 53 // https://bugs.php.net/bug.php?id=64634 54 if (false === $source = @fopen($originFile, 'r')) { 119 { 120 $maxPathLength = PHP_MAXPATHLEN - 2; 121 284 if (is_dir($origin)) { 285 // See https://bugs.php.net/bug.php?id=54097 & http://php.net/manual/en/function.rename.php#113943 286 $this->mirror($origin, $target, null, array('override' => $overwrite, 'delete' => $overwrite));Crawler.php https://bitbucket.org/tippycracker/autokraitis.git | PHP | 1204 lines
1<?php 2 120 $charset = null; 121 if (false !== $pos = stripos($type, 'charset=')) { 122 $charset = substr($type, $pos + 8);LanguageTranslator.php https://bitbucket.org/thomas1151/mats.git | PHP | 651 lines
1<?php namespace ProcessWire; 2 150 * 151 * This is accomplished with PHP's ReflectionClass to determine the file where the class lives 152 * and then convert that to a textdomain string. Once determined, we cache it so that we 227 // convert FileCompiler paths 228 $pos = stripos($filename, '/cache/FileCompiler/'); 229 if($pos) $filename = substr($filename, $pos+20);WireUpload.php https://bitbucket.org/thomas1151/mats.git | PHP | 788 lines
1<?php namespace ProcessWire; 2 109 */ 110 protected $badExtensions = array('php', 'php3', 'phtml', 'exe', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh'); 111 136 /** 137 * Predefined error message strings indexed by PHP UPLOAD_ERR_* defines 138 * 153 UPLOAD_ERR_OK => $this->_('Successful Upload'), 154 UPLOAD_ERR_INI_SIZE => $this->_('The uploaded file exceeds the upload_max_filesize directive in php.ini.'), 155 UPLOAD_ERR_FORM_SIZE => $this->_('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.'), 199 200 $f = $this->getPhpFiles(); 201 if(!$f) return $files; 254 255 if(!$dir && stripos(PHP_OS, 'WIN') === 0) { 256 $dir = $config->paths->cache . 'uploads/';WireMarkupRegions.php https://bitbucket.org/thomas1151/mats.git | PHP | 1556 lines
1<?php namespace ProcessWire; 2 132 foreach($tests as $str) { 133 $pos = stripos($markup, $str, $startPos); 134 if($pos === false) continue;Selectors.php https://bitbucket.org/thomas1151/mats.git | PHP | 1277 lines
1<?php namespace ProcessWire; 2 2 3require_once(PROCESSWIRE_CORE_PATH . "Selector.php"); 4 189 * Static since there may be multiple instances of this Selectors class at runtime. 190 * See Selector.php 191 * 246 247 if(stripos($letters, $c) !== false) { 248 // if a letter appears as the character before operator, then we're good 257 $c = $str[--$n]; 258 if(stripos($letters, $c) !== false) { 259 // if found a letter, then we've got something validMarkupQA.php https://bitbucket.org/thomas1151/mats.git | PHP | 723 lines
1<?php namespace ProcessWire; 2 141 // see if quick exit possible 142 if(stripos($value, 'href=') === false && stripos($value, 'src=') === false) return; 143 295 // scheme and hostname present 296 /** @noinspection PhpUnusedLocalVariableInspection */ 297 list($x, $host) = explode('//', $href);Client.php https://bitbucket.org/kowalski08051/novaposhta.git | PHP | 891 lines
1<?php 2 325 foreach ($warehouses['data'] as $warehouse) { 326 if (mb_stripos($warehouse['Description'], $description) !== FALSE 327 OR mb_stripos($warehouse['DescriptionRu'], $description) !== FALSE) { 378 $found = $findByString 379 ? ((mb_stripos($area['Description'], $findByString) !== FALSE) 380 OR (mb_stripos($area['DescriptionRu'], $findByString) !== FALSE) 380 OR (mb_stripos($area['DescriptionRu'], $findByString) !== FALSE) 381 OR (mb_stripos($area['Area'], $findByString) !== FALSE) 382 OR (mb_stripos($area['AreaRu'], $findByString) !== FALSE)) 401 // Load areas list from file 402 empty($this->_areas) AND $this->_areas = include dirname(__FILE__).'/Goodahead_Novaposhta_Model_Api_ClientAreas.php'; 403 $data = $this->findArea($this->_areas, $findByString, $ref);CPSControllerCommand.php http://ps-yii-extensions.googlecode.com/svn/trunk/ | PHP | 327 lines
1<?php 2/** 52 $this->controllerBaseClass = 'CPSController'; 53 $this->controllerTemplateName = 'controller.php'; 54 109 { 110 $_arList[ $_sAction . '.php' ] = array( 111 'source' => $this->templatePath . DIRECTORY_SEPARATOR . $this->viewTemplateName, 111 'source' => $this->templatePath . DIRECTORY_SEPARATOR . $this->viewTemplateName, 112 'target' => $_sViewPath . DIRECTORY_SEPARATOR . $_sAction . '.php', 113 'callback' => array( $this, 'generateAction' ), 116 117 $_sClasses .= $this->boldEchoString( '(' . $_sViewPath . DIRECTORY_SEPARATOR . $_sAction . '.php' . ')', $_sAction, true ); 118 } 175 176 if ( false !== stripos( $oColumn->dbType, 'text' ) ) 177 return "PS::field( PS::TEXTAREA, \$model, '{$oColumn->name}', array( 'rows' => 6, 'cols' => 50 ) )";Parser.php git://github.com/jyxo/php.git | PHP | 1354 lines
1<?php declare(strict_types = 1); 2 3/** 4 * Jyxo PHP Library 5 * 10 * It is also available through the world-wide-web at this URL: 11 * https://github.com/jyxo/php/blob/master/license.txt 12 */ 42use function str_replace; 43use function stripos; 44use function strlen; 75 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o. 76 * @license https://github.com/jyxo/php/blob/master/license.txt 77 * @author Jaroslav HanslÃkHtml.php git://github.com/jyxo/php.git | PHP | 796 lines
1<?php declare(strict_types = 1); 2 3/** 4 * Jyxo PHP Library 5 * 10 * It is also available through the world-wide-web at this URL: 11 * https://github.com/jyxo/php/blob/master/license.txt 12 */ 34use function strip_tags; 35use function stripos; 36use function strlen; 48 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o. 49 * @license https://github.com/jyxo/php/blob/master/license.txt 50 * @author Jaroslav HanslÃk 78 * Fixes an invalid HTML source, unifies quotes and removes unnecessary whitespace. 79 * Required the Tidy PHP extension. 80 *jymengine.class.php git://github.com/yahoo/messenger-sdk-php.git | PHP | 522 lines
1<?php 2 74 75 if (stripos($rs, 'RequestToken') === false) return false; 76 $request_token = trim(str_replace('RequestToken=', '', $rs)); 94 95 if (stripos($rs, 'oauth_token') === false) 96 { 129 130 if (stripos($rs, 'crumb') === false) return false; 131 163 164 if (stripos($body, 'sessionId') === false) return false; 165 255 256 if (stripos($rs, 'contact') === false) return false; 257common.php http://tastemakers.googlecode.com/svn/trunk/ | PHP | 450 lines
1<?php 2 79 * encodes clean string to be put in url (ex: 'test & string' becomes 'test+string') 80 * regex from http://stackoverflow.com/questions/4973089/cleaning-text-scraped-from-webpage-with-php-regex 81 */ 93/* case insensitive explode 94 * from: http://theserverpages.com/php/manual/en/function.explode.php#37563 95 */ 98 for ($i = 0; ; $i++) { 99 if (($pos = stripos($string, $separator)) === false || ($limit !== false && $i > $limit - 2)) { 100 $result[$i] = $string; 183 // assumes format [name]: A Q&A 184 // only works in php 5.3.0+ 185 if (stristr($interview_title, 'a q&a', true)) { 197 // assumes format [name]: A Q&A - uses "a q" of "a q&a" to avoid ampersand issue 198 // only works in php 5.3.0+ 199 if (stristr($interview_title, 'a q', true)) {pts_strings.php git://pkgs.fedoraproject.org/phoronix-test-suite | PHP | 654 lines
1<?php 2 22 23// TODO XXX: some of these functions may be better optimized using the ctype functions: http://us.php.net/manual/en/ref.ctype.php 24 81 82 if(($w = stripos($value, 'WARNING')) !== false) 83 { 193 { 194 if(stripos($string, $string_to_check) !== false) 195 { 362 363 if(($w = stripos($str, 'WARNING')) !== false) 364 { 380 381 $log = explode(PHP_EOL, $log); 382 foreach($log as &$line)other.php http://rapidleech.googlecode.com/svn/trunk/ | PHP | 579 lines
34 foreach ($ul as $user => $pass) { 35 if ($_SERVER['PHP_AUTH_USER'] == $user && $_SERVER['PHP_AUTH_PW'] == $pass) return true; 36 } 39 if ($options['login_cgi']) { 40 list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = @explode(':', base64_decode(substr((isset($_SERVER['HTTP_AUTHORIZATION']) ? $_SERVER['HTTP_AUTHORIZATION'] : $_SERVER['REDIRECT_HTTP_AUTHORIZATION']), 6)), 2); 41 } 169 //if ($head == 1) 170 if (!headers_sent()) include(TEMPLATE_DIR.'header.php'); 171 echo '<div align="center">'; 375 //see http://bugs.php.net/bug.php?id=27609 376 //see http://bugs.php.net/bug.php?id=30931 377 421 if (!is_array($lang)) $lang = array(); 422 if (basename($options['default_language']) != 'en' && file_exists('languages/en.php')) require_once('languages/en.php'); 423 require_once('languages/'.basename($options['default_language']).'.php');putlocker_com.php http://rapidleech.googlecode.com/svn/trunk/ | PHP | 302 lines
82 $fname = str_replace(str_split('\\:*?"<>|=;'."\t\r\n"), '', $title); 83 } else $fname = urldecode(basename(parse_url($dlink[1], PHP_URL_PATH))); 84 } 153 $fname = str_replace(str_split('\\:*?"<>|=;'."\t\r\n"), '', $title); 154 } else $fname = urldecode(basename(parse_url($dlink[1], PHP_URL_PATH))); 155 } 155 } 156 if (stripos($DL[0], '&mobile=1')) { // Add a -[M] and correct the fileext on mobile videos. 157 if (strrpos($fname, '.') !== false) $fname = substr($fname, 0, strrpos($fname, '.')); 187 188 $page = $this->GetPage($purl.'authenticate.php?login', $this->cookie, $post, $purl.'authenticate.php?login'); 189 $this->cookie = GetCookiesArr($page, $this->cookie); 190 191 if (stripos($page, "\r\nLocation: ") !== false && preg_match('@Location: ((https?://[^/\r\n]+)?/authenticate\.php[^\r\n]*)@i', $page, $redir)) { 192 $redir = (empty($redir[2])) ? 'http://www.putlocker.com'.$redir[1] : $redir[1];Filter.class.php http://plant.googlecode.com/svn/trunk/ | PHP | 544 lines
1<?php 2 3 /** 4 * Filter.class.php 5 * 102 // Check for syntax 103 if (!stripos($argument, "=")) throw new Exception("Arguments must be in the form of 'arg1=val1,arg2=val2'!"); 104grapheme_string.c git://github.com/infusion/PHP.git | C | 920 lines
8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 169 170/* {{{ proto int grapheme_stripos(string haystack, string needle [, int offset ]) 171 Find position of first occurrence of a string within another, ignoring case differences */ 171 Find position of first occurrence of a string within another, ignoring case differences */ 172PHP_FUNCTION(grapheme_stripos) 173{ 184 intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, 185 "grapheme_stripos: unable to parse input param", 0 TSRMLS_CC ); 186php_intl.c git://github.com/infusion/PHP.git | C | 664 lines
2 +----------------------------------------------------------------------+ 3 | PHP Version 5 | 4 +----------------------------------------------------------------------+ 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 463 PHP_FE( grapheme_strpos, grapheme_search_args ) 464 PHP_FE( grapheme_stripos, grapheme_search_args ) 465 PHP_FEsearch.php https://code.google.com/p/osclass/ | PHP | 343 lines
24 <head> 25 <?php osc_current_web_theme_path('head.php') ; ?> 26 <?php if( osc_count_items() == 0 || Params::getParam('iPage') > 0 || stripos($_SERVER['REQUEST_URI'], 'search') ) { ?> 184 <body> 185 <?php osc_current_web_theme_path('header.php') ; ?> 186 <div class="content list"> 202 <?php } else { ?> 203 <a href="<?php echo osc_update_search_url($params) ; ?>"><?php echo $label; ?></a> 204 <?php } ?> 215 <?php } else { ?> 216 <?php require(osc_search_show_as() == 'list' ? 'search_list.php' : 'search_gallery.php') ; ?> 217 <?php } ?> 225 <?php if($f['total'] < 3) continue; ?> 226 <li><a href="<?php echo osc_footer_link_url(); ?>"><?php echo osc_footer_link_title(); ?></a></li> 227 <?php } ?>search.php https://code.google.com/p/osclass/ | PHP | 442 lines
1<?php if ( ! defined('ABS_PATH')) exit('ABS_PATH is not loaded. Direct access is not allowed.'); 2 32 $this->nice_url = false; 33 if( !stripos($_SERVER['REQUEST_URI'], 'search') && osc_rewrite_enabled() ) { 34 $this->nice_url = true;lib_misc.php http://pixie-cms.googlecode.com/svn/trunk/ | PHP | 910 lines
1<?php 2if (!defined('DIRECT_ACCESS')) { 48 /** 49 * Re-implementation of PHP 5's stripos() 50 * 50 * 51 * Borrowed from simplepie for php4 (admin/lib/lib_simplepie.php) 52 * 64 * relative to the beginning of haystack. 65 * @return bool If needle is not found, stripos() will return boolean false. 66 */ 66 */ 67if (!function_exists('stripos')) { 68 function stripos($haystack, $needle, $offset = 0) { 237 238/* A workaround for old versions of php */ 239// ------------------------------------------------------------------lib_core.php http://pixie-cms.googlecode.com/svn/trunk/ | PHP | 1183 lines
1<?php 2if (!defined('DIRECT_ACCESS')) { 46 function adjust_prefix($table) { 47 if (stripos($table, PFX) === 0) 48 return $table; 268 if ($GLOBALS['rich_text_editor'] == 1) { 269 $containsphp = strlen(stristr(utf8_decode(($Fild[$j])), '<?php')) > 0; 270 if ($containsphp) { 270 if ($containsphp) { 271 $form_help .= " <span class=\"alert\">" . $lang['form_php_warning'] . '</span>'; 272 } 293 if ($GLOBALS['rich_text_editor'] == 1) { 294 if (!$containsphp) { 295 echo "\t\t\t\t\t\t\t\t<div class=\"form_item_textarea_ckeditor\">\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"$Nams[$j]\" id=\"$Nams[$j]\" cols=\"50\" class=\"ck-textarea\" rows=\"10\">" . htmlentities($Fild[$j], ENT_QUOTES, 'UTF-8') . "</textarea>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n"; // id=\"$Nams[$j]\"PlayerManager.php https://code.google.com/p/php-blackops-rcon/ | PHP | 790 lines
1<?php defined('ROOT_PATH') or die('No direct script access.'); 2 27 * @subpackage game 28 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 29 */ 142 } 143 elseif (stripos($p->name, $rule) !== FALSE) 144 { 164 // Match 165 if ($p['name'] == $rule OR stripos($p['name'], $rule) !== FALSE) 166 {Commands.php https://code.google.com/p/php-blackops-rcon/ | PHP | 710 lines
1<?php defined('ROOT_PATH') or die('No direct script access.'); 2 25 * @subpackage game 26 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 27 */ 103 // Check 104 if (stripos($text, $bad) !== FALSE) 105 {loader.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | PHP | 1039 lines
1<?php 2 151 152 $cls = new BPM_mediaModule_install_base( $slug=self::getSlug(), $name=self::getName(), $php_class=get_class($this) ); 153 340 341 $os_string = PHP_OS; 342 342 343 if( stripos($os_string,"DARWIN") !== false){ 344 $os_platform = "mac"; 345 } 346 elseif( stripos($os_string, "WIN") !== false){ 347 $os_platform = "windows"; 365 366 $os_bits = (int)(PHP_INT_SIZE * 8); 367map.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 518 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 124 // Hack on XYZ / Esri Attribution layer here since XYZ doesn't support images in attribution 125 if (stripos($default_map,'esri_') !== FALSE AND $all == FALSE) 126 {ExportPlugin.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 378 lines
1<?php 2/** 7 8namespace PhpMyAdmin\Plugins; 9 9 10use PhpMyAdmin\Export; 11use PhpMyAdmin\Properties\Plugins\ExportPluginProperties; 11use PhpMyAdmin\Properties\Plugins\ExportPluginProperties; 12use PhpMyAdmin\Properties\Plugins\PluginPropertyItem; 13use PhpMyAdmin\Relation; 13use PhpMyAdmin\Relation; 14use PhpMyAdmin\Transformations; 15 15 16use function stripos; 17Gallery1DataParser.php git://github.com/gallery/gallery3-contrib.git | PHP | 419 lines
1<?php 2/* 73 /* 74 * We renamed User.php to Gallery_User.php in v1.2, so port forward 75 * any saved user objects. 76 */ 77 if (stripos($tmp, 'O:4:"user"')!==false) { 78 $tmp = str_ireplace('O:4:"user"', 'O:12:"gallery_user"', $tmp); 84 */ 85 if (stripos($tmp, 'O:5:"image"')!==false) { 86 $tmp = str_ireplace('O:5:"image"', 'O:5:"G1Img"', $tmp);MarkupQA.php git://github.com/ryancramerdesign/ProcessWire.git | PHP | 270 lines
1<?php 2 75 // see if quick exit possible 76 if(stripos($value, 'href=') === false && stripos($value, 'src=') === false) return; 77MailReceiver.php https://code.google.com/p/celebrio/ | PHP | 434 lines
1<?php 2/** 60 foreach($list as $row){ 61 if(stripos($row,"Sent",$offset))$folders["Sent"] = \substr($row,\strpos($row,"}",$offset-1)+1,\strlen($row)); 62 elseif(stripos($row,"Draft",$offset))$folders["Drafts"] = \substr($row,\strpos($row,"}",$offset-1)+1,\strlen($row)); 62 elseif(stripos($row,"Draft",$offset))$folders["Drafts"] = \substr($row,\strpos($row,"}",$offset-1)+1,\strlen($row)); 63 elseif(stripos($row,"Trash",$offset)||stripos($row,"Deleted",$offset))$folders["Trash"] = \substr($row,\strpos($row,"}",$offset-1)+1,\strlen($row)); 64 elseif(stripos($row,"Spam",$offset)||stripos($row,"Junk",$offset))$folders["Spam"] = \substr($row,\strpos($row,"}",$offset-1)+1,\strlen($row));~runtime.php http://nblog-thinkphp.googlecode.com/svn/trunk/ | PHP | 2 lines
1<?php 2 if (!defined('THINK_PATH')) exit(); if(version_compare(PHP_VERSION,'6.0.0','<') ) { @set_magic_quotes_runtime (0); define('MAGIC_QUOTES_GPC',get_magic_quotes_gpc()?True:False); } define('MEMORY_LIMIT_ON',function_exists('memory_get_usage')); define('IS_CGI',substr(PHP_SAPI, 0,3)=='cgi' ? 1 : 0 ); define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 ); define('IS_CLI',PHP_SAPI=='cli'? 1 : 0); if(!IS_CLI) { if(!defined('_PHP_FILE_')) { if(IS_CGI) { $_temp = explode('.php',$_SERVER["PHP_SELF"]); define('_PHP_FILE_', rtrim(str_replace($_SERVER["HTTP_HOST"],'',$_temp[0].'.php'),'/')); }else { define('_PHP_FILE_', rtrim($_SERVER["SCRIPT_NAME"],'/')); } } if(!defined('__ROOT__')) { if( strtoupper(APP_NAME) == strtoupper(basename(dirname(_PHP_FILE_))) ) { $_root = dirname(dirname(_PHP_FILE_)); }else { $_root = dirname(_PHP_FILE_); } define('__ROOT__', (($_root=='/' || $_root=='\\')?'':$_root)); } define('URL_COMMON', 0); define('URL_PATHINFO', 1); define('URL_REWRITE', 2); define('URL_COMPAT', 3); } define('THINK_VERSION', '2.1'); if(MEMORY_LIMIT_ON) { $GLOBALS['_startUseMems'] = memory_get_usage(); } define('CACHE_DIR', 'Cache'); define('HTML_DIR', 'Html'); define('CONF_DIR', 'Conf'); define('LIB_DIR', 'Lib'); define('LOG_DIR', 'Logs'); define('LANG_DIR', 'Lang'); define('TEMP_DIR', 'Temp'); define('TMPL_DIR', 'Tpl'); define('TMPL_PATH',APP_PATH.'/'.TMPL_DIR.'/'); define('HTML_PATH',APP_PATH.'/'.HTML_DIR.'/'); define('COMMON_PATH', APP_PATH.'/Common/'); define('LIB_PATH', APP_PATH.'/'.LIB_DIR.'/'); define('CACHE_PATH', RUNTIME_PATH.CACHE_DIR.'/'); define('CONFIG_PATH', APP_PATH.'/'.CONF_DIR.'/'); define('LOG_PATH', RUNTIME_PATH.LOG_DIR.'/'); define('LANG_PATH', APP_PATH.'/'.LANG_DIR.'/'); define('TEMP_PATH', RUNTIME_PATH.TEMP_DIR.'/'); define('DATA_PATH', RUNTIME_PATH.'Data/'); define('VENDOR_PATH',THINK_PATH.'/Vendor/'); set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH); function N($key, $step=0) { static $_num = array(); if (!isset($_num[$key])) { $_num[$key] = 0; } if (empty($step)) return $_num[$key]; else $_num[$key] = $_num[$key] + (int) $step; } function U($url, $params=array(), $redirect=false, $suffix=true) { if (0 === strpos($url, '/')) $url = substr($url, 1); if (!strpos($url, '://')) $url = APP_NAME . '://' . $url; if (stripos($url, '@?')) { $url = str_replace('@?', '@think?', $url); } elseif (stripos($url, '@')) { $url = $url . MODULE_NAME; } $array = parse_url($url); $app = isset($array['scheme']) ? $array['scheme'] : APP_NAME; $route = isset($array['user']) ? $array['user'] : ''; if (defined('GROUP_NAME') && strcasecmp(GROUP_NAME, C('DEFAULT_GROUP'))) $group = GROUP_NAME; if (isset($array['path'])) { $action = substr($array['path'], 1); if (!isset($array['host'])) { $module = MODULE_NAME; } else { if (strpos($array['host'], '-')) { list($group, $module) = explode('-', $array['host']); } else { $module = $array['host']; } } } else { $module = MODULE_NAME; $action = $array['host']; } if (isset($array['query'])) { parse_str($array['query'], $query); $params = array_merge($query, $params); } if (C('APP_SUB_DOMAIN_DEPLOY')) { foreach (C('APP_SUB_DOMAIN_RULES') as $key => $rule) { if (in_array($group . "/", $rule)) $flag = true; if (in_array($group . "/" . $module, $rule)) { $flag = true; unset($module); } if (!isset($group) && in_array(GROUP_NAME . "/" . $module, $rule) && in_array($key,array(SUB_DOMAIN,"*"))) unset($module); if ($flag) { unset($group); if ($key != SUB_DOMAIN && $key != "*") { $sub_domain = $key; } break; } } } if (C('URL_MODEL') > 0) { $depr = C('URL_PATHINFO_MODEL') == 2 ? C('URL_PATHINFO_DEPR') : '/'; $str = $depr; foreach ($params as $var => $val) $str .= $var . $depr . $val . $depr; $str = substr($str, 0, -1); $group = isset($group) ? $group . $depr : ''; $module = isset($module) ? $module . $depr : ""; if (!empty($route)) { $url = str_replace(APP_NAME, $app, __APP__) . '/' . $group . $route . $str; } else { $url = str_replace(APP_NAME, $app, __APP__) . '/' . $group . $module . $action . $str; } if ($suffix && C('URL_HTML_SUFFIX')) $url .= C('URL_HTML_SUFFIX'); }else { $params = http_build_query($params); $params = !empty($params) ? '&' . $params : ''; if (isset($group)) { $url = str_replace(APP_NAME, $app, __APP__) . '?' . C('VAR_GROUP') . '=' . $group . '&' . C('VAR_MODULE') . '=' . $module . '&' . C('VAR_ACTION') . '=' . $action . $params; } else { $url = str_replace(APP_NAME, $app, __APP__) . '?' . C('VAR_MODULE') . '=' . $module . '&' . C('VAR_ACTION') . '=' . $action . $params; } } if (isset($sub_domain)) { $domain = str_replace(SUB_DOMAIN, $sub_domain, $_SERVER['HTTP_HOST']); $url = "http://" . $domain . $url; } if ($redirect) redirect($url); else return $url; } function parse_name($name, $type=0) { if ($type) { return ucfirst(preg_replace("/_([a-zA-Z])/e", "strtoupper('\\1')", $name)); } else { $name = preg_replace("/[A-Z]/", "_\\0", $name); return strtolower(trim($name, "_")); } } function halt($error) { if (IS_CLI) exit($error); $e = array(); if (C('APP_DEBUG')) { if (!is_array($error)) { $trace = debug_backtrace(); $e['message'] = $error; $e['file'] = $trace[0]['file']; $e['class'] = $trace[0]['class']; $e['function'] = $trace[0]['function']; $e['line'] = $trace[0]['line']; $traceInfo = ''; $time = date("y-m-d H:i:m"); foreach ($trace as $t) { $traceInfo .= '[' . $time . '] ' . $t['file'] . ' (' . $t['line'] . ') '; $traceInfo .= $t['class'] . $t['type'] . $t['function'] . '('; $traceInfo .= implode(', ', $t['args']); $traceInfo .=")<br/>"; } $e['trace'] = $traceInfo; } else { $e = $error; } include C('TMPL_EXCEPTION_FILE'); } else { $error_page = C('ERROR_PAGE'); if (!empty($error_page)) { redirect($error_page); } else { if (C('SHOW_ERROR_MSG')) $e['message'] = is_array($error) ? $error['message'] : $error; else $e['message'] = C('ERROR_MESSAGE'); include C('TMPL_EXCEPTION_FILE'); } } exit; } function redirect($url, $time=0, $msg='') { $url = str_replace(array("\n", "\r"), '', $url); if (empty($msg)) $msg = "????{$time}????????{$url}?"; if (!headers_sent()) { if (0 === $time) { header("Location: " . $url); } else { header("refresh:{$time};url={$url}"); echo($msg); } exit(); } else { $str = "<meta http-equiv='Refresh' content='{$time};URL={$url}'>"; if ($time != 0) $str .= $msg; exit($str); } } function throw_exception($msg, $type='ThinkException', $code=0) { if (IS_CLI) exit($msg); if (class_exists($type, false)) throw new $type($msg, $code, true); else halt($msg); } function debug_start($label='') { $GLOBALS[$label]['_beginTime'] = microtime(TRUE); if (MEMORY_LIMIT_ON) $GLOBALS[$label]['_beginMem'] = memory_get_usage(); } function debug_end($label='') { $GLOBALS[$label]['_endTime'] = microtime(TRUE); echo '<div style="text-align:center;width:100%">Process ' . $label . ': Times ' . number_format($GLOBALS[$label]['_endTime'] - $GLOBALS[$label]['_beginTime'], 6) . 's '; if (MEMORY_LIMIT_ON) { $GLOBALS[$label]['_endMem'] = memory_get_usage(); echo ' Memories ' . number_format(($GLOBALS[$label]['_endMem'] - $GLOBALS[$label]['_beginMem']) / 1024) . ' k'; } echo '</div>'; } function dump($var, $echo=true, $label=null, $strict=true) { $label = ($label === null) ? '' : rtrim($label) . ' '; if (!$strict) { if (ini_get('html_errors')) { $output = print_r($var, true); $output = "<pre>" . $label . htmlspecialchars($output, ENT_QUOTES) . "</pre>"; } else { $output = $label . print_r($var, true); } } else { ob_start(); var_dump($var); $output = ob_get_clean(); if (!extension_loaded('xdebug')) { $output = preg_replace("/\]\=\>\n(\s+)/m", "] => ", $output); $output = '<pre>' . $label . htmlspecialchars($output, ENT_QUOTES) . '</pre>'; } } if ($echo) { echo($output); return null; }else return $output; } function get_instance_of($name, $method='', $args=array()) { static $_instance = array(); $identify = empty($args) ? $name . $method : $name . $method . to_guid_string($args); if (!isset($_instance[$identify])) { if (class_exists($name)) { $o = new $name(); if (method_exists($o, $method)) { if (!empty($args)) { $_instance[$identify] = call_user_func_array(array(&$o, $method), $args); } else { $_instance[$identify] = $o->$method(); } } else $_instance[$identify] = $o; } else halt(L('_CLASS_NOT_EXIST_') . ':' . $name); } return $_instance[$identify]; } function __autoload($name) { if (alias_import($name)) return; if (substr($name, -5) == "Model") { require_cache(LIB_PATH . 'Model/' . $name . '.class.php'); } elseif (substr($name, -6) == "Action") { require_cache(LIB_PATH . 'Action/' . $name . '.class.php'); } else { if (C('APP_AUTOLOAD_PATH')) { $paths = explode(',', C('APP_AUTOLOAD_PATH')); foreach ($paths as $path) { if (import($path . $name)) { return; } } } } return; } function require_cache($filename) { static $_importFiles = array(); $filename = realpath($filename); if (!isset($_importFiles[$filename])) { if (file_exists_case($filename)) { require $filename; $_importFiles[$filename] = true; } else { $_importFiles[$filename] = false; } } return $_importFiles[$filename]; } function file_exists_case($filename) { if (is_file($filename)) { if (IS_WIN && C('APP_FILE_CASE')) { if (basename(realpath($filename)) != basename($filename)) return false; } return true; } return false; } function import($class, $baseUrl = '', $ext='.class.php') { static $_file = array(); static $_class = array(); $class = str_replace(array('.', '#'), array('/', '.'), $class); if ('' === $baseUrl && false === strpos($class, '/')) { return alias_import($class); } if (isset($_file[$class . $baseUrl])) return true; else $_file[$class . $baseUrl] = true; $class_strut = explode("/", $class); if (empty($baseUrl)) { if ('@' == $class_strut[0] || APP_NAME == $class_strut[0]) { $baseUrl = dirname(LIB_PATH); $class = substr_replace($class, 'Lib/', 0, strlen($class_strut[0]) + 1); } elseif (in_array(strtolower($class_strut[0]), array('think', 'org', 'com'))) { $baseUrl = THINK_PATH . '/Lib/'; } else { $class = substr_replace($class, '', 0, strlen($class_strut[0]) + 1); $baseUrl = APP_PATH . '/../' . $class_strut[0] . '/' . LIB_DIR . '/'; } } if (substr($baseUrl, -1) != "/") $baseUrl .= "/"; $classfile = $baseUrl . $class . $ext; if ($ext == '.class.php' && is_file($classfile)) { $class = basename($classfile, $ext); if (isset($_class[$class])) throw_exception(L('_CLASS_CONFLICT_') . ':' . $_class[$class] . ' ' . $classfile); $_class[$class] = $classfile; } return require_cache($classfile); } function load($name, $baseUrl='', $ext='.php') { $name = str_replace(array('.', '#'), array('/', '.'), $name); if (empty($baseUrl)) { if (0 === strpos($name, '@/')) { $baseUrl = APP_PATH . '/Common/'; $name = substr($name, 2); } else { $baseUrl = THINK_PATH . '/Common/'; } } if (substr($baseUrl, -1) != "/") $baseUrl .= "/"; include $baseUrl . $name . $ext; } function vendor($class, $baseUrl = '', $ext='.php') { if (empty($baseUrl)) $baseUrl = VENDOR_PATH; return import($class, $baseUrl, $ext); } function alias_import($alias, $classfile='') { static $_alias = array(); if ('' !== $classfile) { $_alias[$alias] = $classfile; return; } if (is_string($alias)) { if (isset($_alias[$alias])) return require_cache($_alias[$alias]); }elseif (is_array($alias)) { foreach ($alias as $key => $val) $_alias[$key] = $val; return; } return false; } function D($name='', $app='') { static $_model = array(); if (empty($name)) return new Model; if (empty($app)) $app = C('DEFAULT_APP'); if (isset($_model[$app . $name])) return $_model[$app . $name]; $OriClassName = $name; if (strpos($name, '.')) { $array = explode('.', $name); $name = array_pop($array); $className = $name . 'Model'; import($app . '.Model.' . implode('.', $array) . '.' . $className); } else { $className = $name . 'Model'; import($app . '.Model.' . $className); } if (class_exists($className)) { $model = new $className(); } else { $model = new Model($name); } $_model[$app . $OriClassName] = $model; return $model; } function M($name='', $class='Model') { static $_model = array(); if (!isset($_model[$name . '_' . $class])) $_model[$name . '_' . $class] = new $class($name); return $_model[$name . '_' . $class]; } function A($name, $app='@') { static $_action = array(); if (isset($_action[$app . $name])) return $_action[$app . $name]; $OriClassName = $name; if (strpos($name, '.')) { $array = explode('.', $name); $name = array_pop($array); $className = $name . 'Action'; import($app . '.Action.' . implode('.', $array) . '.' . $className); } else { $className = $name . 'Action'; import($app . '.Action.' . $className); } if (class_exists($className)) { $action = new $className(); $_action[$app . $OriClassName] = $action; return $action; } else { return false; } } function R($module, $action, $app='@') { $class = A($module, $app); if ($class) return call_user_func(array(&$class, $action)); else return false; } function L($name=null, $value=null) { static $_lang = array(); if (empty($name)) return $_lang; if (is_string($name)) { $name = strtoupper($name); if (is_null($value)) return isset($_lang[$name]) ? $_lang[$name] : $name; $_lang[$name] = $value; return; } if (is_array($name)) $_lang = array_merge($_lang, array_change_key_case($name, CASE_UPPER)); return; } function C($name=null, $value=null) { static $_config = array(); if (empty($name)) return $_config; if (is_string($name)) { if (!strpos($name, '.')) { $name = strtolower($name); if (is_null($value)) return isset($_config[$name]) ? $_config[$name] : null; $_config[$name] = $value; return; } $name = explode('.', $name); $name[0] = strtolower($name[0]); if (is_null($value)) return isset($_config[$name[0]][$name[1]]) ? $_config[$name[0]][$name[1]] : null; $_config[$name[0]][$name[1]] = $value; return; } if (is_array($name)) return $_config = array_merge($_config, array_change_key_case($name)); return null; } function tag($name, $params=array()) { $tags = C('_TAGS_.' . $name); if (!empty($tags)) { foreach ($tags as $key => $call) { $result = B($call, $params); } } } function filter($name, &$content) { $class = $name . 'Filter'; require_cache(LIB_PATH . 'Filter/' . $class . '.class.php'); $filter = new $class(); $content = $filter->run($content); } function B($name, $params=array()) { $class = $name . 'Behavior'; require_cache(LIB_PATH . 'Behavior/' . $class . '.class.php'); $behavior = new $class(); return $behavior->run($params); } function W($name, $data=array(), $return=false) { $class = $name . 'Widget'; require_cache(LIB_PATH . 'Widget/' . $class . '.class.php'); if (!class_exists($class)) throw_exception(L('_CLASS_NOT_EXIST_') . ':' . $class); $widget = Think::instance($class); $content = $widget->render($data); if ($return) return $content; else echo $content; } function S($name, $value='', $expire='', $type='') { static $_cache = array(); alias_import('Cache'); $cache = Cache::getInstance($type); if ('' !== $value) { if (is_null($value)) { $result = $cache->rm($name); if ($result) unset($_cache[$type . '_' . $name]); return $result; }else { $cache->set($name, $value, $expire); $_cache[$type . '_' . $name] = $value; } return; } if (issetCPgsqlSchema.php http://yii-doctrine2.googlecode.com/svn/trunk/ | PHP | 393 lines
1<?php 2/** 14 * @author Qiang Xue <qiang.xue@gmail.com> 15 * @version $Id: CPgsqlSchema.php 3099 2011-03-19 01:26:47Z qiang.xue $ 16 * @package system.db.schema.pgsql 161 162 if (stripos ( $column ['adsrc'], 'nextval' ) === 0 && preg_match ( '/nextval\([^\']*\'([^\']+)\'[^\)]*\)/i', $column ['adsrc'], $matches )) { 163 if (strpos ( $matches [1], '.' ) !== false || $table->schemaName === self::DEFAULT_SCHEMA)vbulletin_global.js http://cmder.googlecode.com/svn/trunk/ | JavaScript | 1537 lines
272 273 while ((startindex = PHP.stripos(str, '[quote')) !== false) 274 { 280 281 if ((stopindex = PHP.stripos(str, '[/quote]')) !== false) 282 { 343*/ 344vB_PHP_Emulator.prototype.stripos = function(haystack, needle, offset) 345{ 386*/ 387vB_PHP_Emulator.prototype.trim = function(str) 388{ 575// initialize the PHP emulator 576var PHP = new vB_PHP_Emulator(); 577CssMin.php http://cssmin.googlecode.com/svn/trunk/ | PHP | 35 lines
1<?php 2/** 30 * @copyright 2008 - 2011 Joe Scylla <joe.scylla@gmail.com> 31 * @license http://opensource.org/licenses/mit-license.php MIT License 32 * @version 3.0.1 33 */ 34 abstract class aCssToken { abstract public function __toString(); } abstract class aCssRulesetStartToken extends aCssToken { } abstract class aCssRulesetEndToken extends aCssToken { public function __toString() { return "}"; } } abstract class aCssParserPlugin { protected $configuration = array(); protected $parser = null; protected $buffer = ""; public function __construct(CssParser $parser, array $configuration = null) { $this->configuration = $configuration; $this->parser = $parser; } abstract public function getTriggerChars(); abstract public function getTriggerStates(); abstract public function parse($index, $char, $previousChar, $state); } abstract class aCssMinifierPlugin { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(aCssToken &$token); abstract public function getTriggerTokens(); } abstract class aCssMinifierFilter { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(array &$tokens); } abstract class aCssFormatter { protected $indent = " "; protected $padding = 0; protected $tokens = array(); public function __construct(array $tokens, $indent = null, $padding = null) { $this->tokens = $tokens; $this->indent = !is_null($indent) ? $indent : $this->indent; $this->padding = !is_null($padding) ? $padding : $this->padding; } abstract public function __toString(); } abstract class aCssDeclarationToken extends aCssToken { public $IsImportant = false; public $IsLast = false; public $Property = ""; public $Value = ""; public function __construct($property, $value, $isImportant = false, $isLast = false) { $this->Property = $property; $this->Value = $value; $this->IsImportant = $isImportant; $this->IsLast = $isLast; } public function __toString() { return $this->Property . ":" . $this->Value . ($this->IsImportant ? " !important" : "") . ($this->IsLast ? "" : ";"); } } abstract class aCssAtBlockStartToken extends aCssToken { } abstract class aCssAtBlockEndToken extends aCssToken { public function __toString() { return "}"; } } class CssWhitesmithsFormatter extends aCssFormatter { public function __toString() { $r = array(); $level = 0; for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { $token = $this->tokens[$i]; $class = get_class($token); $indent = str_repeat($this->indent, $level); if ($class === "CssCommentToken") { $lines = array_map("trim", explode("\n", $token->Comment)); for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii]; } } elseif ($class === "CssAtCharsetToken") { $r[] = $indent . "@charset " . $token->Charset . ";"; } elseif ($class === "CssAtFontFaceStartToken") { $r[] = $indent . "@font-face"; $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtImportToken") { $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";"; } elseif ($class === "CssAtKeyframesStartToken") { $r[] = $indent . "@keyframes \"" . $token->Name . "\""; $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtMediaStartToken") { $r[] = $indent . "@media " . implode(", ", $token->MediaTypes); $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtPageStartToken") { $r[] = $indent . "@page"; $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtVariablesStartToken") { $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes); $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken") { $r[] = $indent . implode(", ", $token->Selectors); $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class == "CssAtFontFaceDeclarationToken" || $class === "CssAtKeyframesRulesetDeclarationToken" || $class === "CssAtPageDeclarationToken" || $class == "CssAtVariablesDeclarationToken" || $class === "CssRulesetDeclarationToken" ) { $declaration = $indent . $token->Property . ": "; if ($this->padding) { $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT); } $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";"; } elseif ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtKeyframesEndToken" || $class === "CssAtKeyframesRulesetEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken" || $class === "CssRulesetEndToken" ) { $r[] = $indent . "}"; $level--; } } return implode("\n", $r); } } class CssVariablesMinifierPlugin extends aCssMinifierPlugin { private $reMatch = "/var\((.+)\)/iSU"; private $variables = null; public function getVariables() { return $this->variables; } public function apply(aCssToken &$token) { if (stripos($token->Value, "var") !== false && preg_match_all($this->reMatch, $token->Value, $m)) { $mediaTypes = $token->MediaTypes; if (!in_array("all", $mediaTypes)) { $mediaTypes[] = "all"; } for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variable = trim($m[1][$i]); foreach ($mediaTypes as $mediaType) { if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable])) { $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value); continue 2; } } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": No value found for variable <code>" . $variable . "</code> in media types <code>" . implode(", ", $mediaTypes) . "</code>", (string) $token)); $token = new CssNullToken(); return true; } } return false; } public function getTriggerTokens() { return array ( "CssAtFontFaceDeclarationToken", "CssAtPageDeclarationToken", "CssRulesetDeclarationToken" ); } public function setVariables(array $variables) { $this->variables = $variables; } } class CssVariablesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $variables = array(); $defaultMediaTypes = array("all"); $mediaTypes = array(); $remove = array(); for($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === "CssAtVariablesStartToken") { $remove[] = $i; $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes); foreach ($mediaTypes as $mediaType) { if (!isset($variables[$mediaType])) { $variables[$mediaType] = array(); } } for($i = $i; $i < $l; $i++) { if (get_class($tokens[$i]) === "CssAtVariablesDeclarationToken") { foreach ($mediaTypes as $mediaType) { $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value; } $remove[] = $i; } elseif (get_class($tokens[$i]) === "CssAtVariablesEndToken") { $remove[] = $i; break; } } } } foreach($variables as $mediaType => $null) { foreach($variables[$mediaType] as $variable => $value) { if (stripos($value, "var") !== false && preg_match_all("/var\((.+)\)/iSU", $value, $m)) { for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ""), $variables[$mediaType][$variable]); } } } } foreach ($remove as $i) { $tokens[$i] = null; } if (!($plugin = $this->minifier->getPlugin("CssVariablesMinifierPlugin"))) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin <code>CssVariablesMinifierPlugin</code> was not found but is required for <code>" . __CLASS__ . "</code>")); } else { $plugin->setVariables($variables); } return count($remove); } } class CssUrlParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array("(", ")"); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === "url(" && $state !== "T_URL") { $this->parser->pushState("T_URL"); $this->parser->setExclusive(__CLASS__); } elseif ($char === "\n" && $previousChar === "\\" && $state === "T_URL") { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_URL") { $line = $this->parser->getBuffer(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ")"); $this->parser->popState(); $this->parser->unsetExclusive(); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_")); } elseif ($char === ")" && $state === "T_URL") { $this->parser->popState(); $this->parser->unsetExclusive(); } else { return false; } return true; } } class CssStringParserPlugin extends aCssParserPlugin { private $delimiterChar = null; public function getTriggerChars() { return array("\"", "'", "\n"); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if (($char === "\"" || $char === "'") && $state !== "T_STRING") { $this->delimiterChar = $char; $this->parser->pushState("T_STRING"); $this->parser->setExclusive(__CLASS__); } elseif ($char === "\n" && $previousChar === "\\" && $state === "T_STRING") { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_STRING") { $line = $this->parser->getBuffer(); $this->parser->popState(); $this->parser->unsetExclusive(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_")); $this->delimiterChar = null; } elseif ($char === $this->delimiterChar && $state === "T_STRING") { if ($previousChar == "\\") { $source = $this->parser->getSource(); $c = 1; $i = $index - 2; while (substr($source, $i, 1) === "\\") { $c++; $i--; } if ($c % 2) { return false; } } $this->parser->popState(); $this->parser->unsetExclusive(); $this->delimiterChar = null; } else { return false; } return true; } } class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) !== "CssRulesetStartToken") { continue; } $endIndex = false; for ($ii = $i + 1; $ii < $l; $ii++) { if (get_class($tokens[$ii]) !== "CssRulesetEndToken") { continue; } $endIndex = $ii; break; } if (!$endIndex) { break; } $startIndex = $i; $i = $endIndex; if ($endIndex - $startIndex <= 2) { continue; } for ($ii = $startIndex + 1; $ii < $endIndex; $ii++) { if (get_class($tokens[$ii]) !== "CssRulesetDeclarationToken") { continue(2); } } $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1); $sortRequired = $lastPropertyName = false; foreach ($declarations as $declaration) { if ($lastPropertyName) { if (strcmp($lastPropertyName, $declaration->Property) > 0) { $sortRequired = true; break; } } $lastPropertyName = $declaration->Property; } if (!$sortRequired) { continue; } usort($declarations, array(__CLASS__, "userDefinedSort1")); for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++) { if ($ii == $ll) { $declarations[$ii]->IsLast = true; } else { $declarations[$ii]->IsLast = false; } } array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations); $r += $endIndex - $startIndex - 1; } return $r; } public static function userDefinedSort1($a, $b) { return strcmp($a->Property, $b->Property); } } class CssRulesetStartToken extends aCssRulesetStartToken { public $Selectors = array(); public function __construct(array $selectors = array()) { $this->Selectors = $selectors; } public function __toString() { return implode(",", $this->Selectors) . "{"; } } class CssRulesetParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array(",", "{", "}", ":", ";"); } public function getTriggerStates() { return array("T_DOCUMENT", "T_AT_MEDIA", "T_RULESET::SELECTORS", "T_RULESET", "T_RULESET_DECLARATION"); } private $selectors = array(); public function parse($index, $char, $previousChar, $state) { if ($char === "," && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) { if ($state !== "T_RULESET::SELECTORS") { $this->parser->pushState("T_RULESET::SELECTORS"); } $this->selectors[] = $this->parser->getAndClearBuffer(",{"); } elseif ($char === "{" && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) { if ($this->parser->getBuffer() !== "") { $this->selectors[] = $this->parser->getAndClearBuffer(",{"); if ($state == "T_RULESET::SELECTORS") { $this->parser->popState(); } $this->parser->pushState("T_RULESET"); $this->parser->appendToken(new CssRulesetStartToken($this->selectors)); $this->selectors = array(); } } elseif ($char === ":" && $state === "T_RULESET") { $this->parser->pushState("T_RULESET_DECLARATION"); $this->buffer = $this->parser->getAndClearBuffer(":;", true); } elseif ($char === ":" && $state === "T_RULESET_DECLARATION") { if ($this->buffer === "filter") { return false; } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); } elseif (($char === ";" || $charUploadTheme.php git://github.com/forkcms/forkcms.git | PHP | 286 lines
1<?php 2 203 for ($i = 0; $i < $zip->numFiles; ++$i) { 204 if (mb_stripos($zip->getNameIndex($i), self::INFO_FILE) !== false) { 205 $infoFile = $zip->statIndex($i); 243 if ($this->checkIfPathContainsIgnoredWord($fileName) || 244 (!empty($this->parentFolderName) && mb_stripos($fileName, $this->parentFolderName) !== 0) 245 ) { 278 foreach ($this->ignoreList as $ignoreItem) { 279 if (mb_stripos($path, $ignoreItem) !== false) { 280 return true;_form.php http://mcmis.googlecode.com/svn/trunk/ | PHP | 132 lines
60 61 <p class="note"><?php echo "<?php ";?> echo Yii::t('application', 'Fields with <span class="required">*</span> are required.');<?php echo "?>";?></p> 62 81 <?php echo "<?php echo ".$this->generateActiveLabel($this->modelClass,$column)."; ?>"; ?> 82 <?php if($column->isForeignKey): ?><?php echo "<?php echo ".generateActiveField($this->modelClass,$column, "array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#".$this->modelClass."_" . $column->name ."\').val()',), 'url'=>CController::createUrl('".getForeignKeyTableName($this->tableSchema, $column->name)."/jsonmessage'), 'success'=>'function(data){\$(\'#' . CHtml::activeId(\$model,'" . $column->name ."') . '_msg\').text(data.message);}')" )."; ?>\n"; ?> 83 <?php echo "<span id=\"<?php echo CHtml::activeId(\$model,'".$column->name."'); ?>_msg\">\n"; ?> 90 <?php echo " 'onclick' => \"{popupview('$column->name', 'index.php?r=".getForeignKeyTableName($this->tableSchema, $column->name)."/popupview'); }\"));\n"; ?> 91 <?php echo "?>\n"; ?><?php else: ?><?php echo "<?php echo ".generateActiveField($this->modelClass,$column)."; ?>\n"; ?><?php endif; ?> 92 <?php echo "<?php echo \$form->error(\$model,'{$column->name}'); ?>\n"; ?> 105 106<?php foreach($this->tableSchema->foreignKeys as $foreignKey): ?><?php echo "<?php\n"; ?> 107<?php echo "\$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog\n"; ?> 118<?php echo "<div class=\"divfor".$foreignKey[1]."\"></div>\n";?> 119<?php echo "<?php \$this->endWidget(); ?>\n";?><?php endforeach;?> 120WordsFinder.php https://bitbucket.org/leminhtamboy/wisi.git | PHP | 345 lines
1<?php 2/** 255 * @return array 256 * @SuppressWarnings(PHPMD.CyclomaticComplexity) 257 */ 265 foreach ($this->_words as $word) { 266 if (stripos($path, $word) !== false || stripos($contents, $word) !== false) { 267 $foundWords[] = $word;QueryByExampleController.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 169 lines
1<?php 2 4 5namespace PhpMyAdmin\Controllers\Database; 6 6 7use PhpMyAdmin\Database\Qbe; 8use PhpMyAdmin\DatabaseInterface; 8use PhpMyAdmin\DatabaseInterface; 9use PhpMyAdmin\Operations; 10use PhpMyAdmin\Relation; 10use PhpMyAdmin\Relation; 11use PhpMyAdmin\RelationCleanup; 12use PhpMyAdmin\ResponseRenderer; 12use PhpMyAdmin\ResponseRenderer; 13use PhpMyAdmin\SavedSearches; 14use PhpMyAdmin\Sql;ICalendar.php git://github.com/modolabs/Kurogo-Mobile-Web.git | PHP | 1118 lines
1<?php 2 199 case 'search': //case insensitive 200 return (stripos($this->getTitle(), $value)!==FALSE); 201 break;Utf8.php git://github.com/nicolas-grekas/Patchwork-UTF8.git | PHP | 451 lines
1<?php // vi: set fenc=utf-8 ts=4 sw=4 et: 2/* 16 * UTF-8 Grapheme Cluster aware string manipulations implementing the quasi complete 17 * set of native PHP string functions that need UTF-8 awareness and more. 18 * Missing are printf-family functions and number_format. 31 { 32 return (bool) preg_match('//u', $s); // Since PHP 5.2.5, this also excludes invalid five and six bytes sequences 33 } 80 81 // PHP string functions that need UTF-8 awareness 82 84 { 85/**/ if (extension_loaded('intl') && PHP_VERSION_ID < 50400) 86/**/ { 86/**/ { 87 return PHP\Override\Intl::grapheme_substr_workaround55562($s, $start, $len); 88/**/ }grapheme_string.c git://github.com/vpj/PHP-Extension-API.git | C | 914 lines
8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 169 170/* {{{ proto int grapheme_stripos(string haystack, string needle [, int offset ]) 171 Find position of first occurrence of a string within another, ignoring case differences */ 171 Find position of first occurrence of a string within another, ignoring case differences */ 172PHP_FUNCTION(grapheme_stripos) 173{ 184 intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, 185 "grapheme_stripos: unable to parse input param", 0 TSRMLS_CC ); 186mbstring.c git://github.com/vpj/PHP-Extension-API.git | C | 4894 lines
172 { mbfl_no_language_korean, php_mb_default_identify_list_kr, sizeof(php_mb_default_identify_list_kr) / sizeof(php_mb_default_identify_list_kr[0]) }, 173 { mbfl_no_language_traditional_chinese, php_mb_default_identify_list_tw_hk, sizeof(php_mb_default_identify_list_tw_hk) / sizeof(php_mb_default_identify_list_tw_hk[0]) }, 174 { mbfl_no_language_simplified_chinese, php_mb_default_identify_list_cn, sizeof(php_mb_default_identify_list_cn) / sizeof(php_mb_default_identify_list_cn[0]) }, 174 { mbfl_no_language_simplified_chinese, php_mb_default_identify_list_cn, sizeof(php_mb_default_identify_list_cn) / sizeof(php_mb_default_identify_list_cn[0]) }, 175 { mbfl_no_language_russian, php_mb_default_identify_list_ru, sizeof(php_mb_default_identify_list_ru) / sizeof(php_mb_default_identify_list_ru[0]) }, 176 { mbfl_no_language_armenian, php_mb_default_identify_list_hy, sizeof(php_mb_default_identify_list_hy) / sizeof(php_mb_default_identify_list_hy[0]) }, 176 { mbfl_no_language_armenian, php_mb_default_identify_list_hy, sizeof(php_mb_default_identify_list_hy) / sizeof(php_mb_default_identify_list_hy[0]) }, 177 { mbfl_no_language_turkish, php_mb_default_identify_list_tr, sizeof(php_mb_default_identify_list_tr) / sizeof(php_mb_default_identify_list_tr[0]) }, 178 { mbfl_no_language_ukrainian, php_mb_default_identify_list_ua, sizeof(php_mb_default_identify_list_ua) / sizeof(php_mb_default_identify_list_ua[0]) }, 178 { mbfl_no_language_ukrainian, php_mb_default_identify_list_ua, sizeof(php_mb_default_identify_list_ua) / sizeof(php_mb_default_identify_list_ua[0]) }, 179 { mbfl_no_language_neutral, php_mb_default_identify_list_neut, sizeof(php_mb_default_identify_list_neut) / sizeof(php_mb_default_identify_list_neut[0]) } 180}; 189 {MB_OVERLOAD_STRING, "strrpos", "mb_strrpos", "mb_orig_strrpos"}, 190 {MB_OVERLOAD_STRING, "stripos", "mb_stripos", "mb_orig_stripos"}, 191 {MB_OVERLOAD_STRING, "strripos", "mb_strripos", "mb_orig_stripos"},multibyte.php git://github.com/abalonepaul/eav_behavior.git | PHP | 1172 lines
7 * 8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 9 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @link http://cakephp.org CakePHP(tm) Project 16 * @package cake 17 * @subpackage cake.cake.libs 18 * @since CakePHP(tm) v 1.2.0.6833 19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 37 */ 38if (!function_exists('mb_stripos')) { 39 function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { 405 function stristr($haystack, $needle, $part = false) { 406 $php = (PHP_VERSION < 5.3); 407function.base.php git://github.com/thorsten/phpMyFAQ.git | PHP | 1241 lines
1<?php 2 if(!defined('AJAX_INIT_DONE')) 5 } 6?><?php 7 /** 9 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn) 10 * @link www.phpletter.com 11 * @since 22/April/2007 13 */ 14require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "config.php"); 15/** 15/** 16 * force to ensure existence of stripos 17 */ 17 */ 18if (!function_exists("stripos")) 19{intl.php git://pkgs.fedoraproject.org/php-bartlett-PHP-CompatInfo | PHP | 488 lines
34 * @param string $version OPTIONAL PHP version 35 * (4 => only PHP4, 5 or null => PHP4 + PHP5) 36 * 72 * @param string $version OPTIONAL PHP version 73 * (4 => only PHP4, 5 or null => PHP4 + PHP5) 74 * 104 * @param string $version OPTIONAL PHP version 105 * (4 => only PHP4, 5 or null => PHP4 + PHP5) 106 * 146 * @param string $version OPTIONAL PHP version 147 * (4 => only PHP4, 5 or null => PHP4 + PHP5) 148 * 286 * @param string $version OPTIONAL PHP version 287 * (4 => only PHP4, 5 or null => PHP4 + PHP5) 288 *