PageRenderTime 401ms queryTime 43ms sortTime 84ms getByIdsTime 88ms findMatchingLines 89ms

100+ results results for 'php strpos repo:thomasfortier/kohana_base' (401 ms)

Not the results you expected?
index.php https://github.com/karpenoktem/punbb.git | PHP | 244 lines
                    
33	// Is phpinfo() a disabled function?
                    
34	if (strpos(strtolower((string)@ini_get('disable_functions')), 'phpinfo') !== false)
                    
35		message($lang_admin_index['phpinfo disabled']);
                    
128else if (isset($_PHPA))
                    
129	$php_accelerator = '<a href="http://www.php-accelerator.co.uk/">ionCube PHP Accelerator</a>';
                    
130else if (ini_get('apc.enabled'))
                    
130else if (ini_get('apc.enabled'))
                    
131	$php_accelerator ='<a href="http://www.php.net/apc/">Alternative PHP Cache (APC)</a>';
                    
132else if (ini_get('zend_optimizer.optimization_level'))
                    
213						<li><span><?php echo $lang_admin_index['Operating system'] ?>: <?php echo PHP_OS ?></span></li>
                    
214						<li><span>PHP: <?php echo PHP_VERSION ?> - <a href="<?php echo forum_link($forum_url['admin_index']) ?>?action=phpinfo"><?php echo $lang_admin_index['Show info'] ?></a></span></li>
                    
215						<li><span><?php echo $lang_admin_index['Accelerator'] ?>: <?php echo $php_accelerator ?></span></li>
                    
226						<li><span><?php echo $lang_admin_index['Rows'] ?>: <?php echo forum_number_format($total_records) ?></span></li>
                    
227						<li><span><?php echo $lang_admin_index['Size'] ?>: <?php echo $total_size ?></span></li>
                    
228<?php endif; ?>
                    
                
AccessToken.php https://gitlab.com/hoanghung.dev/aloads | PHP | 379 lines
                    
1<?php
                    
2/**
                    
246     * @TODO fix this malarkey - getResponse() should always return an object
                    
247     * @see https://github.com/facebook/facebook-php-sdk-v4/issues/36
                    
248     */
                    
375  {
                    
376    return strpos($this->accessToken, '|') !== false;
                    
377  }
                    
                
wp-cache-phase1.php https://github.com/brandonburke/WordPress-Plugin-Baseline.git | PHP | 264 lines
                    
1<?php
                    
2// Pre-2.6 compatibility
                    
5
                    
6if( !include( WP_CONTENT_DIR . '/wp-cache-config.php' ) )
                    
7	return true;
                    
10
                    
11include( WPCACHEHOME . 'wp-cache-base.php');
                    
12
                    
26
                    
27require_once( WPCACHEHOME . 'wp-cache-phase2.php');
                    
28
                    
28
                    
29$plugins = glob( $wp_cache_plugins_dir . '/*.php' );
                    
30if( is_array( $plugins ) ) {
                    
48function gzip_accepted(){
                    
49	if( ini_get( 'zlib.output_compression' ) ) // don't compress WP-Cache data files when PHP is already doing it
                    
50		return false;
                    
                
User_agent.php https://github.com/usagi-project/mynets1.git | PHP | 500 lines
                    
1<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
235			{
                    
236				if (FALSE !== (strpos(strtolower($this->agent), $key)))
                    
237				{
                    
                
menu-header.php https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br | PHP | 306 lines
                    
1<?php
                    
2/**
                    
13 */
                    
14$self = preg_replace( '|^.*/wp-admin/network/|i', '', $_SERVER['PHP_SELF'] );
                    
15$self = preg_replace( '|^.*/wp-admin/|i', '', $self );
                    
114
                    
115		if ( false !== strpos( $class, 'wp-menu-separator' ) ) {
                    
116			$is_separator = true;
                    
129				$img = '<br />';
                    
130			} elseif ( 0 === strpos( $item[6], 'data:image/svg+xml;base64,' ) ) {
                    
131				$img       = '<br />';
                    
133				$img_class = ' svg';
                    
134			} elseif ( 0 === strpos( $item[6], 'dashicons-' ) ) {
                    
135				$img       = '<br />';
                    
155			$menu_file     = $submenu_items[0][2];
                    
156			$pos           = strpos( $menu_file, '?' );
                    
157
                    
                
TranslationDebugCommand.php https://gitlab.com/Isaki/le331.fr | PHP | 268 lines
                    
1<?php
                    
2
                    
59
                    
60  <info>php %command.full_name% en AcmeDemoBundle</info>
                    
61
                    
63
                    
64  <info>php %command.full_name% --domain=messages en AcmeDemoBundle</info>
                    
65
                    
67
                    
68  <info>php %command.full_name% --only-missing en AcmeDemoBundle</info>
                    
69
                    
71
                    
72  <info>php %command.full_name% --only-unused en AcmeDemoBundle</info>
                    
73
                    
75
                    
76  <info>php %command.full_name% en</info>
                    
77
                    
                
Generator.php https://gitlab.com/edot92/jpagithub | PHP | 283 lines
                    
1<?php
                    
2/**
                    
6 * @copyright 2014 Barry vd. Heuvel / Fruitcake Studio (http://www.fruitcakestudio.nl)
                    
7 * @license   http://www.opensource.org/licenses/mit-license.php MIT
                    
8 * @link      https://github.com/barryvdh/laravel-ide-helper
                    
63     *
                    
64     * @param  string  $format  The format to generate the helper in (php/json)
                    
65     * @return string;
                    
66     */
                    
67    public function generate($format = 'php')
                    
68    {
                    
74
                    
75        return $this->generatePhpHelper();
                    
76    }
                    
125                    $versionStr = $refClass->newInstanceWithoutConstructor()->version();
                    
126					$authMethod = strpos($versionStr, 'Lumen (5.0') === 0 ? 'driver' : (strpos($versionStr, 'Lumen (5.1') === 0 ? 'driver' : 'guard');
                    
127				}
                    
                
unpack.php https://gitlab.com/milo-ft/osTicket | PHP | 270 lines
                    
1<?php
                    
2
                    
54        # Read the main.inc.php script
                    
55        $bootstrap_php = $this->destination . '/bootstrap.php';
                    
56        $lines = explode("\n", file_get_contents($bootstrap_php));
                    
58        # Try and use ROOT_DIR
                    
59        if (strpos($include_path, $this->destination) === 0)
                    
60            $include_path = "ROOT_DIR . '" .
                    
76        if (!file_put_contents($bootstrap_php, implode("\n", $lines)))
                    
77            die("Unable to configure location of INCLUDE_DIR in bootstrap.php\n");
                    
78    }
                    
151     * exclude - (string | array<string>) patterns that will be matched
                    
152     *      using the PHP `fnmatch` function. If any file or folder matches,
                    
153     *      it will be excluded from the copy procedure. Omit or use false
                    
206        $pipes = array();
                    
207        $php = proc_open('php', array(
                    
208            0 => array('pipe', 'r'),
                    
                
XmlDescriptor.php https://gitlab.com/jjpa2018/dashboard | PHP | 247 lines
                    
1<?php
                    
2
                    
208        $objectXML->setAttribute('name', '--'.$option->getName());
                    
209        $pos = strpos($option->getShortcut() ?? '', '|');
                    
210        if (false !== $pos) {
                    
                
options.php https://gitlab.com/code26/selah | PHP | 199 lines
                    
1<?php
                    
2/**
                    
19	public static function admin_page_url() {
                    
20		return admin_url('options-general.php');
                    
21	}
                    
23	public static function admin_page() {
                    
24		return 'options-general.php';
                    
25	}
                    
58		global $updraftplus_admin;
                    
59		add_submenu_page('options-general.php', 'UpdraftPlus', __('UpdraftPlus Backups', 'updraftplus'), apply_filters('option_page_capability_updraft-options-group', 'manage_options'), "updraftplus", array($updraftplus_admin, "settings_output"));
                    
60	}
                    
66		$page = '';
                    
67		if ('options-general.php' == $pagenow) $page = "options.php";
                    
68
                    
101			// Add back the page parameter if it looks like we were on the settings page via an OAuth callback that has now had all parameters removed. This is likely unnecessarily conservative, but there's nothing requiring more than this at the current time.
                    
102			if (substr($referer, -19, 19) == 'options-general.php' && false !== strpos($_SERVER['REQUEST_URI'], '?')) $referer .= '?page=updraftplus';
                    
103
                    
                
XmlDescriptor.php https://github.com/ruudk/symfony.git | PHP | 247 lines
                    
1<?php
                    
2
                    
208        $objectXML->setAttribute('name', '--'.$option->getName());
                    
209        $pos = strpos($option->getShortcut(), '|');
                    
210        if (false !== $pos) {
                    
                
tokenizer.php https://github.com/oluwalataz/zetacomponents.git | PHP | 277 lines
                    
1<?php
                    
2/**
                    
135    {
                    
136        while ( ( $position = strpos( $token->content, "\t" ) ) !== false )
                    
137        {
                    
                
Url.php https://gitlab.com/x33n/respond | PHP | 548 lines
                    
1<?php
                    
2
                    
184    {
                    
185        if (strpos($host, ':') === false) {
                    
186            $this->host = $host;
                    
                
Cookie.php https://github.com/ibnoe/Microweber.git | PHP | 396 lines
                    
1<?php
                    
2/**
                    
6 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
                    
7 * @version $Id: Cookie.php 4302 2011-04-04 00:24:06Z vipsoft $
                    
8 *
                    
118	 * setcookie() replacement -- we don't use the built-in function because
                    
119	 * it is buggy for some PHP versions.
                    
120	 *
                    
120	 *
                    
121	 * @link http://php.net/setcookie
                    
122	 *
                    
142			// Remove port information.
                    
143			$Port = strpos($Domain, ':');
                    
144			if ($Port !== false)  $Domain = substr($Domain, 0, $Port);
                    
214	/**
                    
215	 * Load the cookie content into a php array.
                    
216	 * Parses the cookie string to extract the different variables.
                    
                
RedisProfilerStorage.php https://gitlab.com/Pasantias/pasantiasASLG | PHP | 394 lines
                    
1<?php
                    
2
                    
26    const REDIS_SERIALIZER_NONE = 0;
                    
27    const REDIS_SERIALIZER_PHP = 1;
                    
28
                    
79
                    
80            if ($ip && false === strpos($itemIp, $ip) || $url && false === strpos($itemUrl, $url) || $method && false === strpos($itemMethod, $method)) {
                    
81                continue;
                    
129
                    
130            if (false !== $pos = strpos($item, "\t")) {
                    
131                $result[] = $this->getItemName(substr($item, 0, $pos));
                    
148
                    
149        $profile = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP);
                    
150
                    
175
                    
176        if ($this->setValue($this->getItemName($profile->getToken()), $data, $this->lifetime, self::REDIS_SERIALIZER_PHP)) {
                    
177            if (!$profileIndexed) {
                    
                
smarty_internal_cacheresource_file.php https://gitlab.com/adamlwalker/generatedata | PHP | 264 lines
                    
1<?php
                    
2/**
                    
62        }
                    
63        $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
                    
64        $cached->timestamp = @filemtime($cached->filepath);
                    
178            foreach ($_cache as $_file) {
                    
179                if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
                    
180                // directory ?
                    
229    {
                    
230        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                    
231            clearstatcache(true, $cached->lock_id);
                    
                
theme.php https://github.com/muskmelon/Greemo.git | PHP | 413 lines
                    
1<?php
                    
2/**
                    
56	if ( empty( $redirect ) )
                    
57		$redirect = wp_nonce_url('themes.php?action=delete&template=' . $template, 'delete-theme_' . $template);
                    
58	if ( false === ($credentials = request_filesystem_credentials($redirect)) ) {
                    
61		if ( ! empty($data) ){
                    
62			include_once( ABSPATH . 'wp-admin/admin-header.php');
                    
63			echo $data;
                    
63			echo $data;
                    
64			include( ABSPATH . 'wp-admin/admin-footer.php');
                    
65			exit;
                    
74		if ( ! empty($data) ) {
                    
75			include_once( ABSPATH . 'wp-admin/admin-header.php');
                    
76			echo $data;
                    
76			echo $data;
                    
77			include( ABSPATH . 'wp-admin/admin-footer.php');
                    
78			exit;
                    
                
simpletest.php https://github.com/quarkness/piwik.git | PHP | 478 lines
                    
1<?php
                    
2/**
                    
5 *  @subpackage UnitTester
                    
6 *  @version    $Id: simpletest.php 1723 2008-04-08 00:34:10Z lastcraft $
                    
7 */
                    
12if (version_compare(phpversion(), '5') >= 0) {
                    
13    require_once(dirname(__FILE__) . '/reflection_php5.php');
                    
14} else {
                    
14} else {
                    
15    require_once(dirname(__FILE__) . '/reflection_php4.php');
                    
16}
                    
16}
                    
17require_once(dirname(__FILE__) . '/default_reporter.php');
                    
18require_once(dirname(__FILE__) . '/compatibility.php');
                    
42     *    because the class is an abstract case that should
                    
43     *    not be run. Once PHP4 is dropped this will disappear
                    
44     *    as a public method and "abstract" will rule.
                    
                
CakeRoute.php https://github.com/gustavor/lore.git | PHP | 506 lines
                    
1<?php
                    
2/**
                    
8 *
                    
9 * PHP5
                    
10 *
                    
10 *
                    
11 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
12 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
18 * @link          http://cakephp.org CakePHP(tm) Project
                    
19 * @package       Cake.Routing.Route
                    
19 * @package       Cake.Routing.Route
                    
20 * @since         CakePHP(tm) v 1.3
                    
21 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
140				$slashParam = '/\\' . $namedElements[0][$i];
                    
141				if (strpos($parsed, $slashParam) !== false) {
                    
142					$routeParams[$slashParam] = '(?:/(?P<' . $name . '>' . $this->options[$name] . ')' . $option . ')' . $option;
                    
                
media-template.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 467 lines
                    
1<?php
                    
2/**
                    
17	$class = 'media-modal wp-core-ui';
                    
18	if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
                    
19		$class .= ' ie7';
                    
30	<script type="text/html" id="tmpl-media-modal">
                    
31		<div class="<?php echo $class; ?>">
                    
32			<a class="media-modal-close" href="#" title="<?php esc_attr_e('Close'); ?>"><span class="media-modal-icon"></span></a>
                    
39		<div class="uploader-window-content">
                    
40			<h3><?php _e( 'Drop files to upload' ); ?></h3>
                    
41		</div>
                    
328						if ( size ) { #>
                    
329							<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'full' ); ?>>
                    
330								<?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}
                    
363				<?php for ( $i = 1; $i <= 9; $i++ ) : ?>
                    
364					<option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, 3 ); ?>>
                    
365						<?php echo esc_html( $i ); ?>
                    
                
ArgvInput.php https://gitlab.com/milton2913/myBlog | PHP | 347 lines
                    
1<?php
                    
2
                    
82                $parseOptions = false;
                    
83            } elseif ($parseOptions && 0 === strpos($token, '--')) {
                    
84                $this->parseLongOption($token);
                    
148
                    
149        if (false !== $pos = strpos($name, '=')) {
                    
150            if (0 === strlen($value = substr($name, $pos + 1))) {
                    
288            foreach ($values as $value) {
                    
289                if ($token === $value || 0 === strpos($token, $value.'=')) {
                    
290                    return true;
                    
312            foreach ($values as $value) {
                    
313                if ($token === $value || 0 === strpos($token, $value.'=')) {
                    
314                    if (false !== $pos = strpos($token, '=')) {
                    
                
Table.php https://gitlab.com/techniconline/kmc | PHP | 408 lines
                    
1<?php
                    
2
                    
181        foreach ($row as $key => $cellValue) {
                    
182            if (false === strpos($cellValue, "\n")) {
                    
183                continue;
                    
                
SqlBase.php https://gitlab.com/andecode/theme-spark | PHP | 415 lines
                    
1<?php
                    
2
                    
229    $exposed_options = $form_state->getValue(['pager_options', 'expose', 'items_per_page_options']);
                    
230    if (strpos($exposed_options, '.') !== FALSE) {
                    
231      $error = TRUE;
                    
                
mod.rss.php https://bitbucket.org/mbaily/tremain.git | PHP | 519 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
87		{
                    
88			$items_start = strpos(ee()->TMPL->tagdata, '{exp:channel:entries');
                    
89			
                    
517
                    
518/* End of file mod.rss.php */
                    
519/* Location: ./system/expressionengine/modules/rss/mod.rss.php */
                    
                
vCard.php https://github.com/nerdystudmuffin/dashlet-subpanels.git | PHP | 301 lines
                    
1<?php
                    
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
                    
59		$encoding = '';
                    
60		if(strpos($contact->primary_address_street, "\n") || strpos($contact->primary_address_street, "\r")) {
                    
61			$contact->primary_address_street = str_replace($bad, $good, $contact->primary_address_street);
                    
                
edit.php https://github.com/thisduck/wordpress.git | PHP | 294 lines
                    
29
                    
30	if ( strpos($sendback, 'post.php') !== false )
                    
31		$sendback = admin_url($post_new_file);
                    
114	$submenu_file = "edit.php?post_type=$post_type";
                    
115	$post_new_file = "post-new.php?post_type=$post_type";
                    
116} else {
                    
163<?php screen_icon(); ?>
                    
164<h2><?php echo esc_html( $post_type_object->labels->name ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php
                    
165if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
                    
170if ( isset($_REQUEST['posted']) && $_REQUEST['posted'] ) : $_REQUEST['posted'] = (int) $_REQUEST['posted']; ?>
                    
171<div id="message" class="updated"><p><strong><?php _e('This has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_REQUEST['posted'] ); ?>"><?php _e('View Post'); ?></a> | <a href="<?php echo get_edit_post_link( $_REQUEST['posted'] ); ?>"><?php _e('Edit Post'); ?></a></p></div>
                    
172<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
                    
286
                    
287<?php $wp_list_table->inline_edit(); ?>
                    
288
                    
                
view.html.php https://bitbucket.org/ke2083/transfans.co.uk-website.git | PHP | 496 lines
                    
1<?php
                    
2/**
                    
93			// If the current view is the active item and a contact view for this contact, then the menu item params take priority
                    
94			if (strpos($active->link, 'view=contact') && strpos($active->link, '&id=' . (int) $item->id))
                    
95			{
                    
353		// If it is the active menu item, then the view and item id will match
                    
354		if ((!$active) || ((strpos($active->link, 'view=contact') === false) || (strpos($active->link, '&id=' . (string) $this->item->id) === false)))
                    
355		{
                    
                
all.php https://github.com/Yannix/ImprovedZipArchive.git | PHP | 271 lines
                    
1#!/usr/bin/env php
                    
2<?php
                    
3/**
                    
15
                    
16if (PHP_SAPI != 'cli') {
                    
17    die("It is a very bad idea to run these tests with a non CLI sapi.");
                    
19
                    
20if (strpos(PHP_OS, 'WIN') === 0) {
                    
21    set_include_path('C:/AMP/;.'); // To find external SimpleTest
                    
58
                    
59require_once(__DIR__ . '/../ImprovedZipArchive.php');
                    
60
                    
66
                    
67    protected static function php2fs($string) {
                    
68        return iconv('UTF-8', FS_ENCODING, $string);
                    
                
YamlFileLoader.php https://gitlab.com/leoplanxxi/dr7-web-buap-2016 | PHP | 421 lines
                    
1<?php
                    
2
                    
138    {
                    
139        if (is_string($service) && 0 === strpos($service, '@')) {
                    
140            $this->container->setAlias($id, substr($service, 1));
                    
192            if (is_string($service['factory'])) {
                    
193                if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) {
                    
194                    $parts = explode(':', $service['factory']);
                    
372            $value = array_map(array($this, 'resolveServices'), $value);
                    
373        } elseif (is_string($value) &&  0 === strpos($value, '@=')) {
                    
374            return new Expression(substr($value, 2));
                    
374            return new Expression(substr($value, 2));
                    
375        } elseif (is_string($value) &&  0 === strpos($value, '@')) {
                    
376            if (0 === strpos($value, '@@')) {
                    
378                $invalidBehavior = null;
                    
379            } elseif (0 === strpos($value, '@?')) {
                    
380                $value = substr($value, 2);
                    
                
PhpDumper.php https://github.com/thewiredman/symfony.git | PHP | 442 lines
                    
1<?php
                    
2
                    
20/**
                    
21 * PhpDumper dumps a service container as a PHP class.
                    
22 *
                    
24 */
                    
25class PhpDumper extends Dumper
                    
26{
                    
27    /**
                    
28     * Dumps the service container as a PHP class.
                    
29     *
                    
36     *
                    
37     * @return string A PHP class representing of the service container
                    
38     */
                    
87
                    
88        if (0 === strpos($class, "'") && !preg_match('/^\'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) {
                    
89            throw new \InvalidArgumentException(sprintf('"%s" is not a valid class name.', $class));
                    
                
cache.php https://github.com/mariuz/firetube.git | PHP | 329 lines
                    
1<?php
                    
2/* SVN FILE: $Id$ */
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
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.view.helpers
                    
18 * @since         CakePHP(tm) v 1.0.0.2277
                    
19 * @version       $Revision$
                    
21 * @lastmodified  $Date$
                    
22 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
23 */
                    
                
trackback.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 372 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP Class to handle TrackBacks (send/ping, receive, retreive, detect, seed, etc...)
                    
4 * 
                    
4 * 
                    
5 * <code><?php
                    
6 * include('trackback_cls.php');
                    
11 * 
                    
12 * @version $Id: trackback_cls.php,v 1.2 2004/12/11 18:54:32 Ran Exp $
                    
13 * @copyright Copyright (c) 2004 Ran Aroussi (http://www.blogish.org)
                    
14 * @author Ran Aroussi <ran@blogish.org> 
                    
15 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
                    
16 * 
                    
98        // Did the trackback ping work
                    
99        strpos($response, '<error>0</error>') ? $return = true : $return = false; 
                    
100
                    
                
sajax.php https://bitbucket.org/dgough/annamaria-daneswood-25102012.git | PHP | 416 lines
                    
1<?php
                    
2// ensure this file is being included by a parent file - Joomla! 1.0.x and 1.5 compatible
                    
30
                    
31	// Since str_split used in sajax_get_my_uri is only available on PHP 5, we have
                    
32	// to provide an alternative for those using PHP 4.x
                    
58		if ($myURI == "") {
                    
59			$myURI = $mosConfig_live_site . "/administrator/index2.php";
                    
60		}
                    
60		}
                    
61		$upto = strpos($myURI, "?");
                    
62		if (is_numeric($upto)) {
                    
74	//global $mosConfig_live_site;
                    
75	// $sajax_remote_uri = $mosConfig_live_site . "/administrator/index2.php?option=$option&no_html=1&act=ajax";
                    
76	$sajax_remote_uri = sajax_get_my_uri();
                    
189		// (c) copyright 2005 modernmethod, inc
                    
190		var sajax_debug_mode = <?php echo $sajax_debug_mode ? "true" : "false"; ?>;
                    
191		var sajax_request_type = "<?php echo $t; ?>";
                    
                
profile.php https://github.com/200896596/moodle.git | PHP | 371 lines
                    
1<?php
                    
2
                    
36
                    
37require_once(dirname(__FILE__) . '/../config.php');
                    
38require_once($CFG->dirroot . '/my/lib.php');
                    
38require_once($CFG->dirroot . '/my/lib.php');
                    
39require_once($CFG->dirroot . '/tag/lib.php');
                    
40require_once($CFG->dirroot . '/user/profile/lib.php');
                    
40require_once($CFG->dirroot . '/user/profile/lib.php');
                    
41require_once($CFG->libdir.'/filelib.php');
                    
42
                    
45
                    
46$PAGE->set_url('/user/profile.php', array('id'=>$userid));
                    
47
                    
72    $PAGE->set_heading("$SITE->shortname: $struser");
                    
73    $PAGE->set_url('/user/profile.php', array('id'=>$userid));
                    
74    $PAGE->navbar->add($struser);
                    
                
date.php https://github.com/bet0x/forkcms.git | PHP | 432 lines
                    
1<?php
                    
2
                    
140				// month found
                    
141				if(strpos($longMask, 'mm') !== false && $month === null)
                    
142				{
                    
143					// redefine month
                    
144					$month = substr($data[$this->attributes['name']], strpos($longMask, 'mm'), 2);
                    
145				}
                    
147				// day found
                    
148				if(strpos($longMask, 'dd') !== false && $day === null)
                    
149				{
                    
251					// redefine year
                    
252					$year = substr($data[$this->attributes['name']], strpos($longMask, 'yyyy'), 4);
                    
253
                    
269				// validate year (yy)
                    
270				if(strpos($longMask, 'yy') !== false && strpos($longMask, 'yyyy') === false)
                    
271				{
                    
                
AdminRouter.php https://gitlab.com/najomie/fit-hippie | PHP | 293 lines
                    
1<?php
                    
2/**
                    
147        $id = $screen->id;
                    
148        $start = strpos($id,'_page_loco');
                    
149        // not one of our pages if token not found
                    
273        else {
                    
274            $url = admin_url('admin.php');
                    
275            $args['page'] = $page;
                    
286        if( $query = http_build_query($args,null,'&') ){
                    
287            $sep = false === strpos($url, '?') ? '?' : '&';
                    
288            $url .= $sep.$query;
                    
                
class-itsec-hide-backend.php https://gitlab.com/najomie/fit-hippie | PHP | 361 lines
                    
26
                    
27			$is_jetpack_active = in_array( 'jetpack/jetpack.php', (array) get_option( 'active_plugins', array() ) ) || is_plugin_active_for_network( 'jetpack/jetpack.php' );
                    
28
                    
151					$this->settings['register'] != 'wp-register.php' &&
                    
152					strpos( $_SERVER['REQUEST_URI'], 'wp-register.php' ) !== false ||
                    
153					strpos( $_SERVER['REQUEST_URI'], 'wp-signup.php' ) !== false ||
                    
155						isset( $_REQUEST['redirect_to'] ) &&
                    
156						strpos( $_REQUEST['redirect_to'], 'wp-admin/customize.php' ) !== false
                    
157
                    
160			) &&
                    
161			strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' ) === false
                    
162			&& $this->auth_cookie_expired === false
                    
261
                    
262		if ( strpos( $_SERVER['REQUEST_URI'], 'wp-login.php' ) ) { //are we on the login page
                    
263
                    
                
helper.php https://github.com/chalosalvador/GDS.git | PHP | 467 lines
                    
1<?php
                    
2/**
                    
155		$module->module = preg_replace('/[^A-Z0-9_\.-]/i', '', $module->module);
                    
156		$path = JPATH_BASE.'/modules/'.$module->module.'/'.$module->module.'.php';
                    
157
                    
178
                    
179		require_once JPATH_THEMES.'/system/html/modules.php';
                    
180		$chromePath = JPATH_THEMES.'/'.$app->getTemplate().'/html/modules.php';
                    
240
                    
241		if (strpos($layout, ':') !== false ) {
                    
242			// Get the template and file name from the string
                    
249		// Build the template and base path for the layout
                    
250		$tPath = JPATH_THEMES.'/'.$template.'/html/'.$module.'/'.$layout.'.php';
                    
251		$bPath = JPATH_BASE.'/modules/'.$module.'/tmpl/'.$defaultLayout.'.php';
                    
                
Ini.php https://github.com/studioskylab/Docblox.git | PHP | 293 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Ini.php 16201 2009-06-21 18:51:15Z thomas $
                    
20 */
                    
25 */
                    
26require_once 'Zend/Config.php';
                    
27
                    
105             */
                    
106            require_once 'Zend/Config/Exception.php';
                    
107            throw new Zend_Config_Exception('Filename is not set');
                    
148                     */
                    
149                    require_once 'Zend/Config/Exception.php';
                    
150                    throw new Zend_Config_Exception("Section '$sectionName' cannot be found in $filename");
                    
182             */
                    
183            require_once 'Zend/Config/Exception.php';
                    
184            throw new Zend_Config_Exception($this->_loadFileErrorStr);
                    
                
Request.class.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 658 lines
                    
119		return isset($GLOBALS['currentModuleIsLogModule']); // quick hack...
                    
120		return ereg( '/phpmyvisites.php', Request::getCurrentCompleteUrl() );
                    
121	}
                    
225		{ 
                    
226			$phpmv_url_chemin = $_SERVER['PATH_INFO'];
                    
227		} 
                    
245		$phpmv_url_chemin= Request::getHostUrl() . $phpmv_url_chemin;
                    
246		return substr($phpmv_url_chemin, 0, strrpos($phpmv_url_chemin, '/'));
                    
247	}
                    
355		}
                    
356		$url = '?exec=phpmv&';//'index.php?';
                    
357
                    
530	{
                    
531		//$url = Request::getPhpmvRoot() . "index.php?mod=".$name;
                    
532		$url = generer_url_ecrire('phpmv',"mod=".$name,true);
                    
                
Host.php https://gitlab.com/itlboy/yii2-starter-installed | PHP | 424 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * League.Uri (http://uri.thephpleague.com)
                    
4 *
                    
7 * @copyright 2013-2015 Ignace Nyamagana Butera
                    
8 * @license   https://github.com/thephpleague/uri/blob/master/LICENSE (MIT License)
                    
9 * @version   4.1.0
                    
9 * @version   4.1.0
                    
10 * @link      https://github.com/thephpleague/uri/
                    
11 */
                    
364        if ($this->hasZoneIdentifier) {
                    
365            return $this->withContent(substr($this->data[0], 0, strpos($this->data[0], '%')));
                    
366        }
                    
                
Configuration.php https://github.com/sellingsource/symfony.git | PHP | 362 lines
                    
1<?php
                    
2
                    
188                if (is_integer($i)) {
                    
189                    if (0 === strpos($url, 'https://') || 0 === strpos($url, '//')) {
                    
190                        $urls['http'][] = $urls['ssl'][] = $url;
                    
                
phpBB.php https://bitbucket.org/adatux_/uakami.git | PHP | 538 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * Implementation of phpBB converter.
                    
5 */
                    
5 */
                    
6class phpBB extends BBP_Converter_Base {
                    
7	function __construct() {
                    
357			'to_fieldname' => '_bbp_class',
                    
358			'default'      => 'phpBB'
                    
359		);
                    
457	
                    
458		$count_log2 = strpos($itoa64, $setting[3]);
                    
459	
                    
472		 * We're kind of forced to use MD5 here since it's the only
                    
473		 * cryptographic primitive available in all versions of PHP
                    
474		 * currently in use.  To implement our own low-level crypto
                    
                
YamlFileLoader.php https://bitbucket.org/cryofrost/portal.git | PHP | 339 lines
                    
1<?php
                    
2
                    
130    {
                    
131        if (is_string($service) && 0 === strpos($service, '@')) {
                    
132            $this->container->setAlias($id, substr($service, 1));
                    
295            $value = array_map(array($this, 'resolveServices'), $value);
                    
296        } elseif (is_string($value) &&  0 === strpos($value, '@')) {
                    
297            if (0 === strpos($value, '@?')) {
                    
                
Curl.php https://gitlab.com/yousafsyed/easternglamor | PHP | 453 lines
                    
1<?php
                    
2/**
                    
156     *
                    
157     * @SuppressWarnings(PHPMD.NPathComplexity)
                    
158     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
                    
175     *
                    
176     * @SuppressWarnings(PHPMD.NPathComplexity)
                    
177     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
                    
293    {
                    
294        $optionName = substr($optionName, strpos($optionName, "/") + 1);
                    
295        $optionName = str_replace(['-', ' & '], "_", trim($optionName));
                    
295        $optionName = str_replace(['-', ' & '], "_", trim($optionName));
                    
296        $end = strpos($optionName, ' ');
                    
297        if ($end !== false) {
                    
308     *
                    
309     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
                    
310     * @SuppressWarnings(PHPMD.NPathComplexity)
                    
                
pre-check.php https://bitbucket.org/blackriver/openx.git | PHP | 394 lines
                    
51            // Checking if URL include www or admin in path
                    
52            if (strpos($_SERVER['REQUEST_URI'], '/www/admin/') !== false) {
                    
53                $imageRelativePath = "./precheck/";
                    
258
                    
259    // Test for existence of "parse_url" and "strpos", which are
                    
260    // special cases required for the display of the error message
                    
268    }
                    
269    if (!function_exists('strpos')) {
                    
270        $aErrors[] = $errorString1 . 'strpos' . $errorString2;
                    
322
                    
323    // Check PHP version, as use of PHP < 5.1.4 will result in parse errors
                    
324    $errorMessage = "PHP version 5.1.4, or greater, was not detected.";
                    
338    $phpMemoryLimit = OX_getMemoryLimitSizeInBytes();
                    
339    if ($phpMemoryLimit > 0 && $phpMemoryLimit < $minimumRequiredMemory) {
                    
340        // The memory limit is too low, but can it be increased?
                    
                
Filesystem.php https://github.com/mamayoleksandr/xtbackup.git | PHP | 317 lines
                    
1<?php
                    
2class Storage_Filesystem implements Storage_Interface
                    
55        $this->_baseDir = rtrim($this->_baseDir, '/'). '/';
                    
56        $this->_isWindows = (strpos(strtolower(php_uname('s')), 'win') !== false);
                    
57        $this->_fileStat = new Storage_Filesystem_FileStat();
                    
165            //initialize windows's FileSystemObject
                    
166            /** @noinspection PhpUndefinedClassInspection, PhpUndefinedConstantInspection */
                    
167            $fso = new COM('Scripting.FileSystemObject', null, CP_UTF8);
                    
176            //see Scripting.FileSystemObject on http://msdn.microsoft.com
                    
177            /** @noinspection PhpUndefinedMethodInspection */
                    
178            $folder = $fso->GetFolder($curDir);
                    
                
view.html.php https://bitbucket.org/gnomeontherun/square-one.git | PHP | 280 lines
                    
1<?php
                    
2/**
                    
113		$active	= $app->getMenu()->getActive();
                    
114		if ((!$active) || ((strpos($active->link, 'view=category') === false) || (strpos($active->link, '&id=' . (string) $category->id) === false))) {
                    
115			// Get the layout from the merged category params
                    
                
assets_model.php https://github.com/be3/FUEL-CMS.git | PHP | 331 lines
                    
1<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
3// not pulling from the database so just extend the normal model
                    
4require_once(APPPATH.'libraries/Validator.php');
                    
5
                    
84					(!empty($this->filters['name']) && 
                    
85					(strpos($files[$key]['name'], $this->filters['name']) !== FALSE || strpos($key, $this->filters['name']) !== FALSE)))
                    
86				{
                    
                
Type.php https://bitbucket.org/shashwat_dinasource/bitscentral.git | PHP | 395 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP version 4                                                        |
                    
5// +----------------------------------------------------------------------+
                    
5// +----------------------------------------------------------------------+
                    
6// | Copyright (c) 1997-2002 The PHP Group                                |
                    
7// +----------------------------------------------------------------------+
                    
7// +----------------------------------------------------------------------+
                    
8// | This source file is subject to version 3.0 of the PHP license,       |
                    
9// | that is bundled with this package in the file LICENSE, and is        |
                    
10// | available at through the world-wide-web at                           |
                    
11// | http://www.php.net/license/3_0.txt.                                  |
                    
12// | If you did not receive a copy of the PHP license and are unable to   |
                    
13// | obtain it through the world-wide-web, please send a note to          |
                    
14// | license@php.net so we can mail you a copy immediately.               |
                    
15// +----------------------------------------------------------------------+
                    
                
UploadedFile.php https://gitlab.com/4gdevs/online-class-record-system | PHP | 293 lines
                    
1<?php
                    
2
                    
64    /**
                    
65     * Accepts the information of the uploaded file as provided by the PHP global $_FILES.
                    
66     *
                    
79     * @param string $originalName The original file name
                    
80     * @param string $mimeType     The type of the file as provided by PHP
                    
81     * @param int    $size         The file size
                    
81     * @param int    $size         The file size
                    
82     * @param int    $error        The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants)
                    
83     * @param bool   $test         Whether the test mode is active
                    
238    /**
                    
239     * Returns the maximum size of an uploaded file as configured in php.ini.
                    
240     *
                    
247        if ('' === $iniMax) {
                    
248            return PHP_INT_MAX;
                    
249        }
                    
                
config.php https://github.com/olberger/fusionforge.git | PHP | 396 lines
                    
4 * NOTE: The settings here should probably not need to be changed.
                    
5 * The user-configurable settings have been moved to IniConfig.php
                    
6 * The run-time code has been moved to lib/IniConfig.php:fix_configs()
                    
16define ('_DEBUG_PARSER',    4); // verbose parsing steps
                    
17define ('_DEBUG_TRACE',     8); // test php memory usage, prints php debug backtraces
                    
18define ('_DEBUG_INFO',     16);
                    
32// essential internal stuff
                    
33if (!check_php_version(5,3)) {
                    
34    set_magic_quotes_runtime(0);
                    
242        // do reinit to purge PHP's static cache [43ms]
                    
243        if ( ($lcfile = FindLocalizedFile("LC_MESSAGES/phpwiki.php", 'missing_ok', 'reinit')) ) {
                    
244            include($lcfile);
                    
375    }
                    
376    return defined('PHPWIKI_DIR')
                    
377        ? PHPWIKI_DIR . "/uploads/"
                    
                
LanguageNegotiationInfoTest.php https://gitlab.com/reasonat/test8 | PHP | 209 lines
                    
1<?php
                    
2
                    
126      $langcode = $last[$type];
                    
127      $value = $type == LanguageInterface::TYPE_CONTENT || strpos($type, 'test') !== FALSE ? 'it' : 'en';
                    
128      $this->assertEqual($langcode, $value, format_string('The negotiated language for %type is %language', array('%type' => $type, '%language' => $value)));
                    
137    foreach ($this->languageManager()->getDefinedLanguageTypes() as $type) {
                    
138      $this->assertTrue(strpos($type, 'test') === FALSE, format_string('The %type language is still available', array('%type' => $type)));
                    
139    }
                    
                
commlib.php https://gitlab.com/ElvisAns/tiki | PHP | 392 lines
                    
1<?php
                    
2
                    
9//this script may only be included - so its better to die if called directly.
                    
10if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
                    
11    header("location: index.php");
                    
                
lexer.php https://github.com/nadavkav/Moodle-RTL--Shenkar-Translation-Team-.git | PHP | 393 lines
                    
1<?php  // $Id: lexer.php,v 1.1 2005/01/31 07:39:03 moodler Exp $
                    
2
                    
2
                    
3/* PHP lexer code snarfed from the CVS tree for the lamplib project at 
                    
4 * http://sourceforge.net/projects/lamplib
                    
165     *    Some optimisation to make the sure the
                    
166     *    content is only scanned by the PHP regex
                    
167     *    parser once. Lexer modes must not start
                    
384            if ($action = $this->_regexes[$this->_mode->getCurrent()]->match($raw, $match)) {
                    
385                $count = strpos($raw, $match);
                    
386                $unparsed = substr($raw, 0, $count);
                    
                
class-mb-custom-taxonomy-register.php https://gitlab.com/code26/selah | PHP | 235 lines
                    
1<?php
                    
2/**
                    
111		foreach ( $post_meta as $key => $value ) {
                    
112			if ( false !== strpos( $key, 'label' ) ) {
                    
113				// If post meta has prefix 'label' then add it to $labels.
                    
117				$labels[ str_replace( 'label_', '', $key ) ] = $data;
                    
118			} elseif ( false !== strpos( $key, 'args' ) ) {
                    
119				// If post meta has prefix 'args' then add it to $args.
                    
                
tprScriptParser.php https://github.com/yoyar/tprsp.git | PHP | 456 lines
                    
1<?php
                    
2
                    
214
                    
215		if( FALSE !== ($pos = strpos($teaser, '?'))  ) {
                    
216			return substr($teaser, 0, $pos) . '?';
                    
227
                    
228		}  elseif( FALSE !== ($pos = strpos(substr($teaser, 0, -1), '.'))) {
                    
229
                    
                
OracleSchemaManager.php https://gitlab.com/adrianjose605/SaintW | PHP | 322 lines
                    
1<?php
                    
2/*
                    
101        $dbType = strtolower($tableColumn['data_type']);
                    
102        if(strpos($dbType, "timestamp(") === 0) {
                    
103            if (strpos($dbType, "WITH TIME ZONE")) {
                    
                
Model.class.php https://github.com/liujinsong668/epptime.git | PHP | 295 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2010 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
14 +------------------------------------------------------------------------------
                    
15 * ThinkPHP 简洁模式Model模型类
                    
16 * 只支持原生SQL操作 支持多数据库连接和切换
                    
87        if(!empty($sql)) {
                    
88            if(strpos($sql,'__TABLE__')) {
                    
89                $sql    =   str_replace('__TABLE__',$this->getTableName(),$sql);
                    
110        if(!empty($sql)) {
                    
111            if(strpos($sql,'__TABLE__')) {
                    
112                $sql    =   str_replace('__TABLE__',$this->getTableName(),$sql);
                    
                
html.php https://bitbucket.org/alvinpd/monsterninja.git | PHP | 377 lines
                    
1<?php defined('SYSPATH') or die('No direct access allowed.');
                    
2/**
                    
9 * @copyright  (c) 2007-2010 Kohana Team
                    
10 * @license    http://kohanaphp.com/license
                    
11 */
                    
114		{
                    
115			if (strpos($uri, '://') !== FALSE)
                    
116			{
                    
251	{
                    
252		if (strpos($file, '://') === FALSE)
                    
253		{
                    
283	{
                    
284		if (strpos($file, '://') === FALSE)
                    
285		{
                    
311	{
                    
312		if (strpos($file, '://') === FALSE)
                    
313		{
                    
                
route.php https://github.com/ymtn/core.git | PHP | 589 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
225
                    
226		if (strpos($expression, '(') !== FALSE)
                    
227		{
                    
288	 * The $uri parameter can either be a string for basic regex matching or it
                    
289	 * can be a valid callback or anonymous function (php 5.3+). If you use a
                    
290	 * callback or anonymous function, your method should return an array
                    
488
                    
489		if (strpos($uri, '<') === FALSE AND strpos($uri, '(') === FALSE)
                    
490		{
                    
496			// If the localhost setting does not have a protocol
                    
497			if (strpos($this->_defaults['host'], '://') === FALSE)
                    
498			{
                    
575
                    
576			if (strpos($host, '://') === FALSE)
                    
577			{
                    
                
modrestcurlclient.class.php https://gitlab.com/haque.mdmanzurul/modx-improve-carolyn | PHP | 298 lines
                    
1<?php
                    
2/**
                    
5 */
                    
6require_once dirname(__FILE__) . '/modrestclient.class.php';
                    
7/**
                    
70            case 'GET':
                    
71                $path .= (strpos($host,'?') === false ? '?' : '&').$q;
                    
72                break;
                    
                
bookmark-template.php https://github.com/muskmelon/Greemo.git | PHP | 256 lines
                    
1<?php
                    
2/**
                    
103		if ( $bookmark->link_image != null && $show_images ) {
                    
104			if ( strpos($bookmark->link_image, 'http') === 0 )
                    
105				$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
                    
                
CMB2_Utils.php https://gitlab.com/almoore1/buy-button-wordpress | PHP | 301 lines
                    
1<?php
                    
2/**
                    
32		// Is URL in uploads directory?
                    
33		if ( false === strpos( $img_url, $dir['baseurl'] . '/' ) ) {
                    
34			return false;
                    
149		return (string) (int) $timestamp === (string) $timestamp
                    
150			&& $timestamp <= PHP_INT_MAX
                    
151			&& $timestamp >= ~PHP_INT_MAX;
                    
188
                    
189		if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) {
                    
190			// Windows
                    
225	/**
                    
226	 * Takes a php date() format string and returns a string formatted to suit for the date/time pickers
                    
227	 * It will work with only with the following subset ot date() options:
                    
275	/**
                    
276	 * Helper function for CMB_Utils->php_to_js_dateformat, because php 5.2 was retarded.
                    
277	 * @since  2.2.0
                    
                
Proxy.php https://github.com/digitalstrategyworks/Reese-WordPress.git | PHP | 267 lines
                    
1<?php
                    
2
                    
18 * @subpackage Client_Adapter
                    
19 * @version    $Id: Proxy.php 17059 2009-07-25 11:24:49Z shahar $
                    
20 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
26 */
                    
27require_once 'Microsoft/Uri/Http.php';
                    
28/**
                    
30 */
                    
31require_once 'Microsoft/Http/Client.php';
                    
32/**
                    
34 */
                    
35require_once 'Microsoft/Http/Client/Adapter/Socket.php';
                    
36
                    
119        if (! $this->socket) {
                    
120            require_once 'Microsoft/Http/Client/Adapter/Exception.php';
                    
121            throw new Microsoft_Http_Client_Adapter_Exception("Trying to write but we are not connected");
                    
                
Decode.php https://github.com/mrbanzai/zf2.git | PHP | 247 lines
                    
1<?php
                    
2/**
                    
55        // the part before the first boundary string is discarded:
                    
56        $p = strpos($body, '--' . $boundary . "\n", $start);
                    
57        if ($p === false) {
                    
64
                    
65        while (($p = strpos($body, '--' . $boundary . "\n", $start)) !== false) {
                    
66            $res[] = substr($body, $start, $p-$start);
                    
70        // no more parts, find end boundary
                    
71        $p = strpos($body, '--' . $boundary . '--', $start);
                    
72        if ($p===false) {
                    
132        // default is set new line
                    
133        if (strpos($message, $EOL . $EOL)) {
                    
134            list($headers, $body) = explode($EOL . $EOL, $message, 2);
                    
135        // next is the standard new line
                    
136        } else if ($EOL != "\r\n" && strpos($message, "\r\n\r\n")) {
                    
137            list($headers, $body) = explode("\r\n\r\n", $message, 2);
                    
                
view.php https://github.com/aurelienRT1/ezpublish.git | PHP | 255 lines
                    
1<?php
                    
2//
                    
97            // Without reference there will be a inconsistency with GLOBAL instance and stored ini file.
                    
98            $iniTemp = eZINI::create( $settingFile . '.append.php', $path, null, null, null, true );
                    
99            $iniTemp->removeSetting( $block, $setting );
                    
171                case 'string':
                    
172                    if( strpos( $settingKey, ';' ) )
                    
173                    {
                    
234    $iniFiles = array_merge( $iniFiles, eZDir::recursiveFindRelative( $iniPath, '', '.ini' ) );
                    
235    $iniFiles = array_merge( $iniFiles, eZDir::recursiveFindRelative( $iniPath, '', '.ini.append.php' ) );
                    
236}
                    
239$iniFiles = preg_replace('%.*/%', '', $iniFiles );
                    
240// remove *.ini[.append.php] from file name
                    
241$iniFiles = preg_replace('%\.ini.*%', '.ini', $iniFiles );
                    
                
evahabillage_sommaire.html https://bitbucket.org/pombredanne/spip-zone-treemap.git | HTML | 288 lines
                    
1<?php
                    
2$test_3cols=sql_select('habillage','spip_eva_habillage',"sauvegarde='Defaut'");
                    
3	$tab_3cols=sql_fetch($test_3cols);
                    
4	if (strpos($tab_3cols['habillage'],'3colonnes')) {
                    
5		$test_3_colonnes=true;
                    
11		$test_3_colonnes=false;
                    
12		if (strpos($tab_3cols['habillage'],'droite')) {
                    
13			$test_droite=true;
                    
38<table style="margin-top:-30px; margin-bottom:-10px;"><tr valign="top">
                    
39<?php
                    
40if ($eva_gauche) {
                    
136</tr></table>
                    
137<?php
                    
138$texte_eva='<table><tr><th width=489>';
                    
241<th><select name="eva_mon_bloc_perso_skel_sommaire">
                    
242<?php
                    
243if ($test_3_colonnes) {
                    
                
evahabillage_auteur.html https://bitbucket.org/pombredanne/spip-zone-treemap.git | HTML | 288 lines
                    
1<?php
                    
2$test_3cols=sql_select('habillage','spip_eva_habillage',"sauvegarde='Defaut'");
                    
3	$tab_3cols=sql_fetch($test_3cols);
                    
4	if (strpos($tab_3cols['habillage'],'3colonnes')) {
                    
5		$test_3_colonnes=true;
                    
11		$test_3_colonnes=false;
                    
12		if (strpos($tab_3cols['habillage'],'droite')) {
                    
13			$test_droite=true;
                    
38<table style="margin-top:-30px; margin-bottom:-10px;"><tr valign="top">
                    
39<?php
                    
40if ($eva_gauche) {
                    
136</tr></table>
                    
137<?php
                    
138$texte_eva='<table><tr><th width=489>';
                    
241<th><select name="eva_mon_bloc_perso_skel_auteur">
                    
242<?php
                    
243if ($test_3_colonnes) {
                    
                
Ini.php https://github.com/orchestra-io/sample-openx.git | PHP | 293 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Ini.php 14667 2009-04-05 09:18:21Z rob $
                    
20 */
                    
25 */
                    
26require_once 'Zend/Config.php';
                    
27
                    
105             */
                    
106            require_once 'Zend/Config/Exception.php';
                    
107            throw new Zend_Config_Exception('Filename is not set');
                    
148                     */
                    
149                    require_once 'Zend/Config/Exception.php';
                    
150                    throw new Zend_Config_Exception("Section '$sectionName' cannot be found in $filename");
                    
182             */
                    
183            require_once 'Zend/Config/Exception.php';
                    
184            throw new Zend_Config_Exception($this->_loadFileErrorStr);
                    
                
CheckRouteBehavior.class.php https://bitbucket.org/zjut/labs.git | PHP | 212 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
70            if(':' == substr($val,0,1)) {// 动态变量
                    
71                if(strpos($val,'\\')) {
                    
72                    $type = substr($val,-1);
                    
76                    }
                    
77                }elseif(strpos($val,'^')){
                    
78                    $array   =  explode('|',substr(strstr($val,'^'),1));
                    
134        foreach ($rule as $item){
                    
135            if(0===strpos($item,':')) { // 动态变量获取
                    
136                if($pos = strpos($item,'^') ) {
                    
147        }
                    
148        if(0=== strpos($url,'/') || 0===strpos($url,'http')) { // 路由重定向跳转
                    
149            if(strpos($url,':')) { // 传递动态参数
                    
191        $url   =  preg_replace('/:(\d+)/e','$matches[\\1]',$url);
                    
192        if(0=== strpos($url,'/') || 0===strpos($url,'http')) { // 路由重定向跳转
                    
193            header("Location: $url", true,(is_array($route) && isset($route[1]))?$route[1]:301);
                    
                
smarty_internal_cacheresource_file.php https://gitlab.com/ilya.webcity/anna | PHP | 259 lines
                    
1<?php
                    
2/**
                    
62        }
                    
63        $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
                    
64        Smarty::muteExpectedErrors();
                    
173            foreach ($_cache as $_file) {
                    
174                if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
                    
175                // directory ?
                    
224    {
                    
225        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                    
226            clearstatcache(true, $cached->lock_id);
                    
                
SignedRequest.php https://gitlab.com/wuhang2003/rainloop-webmail | PHP | 386 lines
                    
1<?php
                    
2/**
                    
176  {
                    
177    if (strpos($signedRequest, '.') !== false) {
                    
178      return;
                    
                
ClassCollectionLoaderTest.php https://gitlab.com/pr0055/symfonypizza | PHP | 278 lines
                    
20
                    
21class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase
                    
22{
                    
138    {
                    
139        require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php';
                    
140        require_once __DIR__.'/Fixtures/ClassesWithParents/F.php';
                    
167    {
                    
168        $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
                    
169    }
                    
188        ClassCollectionLoader::enableTokenizer(false);
                    
189        $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
                    
190        ClassCollectionLoader::enableTokenizer(true);
                    
222        spl_autoload_register($r = function ($class) {
                    
223            if (0 === strpos($class, 'Namespaced') || 0 === strpos($class, 'Pearlike_')) {
                    
224                @require_once __DIR__.'/Fixtures/'.str_replace(array('\\', '_'), '/', $class).'.php';
                    
                
index.php https://github.com/justinlyon/scc.git | PHP | 344 lines
                    
1<?php
                    
2/*
                    
5 * If you're seeing this in your browser, and are trying to install Gallery,
                    
6 * you either do not have PHP installed, or if it is installed, it is not
                    
7 * properly enabled. Please visit the following page for assistance:
                    
12 *
                    
13 * $Id: index.php 17580 2008-04-13 00:38:13Z tnalmdal $
                    
14 *
                    
41 * Disable magic_quotes runtime -- it causes problems with legitimate quotes
                    
42 * in our SQL, as well as reading/writing the config.php
                    
43 */
                    
52require_once($g2Base . 'lib/support/GallerySetupUtilities.class');
                    
53define('INDEX_PHP', basename(__FILE__));
                    
54
                    
305    require_once($g2Base . 'modules/core/classes/GalleryUrlGenerator.class');
                    
306    $urlPath = preg_replace('|^(.*/)install/index.php(?:\?.*)?$|s', '$1',
                    
307			    GalleryUrlGenerator::getCurrentRequestUri());
                    
                
sfCommandManager.class.php https://github.com/IDCI-Consulting/WebsiteEval.git | PHP | 381 lines
                    
1<?php
                    
2
                    
16 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
17 * @version    SVN: $Id: sfCommandManager.class.php 21908 2009-09-11 12:06:21Z fabien $
                    
18 */
                    
328  {
                    
329    if (false !== strpos($argument, '='))
                    
330    {
                    
                
ClassCollectionLoaderTest.php https://gitlab.com/cuza/Clinic_Recods | PHP | 274 lines
                    
20
                    
21class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase
                    
22{
                    
138    {
                    
139        require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php';
                    
140        require_once __DIR__.'/Fixtures/ClassesWithParents/F.php';
                    
167    {
                    
168        $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
                    
169    }
                    
188        ClassCollectionLoader::enableTokenizer(false);
                    
189        $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
                    
190        ClassCollectionLoader::enableTokenizer(true);
                    
222        spl_autoload_register($r = function ($class) {
                    
223            if (0 === strpos($class, 'Namespaced') || 0 === strpos($class, 'Pearlike_')) {
                    
224                require_once __DIR__.'/Fixtures/'.str_replace(array('\\', '_'), '/', $class).'.php';
                    
                
lib.preoperation.php https://github.com/yourenglishsolution/YES-ML.git | PHP | 443 lines
                    
1<?php defined("IN_DOCEBO") or die('Direct access is forbidden.');
                    
2
                    
16
                    
17		require_once(_base_.'/lib/lib.platform.php');
                    
18		$pl_man =& PlatformManager::CreateInstance();
                    
26			$GLOBALS['modname'] = 'login';
                    
27			Util::jump_to('../index.php');
                    
28		}
                    
41			
                    
42			Util::jump_to(Get::rel_path('lms').'/index.php?modname=login&op=logout&msg=102');
                    
43		}
                    
50	$GLOBALS['op'] 		= '';
                    
51	if(strpos($GLOBALS['req'], 'lms/profile') === false) {
                    
52		$GLOBALS['req'] = 'lms/profile/renewalpwd';
                    
79 * operation that is needed before loading grafiphs element, menu and so on
                    
80 * index.php?login_user=staff&time=200812101752&token=5D93BCEDF500E9759E4870492AF32E7A
                    
81 */
                    
                
jlparameter.php https://gitlab.com/julienv/joomleague | PHP | 552 lines
                    
1<?php
                    
2/**
                    
3 * @copyright	Copyright (C) 2005-2014 joomleague.at. All rights reserved.
                    
4 * @license		GNU/GPL, see LICENSE.php
                    
5 * Joomla! is free software. This version may have been modified pursuant
                    
8 * other free or open source software licenses.
                    
9 * See COPYRIGHT.php for copyright notices and details.
                    
10 */
                    
147		{
                    
148			if (strpos($data, '{') === 0)
                    
149			{
                    
301
                    
302		return implode(PHP_EOL, $html);
                    
303	}
                    
470
                    
471		if ((isset($this->_elements[$signature]) && !($this->_elements[$signature] instanceof __PHP_Incomplete_Class)) && $new === false)
                    
472		{
                    
                
simpletest.php https://github.com/orchestra-io/sample-openx.git | PHP | 433 lines
                    
1<?php
                    
2    /**
                    
5     *	@subpackage	UnitTester
                    
6     *	@version	$Id: simpletest.php 7321 2007-06-05 09:08:01Z andrew.hill@openads.org $
                    
7     */
                    
12    if (version_compare(phpversion(), '5') >= 0) {
                    
13        require_once(dirname(__FILE__) . '/reflection_php5.php');
                    
14    } else {
                    
14    } else {
                    
15        require_once(dirname(__FILE__) . '/reflection_php4.php');
                    
16    }
                    
39         *    because the class is an abstract case that should
                    
40         *    not be run. Once PHP4 is dropped this will disappear
                    
41         *    as a public method and "abstract" will rule.
                    
205     *    test run. Makes things like error queues
                    
206     *    available to PHP event handlers, and also
                    
207     *    gets around some nasty reference issues in
                    
                
index.html https://github.com/connec/yash.git | HTML | 368 lines
                    
13    <script type="text/javascript" src="jquery.yash.js"></script>
                    
14    <script type="text/javascript" src="yash.syntax.php.js"></script>
                    
15    <script type="text/javascript">
                    
21  <body>
                    
22    <div id="editor">&lt;?php
                    
23
                    
24/**
                    
25 * parser.php
                    
26 */
                    
170      
                    
171      if(strpos($this-&gt;line, '+#') === 0)
                    
172        $this-&gt;handle_loud_comment();
                    
174        $this-&gt;handle_tag();
                    
175      elseif(strpos($this-&gt;line, '-#') === 0)
                    
176        continue;
                    
                
parameter.php https://github.com/rietn/minima.git | PHP | 395 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: parameter.php 20196 2011-01-09 02:40:25Z ian $
                    
4 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
                    
13// Register the element class with the loader.
                    
14JLoader::register('JElement', dirname(__FILE__).'/parameter/element.php');
                    
15
                    
71		if ($data = trim($data)) {
                    
72			if (strpos($data, '{') === 0) {
                    
73				$this->loadJSON($data);
                    
176
                    
177		return implode(PHP_EOL, $html);
                    
178	}
                    
328
                    
329		if ((isset($this->_elements[$signature]) && !($this->_elements[$signature] instanceof __PHP_Incomplete_Class))  && $new === false) {
                    
330			return	$this->_elements[$signature];
                    
                
memcache.php https://github.com/rietn/minima.git | PHP | 410 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: memcache.php 20228 2011-01-10 00:52:54Z eddieajau $
                    
4 * @package		Joomla.Framework
                    
241
                    
242			if (strpos($value->name, $secret.'-cache-'.$group.'-')===0 xor $mode != 'group') {
                    
243				self::$_db->delete($value->name,0);
                    
                
youtube.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 284 lines
                    
1<?php
                    
2
                    
30function youtube_embed_to_short_code( $content ) {
                    
31	if ( false === strpos( $content, 'youtube.com' ) )
                    
32		return $content;
                    
119	// Replace any extra question marks with ampersands - the result of a URL like "http://www.youtube.com/v/9FhMMmqzbD8?fs=1&hl=en_US" being passed in.
                    
120	$query_string_start = strpos( $url, "?" );
                    
121
                    
                
MySQLTableInfo.php https://bitbucket.org/ferOnti/processmaker.git | PHP | 252 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: MySQLTableInfo.php,v 1.20 2006/01/17 19:44:39 hlellelid Exp $
                    
4 *
                    
18 * and is licensed under the LGPL. For more information please see
                    
19 * <http://creole.phpdb.org>.
                    
20 */
                    
21
                    
22require_once 'creole/metadata/TableInfo.php';
                    
23
                    
35    {
                    
36        include_once 'creole/metadata/ColumnInfo.php';
                    
37        include_once 'creole/drivers/mysql/MySQLTypes.php';
                    
57            $is_nullable = ($row['Null'] == 'YES');
                    
58            $is_auto_increment = (strpos($row['Extra'], 'auto_increment') !== false);
                    
59            $size = null;
                    
                
AbstractClassMetadataFactory.php https://github.com/nattaphat/hgis.git | PHP | 389 lines
                    
1<?php
                    
2/*
                    
185        // Check for namespace alias
                    
186        if (strpos($className, ':') !== false) {
                    
187            list($namespaceAlias, $simpleClassName) = explode(':', $className);
                    
270     * Scenarios in a code-generation setup might have access to XML/YAML
                    
271     * Mapping files without the actual PHP code existing here. That is why the
                    
272     * {@see Doctrine\Common\Persistence\Mapping\ReflectionService} interface
                    
358        // Check for namespace alias
                    
359        if (strpos($class, ':') !== false) {
                    
360            list($namespaceAlias, $simpleClassName) = explode(':', $class);
                    
                
TemplateList.php https://gitlab.com/gideonmarked/atls-express | PHP | 388 lines
                    
1<?php namespace Cms\Widgets;
                    
2
                    
199        foreach ($filteredItems as $itemData) {
                    
200            $pos = strpos($itemData->fileName, '/');
                    
201
                    
                
string.php https://github.com/bb-dev/cakephp2x.git | PHP | 332 lines
                    
5 *
                    
6 * PHP Version 5.x
                    
7 *
                    
7 *
                    
8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
9 * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright 2005-2009, 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.5551
                    
19 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
32class String {
                    
33>>>>>>> cakephp/1.3
                    
34
                    
                
theme-install.php https://gitlab.com/mostafame/team_website | PHP | 329 lines
                    
1<?php
                    
2/**
                    
9/** WordPress Administration Bootstrap */
                    
10require_once( dirname( __FILE__ ) . '/admin.php' );
                    
11require( ABSPATH . 'wp-admin/includes/theme-install.php' );
                    
18if ( is_multisite() && ! is_network_admin() ) {
                    
19	wp_redirect( network_admin_url( 'theme-install.php' ) );
                    
20	exit();
                    
23$title = __( 'Add Themes' );
                    
24$parent_file = 'themes.php';
                    
25
                    
26if ( ! is_network_admin() ) {
                    
27	$submenu_file = 'themes.php';
                    
28}
                    
31foreach ( $installed_themes as $k => $v ) {
                    
32	if ( false !== strpos( $k, '/' ) ) {
                    
33		unset( $installed_themes[ $k ] );
                    
                
font_metrics.cls.php https://gitlab.com/Ofcadavidm/RentCarApp | PHP | 363 lines
                    
1<?php
                    
2/**
                    
10
                    
11require_once DOMPDF_LIB_DIR . "/class.pdf.php";
                    
12
                    
18 * with Font_Metrics::save_font_families().
                    
19 * This is typically done only from command line with load_font.php on converting
                    
20 * ttf fonts to ufm with php-font-lib.
                    
21 *
                    
22 * Declared here because PHP5 prevents constants from being declared with expressions
                    
23 */
                    
23 */
                    
24define('__DOMPDF_FONT_CACHE_FILE', DOMPDF_FONT_DIR . "dompdf_font_family_cache.php");
                    
25
                    
52   *
                    
53   * Usually cached by the {@link load_font.php} script
                    
54   *
                    
                
pdo_dblib_driver.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 332 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
109		{
                    
110			if ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE)
                    
111			{
                    
                
StripTags.php https://bitbucket.org/alexandretaz/maniac_divers.git | PHP | 288 lines
                    
1<?php
                    
2/**
                    
178        // Strip HTML comments first
                    
179        while (strpos($value, '<!--') !== false) {
                    
180            $pos   = strrpos($value, '<!--');
                    
280        // Reconstruct tags ending with "/>" as backwards-compatible XHTML tag
                    
281        if (strpos($tagEnd, '/') !== false) {
                    
282            $tagEnd = " $tagEnd";
                    
                
CsvBulkLoader.php https://gitlab.com/djpmedia/silverstripe-framework | PHP | 453 lines
                    
1<?php
                    
2
                    
95                        if (array_key_exists($column, $row)) {
                    
96                            if (strpos($renamedColumn, '_ignore_') !== 0) {
                    
97                                $row[$renamedColumn] = $row[$column];
                    
123            }
                    
124            print $failedMessage . PHP_EOL;
                    
125        } finally {
                    
134        foreach ($this->columnMap as $column => $newColumn) {
                    
135            if (strpos($newColumn, "->") === 0) {
                    
136                $map[$column] = $column;
                    
248            foreach ($this->columnMap as $k => $v) {
                    
249                if (strpos($v, "->") === 0) {
                    
250                    $map[$k] = $k;
                    
324                }
                    
325            } elseif (strpos($fieldName, '.') !== false) {
                    
326                // we have a relation column with dot notation
                    
                
RedisProfilerStorage.php https://bitbucket.org/hill2steve/mobileroom.git | PHP | 373 lines
                    
1<?php
                    
2
                    
27    const REDIS_SERIALIZER_NONE = 0;
                    
28    const REDIS_SERIALIZER_PHP = 1;
                    
29
                    
76
                    
77            if ($ip && false === strpos($itemIp, $ip) || $url && false === strpos($itemUrl, $url) || $method && false === strpos($itemMethod, $method)) {
                    
78                continue;
                    
117
                    
118            if (false !== $pos = strpos($item, "\t")) {
                    
119                $result[] = $this->getItemName(substr($item, 0, $pos));
                    
136
                    
137        $profile = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP);
                    
138
                    
163
                    
164        if ($this->setValue($this->getItemName($profile->getToken()), $data, $this->lifetime, self::REDIS_SERIALIZER_PHP)) {
                    
165
                    
                
componentbase.php https://gitlab.com/alexprowars/bitrix | PHP | 558 lines
                    
1<?php
                    
2
                    
135	 */
                    
136	protected function checkPermissionEditPhp()
                    
137	{
                    
141			{
                    
142				$this->sendJsonResponse(new Error(Loc::getMessage('TRANSLATE_FILTER_ERROR_PHP_EDIT_RIGHTS'), self::STATUS_DENIED));
                    
143			}
                    
145			{
                    
146				$this->addError(new Error(Loc::getMessage('TRANSLATE_FILTER_ERROR_PHP_EDIT_RIGHTS'), self::STATUS_DENIED));
                    
147				$this->includeComponentTemplate(self::TEMPLATE_ERROR);
                    
198		{
                    
199			$params['SHOW_SOURCE_PATH'] = '/bitrix/admin/translate_show_php.php';
                    
200		}
                    
202		{
                    
203			$params['EDIT_SOURCE_PATH'] = '/bitrix/admin/translate_edit_php.php';
                    
204		}
                    
                
smartpix.php https://github.com/galitush2005/RTL-BIDI-Hebrew-Moodle-Plugins.git | PHP | 271 lines
                    
1<?php 
                    
2// Outputs pictures from theme or core pix folder. Only used if $CFG->smartpix is
                    
6 
                    
7// This does NOT use config.php. This is because doing that makes database requests
                    
8// which cause this to take longer (I benchmarked this at 16ms, 256ms with config.php)
                    
40
                    
41    if ($commapos = strpos($url, '?')) {
                    
42        return substr($url, 0, $commapos);
                    
65        // check that PATH_INFO works == must not contain the script name
                    
66        if (!strpos($path_info, $scriptname)) {
                    
67            return makesafe(rawurldecode($path_info));
                    
71    // now if both fail try the old way
                    
72    // (for compatibility with misconfigured or older buggy php implementations)
                    
73    $arr = explode($scriptname, me());
                    
77    
                    
78    error('Unexpected PHP set up. Turn off the smartpix config option.');
                    
79} 
                    
                
Router.php https://github.com/cawago/ci_campusync_auth.git | PHP | 389 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
80		
                    
81		// Load the routes.php file.
                    
82		@include(APPPATH.'config/routes'.EXT);
                    
100			
                    
101			if (strpos($this->default_controller, '/') !== FALSE)
                    
102			{
                    
247	 * This function matches any routes that may exist in
                    
248	 * the config/routes.php file against the URI to
                    
249	 * determine if the class/method need to be remapped.
                    
283				// Do we have a back-reference?
                    
284				if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE)
                    
285				{
                    
                
editlib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 331 lines
                    
1<?php
                    
2
                    
28    foreach($ua as $key=>$value) {
                    
29        if (strpos($key, 'preference_') === 0) {
                    
30            $name = substr($key, strlen('preference_'));
                    
46    global $CFG, $DB;
                    
47    require_once("$CFG->libdir/gdlib.php");
                    
48
                    
114    if ((!isset($user->trackforums) || ($usernew->trackforums != $user->trackforums)) and !$usernew->trackforums) {
                    
115        require_once($CFG->dirroot.'/mod/forum/lib.php');
                    
116        forum_tp_delete_read_records($usernew->id);
                    
151        $notice = get_string('emailchangepending', 'auth', $user);
                    
152        $notice .= '<br /><a href="edit.php?cancelemailchange=1&amp;id='.$user->id.'">'
                    
153                . get_string('emailchangecancel', 'auth') . '</a>';
                    
                
PSR0Locator.php https://gitlab.com/judielsm/Handora | PHP | 349 lines
                    
3/*
                    
4 * This file is part of PhpSpec, A php toolset to drive emergent
                    
5 * design by specification.
                    
13
                    
14namespace PhpSpec\Locator\PSR0;
                    
15
                    
47    /**
                    
48     * @var \PhpSpec\Util\Filesystem
                    
49     */
                    
180            $path = $this->fullSpecPath.substr($path, strlen($this->fullSrcPath));
                    
181            $path = preg_replace('/\.php/', 'Spec.php', $path);
                    
182
                    
187            $path = $this->fullSpecPath.substr($path, strlen($this->srcPath));
                    
188            $path = preg_replace('/\.php/', 'Spec.php', $path);
                    
189
                    
                
bookmarks_controller.php https://github.com/Gereon93/cakemarks.git | PHP | 357 lines
                    
1<?php
                    
2// Copyright (c) 2011 Martin Ueding <dev@martin-ueding.de>
                    
215		$to_url = $to_visit['Bookmark']['url'];
                    
216		if (!strpos($to_url, "://")) {
                    
217			$to_url = "http://".$to_url;
                    
274		foreach ($input as $bookmark) {
                    
275			# Build a CakePHP style array.
                    
276			$q['Bookmark']['title'] = $bookmark['title'];
                    
                
CookieJar.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 385 lines
                    
1<?php
                    
2
                    
23 * @category Authentication
                    
24 * @package  PhpCAS
                    
25 * @author   Adam Franco <afranco@middlebury.edu>
                    
26 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
                    
27 * @link     https://wiki.jasig.org/display/CASC/phpCAS
                    
28 */
                    
35 * @category Authentication
                    
36 * @package  PhpCAS
                    
37 * @author   Adam Franco <afranco@middlebury.edu>
                    
127     * Parse Cookies without PECL
                    
128     * From the comments in http://php.net/manual/en/function.http-parse-cookie.php
                    
129     *
                    
137    {
                    
138        phpCAS::traceBegin();
                    
139        $cookies = array();
                    
                
weeConfigFile.class.php https://github.com/extend/wee.git | PHP | 322 lines
                    
133		static $aFunc = array(
                    
134			'os'		=> 'php_uname("s") == ":1"',
                    
135			'host'		=> 'php_uname("n") == ":1"',
                    
135			'host'		=> 'php_uname("n") == ":1"',
                    
136			'phpver'	=> 'phpversion() == ":1"',
                    
137			'extver'	=> 'phpversion(":1") == ":2"',
                    
137			'extver'	=> 'phpversion(":1") == ":2"',
                    
138			'sapi'		=> 'php_sapi_name() == ":1"',
                    
139			'path'		=> 'dirname(dirname(dirname(__FILE__))) == ":1"',
                    
156			* host:		Hostname, like localhost.example.com.
                    
157			* phpver:	PHP version.
                    
158			* extver:	PHP extension version. Needs one parameter: the extension's name.
                    
158			* extver:	PHP extension version. Needs one parameter: the extension's name.
                    
159			* sapi:		Type of interface between web server and PHP.
                    
160			* path:		The path to the folder containing the bootstrap file.
                    
                
Driver.php https://gitlab.com/ViniciusP/project-games | PHP | 354 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @since         3.0.0
                    
12 * @since         3.0.0
                    
13 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
14 */
                    
94    /**
                    
95     * Returns whether php is able to use this driver for connecting to database
                    
96     *
                    
258        if ((is_int($value) || $value === '0') || (
                    
259            is_numeric($value) && strpos($value, ',') === false &&
                    
260            $value[0] !== '0' && strpos($value, 'e') === false)
                    
                
class_registry.php https://github.com/jasoneh/SMS-Can-.git | PHP | 371 lines
                    
1<?php
                    
2/* SVN FILE: $Id$ */
                    
8 *
                    
9 * PHP versions 4 and 5
                    
10 *
                    
10 *
                    
11 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
12 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
18 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
19 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
20 * @package       cake
                    
21 * @subpackage    cake.cake.libs
                    
22 * @since         CakePHP(tm) v 0.9.2
                    
23 * @version       $Revision$
                    
25 * @lastmodified  $Date$
                    
26 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
27 */
                    
                
 

Source

Language