PageRenderTime 393ms queryTime 26ms sortTime 3ms getByIdsTime 172ms findMatchingLines 79ms

100+ results results for 'php stripos repo:lux/sitellite' (393 ms)

Not the results you expected?
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])) {
                    
                
Pdosqlite.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);
                    
                
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';
                    
33
                    
                
pluggable.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 ) );
                    
485
                    
                
db_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		<?php
                    
                
class-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		{
                    
                
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();
                    
                
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";
                    
                
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">&nbsp;&nbsp;&nbsp;&nbsp;??<?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		<?php 				
                    
                
CDbCommandBuilder.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	}
                    
                
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			{
                    
                
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...
                    
232		
                    
                
sfCoreAutoload.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	}
                    
                
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ík
                    
                
Html.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;
                    
257		
                    
                
common.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'!");
                    
104				
                    
                
grapheme_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 );
                    
186
                    
                
php_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_FE
                    
                
search.php https://code.google.com/p/osclass/ | PHP | 342 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') )  { ?>
                    
183    <body>
                    
184        <?php osc_current_web_theme_path('header.php') ; ?>
                    
185        <div class="content list">
                    
201                                    <?php } else { ?>
                    
202                                        <a href="<?php echo osc_update_search_url($params) ; ?>"><?php echo $label; ?></a>
                    
203                                    <?php } ?>
                    
214                    <?php } else { ?>
                    
215                        <?php require(osc_search_show_as() == 'list' ? 'search_list.php' : 'search_gallery.php') ; ?>
                    
216                    <?php } ?>
                    
224                        <?php if($f['total'] < 3) continue; ?>
                    
225                        <li><a href="<?php echo osc_footer_link_url(); ?>"><?php echo osc_footer_link_title(); ?></a></li>
                    
226                    <?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);
                    
367
                    
                
map.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		{
                    
                
Gallery1DataParser.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);
                    
                
MailReceiver.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 (isset
                    
                
CPgsqlSchema.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();
                    
577
                    
                
CssMin.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 === ";" || $char 
                    
                
UploadTheme.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;?>
                    
120
                    
                
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 );
                    
186			 
                    
                
mbstring.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);
                    
407
                    
                
function.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     *
                    
                
tinybrowser.php git://github.com/imagecms/ImageCMS.git | PHP | 352 lines
                    
227<link rel="stylesheet" type="text/css" media="all" href="css/style_tinybrowser.css.php" />
                    
228<script language="javascript" type="text/javascript" src="js/tinybrowser.js.php?<?php echo substr($passfeid,1); ?>"></script>
                    
229</head>
                    
236<ul>
                    
237<li id="browse_tab" class="current"><span><a href="tinybrowser.php?type=<?php echo $typenow.$passfolder.$passfeid; ?>"><?php echo TB_BROWSE; ?></a></span></li><?php
                    
238if($tinybrowser['allowupload']) 
                    
239	{
                    
240	?><li id="upload_tab"><span><a href="upload.php?type=<?php echo $typenow.$passfolder.$passfeid; ?>"><?php echo TB_UPLOAD; ?></a></span></li><?php
                    
241	}
                    
243	{
                    
244	?><li id="edit_tab"><span><a href="edit.php?type=<?php echo $typenow.$passfolder.$passfeid; ?>"><?php echo TB_EDIT; ?></a></span></li><?php
                    
245	}
                    
247	{
                    
248	?><li id="folders_tab"><span><a href="folders.php?type=<?php echo $typenow.$passfolder.$passfeid; ?>"><?php echo TB_FOLDERS; ?></a></span></li><?php
                    
249	}
                    
                
Services_NzbHandler_abs.php git://github.com/spotweb/spotweb.git | PHP | 441 lines
                    
1<?php
                    
2
                    
93        for ($i = 0; $i < strlen($title); $i++) {
                    
94            if (stripos($allowedChars, $title[$i]) === false) {
                    
95                $newTitle .= '_';
                    
                
comment-template.php http://core.svn.wordpress.org/ | PHP | 373 lines
                    
1<?php
                    
2/*
                    
225	global $id;
                    
226	$tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id;
                    
227
                    
241	global $id;
                    
242	if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) {
                    
243		echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                    
279
                    
280function comments_template( $file = '/comments.php' ) {
                    
281	global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity;
                    
309	else
                    
310		require( ABSPATH . 'wp-content/themes/default/comments.php');
                    
311}
                    
                
README.md git://github.com/nicolas-grekas/Patchwork-UTF8.git | Markdown | 153 lines
                    
1Patchwork UTF-8 for PHP
                    
2=======================
                    
28
                    
29Unicode handling in PHP is best performed using a combo of `mbstring`, `iconv`,
                    
30`intl` and `pcre` with the `u` flag enabled. But when an application is expected
                    
33
                    
34Patchwork UTF-8 provides pure PHP implementations for 3 of those 4 extensions.
                    
35`pcre` compiled with unicode support is required but is widely available.
                    
44  mb_output_handler, mb_strlen, mb_strpos, mb_strrpos, mb_strtolower,
                    
45  mb_strtoupper, mb_stripos, mb_stristr, mb_strrchr, mb_strrichr, mb_strripos,
                    
46  mb_strstr, mb_strwidth, mb_substitute_character, mb_substr, mb_substr_count*,
                    
106
                    
107```php
                    
108\Patchwork\Utf8\Bootup::initAll(); // Enables the portablity layer and configures PHP for UTF-8
                    
116[Character Sets / Character Encoding Issues](http://www.phpwact.org/php/i18n/charsets)
                    
117and [Handling UTF-8 with PHP](http://www.phpwact.org/php/i18n/utf-8),
                    
118or [PHP et UTF-8](http://julp.lescigales.org/articles/3-php-et-utf-8.html) for french readers.
                    
                
Mssql.php http://kumbia-enterprise.googlecode.com/svn/trunk/ | PHP | 300 lines
                    
1<?php
                    
2
                    
20 * @license		New BSD License
                    
21 * @version 	$Id: Mssql.php 124 2010-03-08 08:55:28Z gutierrezandresfelipe $
                    
22 */
                    
34 * @license		New BSD License
                    
35 * @link		http://www.php.net/manual/es/ref.mysql.php
                    
36 * @access		Public
                    
117        if($orderby!==false){
                    
118            $sort = (stripos($orderby, 'desc') !== false) ? 'desc' : 'asc';
                    
119            $order = str_ireplace('ORDER BY', '', $orderby);
                    
125            $sql.= ' ORDER BY '.$order.' ';
                    
126            $sql.= (stripos($sort, 'asc') !== false) ? 'DESC' : 'ASC';
                    
127        }
                    
280	/**
                    
281	 * Indica las extensiones PHP requeridas para utilizar el adaptador
                    
282	 *
                    
                
MySQL.php http://poordecisions.googlecode.com/svn/web/PoorDecisions/trunk/ | PHP | 287 lines
                    
1<?php
                    
2
                    
87		    $link = $link? $link : $this->getLink();
                    
88			if(stripos($val, "function:") === 0){
                    
89				$val = substr($val, 9); //function: ends at 9, lol.
                    
                
pma_gis_geometrycollection.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 337 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
5 *
                    
6 * @package PhpMyAdmin-GIS
                    
7 */
                    
8
                    
9if (! defined('PHPMYADMIN')) {
                    
10    exit;
                    
15 *
                    
16 * @package PhpMyAdmin-GIS
                    
17 */
                    
66        foreach ($sub_parts as $sub_part) {
                    
67            $type_pos = stripos($sub_part, '(');
                    
68            $type = substr($sub_part, 0, $type_pos);
                    
119        foreach ($sub_parts as $sub_part) {
                    
120            $type_pos = stripos($sub_part, '(');
                    
121            $type = substr($sub_part, 0, $type_pos);
                    
                
multibyte.php git://github.com/Datawalke/Coordino.git | PHP | 1172 lines
                    
7 *
                    
8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
9 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright 2005-2012, 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);
                    
407
                    
                
multibyte.php http://atlascakephp.googlecode.com/svn/trunk/ | PHP | 1127 lines
                    
1<?php
                    
2/* SVN FILE: $Id$ */
                    
6 *
                    
7 * PHP versions 4 and 5
                    
8 *
                    
8 *
                    
9 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
10 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
16 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
18 * @package       cake
                    
19 * @subpackage    cake.cake.libs
                    
20 * @since         CakePHP(tm) v 1.2.0.6833
                    
21 * @version       $Revision$
                    
23 * @lastmodified  $Date$
                    
24 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
25 */
                    
                
Part.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Part.php 14073 2009-02-12 22:30:40Z beberlei $
                    
20 */
                    
25 */
                    
26require_once 'Zend/Mime/Decode.php';
                    
27
                    
30 */
                    
31require_once 'Zend/Mail/Part/Interface.php';
                    
32
                    
110                 */
                    
111                require_once 'Zend/Mail/Exception.php';
                    
112                throw new Zend_Mail_Exception('handler is not a valid mail handler');
                    
117                 */
                    
118                require_once 'Zend/Mail/Exception.php';
                    
119                throw new Zend_Mail_Exception('need a message id with a handler');
                    
                
Part.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Part.php 11815 2008-10-10 02:50:19Z yoshida@zend.co.jp $
                    
20 */
                    
25 */
                    
26require_once 'Zend/Mime/Decode.php';
                    
27
                    
30 */
                    
31require_once 'Zend/Mail/Part/Interface.php';
                    
32
                    
110                 */
                    
111                require_once 'Zend/Mail/Exception.php';
                    
112                throw new Zend_Mail_Exception('handler is not a valid mail handler');
                    
117                 */
                    
118                require_once 'Zend/Mail/Exception.php';
                    
119                throw new Zend_Mail_Exception('need a message id with a handler');
                    
                
Cookie.php git://github.com/guzzle/guzzle.git | PHP | 441 lines
                    
1<?php
                    
2
                    
387    {
                    
388        return !$this->getPath() || 0 === stripos($path, $this->getPath());
                    
389    }
                    
                
RedisEngine.php git://github.com/nrk/lamestnews.git | PHP | 1087 lines
                    
1<?php
                    
2
                    
205        foreach (str_split($flags) as $flag) {
                    
206            if (stripos($userflags, $flag) === false) {
                    
207                return false;
                    
                
test.php git://github.com/mageekguy/atoum.git | PHP | 1783 lines
                    
264
                    
265	public function setPhpMocker(php\mocker $phpMocker = null)
                    
266	{
                    
266	{
                    
267		$this->phpMocker = $phpMocker ?: new php\mocker();
                    
268
                    
400
                    
401		$phpMocker = $this->phpMocker;
                    
402
                    
402
                    
403		$this->assertionManager->setHandler('resetFunction', function(test\adapter\invoker $invoker) use ($phpMocker) { $phpMocker->resetCalls($invoker->getFunction()); return $invoker; });
                    
404
                    
434			->use('phpArray')->as('array')
                    
435			->use('phpArray')->as('in')
                    
436			->use('phpClass')->as('class')
                    
                
oracle.php git://github.com/KumbiaPHP/KumbiaPHP.git | PHP | 596 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * KumbiaPHP web & app Framework
                    
4 *
                    
13 *
                    
14 * @copyright  Copyright (c) 2005 - 2020 KumbiaPHP Team (http://www.kumbiaphp.com)
                    
15 * @license    https://github.com/KumbiaPHP/KumbiaPHP/blob/master/LICENSE   New BSD License
                    
128        if (!extension_loaded('oci8')) {
                    
129            throw new KumbiaException('Debe cargar la extensión de PHP llamada php_oci8');
                    
130        }
                    
377        if (preg_match("/ORDER[\t\n\r ]+BY/i", $sql)) {
                    
378            if (stripos($sql, 'WHERE')) {
                    
379                return preg_replace("/ORDER[\t\n\r ]+BY/i", "AND ROWNUM <= $number ORDER BY", $sql);
                    
383        }
                    
384        if (stripos($sql, 'WHERE')) {
                    
385            return "$sql AND ROWNUM <= $number";
                    
                
Multibyte.php git://github.com/cakephp/cakephp.git | PHP | 1107 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.I18n
                    
16 * @package       Cake.I18n
                    
17 * @since         CakePHP(tm) v 1.2.0.6833
                    
18 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
30 */
                    
31if (!function_exists('mb_stripos')) {
                    
32	function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) {
                    
370	public static function stristr($haystack, $needle, $part = false) {
                    
371		$php = (PHP_VERSION < 5.3);
                    
372
                    
                
admin_edit_ic.php http://bitsand.googlecode.com/svn/trunk/ | PHP | 482 lines
                    
31
                    
32if ($_POST ['btnSubmit'] != '' && CheckReferrer ('admin_edit_ic.php')) {
                    
33	$sDataWarn = IC_Check ();
                    
37		$sNotes = ba_db_real_escape_string ($link, $_POST ['txtNotes']);
                    
38		if (stripos ($sNotes, "Illegal set of skills entered") === False)
                    
39			$sNotes .= "\nIllegal set of skills entered";
                    
172
                    
173include ('../inc/inc_head_html.php');
                    
174include ('../inc/inc_js_forms.php');
                    
187
                    
188<h1><?php echo TITLE?> - IC Details</h1>
                    
189
                    
209<p>
                    
210<form action = "admin_edit_ic.php?pid=<?php echo $admin_player_id?>" method = "post" name ='ic_form' onsubmit = "return ic_js_check ()" accept-charset="iso-8859-1">
                    
211
                    
                
multibyte.php http://skygames.googlecode.com/svn/trunk/ | PHP | 1126 lines
                    
1<?php
                    
2/* SVN FILE: $Id: multibyte.php 7818 2008-11-01 14:16:06Z mariano.iglesias $ */
                    
3/**
                    
6 *
                    
7 * PHP versions 4 and 5
                    
8 *
                    
8 *
                    
9 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
10 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
16 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
18 * @package       cake
                    
23 * @lastmodified  $Date: 2008-11-01 09:16:06 -0500 (Sat, 01 Nov 2008) $
                    
24 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
25 */
                    
                
TextData.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 716 lines
                    
22 * @package		PHPExcel_Calculation
                    
23 * @copyright	Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
24 * @license		http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
                    
34    define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35    require (PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
42 * @package		PHPExcel_Calculation
                    
43 * @copyright	Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
44 */
                    
151        {
                    
152            if (PHPExcel_Calculation_Functions :: getCompatibilityMode() == PHPExcel_Calculation_Functions :: COMPATIBILITY_OPENOFFICE)
                    
153            {
                    
204            {
                    
205                if (PHPExcel_Calculation_Functions :: getCompatibilityMode() == PHPExcel_Calculation_Functions :: COMPATIBILITY_OPENOFFICE)
                    
206                {
                    
                
multibyte.php http://fredistrano.googlecode.com/svn/trunk/ | PHP | 1127 lines
                    
1<?php
                    
2/* SVN FILE: $Id: multibyte.php 8004 2009-01-16 20:15:21Z gwoo $ */
                    
3/**
                    
6 *
                    
7 * PHP versions 4 and 5
                    
8 *
                    
8 *
                    
9 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
10 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
16 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
18 * @package       cake
                    
23 * @lastmodified  $Date: 2009-01-16 12:15:21 -0800 (Fri, 16 Jan 2009) $
                    
24 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
25 */
                    
                
Site.php git://github.com/concrete5/concrete5.git | PHP | 472 lines
                    
1<?php
                    
2
                    
421        $url = $this->getSiteCanonicalURL();
                    
422        if (stripos($url, 'https:') === 0) {
                    
423            $result = $url;
                    
425            $url = $this->getSiteAlternativeCanonicalURL();
                    
426            if (stripos($url, 'https:') === 0) {
                    
427                $result = $url;
                    
                
class.t3lib_cs.php git://pkgs.fedoraproject.org/moodle | PHP | 2349 lines
                    
1<?php
                    
2/***************************************************************
                    
26 *
                    
27 * $Id: class.t3lib_cs.php,v 1.15 2011/10/27 17:26:27 moodlerobot Exp $
                    
28 *
                    
106 * - strpos/strrpos: they return the BYTE position, if you need the CHARACTER position use utf8_strpos/utf8_strrpos
                    
107 * - htmlentities: charset support for UTF-8 only since PHP 4.3.0
                    
108 * - preg_*: Support compiled into PHP by default nowadays, but could be unavailable, need to use modifier
                    
113 * - stristr
                    
114 * - stripos
                    
115 * - substr
                    
249	var $lang_to_script = array(
                    
250			// iso-639-1 language codes, see http://www.loc.gov/standards/iso639-2/php/code_list.php
                    
251		'ar' => 'arabic',
                    
                
auth.php git://pkgs.fedoraproject.org/moodle | PHP | 2026 lines
                    
1<?php
                    
2
                    
43
                    
44require_once($CFG->libdir.'/authlib.php');
                    
45require_once($CFG->libdir.'/ldaplib.php');
                    
82            $this->config->objectclass = '(objectClass=*)';
                    
83        } else if (stripos($this->config->objectclass, 'objectClass=') === 0) {
                    
84            // Value is 'objectClass=some-string-here', so just add ()
                    
                
lib.php git://pkgs.fedoraproject.org/moodle | PHP | 947 lines
                    
1<?php
                    
2
                    
44        global $CFG;
                    
45        require_once($CFG->libdir.'/ldaplib.php');
                    
46
                    
79            $this->set_config('objectclass', '(objectClass=*)');
                    
80        } else if (stripos($this->config->objectclass, 'objectClass=') === 0) {
                    
81            // Value is 'objectClass=some-string-here', so just add ()
                    
84            $this->set_config('objectclass', '('.$this->config->objectclass.')');
                    
85        } else if (stripos($this->config->objectclass, '(') !== 0) {
                    
86            // Value is 'some-string-not-starting-with-left-parentheses',
                    
                
filter.php git://pkgs.fedoraproject.org/moodle | PHP | 915 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
30
                    
31require_once($CFG->libdir.'/filelib.php');
                    
32
                    
35     * Default media width, some plugins may use automatic sizes or accept resize parameters.
                    
36     * This can be defined in config.php.
                    
37     */
                    
44     * should calculate it themselves using the FILTER_MEDIAPLUGIN_VIDEO_HEIGHT
                    
45     * This can be defined in config.php.
                    
46     */
                    
50
                    
51//TODO: we should use /u modifier in regex, unfortunately it may not work properly on some misconfigured servers, see lib/filter/urltolink/filter.php ...
                    
52
                    
75        }
                    
76        if (stripos($text, '</a>') === false) {
                    
77            // performance shortcut - all regexes below end with the </a> tag,
                    
                
Command.php git://github.com/manuelpichler/php-change-coverage.git | PHP | 507 lines
                    
102     */
                    
103    private $phpunitBinary = 'phpunit';
                    
104
                    
156
                    
157        $phpunit = new PHP_ChangeCoverage_PHPUnit( $this->phpunitBinary );
                    
158        $phpunit->run( $arguments );
                    
301     *
                    
302     * @param string $phpunit The user specified PHPUnit cli tool.
                    
303     *
                    
306     */
                    
307    protected function parsePhpunitBinary( $phpunit )
                    
308    {
                    
312        }
                    
313        throw new InvalidArgumentException( "Cannot find phpunit binary: '{$phpunit}'." );
                    
314    }
                    
                
oracle.php git://github.com/KumbiaPHP/KumbiaPHP.git | PHP | 265 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * KumbiaPHP web & app Framework
                    
4 *
                    
13 *
                    
14 * @copyright  Copyright (c) 2005 - 2020 KumbiaPHP Team (http://www.kumbiaphp.com)
                    
15 * @license    https://github.com/KumbiaPHP/KumbiaPHP/blob/master/LICENSE   New BSD License
                    
19 */
                    
20require_once CORE_PATH.'libs/db/adapters/pdo.php';
                    
21
                    
86        if (preg_match("/ORDER[\t\n\r ]+BY/i", $sql)) {
                    
87            if (stripos($sql, 'WHERE')) {
                    
88                return preg_replace("/ORDER[\t\n\r ]+BY/i", "AND ROWNUM <= $number ORDER BY", $sql);
                    
92        }
                    
93        if (stripos($sql, 'WHERE')) {
                    
94            return "$sql AND ROWNUM <= $number";
                    
                
 

Source

Language