100+ results results for 'php substr repo:facebook/hiphop-php' (607 ms)
1<?php 2if(!defined('PIWIK_CONFIG_TEST_INCLUDED')) 3{ 4 require_once dirname(__FILE__)."/../../../tests/config_test.php"; 5} 6 7require_once 'LanguagesManager/API.php'; 8 36 37 // we also test that none of the language php files outputs any character on the screen (eg. space before the <?php) 38 $languages = Piwik_LanguagesManager_API::getInstance()->getAvailableLanguages(); 59 60 $plugin = substr($stringLabel, 0, strpos($stringLabel, '_')); 61 $plugins[$plugin] = true; 192 { 193 $count += substr_count($string, $parameter); 194 }class-ftp-pure.php https://github.com/muskmelon/Greemo.git | PHP | 190 lines
1<?php 2/** 2/** 3 * PemFTP - A Ftp implementation in pure PHP 4 * 10 * @author Alexey Dotsenko 11 * @link http://www.phpclasses.org/browse/package/1743.html Site 12 * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html 24 * @author Alexey Dotsenko 25 * @link http://www.phpclasses.org/browse/package/1743.html Site 26 * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html 169 } 170 $block=substr($block, $t); 171 } while(!empty($block));club.php https://gitlab.com/julienv/joomleague | PHP | 190 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 */ 84 $team_name=JRequest::getVar('name'); 85 $team_short_name=strtoupper(substr(ereg_replace("[^a-zA-Z]","",$team_name),0,3)); 86 $teammodel=$this->getModel('team'); 101 { 102 $link='index.php?option=com_joomleague&view=clubs&club.display'; 103 } 105 { 106 $link='index.php?option=com_joomleague&task=club.edit&cid[]='.$post['id']; 107 }AddOnManager.js https://github.com/KenBoyer/CompactCMS.git | JavaScript | 305 lines
119 120 t.urls[n] = u.substring(0, u.lastIndexOf('/')); 121 246 * authorurl : 'http://tinymce.moxiecode.com', 247 * infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', 248 * version : "1.0"smarty_internal_config.php https://github.com/LamCiuLoeng/BookShare.git | PHP | 302 lines
1<?php 2/** 109 if ($this->smarty->use_sub_dirs) { 110 $_filepath = substr($_filepath, 0, 2) . DS 111 . substr($_filepath, 2, 2) . DS 111 . substr($_filepath, 2, 2) . DS 112 . substr($_filepath, 4, 2) . DS 113 . $_filepath; 119 $_compile_dir = $this->smarty->getCompileDir(); 120 return $_compile_dir . $_filepath . '.' . basename($this->source->name) . '.config' . '.php'; 121 }HIncludeFragmentRenderer.php https://gitlab.com/Sigpot/AirSpot | PHP | 160 lines
1<?php 2 90 // we need to sign the absolute URI, but want to return the path only. 91 $uri = substr($this->signer->sign($this->generateFragmentUri($uri, $request, true)), strlen($request->getSchemeAndHttpHost())); 92 }File.php https://github.com/robertleeplummerjr/bluebox.git | PHP | 245 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: File.php 3769 2008-12-15 00:48:56Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 125 // Get the id from the filename 126 $array[] = substr(current(explode('~', $file)), $offset); 127 } 159 // Find the hash of the data 160 $hash = substr($data, 0, 40); 161 162 // Remove the hash from the data 163 $data = substr($data, 40); 164File.php https://github.com/yamamoto123/Ushahidi_Web.git | PHP | 245 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: File.php 3917 2009-01-21 03:06:22Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 125 // Get the id from the filename 126 $array[] = substr(current(explode('~', $file)), $offset); 127 } 159 // Find the hash of the data 160 $hash = substr($data, 0, 40); 161 162 // Remove the hash from the data 163 $data = substr($data, 40); 164Editor.php https://github.com/kervin/kyzstudio.git | PHP | 187 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Editor.php 20116 2010-01-07 14:18:34Z matthew $ 21 */ 23/** Zend_Dojo_View_Helper_Dijit */ 24#require_once 'Zend/Dojo/View/Helper/Dijit.php'; 25 26/** Zend_Json */ 27#require_once 'Zend/Json.php'; 28 157 { 158 if ('[]' == substr($name, -2)) { 159 $name = substr($name, 0, strlen($name) - 2);commands.php https://github.com/lxcenter/hypervm.git | PHP | 222 lines
1<?php 2/* 21 * 22 * This is the File Manager Connector for PHP. 23 */ 174 // Get the extension. 175 $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; 176 $sExtension = strtolower( $sExtension ) ;position.php https://github.com/fusenigk/mantisbt-1.git | PHP | 173 lines
1<?php 2/** 3* Locate a byte index given a UTF-8 character index 4* @version $Id: position.php,v 1.1 2006/10/01 00:01:31 harryf Exp $ 5* @package utf8 13* index of that character. Can be useful when you want to 14* PHP's native string functions but we warned, locating 15* the byte can be expensive 45 // $c -> character offset into $str 46 $c = strlen(utf8_decode(substr($str,0,$i))); 47 78 // determine new character offset 79 $c += strlen(utf8_decode(substr($str,$i,$j-$i))); 80 } else { 81 // ditto 82 $c -= strlen(utf8_decode(substr($str,$j,$i-$j))); 83 }graphparser.c https://gitlab.com/envieidoc/tomato | C | 357 lines
25 26#include "graphparser.h" 27#include "avfilter.h" 335 av_log(log_ctx, AV_LOG_ERROR, 336 "Unable to parse graph description substring: \"%s\"\n", 337 filters - 1);Database.php https://gitlab.com/yousafsyed/easternglamor | PHP | 336 lines
1<?php 2/** 209 $extension = strrchr($filename, '.'); 210 $filenameWoExtension = substr($filename, 0, -1 * strlen($extension)); 211 while ($this->fileExists($directory . $filenameWoExtension . '_' . $index . $extension)) {Query.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 356 lines
1<?php 2/** 24 */ 25#require_once 'Zend/Dom/Query/Css2Xpath.php'; 26 29 */ 30#require_once 'Zend/Dom/Query/Result.php'; 31 32/** @see Zend_Xml_Security */ 33#require_once 'Zend/Xml/Security.php'; 34 35/** @see Zend_Xml_Exception */ 36#require_once 'Zend/Xml/Exception.php'; 37 135 // breaking XML declaration to make syntax highlighting work 136 if ('<' . '?xml' == substr(trim($document), 0, 5)) { 137 if (preg_match('/<html[^>]*xmlns="([^"]+)"[^>]*>/i', $document, $matches)) {PanelControl.php https://bitbucket.org/iiic/iszp.git | PHP | 351 lines
1<?php 2 242 { 243 $key = $key ? substr($key, 2) : NULL; 244 $this->setState((int)$key, $open); 249 { 250 $parent = $parent ? substr($parent, 2) : NULL; 251 329 330 $fromType = substr($from, 0, 1); 331 $from = substr($from, 2); 332 333 $toType = substr($to, 0, 1); 334 $to = substr($to, 2);YamlFileLoader.php https://github.com/outlawscumbag/symfony.git | PHP | 325 lines
1<?php 2 128 if (is_string($service) && 0 === strpos($service, '@')) { 129 $this->container->setAlias($id, substr($service, 1)); 130 284 if (0 === strpos($value, '@?')) { 285 $value = substr($value, 2); 286 $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; 287 } else { 288 $value = substr($value, 1); 289 $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; 291 292 if ('=' === substr($value, -1)) { 293 $value = substr($value, 0, -1);InstanceTest.php https://gitlab.com/axeltizon/magento-demopoweraccess | PHP | 139 lines
1<?php 2/** 7 8class InstanceTest extends \PHPUnit_Framework_TestCase 9{ 129 $this->assertContains('<block class="' . $model->getType() . '"', $result); 130 $this->assertEquals(count($params), substr_count($result, '<action method="setData">')); 131 $this->assertContains('<argument name="name" xsi:type="string">display_mode</argument>', $result);DiConfigFilesTest.php https://gitlab.com/axeltizon/magento-demopoweraccess | PHP | 155 lines
1<?php 2/** 9 10class DiConfigFilesTest extends \PHPUnit_Framework_TestCase 11{ 98 foreach ($common as $path => $content) { 99 $output[] = [substr($path, strlen(BP)), $content]; 100 }Chain.php https://gitlab.com/rsilveira1987/Expresso | PHP | 169 lines
1<?php 2/** 18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) 19 * @version $Id: Chain.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $ 20 * @license http://framework.zend.com/license/new-bsd New BSD License 23/** Zend_Controller_Router_Route_Abstract */ 24require_once 'Zend/Controller/Router/Route/Abstract.php'; 25 80 if ($key > 0 && $matchedPath !== null) { 81 $separator = substr($subPath, 0, strlen($this->_separators[$key])); 82 86 87 $subPath = substr($subPath, strlen($separator)); 88 } 105 if ($matchedPath !== null) { 106 $subPath = substr($subPath, strlen($matchedPath)); 107 $separator = substr($subPath, 0, strlen($this->_separators[$key]));hash.php https://gitlab.com/gundambison/secure | PHP | 198 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 6 * 40/** 41 * PHP ext/hash compatibility package 42 * 47 * @link http://codeigniter.com/user_guide/ 48 * @link http://php.net/hash 49 */ 52 53if (is_php('5.6')) 54{ 64 * 65 * @link http://php.net/hash_equals 66 * @param string $known_stringMath.php https://bitbucket.org/blackriver/openx.git | PHP | 154 lines
1<?php 2/** 18 * @license http://framework.zend.com/license/new-bsd New BSD License 19 * @version $Id: Math.php 8672 2008-03-07 21:20:42Z thomas $ 20 */ 24 * Utility class for proxying math function to bcmath functions, if present, 25 * otherwise to PHP builtin math operators, with limited detection of overflow conditions. 26 * Sampling of PHP environments and platforms suggests that at least 80% to 90% support bcmath. 56 * Surprisingly, the results of this implementation of round() 57 * prove better than the native PHP round(). For example, try: 58 * round(639.795, 2); 96 // zero fill digits to the left of the decimal place 97 $op1 = substr($op1, 0, $decPos + $precision) . str_pad('', abs($precision), '0'); 98 } 152 || !extension_loaded('bcmath')) { 153 require_once 'Zend/Locale/Math/PhpMath.php'; 154}NutshellApi.php https://github.com/Doap/nutshell-api-php.git | PHP | 195 lines
1<?php 2 23 * Requires PHP 5.0+ and the CURL and JSON modules. 24 * CURL: http://php.net/manual/en/book.curl.php 25 * JSON Module: http://pecl.php.net/package/json 161 protected function _generateRequestId() { 162 return substr(md5(rand()), 0, 8); 163 } 167 * 168 * Can be overridden to support PHP installations without built-in JSON support. 169 */ 176 * 177 * Can be overridden to support PHP installations without built-in JSON support. 178 */FileProfilerStorage.php https://github.com/outlawscumbag/symfony.git | PHP | 223 lines
1<?php 2/* 38 } 39 $this->folder = substr($dsn, 5); 40 166 // Uses 4 last characters, because first are mostly the same. 167 $folderA = substr($token, -2, 2); 168 $folderB = substr($token, -4, 2);detect.php https://gitlab.com/gricelya/rental | PHP | 261 lines
1<?php 2 12 * @copyright Bastian Allgeier 13 * @license http://www.opensource.org/licenses/mit-license.php MIT License 14 */ 26 /** 27 * Checks if the required php version is installed 28 * 31 */ 32 public static function php($min = '5.3') { 33 return version_compare(PHP_VERSION, $min, '>='); 36 /** 37 * Checks if PHP is running on Apache 38 * 204 $absolute = $_SERVER['SCRIPT_FILENAME']; 205 return substr($absolute, 0, strpos($absolute, $local)); 206 }Inline.php https://gitlab.com/noirscape/myimouto | PHP | 193 lines
1<?php 2/** 131 while ($orig[0] !== false && $final[0] !== false && 132 substr($orig[0], 0, 1) == ' ' && 133 substr($final[0], 0, 1) == ' ') { 133 substr($final[0], 0, 1) == ' ') { 134 $prefix .= substr($orig[0], 0, 1); 135 $orig[0] = substr($orig[0], 1); 135 $orig[0] = substr($orig[0], 1); 136 $final[0] = substr($final[0], 1); 137 } 179 // Eat a word with any preceding whitespace. 180 $spaces = strspn(substr($string, $pos), " \n"); 181 $nextpos = strcspn(substr($string, $pos + $spaces), " \n"); 181 $nextpos = strcspn(substr($string, $pos + $spaces), " \n"); 182 $words[] = str_replace("\n", $newlineEscape, substr($string, $pos, $spaces + $nextpos)); 183 $pos += $spaces + $nextpos;Memcached.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 159 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 129 130 if (is_string($data) && (substr($data, 0, strlen(self::CODE_WORD)) == self::CODE_WORD)) { 131 // Seems we've got chunked dataclass-path-processor.php https://gitlab.com/campus-academy/krowkaramel | PHP | 186 lines
76 77 // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged 78 $directory = @is_file( $file ) ? dirname( $file ) : $file; 81 } 82 // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged 83 147 // We're only able to find the absolute path for plugin/theme PHP files. 148 if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) { 149 return null; 153 $normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path; 154 // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 155 if ( @is_file( $normalized_check ) ) { 171 // We want to resolve symbolic links for consistency with __DIR__ paths. 172 // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 173 $real_path = @realpath( $path );smarty_internal_parsetree.php https://gitlab.com/garabedian.kevin/web2TB | PHP | 393 lines
188 } else { 189 $more_php = $subtree->to_smarty_php(); 190 } 294 if (substr($subtree, 0, 1) == '?') { 295 $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>?' . substr($subtree, 1); 296 } elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') { 296 } elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') { 297 $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>%' . substr($subtree, 1); 298 } else { 305 if (substr($subtree, 0, 1) == '>') { 306 $code = substr($code, 0, strlen($code) - 1) . '%<?php ?>>' . substr($subtree, 1); 307 } else { 314 if (substr($subtree, 0, 1) == '>') { 315 $code = substr($code, 0, strlen($code) - 1) . '?<?php ?>>' . substr($subtree, 1); 316 } else {File.php https://github.com/AlinT/socorro.git | PHP | 245 lines
1<?php defined('SYSPATH') or die('No direct script access.'); 2/** 4 * 5 * $Id: File.php 3160 2008-07-20 16:03:48Z Shadowhand $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 125 // Get the id from the filename 126 $array[] = substr(current(explode('~', $file)), $offset); 127 } 159 // Find the hash of the data 160 $hash = substr($data, 0, 40); 161 162 // Remove the hash from the data 163 $data = substr($data, 40); 164class-credits-options.php https://gitlab.com/woxiprogrammers/infinia-wordpress | PHP | 161 lines
1<?php 2class Footer_Credits_Options { 89 private static function get_default_site() { 90 $domain = strtolower(parse_url(site_url(),PHP_URL_HOST)); 91 $p = strpos($domain,'www.') ; 91 $p = strpos($domain,'www.') ; 92 if (($p !== FALSE) && ($p == 0)) $domain = substr($domain,4); 93 return $domain;Editor.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 187 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Editor.php 20116 2010-01-07 14:18:34Z matthew $ 21 */ 23/** Zend_Dojo_View_Helper_Dijit */ 24// require_once 'Zend/Dojo/View/Helper/Dijit.php'; 25 26/** Zend_Json */ 27// require_once 'Zend/Json.php'; 28 157 { 158 if ('[]' == substr($name, -2)) { 159 $name = substr($name, 0, strlen($name) - 2);Calendar.php https://bitbucket.org/jokusafet/magento2.git | PHP | 137 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 47 * 48 * @SuppressWarnings(PHPMD.UnusedLocalVariable) 49 */ 93 /* Most localized files use the 2 character locale. */ 94 $locale = substr($locale, 0, 2); 95 $localizedJsFilePath = $this->_getUrlPathByLocale($locale);Language.php https://github.com/azouts/oscommerce.git | PHP | 132 lines
1<?php 2/* 51 $this->loadIniFile(); 52 $this->loadIniFile(OSCOM::getSiteApplication() . '.php'); 53 } 84 if ( is_null($filename) ) { 85 if ( file_exists(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/Languages/' . $language_code . '.php') ) { 86 $contents = file(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/Languages/' . $language_code . '.php'); 90 } else { 91 if ( substr(realpath(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/Languages/' . $language_code . '/' . $filename), 0, strlen(realpath(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/Languages/' . $language_code))) != realpath(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/Languages/' . $language_code) ) { 92 return array(); 106 107 $firstchar = substr($line, 0, 1); 108 112 if ( $delimiter !== false ) { 113 $key = trim(substr($line, 0, $delimiter)); 114 $value = trim(substr($line, $delimiter + 1));AbstractFieldCoder.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 158 lines
1<?php 2/* 35 36require_once 'api/Wrapper.php'; 37 76 // Field is multilingual and after cutting off _xx_YY should be skipped (CRM-7230)… 77 if ((preg_match('/_[a-z][a-z]_[A-Z][A-Z]$/', $fldName) && in_array(substr($fldName, 0, -6), $skipFields))) { 78 return TRUE;frmfolders.html https://bitbucket.org/pombredanne/spip-zone-treemap.git | HTML | 192 lines
5 * Licensed under the terms of the GNU Lesser General Public License: 6 * http://www.opensource.org/licenses/lgpl-license.php 7 * 135 if ( folderPath != '/' ) 136 sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ; 137minifyTextarea.php https://github.com/soitun/minify.git | PHP | 183 lines
1<?php 2die('Disabled: use this only for testing'); 3 4$app = (require __DIR__ . '/../../bootstrap.php'); 5/* @var \Minify\App $app */ 6 7// use FirePHP if not already setup 8if (!$app->config->errorLogger) { 96 if ($m[1] > 200) { 97 $msg .= h(substr($input, ($m[1] - 200), 200)); 98 } else { 98 } else { 99 $msg .= h(substr($input, 0, $m[1])); 100 } 105 $msg .= "<span style='background:#c00;color:#fff'>$highlighted</span>"; 106 $msg .= h(substr($input, $m[1] + 1, 200)) . "</span></pre>"; 107 }Url.php https://gitlab.com/x33n/respond | PHP | 548 lines
1<?php 2 91 // Always ensure that the path begins with '/' if set and something is before the path 92 if ($url && $parts['path'][0] != '/' && substr($url, -1) != '/') { 93 $url .= '/';_functions.php https://gitlab.com/bradanlane/AirPRS | PHP | 227 lines
1<?php 2 4 5$conf = parse_ini_file("/appdata/airprs/php_db_settings.ini"); 6$default_key = "af14a856-ae0e-44f1-878b-d4f0a747d762"; 62 $temp_key = sprintf('%02x%02x%02x%02x', $parts[0], $parts[1], $parts[2], $parts[3]); 63 $temp_key = $temp_key . substr($default_key, 8); 64 printf ("key = %s\n", $temp_key); 192 193 $file_parts = pathinfo($_SERVER['PHP_SELF']); 194 $data = array (imdb_scraper.php https://github.com/aramk/IMDb-Scraper.git | PHP | 185 lines
1<?php 2 9By Aram Kocharyan 10http://ak.net84.net/php/imdb-scraper/ 11akarmenia@gmail.com 16// Utility functions 17require_once('util.php'); 18 107 // Run a search using the words and see how many matches each search result gets 108 $counts = substr_count_arrays($titles, $query_bits); 109VarCloner.php https://gitlab.com/Sigpot/AirSpot | PHP | 324 lines
1<?php 2 105 $stub->cut = $cut; 106 $stub->value = substr($v, 0, -$cut); 107 } else { 114 $stub->cut = $cut; 115 $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); 116 } 148 case 'object': 149 if (empty($objRefs[$h = $zval['object_handle'] ?: ($hashMask ^ hexdec(substr(spl_object_hash($v), $hashOffset, PHP_INT_SIZE)))])) { 150 $stub = new Stub(); 164 } else { 165 $h = $hashMask ^ hexdec(substr(spl_object_hash($stub->value), $hashOffset, PHP_INT_SIZE)); 166 } 321 322 self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE)); 323 }Command.php https://github.com/nicnocquee/PPION-Website.git | PHP | 512 lines
1<?php 2 268 if (false !== $pos = strrpos($name, ':')) { 269 $namespace = substr($name, 0, $pos); 270 $name = substr($name, $pos + 1); 378 $name, 379 $_SERVER['PHP_SELF'].' '.$name 380 );Bundle.php https://github.com/jdewit/symfony.git | PHP | 203 lines
1<?php 2 113 114 return substr($class, 0, strrpos($class, '\\')); 115 } 161 162 return $this->name = false === $pos ? $name : substr($name, $pos + 1); 163 } 181 $finder = new Finder(); 182 $finder->files()->name('*Command.php')->in($dir); 183 189 } 190 $class = $ns.'\\'.$file->getBasename('.php'); 191 if ($this->container) {ranks.php https://github.com/WeMake-IT/Hosting-Service.git | PHP | 202 lines
1<?php 2/* 46 47if(!isforumadmin($userID) OR mb_substr(basename($_SERVER['REQUEST_URI']),0,15) != "admincenter.php") die($_language->module['access_denied']); 48 75 @chmod($filepath.$rank['name'], 0755); 76 $file_ext=strtolower(mb_substr($rank['name'], strrpos($rank['name'], "."))); 77 $file=$id.$file_ext; 119 120 echo'<h1>¤ <a href="admincenter.php?site=ranks" class="white">'.$_language->module['user_ranks'].'</a> » '.$_language->module['add_rank'].'</h1>'; 121 121 122 echo'<form method="post" action="admincenter.php?site=ranks" enctype="multipart/form-data"> 123 <table width="100%" border="0" cellspacing="1" cellpadding="3"> 151 152 echo'<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=ranks&action=add\');return document.MM_returnValue" value="'.$_language->module['new_rank'].'" /><br /><br />'; 153LexerNeedle.php https://github.com/bshaffer/ChartDown.git | PHP | 238 lines
1<?php 2 48 { 49 return substr($this->text, $this->cursor); 50 } 58 { 59 $rest = substr($this->text, $this->cursor); 60 $this->moveToEnd(); 131 132 $text = substr($this->text, $this->cursor, $pos - $this->cursor); 133 147 { 148 $prev = substr($this->text, $this->cursor, $pos - $this->cursor); 149 $this->moveTo($text); 195 { 196 return substr_count(substr($this->text, $this->cursor), "\n") + 1; 197 }FileController.php https://bitbucket.org/posinsk/poadminbundle.git | PHP | 272 lines
1<?php 2 103 $this->getLogger()->setSubject($dir)->logDirRemove(); 104 $this->rmdirRecursive($webDir . '/' . substr($dir, 1)); 105 } 109 $this->getLogger()->setSubject($file)->logFileRemove(); 110 unlink($webDir . '/' . substr($file, 1)); 111 } 154 155 $uploadedFilename = $filename[0] . substr(uniqid(), 10, 3) . '.' . $extension; 156 }Cache.php https://github.com/luisbraschi/ursp.git | PHP | 250 lines
1<?php 2/** 18 * @license http://framework.zend.com/license/new-bsd New BSD License 19 * @version $Id: Cache.php 21974 2010-04-23 17:10:17Z alexander $ 20 */ 132 // security controls are explicit 133 #require_once str_replace('_', DIRECTORY_SEPARATOR, $backendClass) . '.php'; 134 } else { 145 if (!$autoload) { 146 $file = str_replace('_', DIRECTORY_SEPARATOR, $backendClass) . '.php'; 147 if (!(self::_isReadable($file))) { 174 // security controls are explicit 175 #require_once str_replace('_', DIRECTORY_SEPARATOR, $frontendClass) . '.php'; 176 } else { 232 * Returns TRUE if the $filename is readable, or FALSE otherwise. 233 * This function uses the PHP include_path, where PHP's is_readable() 234 * does not.CurrencyTest.php https://github.com/MontmereLimited/zf2.git | PHP | 176 lines
1<?php 2/** 42 */ 43class CurrencyTest extends \PHPUnit_Framework_TestCase 44{ 117 } catch (\Exception $e) { 118 if (substr($e->getMessage(), 0, 15) == 'No region found') { 119 $this->assertContains('within the locale', $e->getMessage()); 130 } catch (\Exception $e) { 131 if (substr($e->getMessage(), 0, 15) == 'No region found') { 132 $this->assertContains('within the locale', $e->getMessage());View.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 262 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 70 } else { 71 $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255)); 72 }realplexor.php https://github.com/vinks/kohana-realplexor.git | PHP | 358 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 2/** 3 * Dklab_Realplexor PHP API for Kohana. 4 * 161 if (strlen($this->_namespace) && strpos($id, $this->_namespace) === 0) 162 $id = substr($id, strlen($this->_namespace)); 163 234 if ($from && strlen($this->_namespace) && strpos($id, $this->_namespace) === 0) 235 $id = substr($id, strlen($this->_namespace)); 236 296 if (@fwrite($fs, $data) === false) 297 throw new Exception($php_errormsg); 298 300 { 301 throw new Exception($php_errormsg); 302 break;Bundle.php https://gitlab.com/daniruizcamacho/pfcascensores | PHP | 203 lines
1<?php 2 113 114 return substr($class, 0, strrpos($class, '\\')); 115 } 161 162 return $this->name = false === $pos ? $name : substr($name, $pos + 1); 163 } 181 $finder = new Finder(); 182 $finder->files()->name('*Command.php')->in($dir); 183 189 } 190 $class = $ns.'\\'.$file->getBasename('.php'); 191 if ($this->container) {BufferedReader.php https://gitlab.com/Isaki/le331.fr | PHP | 196 lines
1<?php 2/* 21 22include_once 'phing/system/io/Reader.php'; 23 83 84 $data = substr($data, 0, $validSize); 85Nlm30CitationSchemaCitationAdapter.inc.php https://github.com/mbehiels/pkp-lib.git | PHP | 164 lines
1<?php 2 3/** 4 * @file plugins/metadata/nlm30/filter/Nlm30CitationSchemaCitationAdapter.inc.php 5 * 117 // Remove the name space prefix 118 $propertyName = substr($fieldName, $namespacePrefixLength); 119 if (in_array($propertyName, array('person-group[@person-group-type="author"]', 'person-group[@person-group-type="editor"]'))) {Default.php https://github.com/gryzz/crystal_magento.git | PHP | 206 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 181 { 182 return substr($this->getFieldIdPrefix(), 0, -1); 183 }class.pop3.php https://github.com/mrbmc/erector.git | PHP | 391 lines
1<?php 2/*~ class.pop3.php 3.---------------------------------------------------------------------------. 4| Software: PHPMailer - PHP email class | 5| Version: 2.0.0 rc2 | 7| Info: http://phpmailer.sourceforge.net | 8| Support: http://sourceforge.net/projects/phpmailer/ | 9| ------------------------------------------------------------------------- | 30 * 31 * Author: Richard Davey (rich@corephp.co.uk) 32 * License: LGPL, see PHPMailer License 188 /* 189 On Windows this will raise a PHP Warning error if the hostname doesn't exist. 190 Rather than supress it with @fsockopen, let's capture it cleanly instead 232 // Does not work on Windows 233 if (substr(PHP_OS, 0, 3) !== 'WIN') { 234 socket_set_timeout($this->pop_conn, $tval, 0);XmlParser.php https://gitlab.com/thallian/freebsd-roles | PHP | 229 lines
1<?php 2 93 94 if (version_compare(PHP_VERSION, '5.4.0', '>=')) { 95 $dom->loadHTML($input, LIBXML_NONET); 155 if (strpos($data, '<?xml') !== false) { 156 $data = substr($data, 0, strrpos($data, '?>')); 157 $data = str_replace("'", '"', $data); 162 if ($p1 !== false && $p2 !== false) { 163 $encoding = substr($data, $p1 + 10, $p2 - $p1 - 10); 164 $encoding = strtolower($encoding);DashletsDialog.php https://gitlab.com/tjaafar/SuiteCRM | PHP | 193 lines
1<?php 2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 38 39include('include/MySugar/DashletsDialog/DashletsDialog.php'); 40 46 47 require_once($GLOBALS['sugar_config']['cache_dir'].'dashlets/dashlets.php'); 48 74 75 $directory = substr($files['meta'], 0, strrpos($files['meta'], '/') + 1); 76 if(is_file($directory . $files['class'] . '.' . $current_language . '.lang.php')) 76 if(is_file($directory . $files['class'] . '.' . $current_language . '.lang.php')) 77 require_once($directory . $files['class'] . '.' . $current_language . '.lang.php'); 78 elseif(is_file($directory . $files['class'] . '.en_us.lang.php')) 78 elseif(is_file($directory . $files['class'] . '.en_us.lang.php')) 79 require_once($directory . $files['class'] . '.en_us.lang.php'); 80proxy_base.php https://github.com/mackensen/moodle.git | PHP | 152 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 73 $serverurl = trim(config::get('server_url')); 74 if (PHPUNIT_TEST) { 75 $serverurl = (new moodle_url(TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER))->out(false); 76 } 77 if (substr($serverurl, -1) == '/') { 78 $serverurl = rtrim($serverurl, '/'); 79 } 80 if (substr($serverurl, -4) == '/api') { 81 $serverurl = rtrim($serverurl, '/api'); 107 plugin::COMPONENT, 108 (new moodle_url('/admin/settings.php?section=modsettingbigbluebuttonbn'))->out() 109 ); 143 ) { 144 if (PHPUNIT_TEST && !defined('TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER')) { 145 return true; // In case we still use fetch and mock server is not defined, this preventstwitter-timeline.php https://gitlab.com/hunt9310/ras | PHP | 470 lines
1<?php 2 26 'twitter_timeline', 27 /** This filter is documented in modules/widgets/facebook-likebox.php */ 28 apply_filters( 'jetpack_widget_name', esc_html__( 'Twitter Timeline', 'jetpack' ) ), 63 public function admin_scripts( $hook ) { 64 // This is still 'widgets.php' when managing widgets via the Customizer. 65 if ( 'widgets.php' === $hook ) { 78 public function widget( $args, $instance ) { 79 $instance['lang'] = substr( strtoupper( get_locale() ), 0, 2 ); 80 83 if ( isset( $instance['title'] ) ) { 84 /** This filter is documented in core/src/wp-includes/default-widgets.php */ 85 echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; 145 146 /** This action is documented in modules/widgets/social-media-icons.php */ 147 do_action( 'jetpack_bump_stats_extras', 'widget', 'twitter_timeline' );register.php https://gitlab.com/nvtdn2006/azora | PHP | 284 lines
1<?php require_once './includes/application.php'; $this->template = 'registration'; $this->title = 'Registration'; ?> 2 106 if ($customerObj->registerCustomer($customer)) { 107 //$activation_link = $config['PRMSConfig']->live_site . '/activate.php?atk=' . $customer['activation_key'] . '&id=' . $cryptographer->Encrypt($customer['id']); 108 $activation_link = $config['PRMSConfig']->live_site . '/activate.php?atk=' . $customer['activation_key'] . '&id=' . $customer['id']; 190 <td class="LabelCell Required">NRIC / FIN <span class="hint">(Identity for account)</span></td> 191 <td><input type="text" name="nric" id="nric" maxlength="25" class="input Required AlphaNumberic" value="<?php echo $customer['nric']; ?>" size="20" tabindex="10" /></td> 192 </tr> 198 <td class="LabelCell Required">Date of Birth <span class="hint">(DD/MM/YYYY)</span></td> 199 <td><input type="text" name="dob" id="dob" maxlength="10" class="input Required ValidDate" value="<?php echo $customer['dob']; ?>" size="20" tabindex="30" /></td> 200 </tr> 255 <td> 256 <img src="components/cool.php.captcha/captcha.php" id="captcha" /> 257 <!-- CHANGE TEXT LINK --> 258 <a href="#" onclick=" 259 document.getElementById('captcha').src='components/cool.php.captcha/captcha.php?'+Math.random(); 260 document.getElementById('captcha-form').focus();"Descarte.php https://gitlab.com/SFMSP/Hagape | PHP | 346 lines
1<?php 2 153 if (!empty($data['idItensExcluidos']) && !empty($data['id'])) { 154 $itensExcluidos = substr($data['idItensExcluidos'], 0, -1); 155 $itensExcluidos = explode(',', $itensExcluidos);WinFsStreamWrapper.php https://gitlab.com/oytunistrator/92five | PHP | 400 lines
1<?php // vi: set fenc=utf-8 ts=4 sw=4 et: 2/* 18 * 19 * See also https://code.google.com/p/php-wfio/ for a PHP extension 20 * and comments on http://www.rooftopsolutions.nl/blog/filesystem-encoding-and-php 270 { 271 if ('x' === $m = substr($mode, 0, 1)) 272 {Resource.php https://github.com/rico/flextrine.git | PHP | 467 lines
1<?php 2/** 18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) 19 * @version $Id: Resource.php 23568 2010-12-20 08:13:20Z mjh_ca $ 20 * @license http://framework.zend.com/license/new-bsd New BSD License 23/** Zend_Loader_Autoloader_Interface */ 24require_once 'Zend/Loader/Autoloader/Interface.php'; 25 73 if (!is_array($options)) { 74 require_once 'Zend/Loader/Exception.php'; 75 throw new Zend_Loader_Exception('Options must be passed to resource loader constructor'); 83 ) { 84 require_once 'Zend/Loader/Exception.php'; 85 throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization'); 90 } 91 require_once 'Zend/Loader/Autoloader.php'; 92 Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);UriParser.php https://gitlab.com/itlboy/yii2-starter-installed | PHP | 201 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 */ 71 'path' => $parts['path'], 72 'query' => '' === $parts['query'] ? null : mb_substr($parts['query'], 1, null, 'UTF-8'), 73 'fragment' => '' === $parts['fragment'] ? null : mb_substr($parts['fragment'], 1, null, 'UTF-8'), 188 { 189 return ('.' === mb_substr($host, -1, 1, 'UTF-8')) ? mb_substr($host, 0, -1, 'UTF-8') : $host; 190 }recaptchalib.php https://github.com/matszpk/native-boinc-for-android.git | PHP | 276 lines
1<?php 2/* 2/* 3 * This is a PHP library that handles calling reCAPTCHA. 4 * - Documentation and latest version 4 * - Documentation and latest version 5 * http://recaptcha.net/plugins/php/ 6 * - Get a reCAPTCHA API Key 52 // Cut the last '&' 53 $req=substr($req,0,strlen($req)-1); 54 return $req; 74 $http_request .= "Content-Length: " . strlen($req) . "\r\n"; 75 $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; 76 $http_request .= "\r\n"; 214 if (! function_exists ("mcrypt_encrypt")) { 215 die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); 216 }acymenu.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 83 lines
1<?php 2/** 7?> 8<?php 9class acymenuHelper{ 14 } 15 $selected = substr($selected,0,5); 16 $config = acymailing_config(); 19 if(acymailing_isAllowed($config->get('acl_subscriber_manage','all'))){ 20 $mainmenu['subscriber'] = array(JText::_('USERS'), 'index.php?option=com_acymailing&ctrl=subscriber','acyicon-16-users'); 21 $submenu['subscriber'] = array(); 21 $submenu['subscriber'] = array(); 22 $submenu['subscriber'][] = array(JText::_('USERS'), 'index.php?option=com_acymailing&ctrl=subscriber','acyicon-16-users'); 23 if(acymailing_isAllowed($config->get('acl_subscriber_import','all'))) $submenu['subscriber'][] = array(JText::_('IMPORT'), 'index.php?option=com_acymailing&ctrl=data&task=import','acyicon-16-import'); 23 if(acymailing_isAllowed($config->get('acl_subscriber_import','all'))) $submenu['subscriber'][] = array(JText::_('IMPORT'), 'index.php?option=com_acymailing&ctrl=data&task=import','acyicon-16-import'); 24 if(acymailing_isAllowed($config->get('acl_subscriber_export','all'))) $submenu['subscriber'][] = array(JText::_('ACY_EXPORT'), 'index.php?option=com_acymailing&ctrl=data&task=export','acyicon-16-export'); 25 }zoo.php https://gitlab.com/ricardosanchez/prueba | PHP | 281 lines
1<?php 2/** 13 14require_once dirname(__DIR__) . '/assignment.php'; 15 243 { 244 if (substr($id, 0, 3) == 'app') 245 {TranslatorPathsPass.php https://gitlab.com/madwanz64/laravel | PHP | 147 lines
1<?php 2 48 foreach ($this->findControllerArguments($container) as $controller => $argument) { 49 $id = substr($controller, 0, strpos($controller, ':') ?: \strlen($controller)); 50 if ($container->hasDefinition($id)) {RegionUrlMaps.php https://gitlab.com/Japang-Jawara/jawara-penilaian | PHP | 206 lines
1<?php 2/* 103 * example-instance`. The `:` operator can be used with string fields to match 104 * substrings. For non-string fields it is equivalent to the `=` operator. The 105 * `:*` comparison can be used to test whether a key has been defined. ForMainOptions.php https://gitlab.com/ElvisAns/tiki | PHP | 233 lines
1<?php 2 10if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) { 11 header('location: index.php'); 12 exit; 104 if (parent::$usecolselector) { 105 $orh[$col] = 'if (id == \'' . substr($col, 1) . '\'){'; 106 } else { 148 } 149 //only fancytable uses this and it is set in wikiplugin_fancytable.php 150 //other tables don't show up full width due to use of table-responsive class in wrapper divweb.php https://github.com/XioNoX/Benevolus.git | PHP | 509 lines
1<?php 2 3/** 4 Web pack for the PHP Fat-Free Framework 5 39 self::$vars['DIACRITICS']))); 40 return trim(strtolower($maxlen?substr($out,0,$maxlen):$out),'-'); 41 } 119 while ($ptr<strlen($src)) { 120 $str=strstr(substr($src,$ptr+1),'/',TRUE); 121 if (!strlen($str) && $src[$ptr-1]!='/' || 147 if (!$regex || $ptr<1) { 148 if (substr($src,$ptr+1,2)=='*@') { 149 // Conditional block 149 // Conditional block 150 $str=strstr(substr($src,$ptr+3),'@*/',TRUE); 151 $dst.='/*@'.$str.$src[$ptr].'@*/';Resource.php https://github.com/ianbogda/FileZ.git | PHP | 467 lines
1<?php 2/** 18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) 19 * @version $Id: Resource.php 23775 2011-03-01 17:25:24Z ralph $ 20 * @license http://framework.zend.com/license/new-bsd New BSD License 23/** Zend_Loader_Autoloader_Interface */ 24require_once 'Zend/Loader/Autoloader/Interface.php'; 25 73 if (!is_array($options)) { 74 require_once 'Zend/Loader/Exception.php'; 75 throw new Zend_Loader_Exception('Options must be passed to resource loader constructor'); 83 ) { 84 require_once 'Zend/Loader/Exception.php'; 85 throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization'); 90 } 91 require_once 'Zend/Loader/Autoloader.php'; 92 Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);CSecurityManager.php https://github.com/joshuaswarren/weatherhub.git | PHP | 292 lines
29 * To encrypt and decrypt data, call {@link encrypt()} and {@link decrypt()} 30 * respectively, which uses 3DES encryption algorithm. Note, the PHP Mcrypt 31 * extension must be installed and loaded. 47 * @var string the name of the hashing algorithm to be used by {@link computeHMAC}. 48 * See {@link http://php.net/manual/en/function.hash-algos.php hash-algos} for the list of possible 49 * hash algorithms. Note that if you are using PHP 5.1.1 or below, you can only use 'sha1' or 'md5'. 56 * @var mixed the name of the crypt algorithm to be used by {@link encrypt} and {@link decrypt}. 57 * This will be passed as the first parameter to {@link http://php.net/manual/en/function.mcrypt-module-open.php mcrypt_module_open}. 58 * 190 * @return string the decrypted data 191 * @throws CException if PHP Mcrypt extension is not loaded 192 */ 195 $module=$this->openCryptModule(); 196 $key=substr($key===null ? md5($this->getEncryptionKey()) : $key,0,mcrypt_enc_get_key_size($module)); 197 $ivSize=mcrypt_enc_get_iv_size($module);ModelCriterion.php https://github.com/1989gaurav/Propel.git | PHP | 283 lines
1<?php 2 43 } else { 44 $this->table = substr($column, 0, $dotPos); 45 $this->column = substr($column, $dotPos+1, strlen($column)); 252 foreach ( $this->clauses as $clause ) { 253 // TODO: i KNOW there is a php incompatibility with the following line 254 // but i dont remember what it is, someone care to look it up and 268 * Replace only once 269 * taken from http://www.php.net/manual/en/function.str-replace.php 270 * 275 if($firstChar !== false) { 276 $beforeStr = substr($subject,0,$firstChar); 277 $afterStr = substr($subject, $firstChar + strlen($search));class.AbstractDNSZone.php https://github.com/kennethjiang/Wolke.git | PHP | 241 lines
2 /** 3 * This file is a part of LibWebta, PHP class library. 4 * 47 48 if (substr($serial, 0, 8) == date('Ymd')) 49 {directories.php https://github.com/projectfork/Projectfork.git | PHP | 420 lines
1<?php 2/** 171 if (stripos($filter_search, 'id:') === 0) { 172 $query->where('a.id = '. (int) substr($filter_search, 3)); 173 } 174 elseif (stripos($filter_search, 'author:') === 0) { 175 $search = $this->_db->quote($this->_db->escape(substr($filter_search, 7), true) . '%'); 176 $query->where('(ua.name LIKE ' . $search . ' OR ua.username LIKE ' . $search . ')');Editor.php https://github.com/skoop/Gesichtbuch.git | PHP | 187 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Editor.php 6352 2010-08-16 15:02:45Z tpater $ 21 */ 23/** Zend_Dojo_View_Helper_Dijit */ 24// require_once 'Zend/Dojo/View/Helper/Dijit.php'; 25 26/** Zend_Json */ 27// require_once 'Zend/Json.php'; 28 157 { 158 if ('[]' == substr($name, -2)) { 159 $name = substr($name, 0, strlen($name) - 2);usertypepropertydiskfile.php https://gitlab.com/Rad1calDreamer/honey | PHP | 197 lines
1<?php 2 149 $documentType = $fieldType->getDocumentType(); 150 $iblockId = intval(substr($documentType[2], strlen("iblock_"))); 151 180 $documentType = $fieldType->getDocumentType(); 181 $iblockId = intval(substr($documentType[2], strlen("iblock_"))); 182 if(!$iblockId)util.php https://github.com/robertatakenaka/Regional-2.git | PHP | 220 lines
1<?php 2/* 21 * 22 * Utility functions for the File Manager Connector for PHP. 23 */ 53 } 54 $string = substr($string, strlen($matches[0])); 55 } 61{ 62 if ( defined( 'PHP_OS' ) ) 63 { 63 { 64 $os = PHP_OS ; 65 } 67 { 68 $os = php_uname() ; 69 }ArrayInput.php https://github.com/l3l0/BehatExamples.git | PHP | 190 lines
1<?php 2 118 foreach ($this->parameters as $key => $value) { 119 if ('--' === substr($key, 0, 2)) { 120 $this->addLongOption(substr($key, 2), $value); 121 } elseif ('-' === $key[0]) { 122 $this->addShortOption(substr($key, 1), $value); 123 } else {Math.php https://github.com/lanmediaservice/lms-tplib.git | PHP | 312 lines
1<?php 2/** 18 * @license http://framework.zend.com/license/new-bsd New BSD License 19 * @version $Id: Math.php 16221 2009-06-21 19:49:59Z thomas $ 20 */ 24 * Utility class for proxying math function to bcmath functions, if present, 25 * otherwise to PHP builtin math operators, with limited detection of overflow conditions. 26 * Sampling of PHP environments and platforms suggests that at least 80% to 90% support bcmath. 56 * Surprisingly, the results of this implementation of round() 57 * prove better than the native PHP round(). For example, try: 58 * round(639.795, 2); 100 // zero fill digits to the left of the decimal place 101 $op1 = substr($op1, 0, $decPos + $precision) . str_pad('', abs($precision), '0'); 102 } 309 || !extension_loaded('bcmath')) { 310 //*** require_once 'Zend/Locale/Math/PhpMath.php'; 311 Zend_Locale_Math_PhpMath::disable();TableEntity.php https://github.com/kervin/kyzstudio.git | PHP | 328 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: TableEntity.php 23167 2010-10-19 17:53:31Z mabe $ 21 */ 25 */ 26#require_once 'Zend/Service/WindowsAzure/Exception.php'; 27 188 ); 189 } else if ($accessor->EntityType == 'ReflectionMethod' && substr(strtolower($accessor->EntityAccessor), 0, 3) == 'get') { 190 $method = $accessor->EntityAccessor; 239 $this->$property = $values[$accessor->AzurePropertyName]; 240 } else if ($accessor->EntityType == 'ReflectionMethod' && substr(strtolower($accessor->EntityAccessor), 0, 3) == 'set') { 241 $method = $accessor->EntityAccessor; 310 if (strpos($commentLine, '@azure') !== false) { 311 $azureComment = trim(substr($commentLine, strpos($commentLine, '@azure') + 6)); 312 while (strpos($azureComment, ' ') !== false) {check_config.php https://github.com/sherdog/GitWitty.git | PHP | 180 lines
1<?php 2/** 2/** 3 * @file check_config.php 4 * @brief Check if the CCBoard configuration wrapper is present. 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 22 * A full text version of the GNU GPL version 2 can be found in the LICENSE.php file. 23 * @par History: 52 $rc = '[NOK]'; 53 $result .= JText::_( 'The configuration wrapper is not present in the MASTER ccboard-config.php file.'); 54 $result .= '|[ACTION]'; 72 73 include_once( $patch_dir .DS. 'joomla' .DS. 'patchloader.php'); 74 $patchStr = jms2win_loadPatch( '..' .DS. 'ccboard' .DS. 'patch_config.php'); 107if ( defined( 'MULTISITES_ID') 108 && file_exists( dirname(__FILE__) .DS. 'ccboard-config.' .MULTISITES_ID. '.php')) { 109 require_once( dirname(__FILE__) .DS. 'ccboard-config.' .MULTISITES_ID. '.php');sitemailer_.php https://gitlab.com/nvtdn2006/azora | PHP | 384 lines
1<?php 2class SiteMailer 52 $this->headers .= "MIME-Version: 1.0\r\n"; 53 //$this->headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-" . $this->randomHash . "\"\r\n"; 54 $this->headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; 90 { 91 $this->msgBody .= "\r\n--PHP-mixed-" . $this->randomHash . "--"; 92 $this->msgBody .= $this->attachment; 92 $this->msgBody .= $this->attachment; 93 $this->msgBody .= "\r\n--PHP-mixed-" . $this->randomHash . "--"; 94 }*/ 156 private function sendActivationToCustomer($property) { 157 /*$htmlCT = "--PHP-alt-" . $this->randomHash . "\r\n"; 158 $htmlCT .= 'Content-Type: text/html; charset="iso-8859-1"' . "\r\n"; 165 foreach ($placeholders[0] as $placeholder) { 166 $ph = substr($placeholder, 2, strlen($placeholder)-4); 167 $this->msgBody = preg_replace('/\{\%'.$ph.'\%\}/', $property[$ph], $this->msgBody);model.php https://github.com/myagoo/Hello-PHP.git | PHP | 203 lines
1<?php 2 65 } 66 $query = substr($query, 0, -2); 67 114 } 115 $fields = substr($fields, 0, -2); 116 } 149 $pos = strpos($fieldName, '_'); 150 $prefix = substr($fieldName, 0, $pos); 151 $sufix = substr($fieldName, $pos + 1, strlen($fieldName));enroll.inc.php https://github.com/harriswong/ATutor.git | PHP | 261 lines
1<?php 2/************************************************************************/ 57 if (empty($record['uname'])) { 58 $record['uname'] = stripslashes (strtolower (substr ($record['fname'], 0, 1).$_POST['sep_choice'].$record['lname'])); 59 } 115 116 require_once(AT_INCLUDE_PATH.'classes/phpmailer/atutormailer.class.php'); 117 175 $row = mysql_fetch_assoc($result); 176 $code = substr(md5($row['email'] . $row['creation_date'] . $m_id), 0, 10); 177 178 // send email here. 179 $confirmation_link = AT_BASE_HREF . 'confirm.php?id='.$m_id.SEP.'m='.$code; 180position.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 173 lines
1<?php 2/** 3* Locate a byte index given a UTF-8 character index 4* @version $Id: position.php,v 1.1 2008/10/10 20:52:53 mj Exp $ 5* @package utf8 13* index of that character. Can be useful when you want to 14* PHP's native string functions but we warned, locating 15* the byte can be expensive 45 // $c -> character offset into $str 46 $c = strlen(utf8_decode(substr($str,0,$i))); 47 78 // determine new character offset 79 $c += strlen(utf8_decode(substr($str,$i,$j-$i))); 80 } else { 81 // ditto 82 $c -= strlen(utf8_decode(substr($str,$j,$i-$j))); 83 }DocCommentAlignmentSniff.php https://github.com/amumu/modev.git | PHP | 149 lines
28 * @version Release: 1.2.2 29 * @link http://pear.php.net/package/PHP_CodeSniffer 30 */ 49 * 50 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 51 * @param int $stackPtr The position of the current token 55 */ 56 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) 57 { 60 // We are only interested in function/class/interface doc block comments. 61 $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true); 62 $ignore = array( 73 // Could be a file comment. 74 $prevToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true); 75 if ($tokens[$prevToken]['code'] !== T_OPEN_TAG) {tcpdf_config_alt.php https://github.com/hermansyam/cardiac.git | PHP | 227 lines
1<?php 2//============================================================+ 2//============================================================+ 3// File name : tcpdf_config.php 4// Begin : 2004-06-11 34 if(isset($_SERVER['SCRIPT_FILENAME'])) { 35 $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))); 36 } elseif(isset($_SERVER['PATH_TRANSLATED'])) { 36 } elseif(isset($_SERVER['PATH_TRANSLATED'])) { 37 $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))); 38 } else { 44// Automatic calculation for the following K_PATH_MAIN constant 45$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config')))); 46if (substr($k_path_main, -1) != '/') { 63 $k_path_url .= $_SERVER['HTTP_HOST']; 64 $k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24)); 65}model.php https://github.com/draganz/Kunena-2.0.git | PHP | 171 lines
1<?php 2/** 48 if(strstr($basename,'?')) { 49 $basename = substr($basename, strstr($basename,'?')+1); 50 } 50 } 51 if(substr($basename,-4) == '.zip') { 52 $type = 'zip'; 52 $type = 'zip'; 53 } elseif(substr($basename,-4) == '.tar') { 54 $type = 'tar'; 54 $type = 'tar'; 55 } elseif(substr($basename,-4) == '.tgz') { 56 $type = 'tar.gz'; 56 $type = 'tar.gz'; 57 } elseif(substr($basename,-7) == '.tar.gz') { 58 $type = 'tar.gz';Translator.php https://github.com/comfortablynumb/symfony.git | PHP | 212 lines
1<?php 2 206 if (strlen($locale) > 3) { 207 array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_')))); 208 }Path.php https://github.com/kronda/kronda.git | PHP | 170 lines
1<?php 2 65 66 if (substr_compare($path, "/", 0, 1) !== 0) return "must start with \"/\""; 67 $l = strlen($path); 114 115 if (substr_compare($path, "/", 0, 1) !== 0) { 116 throw new InvalidArgumentException("'path' must start with \"/\""); 124 $lastSlash = strrpos($path, "/"); 125 return substr($path, $lastSlash+1); 126 }index.php https://github.com/kadishmal/tilchi.com.git | PHP | 110 lines
1<?php 2 $this->pageTitle = Yii::t('ContentModule.forum', 'Forum') . ' | ' . Yii::app()->name; 7 <div class="frame"> 8 <div class="title"><h2><?php echo Yii::t('ContentModule.forum', 'Forums'); ?></h2></div> 9 <div id="forum-search"> 9 <div id="forum-search"> 10 <?php 11 $form = $this->beginWidget('CActiveForm', array( 23 <div id="results" class="list"> 24 <?php 25 $cs = Yii::app()->clientScript; 31 <div class="options"> 32 <h2><?php echo Yii::t('ContentModule.forum', 'Didn\'t find what you were looking for?'); ?></h2> 33 <div class="option question"><a href="/forum/new/question"><i></i><h3><?php echo Yii::t('ContentModule.forum', 'Ask a question'); ?></h3></a></div> 33 <div class="option question"><a href="/forum/new/question"><i></i><h3><?php echo Yii::t('ContentModule.forum', 'Ask a question'); ?></h3></a></div> 34 <div class="option idea"><a href="/forum/new/idea"><i></i><h3><?php echo Yii::t('ContentModule.forum', 'Submit an idea'); ?></h3></a></div> 35 <div class="option issue"><a href="/forum/new/issue"><i></i><h3><?php echo Yii::t('ContentModule.forum', 'Report an issue'); ?></h3></a></div>date_helper.php https://gitlab.com/ricoru21/py_incidencia | PHP | 611 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.1.6 or newer 6 * 68 * 69 * This function is identical to PHPs date() function, 70 * except that it allows date codes to be formatted using 247 248 return substr(trim($str), 0, -1); 249 } 369 return mktime( 370 substr($time, 8, 2), 371 substr($time, 10, 2), 371 substr($time, 10, 2), 372 substr($time, 12, 2), 373 substr($time, 4, 2),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)); 297 if ($end !== false) { 298 $optionName = substr($optionName, 0, $end); 299 } 308 * 309 * @SuppressWarnings(PHPMD.CyclomaticComplexity) 310 * @SuppressWarnings(PHPMD.NPathComplexity)Label.php https://github.com/grjones/qframe.git | PHP | 332 lines
1<?php 2/** 22/** Zend_Form_Decorator_Abstract */ 23require_once 'Zend/Form/Decorator/Abstract.php'; 24 28 * Accepts the options: 29 * - separator: separator to use between label and content (defaults to PHP_EOL) 30 * - placement: whether to append or prepend label to content (defaults to prepend) 43 * @license http://framework.zend.com/license/new-bsd New BSD License 44 * @version $Id: Label.php 22129 2010-05-06 11:20:39Z alab $ 45 */ 196 { 197 $tail = substr($method, -6); 198 $head = substr($method, 0, 3); 201 ) { 202 $position = substr($method, -6); 203 $type = strtolower(substr($method, 3, 3));OLE.php https://bitbucket.org/blackriver/openx.git | PHP | 410 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 2.02 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/2_02.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// +----------------------------------------------------------------------+Resource.php https://github.com/rakesh-sankar/PHP-Framework-Benchmark.git | PHP | 467 lines
1<?php 2/** 18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) 19 * @version $Id: Resource.php 23567 2010-12-20 08:12:16Z mjh_ca $ 20 * @license http://framework.zend.com/license/new-bsd New BSD License 23/** Zend_Loader_Autoloader_Interface */ 24require_once 'Zend/Loader/Autoloader/Interface.php'; 25 73 if (!is_array($options)) { 74 require_once 'Zend/Loader/Exception.php'; 75 throw new Zend_Loader_Exception('Options must be passed to resource loader constructor'); 83 ) { 84 require_once 'Zend/Loader/Exception.php'; 85 throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization'); 90 } 91 require_once 'Zend/Loader/Autoloader.php'; 92 Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);Editor.php https://github.com/adaykin/zf2.git | PHP | 601 lines
1<?php 2/** 454 } 455 if ('em' != substr($minHeight, -2)) { 456 $minHeight .= 'em';import_spec_test.py https://gitlab.com/iranjith4/hhvm | Python | 312 lines
29 'README.md', 30 'make_phpt', 31) 41 '/expressions/general/order_of_evaluation.php', 42 '/expressions/primary_expressions/intrinsics_eval.php', 43 '/tests/expressions/primary_expressions/intrinsics_unset.php', 46 '/functions/basics.php', 47 '/functions/byrefs.php', 48) 81 action='append', 82 help="only import tests whose path contains this substring." 83) 128 129def index_containing_substring(the_list, substring): 130 if not the_list:BigBlueButton.php https://gitlab.com/rsilveira1987/Expresso | PHP | 268 lines
1<?php 2 91 $host = $_SERVER['HTTP_HOST']; 92 $base = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/')); 93 return $protocol.'//'.$host.$base.'/Webconference/views/logoutPage.html'; 97 $host = $_SERVER['HTTP_HOST']; 98 $base = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/')); 99 return $protocol.'//'.$host.$base.'/Webconference/views/logoutPage.html';config.php https://github.com/bfritz/fusionpbx.git | PHP | 178 lines
1<?php 2/* 67 $len = strpos($string,$end,$ini) - $ini; 68 return substr($string,$ini,$len); 69} 78 //$db = new PDO('sqlite::memory:'); //sqlite 3 79 if (!function_exists('phpmd5')) { 80 function phpmd5($string) { 83 } 84 if (!function_exists('phpmd5')) { 85 function phpunix_timestamp($string) { 88 } 89 if (!function_exists('phpnow')) { 90 function phpnow() { 94 95 if (!function_exists('phpleft')) { 96 function phpleft($string, $num) {view.html.php https://github.com/sengann/iks-school.com.git | PHP | 152 lines
1<?php 2/** 2/** 3 * @version $Id: view.html.php 19331 2010-11-02 17:32:30Z chdemko $ 4 * @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved. 78 // Load the category helper. 79 require_once JPATH_COMPONENT.'/helpers/categories.php'; 80 100 // Prepare the toolbar. 101 JToolBarHelper::title($title, substr($component,4).($section?"-$section":'').'-category-'.($isNew?'add':'edit').'.png'); 102 134 if (!$lang->hasKey($ref_key = strtoupper($component.($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT').'_HELP_KEY')) { 135 $ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component,4).($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT'); 136 }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 ); 453 // Check for correct hash 454 if (substr($setting, 0, 3) != '$H$') { 455 return $output; 464 $count = 1 << $count_log2; 465 $salt = substr($setting, 4, 8); 466