100+ results results for 'php strlen' (497 ms)
1<?php 2 301 $errorpassw = ""; 302 if (strlen($passwd) < 6) { 303 return $errorpassw = "Password debe tener al menos 6 caracteres"; 304 } 305 if (strlen($passwd) > 16) { 306 return $errorpassw = "Password no puede tener m�s de 16 caracteres";Url.php https://gitlab.com/x33n/respond | PHP | 548 lines
1<?php 2 43 // Convert the query string into a QueryString object 44 if ($parts['query'] || 0 !== strlen($parts['query'])) { 45 $parts['query'] = QueryString::fromString($parts['query']); 89 // Add the path component if present 90 if (isset($parts['path']) && 0 !== strlen($parts['path'])) { 91 // Always ensure that the path begins with '/' if set and something is before the pathOLE.php https://github.com/drobbins/s3db.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// +----------------------------------------------------------------------+voucher.php https://bitbucket.org/allanxyh/uniquemall.git | PHP | 263 lines
1<?php 2class ControllerAccountVoucher extends Controller { 227 public function validate() { 228 if ((utf8_strlen($this->request->post['to_name']) < 1) || (utf8_strlen($this->request->post['to_name']) > 64)) { 229 $this->error['to_name'] = $this->language->get('error_to_name'); 231 232 if ((utf8_strlen($this->request->post['to_email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['to_email'])) { 233 $this->error['to_email'] = $this->language->get('error_email'); 235 236 if ((utf8_strlen($this->request->post['from_name']) < 1) || (utf8_strlen($this->request->post['from_name']) > 64)) { 237 $this->error['from_name'] = $this->language->get('error_from_name'); 239 240 if ((utf8_strlen($this->request->post['from_email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['from_email'])) { 241 $this->error['from_email'] = $this->language->get('error_email');fdt_ro.c https://gitlab.com/pranith/kvm-unit-tests | C | 573 lines
210 if (len) 211 *len = strlen(nh->name); 212 288 return fdt_get_property_namelen(fdt, nodeoffset, name, 289 strlen(name), lenp); 290} 324{ 325 const fdt32_t *php; 326 int len; 330 php = fdt_getprop(fdt, nodeoffset, "phandle", &len); 331 if (!php || (len != sizeof(*php))) { 332 php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len); 332 php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len); 333 if (!php || (len != sizeof(*php))) 334 return 0;eclipse.php https://github.com/kpike/moodle.git | PHP | 307 lines
1<?php 2/** 10 */ 11include_once 'unit_tester.php'; 12include_once 'test_case.php'; 12include_once 'test_case.php'; 13include_once 'invoker.php'; 14include_once 'socket.php'; 14include_once 'socket.php'; 15include_once 'mock_objects.php'; 16/**#@-*/ 238 $thisdir = dirname(__FILE__); 239 $thisdirlen = strlen($thisdir); 240 foreach ($arrfiles as $index=>$file){export.php https://github.com/shlomsky/lim.git | PHP | 409 lines
38 39 if( strlen( $start_date ) > 4 && strlen( $end_date ) > 4 ) 40 $filename = 'wordpress.' . $start_date . '.' . $end_date . '.xml'; 313 <?php if ( $cats ) : foreach ( $cats as $c ) : ?> 314 <wp:category><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->name : ''; ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category> 315 <?php endforeach; endif; ?> 316 <?php if ( $tags ) : foreach ( $tags as $t ) : ?> 317 <wp:tag><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name( $t ); ?><?php wxr_tag_description( $t ); ?></wp:tag> 318 <?php endforeach; endif; ?> 319 <?php if ( $terms ) : foreach ( $terms as $t ) : ?> 320 <wp:term><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $custom_taxonomies[$t->parent]->name : ''; ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term> 321 <?php endforeach; endif; ?> 354 <wp:post_id><?php echo $post->ID; ?></wp:post_id> 355 <wp:post_date><?php echo $post->post_date; ?></wp:post_date> 356 <wp:post_date_gmt><?php echo $post->post_date_gmt; ?></wp:post_date_gmt>Abstract.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 456 lines
1<?php 2/** 24 */ 25require_once 'Zend/Validate/Interface.php'; 26 151 if (!isset($this->_messageTemplates[$messageKey])) { 152 require_once 'Zend/Validate/Exception.php'; 153 throw new Zend_Validate_Exception("No message template exists for key '$messageKey'"); 193 */ 194 require_once 'Zend/Validate/Exception.php'; 195 throw new Zend_Validate_Exception("No property exists by the name '$property'"); 236 if ($this->getObscureValue()) { 237 $value = str_repeat('*', strlen($value)); 238 } 245 $length = self::getMessageLength(); 246 if (($length > -1) && (strlen($message) > $length)) { 247 $message = substr($message, 0, (self::getMessageLength() - 3)) . '...';PropelPager.php https://github.com/1989gaurav/Propel.git | PHP | 597 lines
1<?php 2 15 * 16 * require_once 'propel/util/PropelPager.php'; 17 * require_once 'PEACH/Propel/Poem/poemPeer.php'; 247 } elseif ( ($pos = stripos($selectMethod, 'doSelectJoin')) === 0) { 248 $countMethod = 'doCount' . substr($selectMethod, strlen('doSelect')); 249 } else {recaptchalib.php https://bitbucket.org/Mainboarder/s2firewall.git | PHP | 277 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; 73 $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; 74 $http_request .= "Content-Length: " . strlen($req) . "\r\n"; 75 $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; 164 //discard spam submissions 165 if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { 166 $recaptcha_response = new ReCaptchaResponse();voucher.php https://bitbucket.org/elena_dyavolova/omf.git | PHP | 263 lines
1<?php 2class ControllerAccountVoucher extends Controller { 227 protected function validate() { 228 if ((utf8_strlen($this->request->post['to_name']) < 1) || (utf8_strlen($this->request->post['to_name']) > 64)) { 229 $this->error['to_name'] = $this->language->get('error_to_name'); 231 232 if ((utf8_strlen($this->request->post['to_email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['to_email'])) { 233 $this->error['to_email'] = $this->language->get('error_email'); 235 236 if ((utf8_strlen($this->request->post['from_name']) < 1) || (utf8_strlen($this->request->post['from_name']) > 64)) { 237 $this->error['from_name'] = $this->language->get('error_from_name'); 239 240 if ((utf8_strlen($this->request->post['from_email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['from_email'])) { 241 $this->error['from_email'] = $this->language->get('error_email');UnitTestCase.php https://gitlab.com/mohamed_hussein/prodt | PHP | 282 lines
1<?php 2 11use Drupal\Core\StringTranslation\PluralTranslatableMarkup; 12use Drupal\Tests\Traits\PhpUnitWarnings; 13use Drupal\TestTools\TestVarDumper; 13use Drupal\TestTools\TestVarDumper; 14use PHPUnit\Framework\TestCase; 15use Symfony\Component\VarDumper\VarDumper; 15use Symfony\Component\VarDumper\VarDumper; 16use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; 17 27 28 use PhpUnitWarnings; 29 use PhpUnitCompatibilityTrait; 68 69 $this->root = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)), 2); 70 }VarCloner.php https://gitlab.com/nzqadri/bejeep | PHP | 324 lines
1<?php 2 103 $stub->class = Stub::STRING_BINARY; 104 if (0 <= $maxString && 0 < $cut = strlen($v) - $maxString) { 105 $stub->cut = $cut; 109 } 110 } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { 111 $stub = new Stub(); 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 } 300 $obj = (object) array(); 301 self::$hashOffset = 16 - PHP_INT_SIZE; 302 self::$hashMask = -1;shipping.php https://gitlab.com/reclamare/mao | PHP | 268 lines
35 36 if ((utf8_strlen(trim($this->request->post['firstname'])) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) { 37 $json['error']['firstname'] = $this->language->get('error_firstname'); 39 40 if ((utf8_strlen(trim($this->request->post['lastname'])) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) { 41 $json['error']['lastname'] = $this->language->get('error_lastname'); 43 44 if ((utf8_strlen(trim($this->request->post['address_1'])) < 3) || (utf8_strlen(trim($this->request->post['address_1'])) > 128)) { 45 $json['error']['address_1'] = $this->language->get('error_address_1'); 47 48 if ((utf8_strlen($this->request->post['city']) < 2) || (utf8_strlen($this->request->post['city']) > 32)) { 49 $json['error']['city'] = $this->language->get('error_city'); 55 56 if ($country_info && $country_info['postcode_required'] && (utf8_strlen(trim($this->request->post['postcode'])) < 2 || utf8_strlen(trim($this->request->post['postcode'])) > 10)) { 57 $json['error']['postcode'] = $this->language->get('error_postcode');ArgvInput.php https://github.com/Exercise/symfony.git | PHP | 313 lines
1<?php 2 103 104 if (strlen($name) > 1) { 105 if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { 124 { 125 $len = strlen($name); 126 for ($i = 0; $i < $len; $i++) {adodb-oracle.inc.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 342 lines
1<?php 2/* 58 59 return substr($d,1,strlen($d)-2); 60 } 66 67 return substr($d,1,strlen($d)-2); 68 }Data.php https://gitlab.com/campus-academy/krowkaramel | PHP | 397 lines
1<?php 2 2 3loco_require_lib('compiled/gettext.php'); 4 121 public function msgfmt(){ 122 if( 2 !== strlen("\xC2\xA3") ){ 123 throw new Loco_error_Exception('Refusing to compile MO file. Please disable mbstring.func_overload'); // @codeCoverageIgnoredb_operations.php https://gitlab.com/luyxtran264/myproject | PHP | 315 lines
1<?php 2/* vim: set expandtab sw=4 ts=4 sts=4: */ 11 * 12 * @package PhpMyAdmin 13 */ 18 */ 19require_once 'libraries/common.inc.php'; 20require_once 'libraries/mysql_charsets.inc.php'; 20require_once 'libraries/mysql_charsets.inc.php'; 21require_once 'libraries/display_create_table.lib.php'; 22 25 */ 26require_once 'libraries/check_user_privileges.lib.php'; 27require_once 'libraries/operations.lib.php'; 39 */ 40if (mb_strlen($GLOBALS['db']) 41 && (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_copy']))str.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 416 lines
1<?php 2/** 9 * @copyright 2010 - 2013 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 17 * 18 * PHP needs to be compiled with --enable-mbstring 19 * or a fallback without encoding support is used 129 // substr functions don't parse null correctly 130 $length = is_null($length) ? (function_exists('mb_substr') ? mb_strlen($str, $encoding) : strlen($str)) - $start : $length; 131 137 /** 138 * strlen 139 * 411 { 412 return strlen(strip_tags($string)) < strlen($string); 413 }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);str.php https://bitbucket.org/sriedel/iccrm-wip.git | PHP | 416 lines
1<?php 2/** 9 * @copyright 2010 - 2012 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 17 * 18 * PHP needs to be compiled with --enable-mbstring 19 * or a fallback without encoding support is used 129 // substr functions don't parse null correctly 130 $length = is_null($length) ? (function_exists('mb_substr') ? mb_strlen($str, $encoding) : strlen($str)) - $start : $length; 131 137 /** 138 * strlen 139 * 411 { 412 return strlen(strip_tags($string)) < strlen($string); 413 }survey_invite.php https://bitbucket.org/hanutimes/hanutimes.git | PHP | 253 lines
1<?php 2/* For licensing terms, see /license.txt */ 8 * @author Julio Montoya Chamilo: cleanup, refactoring, security improvements 9 * @version $Id: survey_invite.php 10680 2007-01-11 21:26:23Z pcool $ 10 * 19// Including the global initialization file 20require_once '../inc/global.inc.php'; 21 22// Including additional libraries 23require_once 'survey.lib.php'; 24 53$urlname = strip_tags(api_substr(api_html_entity_decode($survey_data['title'], ENT_QUOTES), 0, 40)); 54if (api_strlen(strip_tags($survey_data['title'])) > 40) { 55 $urlname .= '...'; 58// Breadcrumbs 59$interbreadcrumb[] = array('url' => 'survey_list.php', 'name' => get_lang('SurveyList')); 60if (api_is_course_admin()) {web.php https://github.com/XioNoX/Benevolus.git | PHP | 509 lines
1<?php 2 3/** 4 Web pack for the PHP Fat-Free Framework 5 105 $dst=''; 106 while ($ptr<strlen($src)) { 107 if ($src[$ptr]=='/') { 118 $src[$ofs]=='=') { 119 while ($ptr<strlen($src)) { 120 $str=strstr(substr($src,$ptr+1),'/',TRUE); 120 $str=strstr(substr($src,$ptr+1),'/',TRUE); 121 if (!strlen($str) && $src[$ptr-1]!='/' || 122 strpos($str,"\n")!==FALSE) { 127 $dst.='/'.$str; 128 $ptr+=strlen($str)+1; 129 if ($src[$ptr-1]!='\\' ||slot.c https://github.com/andikleen/linux-misc.git | C | 380 lines
116 * Make sure we hit the realloc case the first time through the 117 * loop. 'len' will be strlen(name) + 3 at that point which is 118 * enough space for "name-X" and the trailing NUL. 119 */ 120 len = strlen(name) + 2; 121 max = 1; 212 * In most cases, @pci_bus, @slot_nr will be sufficient to uniquely identify 213 * a slot. There is one notable exception - pSeries (rpaphp), where the 214 * @slot_nr cannot be determined until a device is actually inserted intoResource.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);functions.recaptchalib.php https://github.com/dkobia/Garden.git | PHP | 278 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; 73 $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; 74 $http_request .= "Content-Length: " . strlen($req) . "\r\n"; 75 $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; 165 //discard spam submissions 166 if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { 167 $recaptcha_response = new ReCaptchaResponse();ClassLoader.php https://gitlab.com/wendy-du-973/club-invest-gr2 | PHP | 481 lines
1<?php 2 39 * @author Jordi Boggiano <j.boggiano@seld.be> 40 * @see https://www.php-fig.org/psr/psr-0/ 41 * @see https://www.php-fig.org/psr/psr-4/ 181 // Register directories for a new namespace. 182 $length = strlen($prefix); 183 if ('\\' !== $prefix[$length - 1]) { 232 } else { 233 $length = strlen($prefix); 234 if ('\\' !== $prefix[$length - 1]) { 376 377 $file = $this->findFileWithExtension($class, '.php'); 378class-gf-field-checkbox.php https://gitlab.com/level-level/gravityforms | PHP | 380 lines
1<?php 2 139 } elseif ( $format == 'text' ) { 140 return substr( $items, 0, strlen( $items ) - 2 ); //removing last comma 141 } else {Template.php https://github.com/rgranadino/magento-mirror.git | PHP | 395 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 */ 171 { 172 return strlen($this->getTemplateTextPreprocessed()) > 0; 173 }composite_log.php https://gitlab.com/alexprowars/bitrix | PHP | 461 lines
14 */ 15require_once(dirname(__FILE__)."/../include/prolog_admin_before.php"); 16require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/prolog.php"); 16require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/prolog.php"); 17define("HELP_FILE", "settings/composite_pages.php"); 18 89{ 90 if (!isset($date) || mb_strlen(trim($date)) < 1) 91 { 112{ 113 if (!is_array($value) && !mb_strlen(trim($value))) 114 { 221 $messageCell = 222 '<a href="composite_diff.php?lang='.LANGUAGE_ID.'&log_id='.$record["ID"].'" target="_blank">'. 223 Loc::getMessage("MAIN_COMPOSITE_LOG_VIEW_DIFF").'</a>';zone.php https://gitlab.com/hazelnuts23/unitedfoodstuff | PHP | 428 lines
1<?php 2class ControllerLocalisationZone extends Controller { 378 379 if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) { 380 $this->error['name'] = $this->language->get('error_name');Image.php https://github.com/Exercise/zf2.git | PHP | 451 lines
1<?php 2/** 413 case 'center': 414 $positionX = $position[0] - ceil(($fontWidth * strlen($text)) / 2); 415 break; 416 case 'right': 417 $positionX = $position[0] - ($fontWidth * strlen($text)); 418 break; 424 throw new Exception( 425 'A font was provided, but this instance of PHP does not have TTF (FreeType) support' 426 );AbstractRenderer.php https://github.com/Exercise/zf2.git | PHP | 531 lines
1<?php 2/** 117 get_class($this), 118 strlen($this->_rendererNamespace) + 1 119 ));Collection.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 347 lines
1<?php 2/** 14 * Sales Rules resource collection model. 15 * @SuppressWarnings(PHPMD.CouplingBetweenObjects) 16 */ 126 * @use $this->addWebsiteGroupDateFilter() 127 * @SuppressWarnings(PHPMD.UnusedFormalParameter) 128 * @return $this 145 $connection = $this->getConnection(); 146 if (strlen($couponCode)) { 147 $select->joinLeft(Template.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 395 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 */ 171 { 172 return strlen($this->getTemplateTextPreprocessed()) > 0; 173 }TextStatistics.php https://github.com/jimmytidey/jimmytidey.co.uk.git | PHP | 414 lines
78 if ( ! $this->blnMbstring ) { 79 return strlen( $strText ); 80 } 83 if ( $this->strEncoding == '' ) { 84 $intTextLength = mb_strlen( $strText ); 85 } else { 88 } catch ( Exception $e ) { 89 $intTextLength = strlen( $strText ); 90 } 95 /** 96 * Gives letter count (ignores all non-letters). Tries mb_strlen and if that fails uses regular strlen. 97 * 106 if ( ! $this->blnMbstring ) { 107 return strlen( $strText ); 108 }Misc.php https://bitbucket.org/tdevonshire/guinness-jazz-festival.git | PHP | 388 lines
1<?php 2/* 30 if (!empty($_GET['langCode']) && preg_match("/^[a-z\-]+$/", $_GET['langCode'])) { 31 if (file_exists(CKFINDER_CONNECTOR_LANG_PATH . "/" . $_GET['langCode'] . ".php")) 32 $langCode = $_GET['langCode']; 33 } 34 include CKFINDER_CONNECTOR_LANG_PATH . "/" . $langCode . ".php"; 35 if ($number) { 64 /** 65 * @link http://pl.php.net/manual/en/function.imagecopyresampled.php 66 * replacement to imagecopyresampled that will deliver results that are almost identical except MUCH faster (very typically 30 times faster) 110 /** 111 * @link http://pl.php.net/manual/pl/function.imagecreatefromjpeg.php 112 * function posted by e dot a dot schultz at gmail dot com 170 /** 171 * convert shorthand php.ini notation into bytes, much like how the PHP source does it 172 * @link http://pl.php.net/manual/en/function.ini-get.phpsanitizing_filters.cpp https://gitlab.com/iranjith4/hhvm | C++ | 329 lines
157 158Variant php_filter_string(PHP_INPUT_FILTER_PARAM_DECL) { 159 unsigned char enc[256] = {0}; 280 281Variant php_filter_url(PHP_INPUT_FILTER_PARAM_DECL) { 282 /* Strip all chars not part of section 5 of 292 293Variant php_filter_number_int(PHP_INPUT_FILTER_PARAM_DECL) { 294 /* strip everything [^0-9+-] */ 302 303Variant php_filter_number_float(PHP_INPUT_FILTER_PARAM_DECL) { 304 /* strip everything [^0-9+-] */ 323 324Variant php_filter_magic_quotes(PHP_INPUT_FILTER_PARAM_DECL) { 325 /* just call addslashes quotes */String.php https://github.com/rgranadino/magento-mirror.git | PHP | 302 lines
55 if ($originalLength > $length) { 56 $length -= $this->strlen($etc); 57 if ($length <= 0) { 95 if (is_null($length)) { 96 $length = $this->strlen($string) - $offset; 97 } 114 foreach ($str as $part) { 115 if ($this->strlen($part) >= $length) { 116 $lastDelimetr = $this->strpos($this->strrev($part), $needle); 135 $result = ''; 136 $strlen = $this->strlen($str); 137 if (!$strlen) { 161 $result = array(); 162 $strlen = $this->strlen($str); 163 if ((!$strlen) || (!is_int($length)) || ($length <= 0)) {ClientesController.php https://gitlab.com/fabiorf/fsipedidos | PHP | 320 lines
1<?php 2 2 3// namespace de localizacao clientesController.php 4namespace Cliente\Controller; 61 62 if(strlen($conteudoCsv)){ 63 $aListArquivo = explode("\n",$conteudoCsv);mailz.php https://bitbucket.org/antonyravel/cape-resorts.git | PHP | 374 lines
25 26 $zing_mailz_plugin=substr(dirname(__FILE__),strlen(WP_CONTENT_DIR)+9,strlen(dirname(__FILE__))-strlen(WP_CONTENT_DIR)-9); 27 define("ZING_MAILZ_PLUGIN", $zing_mailz_plugin); 75 76 if (phpversion() < '5') $warnings[]="You are running PHP version ".phpversion().". You require PHP version 5.2 or higher for this plugin, with version 5.3 recommended."; 77 if (!function_exists('curl_init')) $warnings[]="You need to have cURL installed. Contact your hosting provider to do so."; 226 $buffer=str_replace('<a href="./?zlistpage=logout">logout</a>','',$buffer); 227 $buffer=str_replace('./?','admin.php?'.'page=mailz_cp&zlist=index&',$buffer); 228 if (isset($_GET['zlistpage'])) $buffer=str_replace('<form method=post >','<form method=post action="'.$admin.'admin.php?page=mailz_cp&zlist=index&zlistpage='.$_GET['zlistpage'].'">',$buffer); 229 $buffer=str_replace('name="page"','name="zlistpage"',$buffer); 230 $buffer=str_replace('<form method="get" name="listcontrol" action="">','<form method="get" name="listcontrol" action="admin.php"><input type="hidden" value="mailz-users" name="page"/>',$buffer); 231 $buffer=str_replace('<form method="get" name="listcontrol">','<form method="get" name="listcontrol" action="admin.php"><input type="hidden" value="mailz-users" name="page"/>',$buffer); 233 if (isset($_GET['zlistpage'])) $buffer=str_replace('<form method="post" action="">','<form method=post action="'.$admin.'admin.php?page=mailz_cp&zlist=index&zlistpage='.$_GET['zlistpage'].'">',$buffer); 234 $buffer=str_replace(ZING_PHPLIST_URL.'/?',$admin.'admin.php?page=mailz_cp&zlist=index&',$buffer); 235 $buffer=str_replace('./FCKeditor',ZING_PHPLIST_URL.'/admin/FCKeditor',$buffer);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);DefaultTableMapping.php https://gitlab.com/geeta7/drupal | PHP | 395 lines
1<?php 2 382 // prefixes. 383 if (strlen($table_name) > 48) { 384 // Use a shorter separator, a truncated entity_type, and a hash of thefont_container.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 298 lines
1<?php 2 65 </div>'; 66 if ( isset( $fields['tag_description'] ) && strlen( $fields['tag_description'] ) > 0 ) { 67 $data['tag'] .= ' 81 82 if ( isset( $fields['font_size_description'] ) && strlen( $fields['font_size_description'] ) > 0 ) { 83 $data['font_size'] .= ' 100 </div>'; 101 if ( isset( $fields['text_align_description'] ) && strlen( $fields['text_align_description'] ) > 0 ) { 102 $data['text_align'] .= ' 114 </div>'; 115 if ( isset( $fields['line_height_description'] ) && strlen( $fields['line_height_description'] ) > 0 ) { 116 $data['line_height'] .= ' 130 </div>'; 131 if ( isset( $fields['color_description'] ) && strlen( $fields['color_description'] ) > 0 ) { 132 $data['color'] .= 'ExportToHtmlTemplate.php https://gitlab.com/mattswann/launch-housing | PHP | 232 lines
1<?php 2/* 21 22require_once('ExportBase.php'); 23require_once('CFDBExport.php'); 23require_once('CFDBExport.php'); 24require_once('CFDBShortCodeContentParser.php'); 25 109 substr($options['content'], -3, 3) == '<p>') { 110 $options['content'] = substr($options['content'], 6, strlen($options['content']) - 6 - 3); 111 } 113 substr($options['content'], -3, 3) == '<p>') { 114 $options['content'] = substr($options['content'], 4, strlen($options['content']) - 4 - 3); 115 }ScopeIndentSniff.php https://gitlab.com/michield/dokuwiki | PHP | 319 lines
15 * @version CVS: $Id: ScopeIndentSniff.php 270281 2008-12-02 02:38:34Z squiz $ 16 * @link http://pear.php.net/package/PHP_CodeSniffer 17 */ 31 * @version Release: 1.2.0 32 * @link http://pear.php.net/package/PHP_CodeSniffer 33 */ 76 * 77 * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document. 78 * @param int $stackPtr The position of the current token 82 */ 83 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) 84 { 93 if ($tokens[$stackPtr]['code'] === T_ELSE) { 94 $next = $phpcsFile->findNext( 95 PHP_CodeSniffer_Tokens::$emptyTokens,field_link_color.php https://gitlab.com/eita/agencia-consumo-responsavel | PHP | 207 lines
1<?php 2 170 171 $blah = substr($blah, 0, strlen($blah) - 1); 172 $styleString .= $blah . '{' . $value . '}'; 196 197 $blah = substr($blah, 0, strlen($blah) - 1); 198 $styleString .= $blah . '{' . $value . '}';IndexController.php https://gitlab.com/wuhang2003/phpwind | PHP | 251 lines
1<?php 2Wind::import('APPS:.profile.controller.BaseProfileController'); 11 * @author xiaoxia.xu <xiaoxia.xuxx@aliyun-inc.com> 12 * @copyright ©2003-2103 phpwind.com 13 * @license http://www.phpwind.com 13 * @license http://www.phpwind.com 14 * @version $Id: IndexController.php 28946 2013-05-31 04:59:50Z jieyin $ 15 * @package src.products.u.controller.profile 18 19 /* (non-PHPdoc) 20 * @see BaseProfileController::beforeAction() 26 27 /* (non-PHPdoc) 28 * @see WindController::run() 101 $bbsSign = $this->getInput('bbs_sign', 'post'); 102 if (($len = $this->loginUser->getPermission('sign_max_length')) && Pw::strlen($bbsSign) > $len) { //仅在此限制签名字数 103 $this->showError(array('USER:user.edit.sign.length.over', array('{max}' => $len)));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);filter.php https://bitbucket.org/moodle/moodle.git | PHP | 235 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 104 // ReDoS protection. Stop processing if a word is too large. 105 if (strlen($validtag) < 4096) { 106 if ($tagname === 'a') {DebugBar.php https://gitlab.com/ntphuc/FoodyBackend | PHP | 468 lines
1<?php 2/* 46 47 protected $stackSessionNamespace = 'PHPDEBUGBAR_STACK_DATA'; 48 183 * 184 * If no http driver where defined, a PhpHttpDriver is automatically created 185 * 190 if ($this->httpDriver === null) { 191 $this->httpDriver = new PhpHttpDriver(); 192 } 253 */ 254 public function getDataAsHeaders($headerName = 'phpdebugbar', $maxHeaderLength = 4096, $maxTotalHeaderLength = 250000) 255 { 260 261 if (strlen($data) > $maxTotalHeaderLength) { 262 $data = rawurlencode(json_encode(array(bad.php https://bitbucket.org/talueses/joomla-cms.git | PHP | 420 lines
1<?php 2/** 8* the Initial Developer. All Rights Reserved. 9* Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi) 10* Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com) 12* @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp 13* @see http://hsivonen.iki.fi/php-utf8/ 14* @package utf8 45 while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) { 46 $bytes = strlen($matches[0]); 47 if ( isset($matches[2])) { 82 while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) { 83 $bytes = strlen($matches[0]); 84 if ( isset($matches[2])) { 123 } 124 $str = substr($str,strlen($matches[0])); 125 }unicode.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 269 lines
1<?php 2/** 2/** 3* @version $Id: unicode.php,v 1.1 2008/10/10 20:52:53 mj Exp $ 4* Tools for conversion between UTF-8 and unicode 9* the Initial Developer. All Rights Reserved. 10* Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi) 11* Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com) 13* @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp 14* @see http://hsivonen.iki.fi/php-utf8/ 15* @package utf8 25* Returns false if the input string isn't a valid UTF-8 octet sequence 26* and raises a PHP error at level E_USER_WARNING 27* Note: this function has been modified slightly in this library to 32* @see utf8_from_unicode 33* @see http://hsivonen.iki.fi/php-utf8/ 34* @package utf8FigletTest.php https://github.com/MontmereLimited/zf2.git | PHP | 288 lines
1<?php 2/** 25namespace ZendTest\Captcha; 26use Zend\View\Renderer\PhpRenderer as View; 27 132 $this->assertTrue(is_string($word)); 133 $this->assertTrue(strlen($word) == 8); 134 $this->word = $word; 142 $this->assertTrue(is_string($word)); 143 $this->assertTrue(strlen($word) == 4); 144 $this->word = $word;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 ); 439 $pass_array = unserialize($serialized_pass); 440 if (strlen($pass_array['hash']) == 34) { 441 return ($this->_hash_crypt_private($password, $pass_array['hash'], $itoa64) === $pass_array['hash']) ? true : false; 466 467 if (strlen($salt) != 8) { 468 return $output;Stream.php https://github.com/jpratt/cal.git | PHP | 409 lines
1<?php 2/** 22/** Zend_Pdf_Element_Object */ 23#require_once 'Zend/Pdf/Element/Object.php'; 24 25/** Zend_Pdf_Element_Stream */ 26#require_once 'Zend/Pdf/Element/Stream.php'; 27 28/** Zend_Pdf_Filter_Ascii85 */ 29#require_once 'Zend/Pdf/Filter/Ascii85.php'; 30 31/** Zend_Pdf_Filter_AsciiHex */ 32#require_once 'Zend/Pdf/Filter/AsciiHex.php'; 33 34/** Zend_Pdf_Filter_Compression_Flate */ 35#require_once 'Zend/Pdf/Filter/Compression/Flate.php'; 36tbl_replace.php https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git | PHP | 414 lines
1<?php 2/* vim: set expandtab sw=4 ts=4 sts=4: */ 69 $GLOBALS['js_include'][] = 'tbl_change.js'; 70 require_once './libraries/header.inc.php'; 71 require './tbl_change.php'; 77 $url_params['after_insert'] = $_REQUEST['after_insert']; 78 //$GLOBALS['goto'] = 'tbl_change.php'; 79 $goto_include = 'tbl_change.php'; 110 } 111 if ($GLOBALS['goto'] == 'db_sql.php' && strlen($GLOBALS['table'])) { 112 $GLOBALS['table'] = ''; 116if (! $goto_include) { 117 if (! strlen($GLOBALS['table'])) { 118 $goto_include = 'db_sql.php'; 119 } else { 120 $goto_include = 'tbl_sql.php'; 121 }Encoder.php https://github.com/Exercise/zf2.git | PHP | 309 lines
1<?php 2/** 209 $base64 = false; 210 for ($i = 0; $i < strlen($string); $i++) { 211 $char = ord(substr($string, $i, 1)); 264 } 265 if (isset($this->_options['wrap']) && strlen($attribute) > $this->_options['wrap']) { 266 $attribute = trim(chunk_split($attribute, $this->_options['wrap'], PHP_EOL . ' ')); 267 } 268 $output .= $attribute . PHP_EOL; 269 } 269 } 270 return trim($output, PHP_EOL); 271 } 286 && array_key_exists('objectclass', $attributes)) { 287 $string .= sprintf('version: %d', $this->_options['version']) . PHP_EOL; 288 $this->_versionWritten = true;tokenizer.php https://github.com/xc/zetacomponents.git | PHP | 277 lines
1<?php 2/** 178 179 while ( strlen( $string ) > 0 ) 180 { 207 // Removed matched stuff from input string 208 $string = substr( $string, $length = strlen( $match ) ); 209 244 // Update position, not before converting tabs to spaces. 245 $position += ( $newToken instanceof ezcDocumentWikiNewLineToken ) ? 1 : strlen( $newToken->content ); 246activity.php https://github.com/xillibit/Kunena-forum.git | PHP | 304 lines
1<?php 2/** 50 { 51 if (Joomla\String\StringHelper::strlen($message->message) > $this->params->get('activity_points_limit', 0)) 52 { 163 { 164 if (Joomla\String\StringHelper::strlen($message->message) > $this->params->get('activity_points_limit', 0)) 165 { 188 $params->set('actor', $actor->getDisplayName()); // Actor in the stream 189 $params->set('actor_url', 'index.php?option=com_community&view=profile&userid=' . $actor->id); // Actor Link 190 247 $params->set('recipientName', $target->getDisplayName()); 248 $params->set('recipientUrl', 'index.php?option=com_community&view=profile&userid=' . $target->id); // Actor Link 249 $params->set('url', Uri::getInstance()->toString(array('scheme', 'host', 'port')) . $message->getPermaUrl(null)); // {url} tag for activity. Used when hovering over avatar in notification window, as well as in email notification 253 $params->set('actor', $actor->getDisplayName()); // Actor in the stream 254 $params->set('actor_url', 'index.php?option=com_community&view=profile&userid=' . $actor->id); // Actor Link 255zone.php https://bitbucket.org/sandeepbhaskar/inspiredliving.git | PHP | 441 lines
1<?php 2class ControllerLocalisationZone extends Controller { 382 383 if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) { 384 $this->error['name'] = $this->language->get('error_name');qrsplit.php https://bitbucket.org/Sinfin/pawtucket.git | PHP | 311 lines
1<?php 2/* 2/* 3 * PHP QR Code encoder 4 * 9 * 10 * PHP QR Code is distributed under LGPL 3 11 * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm> 49 { 50 if ($pos >= strlen($str)) 51 return false; 58 { 59 if ($pos >= strlen($str)) 60 return false; 198 $p = 1; 199 $dataStrLen = strlen($this->dataStr); 200helper.php https://github.com/nikosdion/Akeeba-Example.git | PHP | 582 lines
1<?php 2/** 346 case 'aprmd5': 347 $length = strlen($plaintext); 348 $context = $plaintext . '$apr1$' . $salt; 517 $salt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 518 $len = strlen($salt); 519 $makepass = ''; 523 { 524 $stat = array(php_uname()); 525 } 573 $bin = ''; 574 $length = strlen($hex); 575 for ($i = 0; $i < $length; $i += 2)Heuristics.php https://gitlab.com/mrceperka/mi-paa | PHP | 598 lines
1<?php 2namespace MrCeperka\MIPAA\Heuristics; 3 4require_once 'Helpers.php'; 5 224 $setupWithoutLeadingZeros = (string)decbin($i); 225 $setup = str_repeat("0", $this->input['n'] - strlen($setupWithoutLeadingZeros)) . $setupWithoutLeadingZeros; 226 $setupPrice = $setupWeight = 0; 398 399 /*echo 'maxPrice: ' . $maxPrice . PHP_EOL; 400 echo 'bits: ' . $b . PHP_EOL; 400 echo 'bits: ' . $b . PHP_EOL; 401 echo 'me:' . $maxError . PHP_EOL;*/ 402 } 503 * @link http://www.geeksforgeeks.org/branch-and-bound-set-2-implementation-of-01-knapsack/ 504 * Ported to PHP 505 */Generator.php https://gitlab.com/gideonmarked/PLCPortal | PHP | 365 lines
1<?php 2 172 if (strpos($filename, $basePath) === 0) { 173 $filename = substr($filename, strlen($basePath)); 174 }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 288 } 289 $length = strlen($raw); 290 while (is_array($parsed = $this->_reduce($raw))) { 294 } 295 if (strlen($raw) == $length) { 296 return false; 297 } 298 $length = strlen($raw); 299 }biblio_list.inc.php https://gitlab.com/mucill/majalengka | PHP | 294 lines
1<?php 2/** 104 if ($_field == 'title') { 105 if (strlen($_q) < 4) { 106 $_previous_field = 'title_short'; 255 // checking custom frontpage fields file 256 $custom_frontpage_record_file = SB.$sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/custom_frontpage_record.inc.php'; 257 if (file_exists($custom_frontpage_record_file)) {acp_language.php https://github.com/AJenbo/ubuntudanmark.dk.git | PHP | 466 lines
5* 6* @copyright (c) phpBB Limited <https://www.phpbb.com> 7* @license GNU General Public License, version 2 (GPL-2.0) 34 global $config, $db, $user, $template; 35 global $phpbb_root_path, $phpEx, $request; 36 38 { 39 include($phpbb_root_path . 'includes/functions_user.' . $phpEx); 40 } 164 { 165 if (substr($relative_path, 0 - strlen($phpEx)) === $phpEx) 166 { 446 $source_file = $phpbb_root_path . 'language/' . $source_lang . '/' . $file; 447 $dest_file = $phpbb_root_path . 'language/' . $dest_lang . '/' . $file; 448Database.php https://github.com/rgranadino/magento-mirror.git | PHP | 350 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 */ 296 $folderName = rtrim($folderName, '/'); 297 if (!strlen($folderName)) { 298 return;model.php https://github.com/keiouu/Evelite.git | PHP | 398 lines
1<?php 2/* 10require_once(home_dir . "framework/database.php"); 11require_once(home_dir . "framework/model_query.php"); 12require_once(home_dir . "framework/model_fields/init.php"); 214 $post_query = $field->db_post_create_query($db, $name, $table_name); 215 if (strlen($post_scripts) > 0 && strlen($post_query) > 0) 216 $post_scripts .= ", "; 216 $post_scripts .= ", "; 217 if (strlen($post_query) > 0) 218 $post_scripts .= $post_query; 219 } 220 if (strlen($post_scripts) > 0) 221 $SQL .= ", " . $post_scripts; 230 $query = $field->db_extra_create_query_pre($db, $name, $table_name); 231 if (strlen($query) > 0) 232 array_push($extra_scripts, $query);index.php https://github.com/bitweaver/categories.git | PHP | 307 lines
1<?php 2 13// Initialization 14require_once( '../../kernel/setup_inc.php' ); 15 23 24require_once( CATEGORIES_PKG_PATH.'categ_lib.php'); 25require_once( CATEGORIES_PKG_PATH.'CatAdminTreeMaker.php' ); 27if( defined( 'FILEGALS_PKG_PATH' ) ) { 28 include_once( FILEGALS_PKG_PATH.'filegal_lib.php' ); 29} 30if( defined( 'POLLS_PKG_PATH' ) ) { 31 include_once( POLLS_PKG_PATH.'poll_lib.php' ); 32 if (!isset($polllib)) { 36if( defined( 'ARTICLES_PKG_PATH' ) ) { 37 include_once( ARTICLES_PKG_PATH.'BitArticle.php' ); 38}FigletTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 363 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: FigletTest.php 24593 2012-01-05 20:35:02Z matthew $ 21 */ 23// Call Zend_Captcha_FigletTest::main() if this source file is executed directly. 24if (!defined("PHPUnit_MAIN_METHOD")) { 25 define("PHPUnit_MAIN_METHOD", "Zend_Captcha_FigletTest::main"); 27 28require_once 'Zend/Form/Element/Captcha.php'; 29require_once 'Zend/Captcha/Adapter.php'; 29require_once 'Zend/Captcha/Adapter.php'; 30require_once 'Zend/Config.php'; 31 39 */ 40class Zend_Captcha_FigletTest extends PHPUnit_Framework_TestCase 41{WishlistController.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 326 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 */ 133 $result = $wishlist->addNewItem($product, $buyRequest); 134 if (strlen(trim((string)$request->getParam('description')))) { 135 $result->setDescription($request->getParam('description'))->save();Database.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 350 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 */ 296 $folderName = rtrim($folderName, '/'); 297 if (!strlen($folderName)) { 298 return;Process.php https://github.com/agustinc/SemdropsMobile.git | PHP | 372 lines
1<?php 2 15 * Process is a thin wrapper around proc_* functions to ease 16 * start independent PHP processes. 17 * 51 if (!function_exists('proc_open')) { 52 throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); 53 } 79 * 80 * @param Closure|string|array $callback A PHP callback to run whenever there is some 81 * output available on STDOUT or STDERR 106 107 // Workaround for http://bugs.php.net/bug.php?id=51800 108 if (strstr(PHP_OS, 'WIN')) { 130 $writePipes = array($pipes[0]); 131 $stdinLen = strlen($this->stdin); 132 $stdinOffset = 0;io.php https://github.com/robertatakenaka/Regional-2.git | PHP | 295 lines
1<?php 2/* 21 * 22 * This is the File Manager Connector for PHP. 23 */ 42 { 43 if ( strlen( $Config['QuickUploadAbsolutePath'][$resourceType] ) > 0 ) 44 return $Config['QuickUploadAbsolutePath'][$resourceType] ; 50 { 51 if ( strlen( $Config['FileTypesAbsolutePath'][$resourceType] ) > 0 ) 52 return $Config['FileTypesAbsolutePath'][$resourceType] ; 117 118 $php_errormsg = '' ; 119 // Enable error tracking to catch the error. 168 // But it avoids the problems that arise if it isn't checked 169 if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) 170 SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ;GifCreator.php https://gitlab.com/billyprice1/mc-skintools | PHP | 349 lines
1<?php 2 9 * @author Sybio (Clément Guillemain / @Sybio01) 10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 11 * @copyright Clément Guillemain 205 206 $Locals_end = strlen($this->frameSources[$i]) - $Locals_str - 1; 207 $Locals_tmp = substr($this->frameSources[$i], $Locals_str, $Locals_end); 235 $Locals_img = substr($Locals_tmp, 8, 10); 236 $Locals_tmp = substr($Locals_tmp, 18, strlen($Locals_tmp) - 18); 237 242 $Locals_img = substr($Locals_tmp, 0, 10); 243 $Locals_tmp = substr($Locals_tmp, 10, strlen($Locals_tmp) - 10); 244default.tpl https://github.com/merchantos/PrintTemplates.git | Smarty Template | 356 lines
153 {% endif %} 154 {% if Workorder.Shop.ReceiptSetup.header|strlen > 0 %} 155 {{ Workorder.Shop.ReceiptSetup.header|nl2br|raw }} 165 {% if parameters.type == 'shop-tag' %} 166 {% if Workorder.hookIn|strlen > 0 or Workorder.hookOut|strlen > 0 %} 167 <h1 style="margin-top:20px;">Hook In: {{Workorder.hookIn}} <br /> 191 <h3>Work Order Item:</h3> 192 <p>{% if Workorder.Serialized.description|strlen > 0 %} 193 {{ Workorder.Serialized.description }} 193 {{ Workorder.Serialized.description }} 194 {% elseif Workorder.Serialized.Item.description|strlen > 0 %} 195 {{ Workorder.Serialized.Item.description }} 196 {% endif %} 197 {% if Workorder.Serialized.colorName|strlen > 0 %} 198 / {{ Workorder.Serialized.colorName }}all_activity_type_log.php https://gitlab.com/xusasuke6/Slg_php | PHP | 476 lines
1<?php 2 3define('IN_DATANG_SYSTEM', true); 4include "../../../config/config.php"; 5include SYSDIR_ADMIN."/include/global.php"; 113 $date_start1 = explode("-",$_REQUEST['dStartDate']); 114 $date_start1[1] = (strlen($date_start1[1]) >= 2) ? $date_start1[1] : '0'.$date_start1[1]; 115 $date_start1[2] = (strlen($date_start1[2]) >= 2) ? $date_start1[2] : '0'.$date_start1[2]; 127 $date_end1 = explode("-",$_REQUEST['dEndDate']); 128 $date_end1[1] = (strlen($date_end1[1]) >= 2) ? $date_end1[1] : '0'.$date_end1[1]; 129 $date_end1[2] = (strlen($date_end1[2]) >= 2) ? $date_end1[2] : '0'.$date_end1[2];FigletTest.php https://bitbucket.org/ksekar/campus.git | PHP | 363 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: FigletTest.php 24594 2012-01-05 21:27:01Z matthew $ 21 */ 23// Call Zend_Captcha_FigletTest::main() if this source file is executed directly. 24if (!defined("PHPUnit_MAIN_METHOD")) { 25 define("PHPUnit_MAIN_METHOD", "Zend_Captcha_FigletTest::main"); 27 28require_once 'Zend/Form/Element/Captcha.php'; 29require_once 'Zend/Captcha/Adapter.php'; 29require_once 'Zend/Captcha/Adapter.php'; 30require_once 'Zend/Config.php'; 31 39 */ 40class Zend_Captcha_FigletTest extends PHPUnit_Framework_TestCase 41{BodyTest.php https://gitlab.com/leon0399/damnit-engine | PHP | 401 lines
1<?php 2/** 4 * 5 * @link https://github.com/slimphp/Slim 6 * @copyright Copyright (c) 2011-2015 Josh Lockhart 6 * @copyright Copyright (c) 2011-2015 Josh Lockhart 7 * @license https://github.com/slimphp/Slim/blob/master/LICENSE.md (MIT License) 8 */ 13 14class BodyTest extends \PHPUnit_Framework_TestCase 15{ 42 { 43 $stream = fopen('php://temp', $mode); 44 fwrite($stream, $this->text); 81 82 $this->assertEquals('php://temp', $body->getMetadata('uri')); 83 }Compass.php https://github.com/vivid-planet/library.git | PHP | 511 lines
1<?php 2require_once dirname(__FILE__) . '/../ExtensionInterface.php'; 87 $directories = array(); 88 $last_letter = $root[strlen($root) - 1]; 89 $root = ($last_letter == '\\' || $last_letter == '/') ? $root : $root . DIRECTORY_SEPARATOR; 235 if (is_string($object)) { 236 $result = (strlen(trim($object, ' ,')) === 0); 237 } 344 $stack = ''; 345 for ($i = 0; $i < strlen($list); $i++) { 346 $char = substr($list, $i, 1);Cart.php https://bitbucket.org/kdms/sh-magento.git | PHP | 246 lines
1<?php 2/** 48 $xmlObject->addAttribute('summary_qty', (int)$this->helper('checkout/cart')->getSummaryCount()); 49 if (strlen($quote->getCouponCode())) { 50 $xmlObject->addAttribute('has_coupon_code', 1);Deserializer.php https://github.com/Enrise/Zend.git | PHP | 306 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Deserializer.php 24593 2012-01-05 20:35:02Z matthew $ 21 */ 23/** Zend_Amf_Constants */ 24// require_once 'Zend/Amf/Constants.php'; 25 26/** @see Zend_Amf_Parse_Deserializer */ 27// require_once 'Zend/Amf/Parse/Deserializer.php'; 28 29/** 30 * Read an AMF0 input stream and convert it into PHP data types 31 * 61 * @param integer $typeMarker 62 * @return mixed whatever the data type is of the marker in php 63 * @throws Zend_Amf_Exception for invalid typeiblock_admin.php https://gitlab.com/Rad1calDreamer/honey | PHP | 484 lines
1<? 2require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); 3CModule::IncludeModule("iblock"); 3CModule::IncludeModule("iblock"); 4require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/iblock/prolog.php"); 5IncludeModuleLangFile(__FILE__); 8if($arIBTYPE===false) 9 LocalRedirect("/bitrix/admin/iblock_type_admin.php?lang=".LANGUAGE_ID); 10 95 { 96 if(strlen($ID)<=0) 97 continue; 248 { 249 $row =& $lAdmin->AddRow($f_ID, $dbrs, 'iblock_edit.php?ID='.$f_ID.'&type='.htmlspecialcharsbx($type).'&lang='.LANGUAGE_ID.'&admin='.($_REQUEST["admin"]=="Y"? "Y": "N"), GetMessage("IBLOCK_ADM_TO_EDIT")); 250 }yandex_setup.php https://gitlab.com/Rad1calDreamer/honey | PHP | 463 lines
115 { 116 if (strlen($XML_DATA) <= 0) 117 { 121 122 if (($ACTION=="EXPORT_SETUP" || $ACTION=="EXPORT_EDIT" || $ACTION=="EXPORT_COPY") && strlen($SETUP_PROFILE_NAME)<=0) 123 $arSetupErrors[] = GetMessage("CET_ERROR_NO_PROFILE_NAME"); 134 "TITLE"=>GetMessage("CATI_ADM_RETURN_TO_LIST_TITLE"), 135 "LINK"=>"/bitrix/admin/cat_export_setup.php?lang=".LANGUAGE_ID, 136 "ICON"=>"btn_list", 199 "ClearSelected(); BX('id_ifr').src='/bitrix/tools/catalog_export/yandex_util.php?IBLOCK_ID=0&'+'".bitrix_sessid_get()."';", 200 "ClearSelected(); BX('id_ifr').src='/bitrix/tools/catalog_export/yandex_util.php?IBLOCK_ID='+this[this.selectedIndex].value+'&'+'".bitrix_sessid_get()."';", 201 'class="adm-detail-iblock-types"', 400 <td width="60%"> 401 <b><? echo htmlspecialcharsbx(COption::GetOptionString("catalog", "export_default_path", "/bitrix/catalog_export/"));?></b><input type="text" name="SETUP_FILE_NAME" value="<?echo (strlen($SETUP_FILE_NAME)>0) ? htmlspecialcharsbx($SETUP_FILE_NAME) : "yandex_".mt_rand(0, 999999).".php" ?>" size="50" /> 402 </td>ResourceTypeConfig.php https://github.com/talesam/sgce.git | PHP | 357 lines
1<?php 2/* 102 103 if (!strlen($this->_url)) { 104 $this->_url = "/"; 117 118 if (!strlen($this->_directory)) { 119 $this->_directory = resolveUrl($this->_url); 129 $resourceTypeNode["allowedExtensions"] = trim((string)$resourceTypeNode["allowedExtensions"]); 130 if (strlen($resourceTypeNode["allowedExtensions"])) { 131 $extensions = explode(",", $resourceTypeNode["allowedExtensions"]); 147 $resourceTypeNode["deniedExtensions"] = trim((string)$resourceTypeNode["deniedExtensions"]); 148 if (strlen($resourceTypeNode["deniedExtensions"])) { 149 $extensions = explode(",", $resourceTypeNode["deniedExtensions"]); 160 } 161 if (!strlen($_view) && isset($GLOBALS['config']['DefaultDisplaySettings']['view'])) { 162 $_view = $GLOBALS['config']['DefaultDisplaySettings']['view'];imagepicker.php https://gitlab.com/che234/adn | PHP | 267 lines
1<?php 2/** 2/** 3 * @version $Id: imagepicker.php 11812 2013-06-27 17:49:30Z djamil $ 4 * @author RocketTheme http://www.rockettheme.com 59 $path = $this->data->path; 60 if (!strlen($path)) $tipTitle = ''; 61 } else { 125 'attributes' => array( 126 'value' => $platforminfo->getRootUrl().'/wp-admin/media-upload.php?post_id=0&width=640&height=687&e_name=' . $this->id . '&TB_iframe=1', 127 'icon' => 'mediamanager', 137 'attributes' => array( 138 'value' => $platforminfo->getRootUrl().'/wp-admin/admin-ajax.php?action=rokgallery_gallerypicker&height=600&width=675&show_menuitems=0&inputfield=' . $this->id . '&modal=false&TB_iframe=true', 139 'icon' => 'rokgallery', 177 $class = (isset($attributes['class']) ? $attributes['class'] : "") . (isset($attributes['disabled']) ? " disabled" : ""); 178 $class = (strlen($class) ? 'class="'. $class . '"' : ""); 179 $icon = (isset($attributes['icon']) ? $attributes['icon'] : "");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 * 181 $cookieString = $this->generateContentString(); 182 if(strlen($cookieString) > self::MAX_COOKIE_SIZE) 183 { 214 /** 215 * Load the cookie content into a php array. 216 * Parses the cookie string to extract the different variables.IPN.class.php https://github.com/vaughnpaul/NOS.git | PHP | 299 lines
1<?php 2/* 2/* 3 $Id: IPN.class.php,v 2.8 2004/09/11 devosc Exp $ 4 20 21require_once($modules_directory . 'payment/paypal/classes/Client/Connector.class.php'); 22 28 if ($debug->enabled) $debug->add(UNKNOWN_TXN_TYPE,sprintf(UNKNOWN_TXN_TYPE_MSG,$post_vars['payment_type'])); 29 } else if(strlen($post_vars['txn_id']) == 17) { 30 $this->init($post_vars); //Looks like a PayPal transaction 251 if(defined('TABLE_PAYPAL_AUCTION')) { 252 if($this->isAuction() && strlen($this->key['item_number']) > 0) { 253 $items = explode(',', $this->key['item_number']);CodeFormatter.php https://gitlab.com/nmhieucoder/laravel_tintuc | PHP | 320 lines
1<?php 2 144 * 145 * @todo consider switching \token_get_all() out for PHP-Parser-based formatting at some point. 146 * 262 263 yield $lineNum => $line.\PHP_EOL; 264 } 284 \end($lines); 285 $pad = \strlen(\key($lines)); 286list_generator.php https://github.com/mackensen/moodle.git | PHP | 336 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 204 if (strrpos($directory, $directoryroot) !== false) { 205 $location = substr($directory, strlen($directoryroot)); 206 $eventname = substr($file, 0, -4); 295 // Create a link for further event detail. 296 $url = new \moodle_url('eventdetail.php', array('eventname' => $eventfullpath)); 297 $link = \html_writer::link($url, $eventfullpath::get_name_with_info());Abstract.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 320 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 */ 180 'type' => Mage_ImportExport_Model_Import::getAttributeType($attribute), 181 'default_value' => strlen($attribute->getDefaultValue()) 182 ? $attribute->getDefaultValue() : null, 253 // check value for non-empty in the case of required attribute? 254 if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) { 255 $error |= !$this->_entityModel->isAttributeValid($attrCode, $attrParams, $rowData, $rowNum); 295 if (!$attrParams['is_static']) { 296 if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) { 297 $resultAttrs[$attrCode] =Adapter.php https://github.com/deviousdodo/RPC.git | PHP | 748 lines
1<?php 2 220 221 $this->setPkField( substr( $this->getName(), strlen( $this->getDb()->getPrefix() ) ) . '_id' ); 222install.php https://github.com/zackster/hip-hop-goblin.git | PHP | 281 lines
1<?php 2/*************************************************************************** 7 * 8 * Notice: Most of this file is taken from the install.php file of the phpBB v2 forum 9 * The stylesheet associated is also a modified version of the subSilver.css stylesheet that comes with the phpBB v2 forum 22 23if (@file_exists('../config.php')) 24{ 172 { 173 if (!($fp = @fopen('../config.php', 'w'))) 174 { 199 { 200 $text = 'VOGOO PHP LIB installation is complete. Thank you for choosing the VOGOO PHP Lib.<br />You can now close this window and start using the VOGOO PHP Lib in your own PHP scripts.'; 201 } 274 </tr> 275<?php } ?> 276 </table></td>stylies.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 347 lines
1<?php 2defined('JPATH_BASE') or die(); 38 } else { 39 $layoutStyle = substr(trim($item),$posStyle+(int)strlen('layout_style=')); 40 } 125 var jvStyle7 = $$('.jv_slide_style7'); 126 var layout = "<?php echo $layoutStyle; ?>"; 127 var selectStyle = function(style){ 343 </script> 344 <?php 345 return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', $class, 'value', 'text', $value, $control_name.$name);class-wp-importer.php https://gitlab.com/Gashler/dp | PHP | 302 lines
1<?php 2/** 160 /** 161 * Sort by strlen, longest string first 162 * 167 function cmpr_strlen( $a, $b ) { 168 return strlen( $b ) - strlen( $a ); 169 } 276 } else if ( (bool) preg_match( "/^-([a-zA-Z0-9]+)/", $args[$i], $match ) ) { 277 for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) { 278 $key = $match[1]{$j};EditView.php https://github.com/hitchby/PLEXUS.git | PHP | 356 lines
23require_once('Smarty_setup.php'); 24require_once('data/Tracker.php'); 25require_once('include/utils/utils.php'); 25require_once('include/utils/utils.php'); 26require_once('include/utils/UserInfoUtil.php'); 27require_once("include/Zend/Json.php"); 98 //added for getting list-ids to compose email popup from list view(Accounts,Contacts,Leads) 99 if(isset($_REQUEST['field_id']) && strlen($_REQUEST['field_id']) != 0) { 100 if($_REQUEST['par_module'] == "Users") 160 $mailbox = $_REQUEST["mailbox"]; 161 require_once('include/utils/UserInfoUtil.php'); 162 require_once("modules/Webmails/Webmails.php"); 309$smarty->assign("IMAGE_PATH", $image_path); 310$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 311$smarty->assign("ID", $focus->id);shelftags.php https://github.com/joelbrock/is4c_nofc.git | PHP | 405 lines
1<?php 2require_once '../define.conf'; 7 */ 8 require('../src/fpdf/fpdf.php'); 9 12 */ 13 // require('prodFunction.php'); 14 75 //Add or control the check digit 76 if(strlen($barcode)==12) 77 $barcode.=$this->GetCheckDigit($barcode); 116 //Draw bars 117 for($i=0;$i<strlen($code);$i++) 118 { 296 /** 297 * determine check digit using barcode.php function 298 */tNG_dispatcher.class.php https://github.com/nadavkav/MoodleTAO.git | PHP | 421 lines
1<?php 2/* 147 $outRules .= '<script src="'.$this->relPath.'includes/tng/scripts/FormValidation.js" type="text/javascript"></script>' . "\r\n"; 148 $outRules .= '<script src="'.$this->relPath.'includes/tng/scripts/FormValidation.js.php" type="text/javascript"></script>' . "\r\n"; 149 if (isset($this->UnivalProps) && is_array($this->UnivalProps) && count($this->UnivalProps) > 0) { 190 } 191 $outRules = substr($outRules, 0, strlen($outRules) - 2); 192 $outRules .= "}"; 325 $js_devNotes = KT_escapeJS($ret_devel); 326 $js_os = PHP_OS; 327 $js_webserver = @$_SERVER['SERVER_SOFTWARE']; 327 $js_webserver = @$_SERVER['SERVER_SOFTWARE']; 328 $js_servermodel = (!file_exists($this->relPath . 'adodb/')? 'PHP MySQL ': 'PHP ADODB ') . phpversion(); 329 $js_installation = KT_escapeJS(php_sapi_name());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 * 87 fputs($tb_sock, "Content-type: application/x-www-form-urlencoded\r\n"); 88 fputs($tb_sock, "Content-length: " . strlen($tb_send) . "\r\n"); 89 fputs($tb_sock, "Connection: close\r\n\r\n");search.inc.php https://github.com/harriswong/ATutor.git | PHP | 344 lines
1<?php 2/************************************************************************/ 14 15// NOTE! please see include/html/search.inc.php NOTE! 16 61function get_content_search_result($words, $predicate, $course_id, &$total_score, &$course_score) { 62 global $addslashes, $db, $highlight_system_courses, $strlen, $substr, $strtolower; 63 109 110 if ($strlen($row['text']) > 270) { 111 $row['text'] = $substr($row['text'], 0, 268).'...'; 302 if ($_SESSION['course_id'] != $items['course_id']) { 303 echo '<a href="bounce.php?course='.$items['course_id'].SEP.'p='.urlencode('forum/view.php?fid='.$items['forum_id'].SEP.'pid='.$items['post_id'].SEP.'words='.$_GET['words']).'">'.$items['forum_title'].' - '.$items['subject'].'</a> '; 304 } else { 312 if ($_SESSION['course_id'] != $items['course_id']) { 313 echo '<a href="bounce.php?course='.$items['course_id'].SEP.'p='.urlencode('content.php?cid='.$items['content_id'].SEP.'words='.$_GET['words']).'">'.$items['title'].'</a> '; 314 } else {WishlistController.php https://github.com/arush/desparation-deprecated.git | PHP | 326 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 */ 133 $result = $wishlist->addNewItem($product, $buyRequest); 134 if (strlen(trim((string)$request->getParam('description')))) { 135 $result->setDescription($request->getParam('description'))->save();Cart.php https://github.com/arush/desparation-deprecated.git | PHP | 246 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 */ 48 $xmlObject->addAttribute('summary_qty', (int)$this->helper('checkout/cart')->getSummaryCount()); 49 if (strlen($quote->getCouponCode())) { 50 $xmlObject->addAttribute('has_coupon_code', 1);inputfilter.php https://github.com/chrisinammo/arthurmcneil.git | PHP | 551 lines
1<?php 2/** 2/** 3 * @class: InputFilter (PHP4 & PHP5, with comments) 4 * @project: PHP Input Filter 5 * @date: 10-05-2005 6 * @version: 1.2.2_php4/php5 7 * @author: Daniel Morris 58 /** 59 * Method to be called by another php script. Processes for XSS and 60 * specified bad code. 180 $currentTag = substr($fromTagOpen, 0, $tagOpen_end); 181 $tagLength = strlen($currentTag); 182 $tagLeft = $currentTag; 265 */ 266 $tagLeft = substr($fromSpace, strlen($attr)); 267 $currentSpace = strpos($tagLeft, ' ');Translator.php https://github.com/ruudk/symfony.git | PHP | 483 lines
1<?php 2 216 217 $len = \strlen(MessageCatalogue::INTL_DOMAIN_SUFFIX); 218 if ($this->hasIntlFormatter 219 && ($catalogue->defines($id, $domain.MessageCatalogue::INTL_DOMAIN_SUFFIX) 220 || (\strlen($domain) > $len && 0 === substr_compare($domain, MessageCatalogue::INTL_DOMAIN_SUFFIX, -$len, $len))) 221 ) { 307 $content = sprintf(<<<EOF 308<?php 309 358 { 359 return $this->cacheDir.'/catalogue.'.$locale.'.'.strtr(substr(base64_encode(hash('sha256', serialize($this->cacheVary), true)), 0, 7), '/', '_').'.php'; 360 }