100+ results results for 'php preg_replace' (1815 ms)
1<?php 2/** 202 { 203 return preg_replace('{/$}', '', $path); 204 }filters.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 176 lines
1<?php 2/** 103 foreach ($wpcf7 as $key => $val) { 104 $val = preg_replace('/' . preg_quote($site_url, '/') . '/i', $new_site_url, $val); 105 $val = preg_replace('/' . preg_quote($admin_email, '/') . '/i', $new_admin_email, $val);account.php https://gitlab.com/ji5656/test2 | PHP | 188 lines
1<?php 2 $page = "My Account"; 2 $page = "My Account"; 3 include '../includes/connect.php'; 4 include '../includes/header.php'; 4 include '../includes/header.php'; 5 include '../includes/nav.php'; 6 include "../includes/loginmembercheck.php"; 8<div class="login"> 9<?php 10 $memberID = $_SESSION['user']; 17 18<?php 19 40 41<form action="accountprocessing.php" method="post"> 42Filesystem.php https://gitlab.com/jatasya/Slim_framework | PHP | 239 lines
1<?php 2 214 { 215 return preg_replace('#/{2,}#', '/', strtr((string) $name, '\\', '/')); 216 }admin_ratings.php https://github.com/tbleher/gallery3-contrib.git | PHP | 140 lines
1<?php defined("SYSPATH") or die("No direct script access."); 2/** 47 $iconset = Input::instance()->post("iconset"); 48 $iconset = preg_replace("/\/index\.php/","",$iconset); 49 module::set_var("ratings", "iconset", $iconset);QueryBuilder.php https://gitlab.com/itlboy/yii2-starter-installed | PHP | 184 lines
1<?php 2/** 114 $definition = $this->getColumnDefinition($table, $column); 115 $definition = trim(preg_replace("/COMMENT '(.*?)'/i", '', $definition)); 116 172 } 173 $sql = preg_replace('/^[^(]+\((.*)\).*$/', '\1', $sql); 174 $sql = str_replace(', [', ",\n[", $sql);StringEscape.php https://gitlab.com/cpteam/core | PHP | 231 lines
1<?php 2 84 { 85 return preg_replace("/^(\s*(\r\n|\n|\r)){2,}/m", "\n", $text); 86 } 141 142 $url = preg_replace('/^\b((?!(?:https?|ftp):\/\/)(www\.))/im', 'http://www.', $url); 143 143 144 return preg_replace($reg_exUrl, '<i><a href="$0" target="_blank" rel="nofollow">$0</a></i>', $url); 145 } 148 { 149 $text = preg_replace("/\*+(.*)?/i", "<ul><li>$1</li></ul>", $text); 150 $text = preg_replace("/(\<\/ul\>\n(.*)\<ul\>*)+/", "", $text); 159 $data = strtolower($data); 160 $data = preg_replace("/[^[:alpha:][:digit:]]/", "-", $data); 161 $data = trim($data, "-");Query.php https://github.com/tmccormi/openemr.git | PHP | 195 lines
1<?php 2/** 52 53 if ($xpathPhpfunctions = $document->getXpathPhpFunctions()) { 54 $xpath->registerNamespace('php', 'http://php.net/xpath'); 55 if ($xpathPhpfunctions === true) { 56 $xpath->registerPhpFunctions(); 57 } else { 57 } else { 58 $xpath->registerPhpFunctions($xpathPhpfunctions); 59 } 93 // Arbitrary attribute value contains whitespace 94 $path = preg_replace_callback( 95 '/\[\S+?([\'"])((?!\1|\\\1).*?)\1\]/', 96 function ($matches) use ($placeholder) { 97 return str_replace($matches[2], preg_replace('/\s+/', $placeholder, $matches[2]), $matches[0]); 98 },ArticleHTMLGalley.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 259 lines
1<?php 2 3/** 4 * @file classes/article/ArticleHTMLGalley.inc.php 5 * 14 15// $Id: ArticleHTMLGalley.inc.php,v 1.33 2009/05/12 16:57:20 asmecher Exp $ 16 55 56 $contents = preg_replace( 57 '/([Ss][Rr][Cc]|[Hh][Rr][Ee][Ff]|[Dd][Aa][Tt][Aa])\s*=\s*"([^"]*' . $pattern . ')"/', 62 // Replacement for Flowplayer 63 $contents = preg_replace( 64 '/[Uu][Rr][Ll]\s*\:\s*\'(' . $pattern . ')\'/', 69 // Replacement for other players (ested with odeo; yahoo and google player won't work w/ OJS URLs, might work for others) 70 $contents = preg_replace( 71 '/[Uu][Rr][Ll]=([^"]*' . $pattern . ')/',docleanup.php https://github.com/cybernet/CyBerFuN-CoDeX.git | PHP | 154 lines
1<?php 2require_once("include/bittorrent.php"); 3require_once "include/user_functions.php"; 9 // moddifed logginorreturn by retro//Remember to change the following line to match your server 10 print("<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 ".$SITENAME." Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"); 11 die(); 31 // Doesn't work for 2000 32 // If you need it to work for 2000 look at http://us2.php.net/manual/en/function.memo...usage.php#54642 33 if (substr(PHP_OS, 0, 3) == 'WIN') { 37 38 return preg_replace('/[\D]/', '', $output[5]) * 1024; 39 } 56 57?><tr><td class="colhead">Cleanup Name</td><td class="colhead">Last Run</td><td class="colhead">Runs every</td><td class="colhead">Scheduled to run</td></tr><?php 58$res = mysql_query("SELECT arg, value_u FROM avps");XLSX.php https://gitlab.com/VTTE/sitios-vtte | PHP | 178 lines
1<?php 2 105 /** 106 * Converts PHP control characters from the given string to OpenXML escaped control characters 107 * 126 127 return preg_replace_callback("/({$this->escapableControlCharactersPattern})/", function($matches) { 128 return $this->controlCharactersEscapingReverseMap[$matches[0]]; 139 { 140 return preg_replace('/_(x[\dA-F]{4})_/', '_x005F_$1_', $string); 141 } 143 /** 144 * Converts OpenXML escaped control characters from the given string to PHP control characters 145 * 161 // only unescape characters that don't contain the escaped escape character for now 162 $unescapedString = preg_replace("/(?<!_x005F)($escapedCharValue)/", $charValue, $unescapedString); 163 }readmes.inc.php https://gitlab.com/Gashler/sg | PHP | 233 lines
77 $rm = preg_replace ("/(\=\=)( )(Description)( )(\=\=)/", "<h4 id=\"rm-description\">$3</h4>", $rm); 78 $rm = preg_replace ("/(\=\=)( )(Screenshots)( )(\=\=)/", "<h4 id=\"rm-screenshots\">$3</h4>", $rm); 79 $rm = preg_replace ("/(\=\=)( )(Frequently Asked Questions)( )(\=\=)/", "<h4 id=\"rm-faqs\">$3</h4>", $rm); 101 { 102 $rm = preg_replace ("/\<pre\>\<code\>/i", '<pre lang="php" escaped="true">', $rm); 103 $rm = preg_replace ("/\<\/code\>\<\/pre\>/i", '</pre>', $rm); 119 $rm = preg_replace ("/(\=\=)( )(Installation)( )(\=\=)/", "<h2 id=\"rm-installation\">$3</h2>", $rm); 120 $rm = preg_replace ("/(\=\=)( )(Description)( )(\=\=)/", "<h2 id=\"rm-description\">$3</h2>", $rm); 121 $rm = preg_replace ("/(\=\=)( )(Screenshots)( )(\=\=)/", "<h2 id=\"rm-screenshots\">$3</h2>", $rm); 121 $rm = preg_replace ("/(\=\=)( )(Screenshots)( )(\=\=)/", "<h2 id=\"rm-screenshots\">$3</h2>", $rm); 122 $rm = preg_replace ("/(\=\=)( )(Frequently Asked Questions)( )(\=\=)/", "<h2 id=\"rm-faqs\">$3</h2>", $rm); 123 $rm = preg_replace ("/(\=\=)( )(Changelog)( )(\=\=)/", "<h2 id=\"rm-changelog\">$3</h2>", $rm); 153 { 154 $rm = preg_replace ("/\<pre\>\<code\>/i", '<pre lang="php" escaped="true">', $rm); 155 $rm = preg_replace ("/\<\/code\>\<\/pre\>/i", '</pre>', $rm);cusm_discussion_answer.php https://gitlab.com/ptisky/API_prestashop | PHP | 458 lines
1<?php 2/** 62 63 $message_infos['message'] = preg_replace( 64 '/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui', 379</style> 380<script type="text/javascript" src="<?php echo SC_JQUERY;?>"></script> 381<script type="text/javascript"> 381<script type="text/javascript"> 382<?php if($success) { ?> 383parent.successAnswer(); 383parent.successAnswer(); 384<?php } ?> 385 403 404 <?php 405 if(!empty($errors))datalib_test.php https://github.com/gpreunin/moodle.git | PHP | 161 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 17/** 18 * This file contains tests for some of the code in ../datalib.php. 19 * 29global $CFG; 30require_once(dirname(__FILE__) . '/../lib.php'); 31 33/** 34 * Unit tests for some of the code in ../datalib.php. 35 * 48 } 49 $newsql = preg_replace('/(?<!:):[a-z][a-z0-9_]*/', '?', $sql); 50 return array($newsql, $newparams);main.php https://github.com/dgz/shimmie2.git | PHP | 155 lines
1<?php 2/** 33 ) as $el) { 34 $text = preg_replace("!\[$el\](.*?)\[/$el\]!s", "<$el>$1</$el>", $text); 35 } 35 } 36 $text = preg_replace('!^>>([^\d].+)!', '<blockquote><small>$1</small></blockquote>', $text); 37 $text = preg_replace('!>>(\d+)(#c?\d+)?!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('post/view/$1$2').'">>>$1$2</a>', $text); 37 $text = preg_replace('!>>(\d+)(#c?\d+)?!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('post/view/$1$2').'">>>$1$2</a>', $text); 38 $text = preg_replace('!\[url=site://(.*?)(#c\d+)?\](.*?)\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$3</a>', $text); 39 $text = preg_replace('!\[url\]site://(.*?)(#c\d+)?\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$1$2</a>', $text); 39 $text = preg_replace('!\[url\]site://(.*?)(#c\d+)?\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$1$2</a>', $text); 40 $text = preg_replace('!\[url=((?:https?|ftp|irc|mailto)://.*?)\](.*?)\[/url\]!s', '<a href="$1">$2</a>', $text); 41 $text = preg_replace('!\[url\]((?:https?|ftp|irc|mailto)://.*?)\[/url\]!s', '<a href="$1">$1</a>', $text); 41 $text = preg_replace('!\[url\]((?:https?|ftp|irc|mailto)://.*?)\[/url\]!s', '<a href="$1">$1</a>', $text); 42 $text = preg_replace('!\[email\](.*?)\[/email\]!s', '<a href="mailto:$1">$1</a>', $text); 43 $text = preg_replace('!\[img\](https?:\/\/.*?)\[/img\]!s', '<img src="$1">', $text);config.php https://gitlab.com/wildanoo/E-procurement | PHP | 369 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2 18//$config['base_url'] = "http://".$_SERVER['HTTP_HOST']; 19//$config['base_url'] .= preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME'])).'/'; 20// OR 30| 31| Typically this will be your index.php file, unless you've renamed it to 32| something else. If you are using mod_rewrite to remove the page set this 156| invoke your controllers and its functions: 157| example.com/index.php?c=controller&m=function 158| 180| 0 = Disables logging, Error logging TURNED OFF 181| 1 = Error Messages (including PHP errors) 182| 2 = Debug Messages 207| 208| Each item that is logged has an associated date. You can use PHP date 209| codes to set your own date formattingsetup-config.php https://gitlab.com/haque.mdmanzurul/wp-silect | PHP | 347 lines
52if ( file_exists( ABSPATH . 'wp-config.php' ) ) 53 wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ), 'install.php' ) . '</p>' ); 54 56if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) ) 57 wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>."), 'install.php' ) . '</p>' ); 58 137 <?php _e( 'We’re going to use this information to create a <code>wp-config.php</code> file.' ); ?> 138 <strong><?php _e( "If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>." ); ?></strong> 139 <?php _e( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ); ?> 307<p><?php _e( 'After you’ve done that, click “Run the install.”' ); ?></p> 308<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the install' ); ?></a></p> 309<script> 338 339<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the install' ); ?></a></p> 340<?phpdeclarer_bases.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 231 lines
1<?php 2 63 while ($f = readdir($d)) { 64 if ((preg_match('/^(.*)[.]php$/', $f, $s)) 65 and is_readable($f = $dir . $f) 147 define('_DECLARER_PASS_DB', $pass_db); 148 // si on est sur le meme serveur que connect.php 149 // indiquer quelle est la db utilisee pour l'exclure des choix possibles 188 // securite : le nom doit etre un mot sans caracteres speciaux 189 $f = preg_replace(',[^\w],', '', $nom_connect); 190 if ($f !== $nom_connect) { 191 $erreurs['nom_connect'] = _T('erreur_nom_connect_incorrect'); 192 } elseif (file_exists(_DIR_CONNECT . $nom_connect . '.php')) { 193 $erreurs['nom_connect'] = _T('erreur_connect_deja_existant'); 225 226 install_fichier_connexion(_DIR_CONNECT . _DECLARER_NOM_CONNECT . '.php', $conn); 227waldo.php https://bitbucket.org/driftcreate/supermarketetc.git | PHP | 167 lines
1<?php 2 /** 3 * A Dynamic Responsive CSS Background Images Extension for WordPress 4 * and Other PHP-Based Applications 5 * 5 * 6 * Adds support to WordPress themes and other PHP based applications 7 * (with appropriate modifications) to dynamically generate styles 20 * Thank you to Donald Allen <https://github.com/donaldallen> for presenting the 21 * initial idea of PHP generated styles for use with background images. 22 */ 60 public function waldoSavedStyles() { 61 return unserialize(file_get_contents($this->template_dir .'/waldo-styles.php')); 62 } 96 * waldoStyles 97 * Minify and write styles to waldo.css, save waldo_styles array to waldo-styles.php. 98 *feeds.php https://github.com/agnesrambaud/yacs.git | PHP | 428 lines
1<?php 2/** 131 // get them from the database 132 include_once $context['path_to_root'].'links/links.php'; 133 return Links::list_news(0, $count, $variant); 140 * To troubleshoot feeders you can configure the debugging facility in the 141 * configuration panel for feeds (parameter [code]debug_feeds[/code], at [script]feeds/configure.php[/script]). 142 * 142 * 143 * @see links/link.php 144 * 230 case 'files': 231 return 'files/feed.php'; 232 case 'opml': 267 * At the end of the feeding process, the database is purged from oldest links according to the limit 268 * defined in parameters/feeds.include.php, set through feeds/configure.php. 269 * See Links::purge_old_news().class.HP-UX.inc.php https://github.com/vtiger-jp/vtigercrm-5.1.x-ja.git | PHP | 421 lines
1<?php 2 2 3// phpSysInfo - A PHP System Information Script 4// http://phpsysinfo.sourceforge.net/ 19 20// $Id: class.HP-UX.inc.php,v 1.17 2006/02/11 17:31:03 bigmichi1 Exp $ 21 170 if (!preg_match('/bridge/i', $key) && !preg_match('/USB/i', $key)) { 171 $results[] = preg_replace('/\([^\)]+\)\.$/', '', trim($value)); 172 }compressor.php http://textmotion.googlecode.com/svn/trunk/ | PHP | 0 lines
1<?php 2 17 * @lastmodified $Date: 2008-05-26 14:32:25 +1000 (Mon, 26 May 2008) $ 18 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 19 * 91 // protecting from parent directory writing 92 $current["filename"] = preg_replace("/(\.\.\/|\/\.\.)/", "", $current["filename"]); 93Item.php https://bitbucket.org/acidel/buykoala.git | PHP | 447 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 */ 256 return Mage::helper('core/string') 257 ->substr(preg_replace('/[\pC¢€•—™°½]|shipping/ui', '', $string), 0, 3500); 258 } 428 { 429 return preg_replace('/\s+/', '_', $string); 430 430 431// $string = preg_replace('/([^a-z^0-9^_])+/','_',strtolower($string)); 432// $string = preg_replace('/_{2,}/','_',$string);class-ai1ec-database.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 521 lines
1<?php 2// 2// 3// class-ai1ec-database.php 4// all-in-one-event-calendar 60 require_once ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR . 61 'includes' . DIRECTORY_SEPARATOR . 'upgrade.php'; 62 } 100 'indexes' => array(), 101 'content' => preg_replace( '#`#', '', $matches[2] ), 102 'clauses' => $matches[3], 142 ++$lineno; 143 $line = trim( preg_replace( '#\s+#', ' ', $line ) ); 144 $line_new = rtrim( $line, ',' ); 187 protected function _parse_index( $description ) { 188 $description = preg_replace( 189 '#^CONSTRAINT(\s+`?[^ ]+`?)?\s+#six',class-wc-download-handler.php https://gitlab.com/webkod3r/tripolis | PHP | 426 lines
1<?php 2 41 'email' => sanitize_email( str_replace( ' ', '+', $_GET['email'] ) ), 42 'download_id' => wc_clean( isset( $_GET['key'] ) ? preg_replace( '/\s+/', ' ', $_GET['key'] ) : '' ) 43 ) ); 258 self::download_headers( $parsed_file_path['file_path'], $filename ); 259 $xsendfile_path = trim( preg_replace( '`^' . str_replace( '\\', '/', getcwd() ) . '`', '', $parsed_file_path['file_path'] ), '/' ); 260 header( "X-Accel-Redirect: /$xsendfile_path" ); 338 } 339 if ( function_exists( 'get_magic_quotes_runtime' ) && get_magic_quotes_runtime() && version_compare( phpversion(), '5.4', '<' ) ) { 340 set_magic_quotes_runtime( 0 ); 369 * 370 * Reads file in chunks so big downloads are possible without changing PHP.INI - http://codeigniter.com/wiki/Download_helper_for_large_files/. 371 *display.php https://gitlab.com/potion/librechan | PHP | 528 lines
1<?php 2 13 joaoptm78@gmail.com 14 http://www.php.net/manual/en/function.filesize.php#100097 15*/ 41 } 42 $body = preg_replace('/\/$/', '', $body); 43 159 // Replace line breaks with some whitespace 160 $body = preg_replace('@<br/?>@i', ' ', $body); 161 210 // It's easiest just to remove them all first. 211 $body = preg_replace('/<!--.*?-->/s', '', $body); 212 226 // Remove any corrupt tags at the end 227 $body = preg_replace('/<([\w]+)?([^>]*)?$/', '', $body); 228Converter.php https://gitlab.com/luisrepo/ClienteWS | PHP | 396 lines
1<?php 2/** 18 * @license http://framework.zend.com/license/new-bsd New BSD License 19 * @version $Id: Converter.php 23775 2011-03-01 17:25:24Z ralph $ 20 */ 38 * 39 * @see Net_LDAP2_Util::asc2hex32() from Benedikt Hallinger <beni@php.net> 40 * @link http://pear.php.net/package/Net_LDAP2 40 * @link http://pear.php.net/package/Net_LDAP2 41 * @author Benedikt Hallinger <beni@php.net> 42 * 61 * 62 * @see Net_LDAP2_Util::hex2asc() from Benedikt Hallinger <beni@php.net>, 63 * heavily based on work from DavidSmith@byu.net 63 * heavily based on work from DavidSmith@byu.net 64 * @link http://pear.php.net/package/Net_LDAP2 65 * @author Benedikt Hallinger <beni@php.net>, heavily based on work from DavidSmith@byu.netsession.php https://gitlab.com/alexprowars/bitrix | PHP | 317 lines
1<?php 2 161 case "USER_AGENT": 162 $val = preg_replace("/[\n\r]+/", " ", $val); 163 $match = ($arFilter[$key."_EXACT_MATCH"]=="Y" && $match_value_set) ? "N" : "Y"; 258 S.LAST_HIT_ID, 259 S.PHPSESSID, 260 S.ADV_ID,SearchUpdate.php https://gitlab.com/coco-codeselfstudy/mediawiki-core | PHP | 204 lines
1<?php 2/** 124 125 $text = preg_replace( "/<\\/?\\s*[A-Za-z][^>]*?>/", 126 ' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup 126 ' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup 127 $text = preg_replace( "/(^|\\n)==\\s*([^\\n]+)\\s*==(\\s)/sD", 128 "\\1\\2 \\2 \\2\\3", $text ); # Emphasize headings 133 $pat = "/(^|[^\\[])({$protos}):[{$uc}]+([^{$uc}]|$)/"; 134 $text = preg_replace( $pat, "\\1 \\3", $text ); 135 137 $p2 = "/([^\\[])\\[({$protos}):[{$uc}]+\\s+([^\\]]+)]/"; 138 $text = preg_replace( $p1, "\\1 ", $text ); 139 $text = preg_replace( $p2, "\\1 \\3 ", $text ); 142 $pat2 = "/\\[\\[image:([{$uc}]+)\\.(gif|png|jpg|jpeg)([^{$uc}])/i"; 143 $text = preg_replace( $pat2, " \\1 \\3", $text ); 144collect.php https://gitlab.com/alexprowars/bitrix | PHP | 493 lines
1<?php 2namespace Bitrix\Translate\Controller\Asset; 175 $assemblyDate = $this->controller->getRequest()->get('assemblyDate'); 176 if ($assemblyDate !== null && preg_replace("/[\D]+/", "", $assemblyDate) && mb_strlen($assemblyDate) == 8) 177 { 417 418 if ((mb_substr($name, -4) === '.php') && is_file($fullPath)) 419 {Document.php https://bitbucket.org/GIBravo/materialdesign.git | PHP | 246 lines
1<?php 2 183 $jsCode = str_replace("\t", "", $jsCode); 184 $jsCode = preg_replace('/\s\s+/', ' ', $jsCode); 185 202 $style = str_replace("\t", "", $style); 203 $style = preg_replace('/\s\s+/', ' ', $style); 204ReplaceTokens.php https://gitlab.com/Isaki/le331.fr | PHP | 475 lines
1<?php 2 22 23include_once 'phing/filters/BaseParamFilterReader.php'; 24include_once 'phing/types/TokenSource.php'; 24include_once 'phing/types/TokenSource.php'; 25include_once 'phing/filters/ChainableReader.php'; 26 174 // filter buffer 175 $buffer = preg_replace_callback( 176 "/" . preg_quote($this->_beginToken, '/') . "([\w\.\-:]+?)" . preg_quote($this->_endToken, '/') . "/",date.php https://bitbucket.org/eternaware/joomus.git | PHP | 462 lines
1<?php 2/** 252 * 253 * @param string $format The date format specification string (see {@link PHP_MANUAL#date}) 254 * @param boolean $local True to return the date string in the local time zone, false to return it in GMT. 268 * 269 * @param string $format The date format specification string (see {@link PHP_MANUAL#date}) 270 * @param boolean $local True to return the date string in the local time zone, false to return it in GMT. 281 // Do string replacements for date format options that can be translated. 282 $format = preg_replace('/(^|[^\\\])D/', "\\1" . self::DAY_ABBR, $format); 283 $format = preg_replace('/(^|[^\\\])l/', "\\1" . self::DAY_NAME, $format); 283 $format = preg_replace('/(^|[^\\\])l/', "\\1" . self::DAY_NAME, $format); 284 $format = preg_replace('/(^|[^\\\])M/', "\\1" . self::MONTH_ABBR, $format); 285 $format = preg_replace('/(^|[^\\\])F/', "\\1" . self::MONTH_NAME, $format);function.encoded.php https://github.com/rinie/TransFormr.git | PHP | 275 lines
1<?php 2defined( '_Transformr' ) or die( 'Restricted access' ); 7function html_convert_entities($string) { 8 return preg_replace_callback('/([a-zA-Z][a-zA-Z0-9]+);/', 9 'convert_entity', $string);TemplateTask.php git://github.com/hugodias/cakeStrap.git | PHP | 219 lines
1<?php 2/** 4 * 5 * PHP 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @link http://cakephp.org CakePHP(tm) Project 16 * @since CakePHP(tm) v 1.3 16 * @since CakePHP(tm) v 1.3 17 * @license http://www.opensource.org/licenses/mit-license.php MIT License 18 */ 72 $separator = DS === '/' ? '/' : '\\\\'; 73 $core = preg_replace('#shells' . $separator . '$#', '', $core); 74Regex.php https://bitbucket.org/dannyelps/rea.git | PHP | 319 lines
1<?php 2 290 291 $this->pattern = preg_replace_callback('~[\\\\]*\\.~', $replace, $this->pattern); 292locale.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 373 lines
1<?php 2/** 122 foreach ($this->weekday_initial as $weekday_ => $weekday_initial_) { 123 $this->weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_); 124 } 164 foreach ($this->month_abbrev as $month_ => $month_abbrev_) { 165 $this->month_abbrev[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_); 166 } 174 // Numbers formatting 175 // See http://php.net/number_format 176 176 177 /* translators: $thousands_sep argument for http://php.net/number_format, default is , */ 178 $trans = __('number_format_thousands_sep'); 180 181 /* translators: $dec_point argument for http://php.net/number_format, default is . */ 182 $trans = __('number_format_decimal_point');caddchatm.php https://gitlab.com/ppkbb3cker/ppkbb3cker2.git | PHP | 235 lines
1<?php 2/** 4* @package ppkBB3cker 5* @version $Id: caddchatm.php 1.000 2010-03-14 13:14:00 PPK $ 6* @copyright (c) 2010 PPK 6* @copyright (c) 2010 PPK 7* @license http://opensource.org/licenses/gpl-license.php GNU Public License 8* 13*/ 14if (!defined('IN_PHPBB')) 15{ 77 $edit_data['user_id'] > 1 ? '' : $edit_data['user_id']=1; 78 include_once($phpbb_root_path.'chat/include/caddlogchat.'.$phpEx); 79 chat_add_log(3, $chat_user['user_id'], my_int_val($edit_data['room']), mysql_real_escape_string($edit_data['user_id'], $c), 'LOG_CHAT_EDITMESS', ''); 118 // generates E_NOTICE 119 // for PHP4 objects, but not PHP5 objects 120 $str = (string) $str;ExtractStyleBlocks.php https://gitlab.com/irvanresna/sensasi | PHP | 289 lines
1<?php 2 2 3// why is this a top level function? Because PHP 5.2.0 doesn't seem to 4// understand how to interpret this filter if it's a static method. 14 * @note 15 * See tests/HTMLPurifier/Filter/ExtractStyleBlocksTest.php for 16 * sample usage. 43 * Save the contents of CSS blocks to style matches 44 * @param $matches preg_replace style $matches array 45 */ 56 if ($tidy !== null) $this->_tidy = $tidy; 57 $html = preg_replace_callback('#<style(?:\s.*)?>(.+)</style>#isU', array($this, 'styleCallback'), $html); 58 $style_blocks = $this->_styleMatches;text.php https://gitlab.com/vince.omega/mcb-nov-build | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.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 */ 173 { 174 return preg_replace('#(?<!:)//+#', '/', $str); 175 } 205 $regex .= 'e'; 206 return preg_replace($regex, 'str_repeat($replacement, utf8::strlen(\'$1\'))', $str); 207 } 208 209 return preg_replace($regex, $replacement, $str); 210 }Config.php https://gitlab.com/kennethgomad01/genisys | PHP | 503 lines
1<?php 2 100 public static function fixYAMLIndexes($str){ 101 return preg_replace("#^([ ]*)([a-zA-Z_]{1}[ ]*)\\:$#m", "$1\"$2\":", $str); 102 }text.php https://github.com/error10/Ushahidi_Web.git | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.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 */ 173 { 174 return preg_replace('#(?<!:)//+#', '/', $str); 175 } 205 $regex .= 'e'; 206 return preg_replace($regex, 'str_repeat($replacement, utf8::strlen(\'$1\'))', $str); 207 } 208 209 return preg_replace($regex, $replacement, $str); 210 }Context.php https://github.com/ratbird/hope.git | PHP | 492 lines
1<?php 2 244 $properties = array_combine($properties, $properties); 245 $properties = array_change_key_case(array_flip(preg_replace('/((?<=[a-z]|\d)[A-Z]|(?<!^)[A-Z](?=[a-z]))/', 246 '_\\1', $properties))); 343 $file = Util::normalizePath($file); 344 $dirname = preg_replace('/[^\/\\\\]*$/', '', $file); 345 379 'urlArgs', // whether to add args into url tokens 380 'customVariables', // variables from the php API 381 'currentFileInfo', // current file information object 409 'importantScope', // used to bubble up !important statements 410 'customVariables', // variables from the php API 411 ];Db.php https://github.com/guiohm/magento-french.git | PHP | 415 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) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 137 else { 138 return preg_replace($regExp, '', $row['Create Table']) . ';'; 139 }update.php https://github.com/utkarshkukreti/wp.git | PHP | 449 lines
27 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 28 $php_version = phpversion(); 29 49 if ( method_exists( $wpdb, 'db_version' ) ) 50 $mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version()); 51 else 68 'version' => $wp_version, 69 'php' => $php_version, 70 'locale' => $locale, 160 case 'load-plugins.php' : 161 case 'load-update.php' : 162 $timeout = 3600; // 1 hour 233function wp_update_themes() { 234 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 235links_options.php https://bitbucket.org/wiseintegration/wisetracker-wp.git | PHP | 184 lines
1<?php 2/** 14 <div class="postbox"> 15 <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><br /></div> 16 <h3 class="hndle" id="links_options"><?php esc_attr_e( 'Links options', 'adminimize' ); ?></h3> 22 <colgroup> 23 <?php 24 $col = 0; 32 <tr> 33 <th><?php esc_attr_e( 'Option', 'adminimize' ); ?></th> 34 <?php 35 foreach ( $user_roles_names as $role_name ) { ?> 36 <th><?php esc_attr_e( 'Deactivate for', 'adminimize' ); 37 echo '<br/>' . $role_name; ?></th> 37 echo '<br/>' . $role_name; ?></th> 38 <?php } ?> 39 </tr>users_controller.php https://github.com/makies/croogo.git | PHP | 301 lines
1<?php 2/** 4 * 5 * PHP version 5 6 * 10 * @author Fahad Ibnay Heylaal <contact@fahad19.com> 11 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 12 * @link http://www.croogo.org 177 $this->Email->from = Configure::read('Site.title') . ' ' 178 . '<croogo@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])).'>'; 179 $this->Email->to = $this->data['User']['email']; 232 $this->Email->from = Configure::read('Site.title') . ' ' 233 . '<croogo@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])).'>'; 234 $this->Email->to = $user['User']['email'];markdown.php https://github.com/patadejaguar/S.A.F.E.-Open-Source-Microfinance-Suite.git | PHP | 572 lines
1<?php 2 37 protected function _blockquote($str) { 38 $str=preg_replace('/(?<=^|\n)\h?>\h?(.*?(?:\n+|$))/','\1',$str); 39 return strlen($str)? 48 protected function _pre($str) { 49 $str=preg_replace('/(?<=^|\n)(?: {4}|\t)(.+?(?:\n+|$))/','\1', 50 $this->esc($str)); 68 switch (strtolower($hint)) { 69 case 'php': 70 $str=$fw->highlight($str); 141 '/(?<=^|\n)(?:'. 142 '(;[^\n]*)|(?:<\?php.+?\?>?)|'. 143 '(?:\[(.+?)\])|'. 237 substr($str,$ptr),$match)) { 238 $match[3]=preg_replace('/(?<=^|\n)(?: {4}|\t)/','',$match[3]); 239 $found=FALSE;rss-importer.php https://bitbucket.org/babinkochana/triptrills.git | PHP | 227 lines
1<?php 2/* 17// Load Importer API 18require_once ABSPATH . 'wp-admin/includes/import.php'; 19 20if ( !class_exists( 'WP_Importer' ) ) { 21 $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php'; 22 if ( file_exists( $class_wp_importer ) ) 60 echo '<p>'.__('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your WordPress site. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.', 'rss-importer').'</p>'; 61 wp_import_upload_form("admin.php?import=rss&step=1"); 62 echo '</div>'; 90 preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $post_date_gmt); 91 $post_date_gmt = preg_replace('|([-+])([0-9]+):([0-9]+)$|', '\1\2\3', $post_date_gmt[1]); 92 $post_date_gmt = str_replace('T', ' ', $post_date_gmt); 128 // Clean up content 129 $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); 130 $post_content = str_replace('<br>', '<br />', $post_content);widgets.php https://gitlab.com/Gashler/dp | PHP | 1270 lines
1<?php 2/** 73 /** 74 * PHP5 constructor 75 * 86 function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) { 87 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base); 88 $this->name = $name; 94 /** 95 * PHP4 constructor 96 */rewrite.php https://gitlab.com/Gashler/dp | PHP | 1688 lines
1<?php 2/** 254 * 255 * To remove any manually prepended /index.php/. 256 * 264 if ( !empty( $base ) ) { 265 $base = preg_replace( '|^/index\.php/|', '', $base ); 266 $base = trim( $base, '/' ); 315 316 // Strip 'index.php/' if we're not using path info permalinks 317 if ( !$wp_rewrite->using_index_permalinks() ) 353 // Trim the query of everything up to the '?'. 354 $query = preg_replace("!^.+\?!", '', $query); 355 547 */ 548 var $index = 'index.php'; 549post-template.php https://gitlab.com/Gashler/dp | PHP | 1432 lines
1<?php 2/** 229 if ( $preview ) // preview fix for javascript bug with foreign languages 230 $output = preg_replace_callback( '/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output ); 231 239 * @access private 240 * @param array $match Match array from preg_replace_callback 241 * @return stringms-blogs.php https://gitlab.com/Gashler/dp | PHP | 783 lines
1<?php 2 50 if ( !empty( $blogname ) ) 51 $url = preg_replace( '|^([^\.]+://)|', "\${1}" . $blogname . '.', $url ); 52 } else {load.php https://gitlab.com/Gashler/dp | PHP | 760 lines
88 // Fix empty PHP_SELF 89 $PHP_SELF = $_SERVER['PHP_SELF']; 90 if ( empty( $PHP_SELF ) ) 90 if ( empty( $PHP_SELF ) ) 91 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] ); 92} 106 wp_load_translations_early(); 107 die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); 108 } 394 } else if ( !$_wp_using_ext_object_cache && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) { 395 // Sometimes advanced-cache.php can load object-cache.php before it is loaded here. 396 // This breaks the function_exists check above and can result in $_wp_using_ext_object_cache 426 wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) ); 427 } elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) { 428functions.php https://gitlab.com/Gashler/dp | PHP | 1663 lines
1<?php 2/** 7 8require( ABSPATH . WPINC . '/option.php' ); 9 12 * 13 * $format should be either a PHP date format string, e.g. 'U' for a Unix 14 * timestamp, or 'G' for a Unix timestamp assuming that $date is GMT. 111 $dateformatstring = ' '.$dateformatstring; 112 $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); 113 $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); 113 $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); 114 $dateformatstring = preg_replace( "/([^\\\])l/", "\\1" . backslashit( $dateweekday ), $dateformatstring ); 115 $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); 115 $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); 116 $dateformatstring = preg_replace( "/([^\\\])a/", "\\1" . backslashit( $datemeridiem ), $dateformatstring ); 117 $dateformatstring = preg_replace( "/([^\\\])A/", "\\1" . backslashit( $datemeridiem_capital ), $dateformatstring );default-widgets.php https://gitlab.com/Gashler/dp | PHP | 1206 lines
65 ?> 66 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 67 <p> 75 <p> 76 <label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e( 'Exclude:' ); ?></label> <input type="text" value="<?php echo $exclude; ?>" name="<?php echo $this->get_field_name('exclude'); ?>" id="<?php echo $this->get_field_id('exclude'); ?>" class="widefat" /> 77 <br /> 214?> 215 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p> 216<?php 280?> 281 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 282 <p> 282 <p> 283 <input class="checkbox" type="checkbox" <?php echo $dropdown; ?> id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>" /> <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e('Display as dropdown'); ?></label> 284 <br/>class-wp.php https://gitlab.com/Gashler/dp | PHP | 645 lines
1<?php 2/** 152 $req_uri = $req_uri_array[0]; 153 $self = $_SERVER['PHP_SELF']; 154 $home_path = parse_url(home_url()); 166 $req_uri = trim($req_uri, '/'); 167 $req_uri = preg_replace("|^$home_path|i", '', $req_uri); 168 $req_uri = trim($req_uri, '/'); 169 $pathinfo = trim($pathinfo, '/'); 170 $pathinfo = preg_replace("|^$home_path|i", '', $pathinfo); 171 $pathinfo = trim($pathinfo, '/'); 172 $self = trim($self, '/'); 173 $self = preg_replace("|^$home_path|i", '', $self); 174 $self = trim($self, '/'); 221 // Trim the query of everything up to the '?'. 222 $query = preg_replace("!^.+\?!", '', $query); 223canonical.php https://gitlab.com/Gashler/dp | PHP | 536 lines
55 56 // Some PHP setups turn requests for / into /index.php in REQUEST_URI 57 // See: http://trac.wordpress.org/ticket/5017 59 // Disabled, for now: 60 // $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']); 61 242 'wp-atom.php' => 'atom', 243 'wp-commentsrss2.php' => 'comments_rss2', 244 'wp-feed.php' => get_default_feed(), 244 'wp-feed.php' => get_default_feed(), 245 'wp-rdf.php' => 'rdf', 246 'wp-rss.php' => 'rss2', 274 275 $redirect['path'] = user_trailingslashit( preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/?$|', '/', $redirect['path']) ); // strip off trailing /index.php/ 276 if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($redirect['path'], '/' . $wp_rewrite->index . '/') === false )admin-bar.php https://gitlab.com/Gashler/dp | PHP | 770 lines
1<?php 2/** 24 /* Load the admin bar class code ready for instantiation */ 25 require( ABSPATH . WPINC . '/class-wp-admin-bar.php' ); 26 79 'title' => '<span class="ab-icon"></span>', 80 'href' => self_admin_url( 'about.php' ), 81 'meta' => array( 91 'title' => __('About WordPress'), 92 'href' => self_admin_url( 'about.php' ), 93 ) ); 223 if ( empty( $blogname ) ) 224 $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() ); 225 255 'title' => __( 'Edit Site' ), 256 'href' => network_admin_url( 'site-info.php?id=' . get_current_blog_id() ), 257 ) );api-functions.inc.php https://gitlab.com/Gashler/dp | PHP | 1102 lines
1<?php 2/** 25* ``` 26* <!php 27* if(is_user_logged_in()) 65* ``` 66* <!php 67* if(user_is(123, "subscriber")) 133 { 134 $role = ($role === "s2member_level0") ? "subscriber" : preg_replace("/^access_/i", "", $role); 135 151* ``` 152* <!php 153* if(user_is(123, "subscriber")) 228* ``` 229* <!php 230* if(current_user_is("subscriber"))nc-markdown.inc.php https://gitlab.com/Gashler/dp | PHP | 1475 lines
1<?php 2/** 2/** 3* PHP Markdown class. 4* 4* 5* Copyright {@link http://www.michelf.com/projects/php-markdown/ Michel Fortin}. 6* Original Markdown. Copyright {@link http://daringfireball.net/projects/markdown/ John Gruber}. 17/** 18* PHP Markdown interface. 19* 36/** 37* PHP Markdown class. 38* @package Xtnls\Markdown 43 # Regex to match balanced [brackets]. 44 # Needed to insert a maximum bracked depth while converting to PHP. 45 var $nested_brackets_depth = 6;utils-urls.inc.php https://gitlab.com/Gashler/dp | PHP | 375 lines
39 { 40 return apply_filters("wp_signup_location", site_url("/wp-signup.php")); 41 } 42 /** 43 * Builds a WordPress® registration URL to `/wp-login.php?action=register`. 44 * 146 * 147 * This works around issues with this PHP function in versions prior to 5.3.8. 148 * 152 * @param str $url_uri Either a full URL, or a partial URI to parse. 153 * @param bool|int $component Optional. See PHP documentation on ``parse_url()`` function. 154 * @param bool $clean_path Defaults to true. s2Member will cleanup any return array `path`. 164 list($_, $query) = preg_split /* Split @ query string marker. */("/\?/", $url_uri, 2); 165 $query = /* See: <https://bugs.php.net/bug.php?id=38143>. */ str_replace("://", urlencode("://"), $query); 166 $url_uri = /* Put it all back together again, after the above modifications. */ $_."?".$query;utils-strings.inc.php https://gitlab.com/Gashler/dp | PHP | 548 lines
155 * @see s2Member\Utilities\c_ws_plugin__s2member_utils_strings::trim_deep() 156 * @see http://php.net/manual/en/function.trim.php 157 * 173 * @see s2Member\Utilities\c_ws_plugin__s2member_utils_strings::trim() 174 * @see http://php.net/manual/en/function.trim.php 175 * 187 Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys. 188 For further details, see: <http://php.net/manual/en/function.array-map.php>. */ 189 { 269 Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys. 270 For further details, see: <http://php.net/manual/en/function.array-map.php>. */ 271 { 291 Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys. 292 For further details, see: <http://php.net/manual/en/function.array-map.php>. */ 293 {registrations.inc.php https://gitlab.com/Gashler/dp | PHP | 783 lines
1<?php 2/** 117 if (is_multisite ()) // This event should ONLY be processed with Multisite Networking. 118 if (!is_admin () && !empty ($_POST) && is_array ($_POST) && ((preg_match ("/\/wp-signup\.php/", $_SERVER["REQUEST_URI"]) && !empty ($_POST["stage"]) && preg_match ("/^validate-(user|blog)-signup$/", (string)$_POST["stage"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_register_page ()))) 119 { 121 if (preg_match ("/^ws_plugin__s2member_(custom_reg_field|user_new)_/", $key)) 122 if ($key = preg_replace ("/_user_new_/", "_custom_reg_field_", $key)) 123 echo '<input type="hidden" name="' . esc_attr ($key) . '" value="' . esc_attr (maybe_serialize ($value)) . '" />' . "\n"; 157 if (is_multisite ()) // This event should ONLY be processed with Multisite Networking. 158 if (!empty ($_POST) && is_array ($_POST) && ((is_blog_admin () && $pagenow === "user-new.php") || (!is_admin () && ((preg_match ("/\/wp-signup\.php/", $_SERVER["REQUEST_URI"]) && !empty ($_POST["stage"]) && preg_match ("/^validate-(user|blog)-signup$/", (string)$_POST["stage"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_register_page ()))))) 159 { 166 if (preg_match ("/^ws_plugin__s2member_(custom_reg_field|user_new)_/", $key)) 167 if ($key = preg_replace ("/_user_new_/", "_custom_reg_field_", $key)) 168 $meta["s2member_ms_signup_meta"][$key] = maybe_unserialize ($value); 243 if (is_multisite ()) // This event should ONLY be processed with Multisite Networking. 244 if ((is_blog_admin () && $pagenow === "user-new.php" && isset ($_POST["noconfirmation"])) || (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ())))) 245 {paypal-utilities.inc.php https://gitlab.com/Gashler/dp | PHP | 674 lines
1<?php 2/** 60 { 61 foreach(preg_split("/[\r\n]+/", preg_replace("/^SUCCESS/i", "", $response)) as $varline) 62 { 133 else // Else it's a standard Proxy Key; not on a Multisite Network, or not on the Main Site anyway. 134 $key = md5(c_ws_plugin__s2member_utils_encryption::xencrypt(preg_replace("/\:[0-9]+$/", "", $_SERVER["HTTP_HOST"]), false, false)); 135 194 $log4 = (is_multisite() && !is_main_site()) ? ($_log4 = $current_blog->domain.$current_blog->path)."\n".$log4 : $log4; 195 $log2 = (is_multisite() && !is_main_site()) ? "paypal-api-4-".trim(preg_replace("/[^a-z0-9]/i", "-", $_log4), "-").".log" : "paypal-api.log"; 196 254 $value = (string)$value; 255 $value = preg_replace('/"/', "'", $value); 256paypal-return-in-wa-ccaps-wo-level.inc.php https://gitlab.com/Gashler/dp | PHP | 201 lines
85 86 if ($paypal["ccaps"] && preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $paypal["ccaps"]))) 87 foreach (preg_split ("/[\r\n\t\s;,]+/", preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $paypal["ccaps"]))) as $ccap) 87 foreach (preg_split ("/[\r\n\t\s;,]+/", preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $paypal["ccaps"]))) as $ccap) 88 if (strlen ($ccap = trim (strtolower (preg_replace ("/[^a-z_0-9]/i", "", $ccap))))) 89 $user->add_cap ("access_s2member_ccap_" . $ccap); 101 { 102 if (($code = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $code)) && ($code = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["subscr_id"]), $code))) 103 if (($code = preg_replace ("/%%amount%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["mc_gross"]), $code)) && ($code = preg_replace ("/%%txn_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["txn_id"]), $code))) 104 if (($code = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["item_number"]), $code)) && ($code = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["item_name"]), $code))) 105 if (($code = preg_replace ("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["first_name"]), $code)) && ($code = preg_replace ("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["last_name"]), $code))) 106 if (($code = preg_replace ("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (trim ($paypal["first_name"] . " " . $paypal["last_name"])), $code))) 108 { 109 if (($code = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $code)) && ($code = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $code))) 110 if (($code = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (trim ($user->first_name . " " . $user->last_name)), $code)))paypal-return-in-subscr-or-wa-w-level.inc.php https://gitlab.com/Gashler/dp | PHP | 379 lines
1<?php 2/** 60 $paypal["ip"] = (preg_match("/ip address/i", $paypal["option_name2"]) && $paypal["option_selection2"]) ? $paypal["option_selection2"] : ""; 61 $paypal["ip"] = (!$paypal["ip"] && preg_match("/^[a-z0-9]+~[0-9\.]+$/i", $paypal["invoice"])) ? preg_replace("/^[a-z0-9]+~/i", "", $paypal["invoice"]) : $paypal["ip"]; 62 $paypal["ip"] = (!$paypal["ip"] && $_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : $paypal["ip"]; 147 148 if($paypal["ccaps"] && preg_replace("/^-all[\r\n\t\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) 149 foreach(preg_split("/[\r\n\t\s;,]+/", preg_replace("/^-all[\r\n\t\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) as $ccap) 149 foreach(preg_split("/[\r\n\t\s;,]+/", preg_replace("/^-all[\r\n\t\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) as $ccap) 150 if(strlen($ccap = trim(strtolower(preg_replace("/[^a-z_0-9]/i", "", $ccap))))) 151 $user->add_cap("access_s2member_ccap_".$ccap); 191 if(($code = preg_replace("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $code)) && ($code = preg_replace("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["subscr_id"]), $code))) 192 if(($code = preg_replace("/%%initial%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial"]), $code)) && ($code = preg_replace("/%%regular%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular"]), $code)) && ($code = preg_replace("/%%recurring%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["recurring"]), $code))) 193 if(($code = preg_replace("/%%initial_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial_term"]), $code)) && ($code = preg_replace("/%%regular_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular_term"]), $code))) 193 if(($code = preg_replace("/%%initial_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial_term"]), $code)) && ($code = preg_replace("/%%regular_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular_term"]), $code))) 194 if(($code = preg_replace("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["item_number"]), $code)) && ($code = preg_replace("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["item_name"]), $code))) 195 if(($code = preg_replace("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["first_name"]), $code)) && ($code = preg_replace("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["last_name"]), $code)))paypal-return-in-subscr-modify-w-level.inc.php https://gitlab.com/Gashler/dp | PHP | 233 lines
1<?php 2/** 110 if($paypal["ccaps"] && preg_replace("/^-all[\r\n\t\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) 111 foreach(preg_split("/[\r\n\t\s;,]+/", preg_replace("/^-all[\r\n\t\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) as $ccap) 112 if(strlen($ccap = trim(strtolower(preg_replace("/[^a-z_0-9]/i", "", $ccap))))) 144 if(($code = preg_replace("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $code)) && ($code = preg_replace("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["subscr_id"]), $code))) 145 if(($code = preg_replace("/%%initial%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial"]), $code)) && ($code = preg_replace("/%%regular%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular"]), $code)) && ($code = preg_replace("/%%recurring%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["recurring"]), $code))) 146 if(($code = preg_replace("/%%initial_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial_term"]), $code)) && ($code = preg_replace("/%%regular_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular_term"]), $code))) 147 if(($code = preg_replace("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["item_number"]), $code)) && ($code = preg_replace("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["item_name"]), $code))) 148 if(($code = preg_replace("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["first_name"]), $code)) && ($code = preg_replace("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["last_name"]), $code))) 149 if(($code = preg_replace("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(trim($paypal["first_name"]." ".$paypal["last_name"])), $code))) 149 if(($code = preg_replace("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(trim($paypal["first_name"]." ".$paypal["last_name"])), $code))) 150 if(($code = preg_replace("/%%payer_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["payer_email"]), $code))) 151 { 151 { 152 if(($code = preg_replace("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($user->first_name), $code)) && ($code = preg_replace("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($user->last_name), $code))) 153 if(($code = preg_replace("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(trim($user->first_name." ".$user->last_name)), $code)))paypal-notify-in-web-accept-sp.inc.php https://gitlab.com/Gashler/dp | PHP | 258 lines
86 87 if (($rec = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $rec)) && ($rec = preg_replace ("/%%txn_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["txn_id"]), $rec))) 88 if (($rec = preg_replace ("/%%amount%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["mc_gross"]), $rec))) // Full amount of the payment, before fee is subtracted. 93 if (($rec = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["ip"]), $rec))) 94 if (($rec = preg_replace ("/%%full_coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["full_coupon_code"]), $rec)) && ($rec = preg_replace ("/%%coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["coupon_code"]), $rec)) && ($rec = preg_replace ("/%%coupon_affiliate_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["affiliate_id"]), $rec))) 95 102 if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["ip"]), $sbj))) 103 if (($sbj = preg_replace ("/%%full_coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["full_coupon_code"]), $sbj)) && ($sbj = preg_replace ("/%%coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["coupon_code"]), $sbj)) && ($sbj = preg_replace ("/%%coupon_affiliate_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["affiliate_id"]), $sbj))) 104 111 if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($paypal["ip"]), $msg))) 112 if (($msg = preg_replace ("/%%full_coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["full_coupon_code"]), $msg)) && ($msg = preg_replace ("/%%coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["coupon_code"]), $msg)) && ($msg = preg_replace ("/%%coupon_affiliate_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($coupon["affiliate_id"]), $msg))) 113 113 114 if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg)))) 115 {paypal-notify-in-wa-ccaps-wo-level.inc.php https://gitlab.com/Gashler/dp | PHP | 295 lines
112 113 if (($url = preg_replace ("/%%full_coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["full_coupon_code"])), $url)) && ($url = preg_replace ("/%%coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["coupon_code"])), $url)) && ($url = preg_replace ("/%%coupon_affiliate_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["affiliate_id"])), $url))) 114 138 if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)) && ($url = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["subscr_id"])), $url))) 139 if (($url = preg_replace ("/%%amount%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["mc_gross"])), $url)) && ($url = preg_replace ("/%%txn_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["txn_id"])), $url))) 140 if (($url = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_number"])), $url)) && ($url = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_name"])), $url))) 140 if (($url = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_number"])), $url)) && ($url = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_name"])), $url))) 141 if (($url = preg_replace ("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["first_name"])), $url)) && ($url = preg_replace ("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["last_name"])), $url))) 142 if (($url = preg_replace ("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (trim ($paypal["first_name"] . " " . $paypal["last_name"]))), $url))) 144 145 if (($url = preg_replace ("/%%full_coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["full_coupon_code"])), $url)) && ($url = preg_replace ("/%%coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["coupon_code"])), $url)) && ($url = preg_replace ("/%%coupon_affiliate_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["affiliate_id"])), $url))) 146 146 147 if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user->first_name)), $url)) && ($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user->last_name)), $url))) 148 if (($url = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (trim ($user->first_name . " " . $user->last_name))), $url)))paypal-notify-in-subscr-or-wa-w-level.inc.php https://gitlab.com/Gashler/dp | PHP | 449 lines
123 foreach (preg_split ("/[\r\n\t\s;,]+/", preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $paypal["ccaps"]))) as $ccap) 124 if (strlen ($ccap = trim (strtolower (preg_replace ("/[^a-z_0-9]/i", "", $ccap))))) 125 $user->add_cap ("access_s2member_ccap_" . $ccap); 164 if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)) && ($url = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["subscr_id"])), $url))) 165 if (($url = preg_replace ("/%%initial%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["initial"])), $url)) && ($url = preg_replace ("/%%regular%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["regular"])), $url)) && ($url = preg_replace ("/%%recurring%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["recurring"])), $url))) 166 if (($url = preg_replace ("/%%initial_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["initial_term"])), $url)) && ($url = preg_replace ("/%%regular_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["regular_term"])), $url))) 167 if (($url = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_number"])), $url)) && ($url = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_name"])), $url))) 168 if (($url = preg_replace ("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["first_name"])), $url)) && ($url = preg_replace ("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["last_name"])), $url))) 169 if (($url = preg_replace ("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (trim ($paypal["first_name"] . " " . $paypal["last_name"]))), $url))) 171 172 if (($url = preg_replace ("/%%full_coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["full_coupon_code"])), $url)) && ($url = preg_replace ("/%%coupon_code%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["coupon_code"])), $url)) && ($url = preg_replace ("/%%coupon_affiliate_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode($coupon["affiliate_id"])), $url))) 173 173 174 if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user->first_name)), $url)) && ($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user->last_name)), $url))) 175 if (($url = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (trim ($user->first_name . " " . $user->last_name))), $url)))paypal-notify-in-subscr-modify-w-level.inc.php https://gitlab.com/Gashler/dp | PHP | 296 lines
59 $paypal["ip"] = (preg_match ("/ip address/i", $paypal["option_name2"]) && $paypal["option_selection2"]) ? $paypal["option_selection2"] : ""; 60 $paypal["ip"] = (!$paypal["ip"] && preg_match ("/^[a-z0-9]+~[0-9\.]+$/i", $paypal["invoice"])) ? preg_replace ("/^[a-z0-9]+~/i", "", $paypal["invoice"]) : $paypal["ip"]; 61 131 132 c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_modification_email_sbj", _x ("Thank you! Your account has been updated.", "s2member-front", "s2member"), get_defined_vars ()), apply_filters ("ws_plugin__s2member_modification_email_msg", _x ("Thank you! You've been updated to:", "s2member-front", "s2member") . "\n" . $paypal["item_name"] . "\n\n" . _x ("Please log back in now.", "s2member-front", "s2member") . "\n" . wp_login_url (), get_defined_vars ()), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release (); 133 140 if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)) && ($url = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["subscr_id"])), $url))) 141 if (($url = preg_replace ("/%%initial%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["initial"])), $url)) && ($url = preg_replace ("/%%regular%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["regular"])), $url)) && ($url = preg_replace ("/%%recurring%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["recurring"])), $url))) 142 if (($url = preg_replace ("/%%initial_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["initial_term"])), $url)) && ($url = preg_replace ("/%%regular_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["regular_term"])), $url))) 143 if (($url = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_number"])), $url)) && ($url = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["item_name"])), $url))) 144 if (($url = preg_replace ("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["first_name"])), $url)) && ($url = preg_replace ("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($paypal["last_name"])), $url))) 145 if (($url = preg_replace ("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (trim ($paypal["first_name"] . " " . $paypal["last_name"]))), $url))) 147 148 if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user->first_name)), $url)) && ($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user->last_name)), $url))) 149 if (($url = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (trim ($user->first_name . " " . $user->last_name))), $url)))menu-pages.inc.php https://gitlab.com/Gashler/dp | PHP | 793 lines
1<?php 2/** 77 else if(!is_array($value) || (is_array($value) && /* Updating an array? */ array_shift($value) === "update-signal")) 78 $options[preg_replace("/^".preg_quote("ws_plugin__s2member_", "/")."/", "", $key)] = $value; 79email-configs.inc.php https://gitlab.com/Gashler/dp | PHP | 401 lines
169 // Reduces `"Name" <email>`, to just an email address *(for best cross-platform compatibility across various MTAs)*. 170 // Also works around bug in PHP versions prior to fix in 5.2.11. See bug report: <https://bugs.php.net/bug.php?id=28038>. 171 // Also supplements WordPress®. WordPress® currently does NOT support semicolon `;` delimitation, s2Member does. 244 if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_subject"])) 245 if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj))) 246 if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj))) 246 if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj))) 247 if (($sbj = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $sbj))) 248 if (($sbj = preg_replace ("/%%label%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($label), $sbj))) 255 if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj))) 256 if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj))) 257 if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj))) 273 if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg))) 274 if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg))) 275 if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))custom-reg-fields.inc.php https://gitlab.com/Gashler/dp | PHP | 552 lines
1<?php 2/** 60 61 $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"])); 62 $field_id_class = preg_replace("/_/", "-", $field_var); 141 { 142 $common = preg_replace('/ name\="(.+?)"/', ' name="$1[]"', $common); 143 $common = preg_replace('/ style\="(.+?)"/', ' style="height:auto; $1"', $common); 191 { 192 $common = preg_replace('/ name\="(.+?)"/', ' name="$1[]"', $common); 193 198 { 199 $common_i = preg_replace('/ id\="(.+?)"/', ' id="$1---'.($i).'"', $common); 200 230 { 231 $common_i = preg_replace('/ id\="(.+?)"/', ' id="$1---'.($i).'"', $common); 232custom-reg-fields-4bp.inc.php https://gitlab.com/Gashler/dp | PHP | 286 lines
1<?php 2/** 75 { 76 $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"])); 77 $field_id_class = preg_replace ("/_/", "-", $field_var); 173 { 174 $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"])); 175 $field_id_class = preg_replace ("/_/", "-", $field_var);syscon.inc.php https://gitlab.com/Gashler/dp | PHP | 566 lines
1<?php 2/** 34plugins_url("/".basename(dirname(dirname(__FILE__)))) : // Otherwise, this gives it a chance to live anywhere in the content dir. 35content_url(preg_replace("/^(.*?)\/".preg_quote(basename(WP_CONTENT_DIR), "/")."/", "", str_replace(DIRECTORY_SEPARATOR, "/", dirname(dirname(__FILE__))))); 36/* 38*/ 39$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]."/".preg_replace("/\.php$/", "-o.php", basename($GLOBALS["WS_PLUGIN__"]["s2member"]["l"])); 40/* 70*/ 71$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["default_files_dir"] = dirname(dirname(__FILE__))."-files".((stripos(PHP_OS, "win") === 0 && stripos($_SERVER["SERVER_SOFTWARE"], "apache") === false) ? "/app_data" : ""); 72$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = apply_filters("ws_plugin__s2member_files_dir", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["default_files_dir"]); 72$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = apply_filters("ws_plugin__s2member_files_dir", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["default_files_dir"]); 73$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_no_gzip_htaccess"] = dirname(__FILE__)."/templates/cfg-files/s2member-files-no-gzip.php"; 74$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir_htaccess"] = dirname(__FILE__)."/templates/cfg-files/s2member-files.php"; 77*/ 78$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["default_logs_dir"] = dirname(dirname(__FILE__))."-logs".((stripos(PHP_OS, "win") === 0 && stripos($_SERVER["SERVER_SOFTWARE"], "apache") === false) ? "/app_data" : ""); 79$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters("ws_plugin__s2member_logs_dir", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["default_logs_dir"]);admin.php https://gitlab.com/Gashler/dp | PHP | 925 lines
200 <br/> 201 <a href="<?php echo $config_link;?>"><?php _e('I already have a key'); ?></a> 202 </div> 218 <td> 219 <input id="key" name="key" type="text" size="15" maxlength="12" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="regular-text code <?php echo $key_status;?>"><div class="under-input key-status <?php echo $key_status;?>"><?php echo isset( $key_status_strings[ $key_status ] ) ? $key_status_strings[ $key_status ] : '';?></div> 220 <p class="need-key description"><?php printf( __('You must enter a valid Akismet API key here. If you need an API key, you can <a href="%s">create one here</a>'), '#' );?></p> 228 <label for="akismet_discard_month" title="<?php esc_attr_e( 'Auto-detete old spam' ); ?>"><input name="akismet_discard_month" id="akismet_discard_month" value="true" type="checkbox" <?php echo get_option('akismet_discard_month') == 'true' ? 'checked="checked"':''; ?>> <span><?php _e('Auto-delete spam submitted on posts more than a month old.'); ?></span></label><br> 229 <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' ); ?>"><input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="true" type="checkbox" <?php echo get_option('akismet_show_user_comments_approved') == 'true' ? 'checked="checked"':''; ?>> <span><?php _e('Show the number of comments you\'ve approved beside each comment author.'); ?></span></label> 230 </fieldset> 279 <thead> 280 <th><?php _e('Akismet server'); ?></th><th><?php _e('Network Status'); ?></th> 281 </thead> 287 <td align="center"><?php echo esc_html( $ip ); ?></td> 288 <td class="key-status <?php echo $status ? 'valid' : 'failed'; ?>"><?php echo $status ? __('Accessible') : __('Re-trying'); ?></td> 289 </tr>media.php https://gitlab.com/Gashler/dp | PHP | 1517 lines
150 // convert any remaining line breaks to <br> 151 $caption = preg_replace( '/[ \n\t]*\n[ \t]*/', '<br />', $caption ); 152 163/** 164 * Private preg_replace callback used in image_add_caption() 165 * 336 $file = $file['file']; 337 $title = preg_replace('/\.[^.]+$/', '', basename($file)); 338 $content = ''; 381?> 382<title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title> 383<?php 394addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 395var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup', 396isRtl = <?php echo (int) is_rtl(); ?>;file.php https://gitlab.com/Gashler/dp | PHP | 1071 lines
20 'footer.php' => __( 'Footer' ), 21 'header.php' => __( 'Header' ), 22 'sidebar.php' => __( 'Sidebar' ), 33 'functions.php' => __( 'Theme Functions' ), 34 'attachment.php' => __( 'Attachment Template' ), 35 'image.php' => __('Image Attachment Template'), 35 'image.php' => __('Image Attachment Template'), 36 'video.php' => __('Video Attachment Template'), 37 'audio.php' => __('Audio Attachment Template'), 38 'application.php' => __('Application Attachment Template'), 39 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 40 '.htaccess' => __( '.htaccess (for rewrite rules )' ), 292 else 293 $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 294 return call_user_func($upload_error_handler, $file, $error_msg);press-this.php https://gitlab.com/Gashler/dp | PHP | 653 lines
155 <a href="#" class="select"> 156 <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr(__('Click to insert.')); ?>" title="<?php echo esc_attr(__('Click to insert.')); ?>" /> 157 </a> 290 291 jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="button button-small"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 292 jQuery('#img_container').html(strtoappend); 305addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 306var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>; 307var photostorage = false; 348 case 'video' : 349 jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() { 350 <?php 396 cache : false, 397 url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>", 398 data: "ajax=photo_js&u=<?php echo urlencode($url)?>",network.php https://gitlab.com/Gashler/dp | PHP | 542 lines
1<?php 2/** 15/** WordPress Administration Bootstrap */ 16require_once( './admin.php' ); 17 22 if ( ! is_network_admin() ) { 23 wp_redirect( network_admin_url( 'setup.php' ) ); 24 exit; 53function allow_subdomain_install() { 54 $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) ); 55 if( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) 215 <tr> 216 <th><label><input type='radio' name='subdomain_install' value='1'<?php checked( $subdomain_install ); ?> /> <?php _e( 'Sub-domains' ); ?></label></th> 217 <td><?php printf( _x( 'like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples' ), $hostname ); ?></td> 219 <tr> 220 <th><label><input type='radio' name='subdomain_install' value='0'<?php checked( ! $subdomain_install ); ?> /> <?php _e( 'Sub-directories' ); ?></label></th> 221 <td><?php printf( _x( 'like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples' ), $hostname ); ?></td>wp-signup.php https://gitlab.com/Gashler/dp | PHP | 584 lines
119 <label class="checkbox" for="blog_public_on"> 120 <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> /> 121 <strong><?php _e( 'Yes' ); ?></strong> 123 <label class="checkbox" for="blog_public_off"> 124 <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> /> 125 <strong><?php _e( 'No' ); ?></strong> 173 <?php } ?> 174 <input name="user_email" type="text" id="user_email" value="<?php echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('We send your registration email to this address. (Double-check your email address before continuing.)') ?> 175 <?php 231 <ul> 232 <?php foreach ( $blogs as $blog ) { 233 $home_url = get_home_url( $blog->userblog_id ); 296 <p> 297 <?php printf( __( '<a href="http://%1$s">http://%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' ), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name ) ?> 298 </p>date_helper.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 796 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 6 * 88 * 89 * This function is identical to PHPs date() function, 90 * except that it allows date codes to be formatted using 115 '', 116 preg_replace('/([a-z]+?){1}/i', '\\\\\\1', $datestr) 117 ); 131 * 132 * As of PHP 5.2, the DateTime extension provides constants that 133 * serve for the exact same purpose and are used with date(). 136 * @deprecated 3.0.0 Use PHP's native date() instead. 137 * @link http://www.php.net/manual/en/class.datetime.php#datetime.constants.types 138 *template.php https://gitlab.com/endomorphosis/fusenews | PHP | 1145 lines
1<?php 2 7 function draw_subscribe($template_p) { 8 global $phpiCal_config, $getdate, $cal, $ALL_CALENDARS_COMBINED, $subscribe_path, $download_filename; 9 if ($cal != $ALL_CALENDARS_COMBINED && $subscribe_path != '' && $download_filename != '') { 12 } else { 13 $this->page = preg_replace('!<\!-- switch display_download on -->.*<\!-- switch display_download off -->!Uis', '', $this->page); 14 } 17 function draw_admin() { 18 global $phpiCal_config, $getdate, $cal, $master_array, $is_loged_in; 19 $delete_table = ''; 50 } else { 51 $this->page = preg_replace('!<\!-- switch logged_in on -->.*<\!-- switch logged_in off -->!Uis', '', $this->page); 52 $this->page = preg_replace('!<\!-- switch logged_in2 on -->.*<\!-- switch logged_in2 off -->!Uis', '', $this->page); 57 function draw_print($template_p) { 58 global $phpiCal_config, $getdate, $cal, $master_array, $printview, $dateFormat_day, $timeFormat, $week_start, $week_end, $lang; 59 preg_match("!<\!-- loop events on -->(.*)<\!-- loop events off -->!Uis", $this->page, $match1);install.php https://gitlab.com/endomorphosis/fusenews | PHP | 592 lines
1<?php 2// $Id: install.php,v 1.34.2.5 2008/07/09 21:48:41 drumm Exp $ 8 * that the current environment meets our minimum requirements. We then go 9 * on to verify that settings.php is properly configured. From there we 10 * connect to the configured database and verify that it meets our minimum 27 28 // Check existing settings.php. 29 $verify = install_verify_settings(); 51 if (!empty($_GET['profile'])) { 52 $profile = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['profile']); 53 } 54 elseif ($profile = install_select_profile()) { 55 install_goto("install.php?profile=$profile"); 56 } 62 if (!empty($_GET['locale'])) { 63 $install_locale = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['locale']); 64 }install.php https://gitlab.com/endomorphosis/pacificcarandfoundry | PHP | 591 lines
1<?php 2// $Id: install.php,v 1.34.2.4 2007/11/07 08:10:16 drumm Exp $ 8 * that the current environment meets our minimum requirements. We then go 9 * on to verify that settings.php is properly configured. From there we 10 * connect to the configured database and verify that it meets our minimum 27 28 // Check existing settings.php. 29 $verify = install_verify_settings(); 51 if (!empty($_GET['profile'])) { 52 $profile = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['profile']); 53 } 54 elseif ($profile = install_select_profile()) { 55 install_goto("install.php?profile=$profile"); 56 } 62 if (!empty($_GET['locale'])) { 63 $install_locale = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['locale']); 64 }install.php https://gitlab.com/endomorphosis/tactilevision | PHP | 1179 lines
1<?php 2 9 * that the current environment meets our minimum requirements. We then go 10 * on to verify that settings.php is properly configured. From there we 11 * connect to the configured database and verify that it meets our minimum 45 if (!empty($_GET['profile'])) { 46 $profile = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['profile']); 47 } 51 52 // Check existing settings.php. 53 $verify = install_verify_settings(); 85 if ($profile = install_select_profile()) { 86 install_goto("install.php?profile=$profile"); 87 } 97 if (!empty($_GET['locale'])) { 98 $install_locale = preg_replace('/[^a-zA-Z_0-9\-]/', '', $_GET['locale']); 99 }widgets.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1215 lines
1<?php 2/** 73 /** 74 * PHP4 constructor 75 */ 80 /** 81 * PHP5 constructor 82 * 93 function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { 94 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base); 95 $this->name = $name;rewrite.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1730 lines
225 * 226 * To remove any manually prepended /index.php/. 227 * 235 if ( !empty( $base ) ) { 236 $base = preg_replace( '|^/index\.php/|', '', $base ); 237 $base = trim( $base, '/' ); 272 // This fixes things like #anchors, ?query=strings, missing 'www.', 273 // added 'www.', or added 'index.php/' that will mess up our WP_Query 274 // and return a false negative 291 292 // Strip 'index.php/' if we're not using path info permalinks 293 if ( !$wp_rewrite->using_index_permalinks() ) 323 // Trim the query of everything up to the '?'. 324 $query = preg_replace("!^.+\?!", '', $query); 325post-template.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1236 lines
1<?php 2/** 227 if ( $preview ) // preview fix for javascript bug with foreign languages 228 $output = preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";'), $output); 229ms-blogs.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 577 lines
1<?php 2 33 if ( !empty( $blogname ) ) 34 $url = preg_replace( '|^([^\.]+://)|', '$1' . $blogname . '.', $url ); 35 } else {load.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 586 lines
87 // Fix empty PHP_SELF 88 $PHP_SELF = $_SERVER['PHP_SELF']; 89 if ( empty( $PHP_SELF ) ) 89 if ( empty( $PHP_SELF ) ) 90 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] ); 91} 106 if ( version_compare( $required_php_version, $php_version, '>' ) ) 107 die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress %2%s requires at least %2%s.'/*/WP_I18N_OLD_PHP*/, $php_version, $wp_version, $required_php_version ) ); 108 399 elseif ( false !== strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) ) 400 $link = preg_replace( '|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php'; 401 else 401 else 402 $link = preg_replace( '|/[^/]+?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php'; 403 require( ABSPATH . WPINC . '/kses.php' );functions.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1681 lines
1<?php 2/** 19 * 20 * @param string $dateformatstring Either 'G', 'U', or php date format. 21 * @param string $mysqlstring Time from mysql DATETIME field. 87 $i = $unixtimestamp; 88 // Sanity check for PHP 5.1.0- 89 if ( false === $i || intval($i) < 0 ) { 112 $dateformatstring = ' '.$dateformatstring; 113 $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); 114 $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); 114 $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); 115 $dateformatstring = preg_replace( "/([^\\\])l/", "\\1" . backslashit( $dateweekday ), $dateformatstring ); 116 $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); 116 $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); 117 $dateformatstring = preg_replace( "/([^\\\])a/", "\\1" . backslashit( $datemeridiem ), $dateformatstring ); 118 $dateformatstring = preg_replace( "/([^\\\])A/", "\\1" . backslashit( $datemeridiem_capital ), $dateformatstring );formatting.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1441 lines
1<?php 2/** 81 // regular expressions 82 $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); 83 } elseif (!empty($curl)) { 93 94 $curl = preg_replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/', '&$1', $curl); 95 $output .= $curl; 143/** 144 * Accepts matches array from preg_replace_callback in wpautop() or a string. 145 * 185 $pee = $pee . "\n"; // just to make things a little easier, pad the end 186 $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 187 // Space things out a little 188 $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; 189 $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 190 $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);default-widgets.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1159 lines
66 ?> 67 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 68 <p> 76 <p> 77 <label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e( 'Exclude:' ); ?></label> <input type="text" value="<?php echo $exclude; ?>" name="<?php echo $this->get_field_name('exclude'); ?>" id="<?php echo $this->get_field_id('exclude'); ?>" class="widefat" /> 78 <br /> 196?> 197 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p> 198<?php 262?> 263 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 264 <p> 317?> 318 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 319<?phpclasses.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1700 lines
1<?php 2/** 5 * Some of the other classes are contained in other files. For example, the 6 * WordPress cache is in cache.php and the WordPress roles API is in 7 * capabilities.php. The third party libraries are contained in their own 161 $req_uri = $req_uri_array[0]; 162 $self = $_SERVER['PHP_SELF']; 163 $home_path = parse_url(home_url()); 175 $req_uri = trim($req_uri, '/'); 176 $req_uri = preg_replace("|^$home_path|", '', $req_uri); 177 $req_uri = trim($req_uri, '/'); 178 $pathinfo = trim($pathinfo, '/'); 179 $pathinfo = preg_replace("|^$home_path|", '', $pathinfo); 180 $pathinfo = trim($pathinfo, '/'); 181 $self = trim($self, '/'); 182 $self = preg_replace("|^$home_path|", '', $self); 183 $self = trim($self, '/');class-IXR.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 908 lines
1<?php 2/** 11 * @link http://scripts.incutio.com/xmlrpc/ Site 12 * @link http://scripts.incutio.com/xmlrpc/manual.php Manual 13 * @license BSD License http://www.opensource.org/licenses/bsd-license.php 61 } 62 // If it is a normal PHP object convert it in to a struct 63 if (is_object($this->data)) { 160 // first remove the XML declaration 161 // this method avoids the RAM usage of preg_replace on very large messages 162 $header = preg_replace( '/<\?xml.*?\?'.'>/', '', substr( $this->message, 0, 100 ), 1 ); 412 'faults_interop' => array( 413 'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php', 414 'specVersion' => 20010516canonical.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 403 lines
53 54 // Some PHP setups turn requests for / into /index.php in REQUEST_URI 55 // See: http://trac.wordpress.org/ticket/5017 57 // Disabled, for now: 58 // $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']); 59 228 229 $paged_redirect['path'] = user_trailingslashit( preg_replace('|/index.php/?$|', '/', $paged_redirect['path']) ); // strip off trailing /index.php/ 230 if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($paged_redirect['path'], '/index.php/') === false ) 230 if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($paged_redirect['path'], '/index.php/') === false ) 231 $paged_redirect['path'] = trailingslashit($paged_redirect['path']) . 'index.php/'; 232 if ( !empty( $addl_path ) ) 265 // trailing /index.php 266 $redirect['path'] = preg_replace('|/index.php/*?$|', '/', $redirect['path']); 267RCCWP_CustomWritePanel.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 685 lines
1<?php 2/** 45 * @param array $standardFields a list of standard fields ids that are to be displayed in 46 * in the panel. Use $STANDARD_FIELDS defined in RCCWP_Constant.php 47 * @param array $categories array of category ids that are checked by default when the user 54 function Create($name, $description = '', $standardFields = array(), $categories = array(), $display_order = 1, $type = FALSE, $createDefaultGroup=true,$single_post = 0, $default_theme_page = NULL, $default_parent_page = NULL) { 55 include_once('RC_Format.php'); 56 global $wpdb; 105 if ($createDefaultGroup){ 106 include_once('RCCWP_CustomGroup.php'); 107 RCCWP_CustomGroup::Create($customWritePanelId, '__default', false, false); 282 * Create a capability name for a write panel given its name. This function is 283 * copied from WP's sanitize_title_with_dashes($title) (formatting.php) 284 * 288 function GetCapabilityName($customWritePanelName) { 289 // copied from WP's sanitize_title_with_dashes($title) (formatting.php) 290 $capabilityName = strip_tags($customWritePanelName);classes.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 589 lines
1<?php 2 178 $response_regex = '%\[\s*response\s*\]%'; 179 $form = preg_replace_callback( $response_regex, 180 array( &$this, 'response_replace_callback' ), $form ); 252 $c['blog'] = get_option( 'home' ); 253 $c['user_ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ); 254 $c['user_agent'] = $_SERVER['HTTP_USER_AGENT']; 336 337 $subject = preg_replace_callback( $regex, $callback, $mail_template['subject'] ); 338 $sender = preg_replace_callback( $regex, $callback, $mail_template['sender'] ); 338 $sender = preg_replace_callback( $regex, $callback, $mail_template['sender'] ); 339 $recipient = preg_replace_callback( $regex, $callback, $mail_template['recipient'] ); 340 $additional_headers = 340 $additional_headers = 341 preg_replace_callback( $regex, $callback, $mail_template['additional_headers'] ); 342akismet.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1176 lines
141<?php foreach ( $ms as $m ) : ?> 142 <p style="padding: .5em; background-color: #<?php echo $messages[$m]['color']; ?>; color: #fff; font-weight: bold;"><?php echo $messages[$m]['text']; ?></p> 143<?php endforeach; ?> 149<?php } ?> 150<p><label><input name="akismet_discard_month" id="akismet_discard_month" value="true" type="checkbox" <?php if ( get_option('akismet_discard_month') == 'true' ) echo ' checked="checked" '; ?> /> <?php _e('Automatically discard spam comments on posts older than a month.'); ?></label></p> 151 <p class="submit"><input type="submit" name="submit" value="<?php _e('Update options »'); ?>" /></p> 160 <p style="padding: .5em; background-color: #d22; color: #fff; font-weight:bold;"><?php _e('Network functions are disabled.'); ?></p> 161 <p><?php echo sprintf( __('Your web host or server administrator has disabled PHP\'s <code>fsockopen</code> or <code>gethostbynamel</code> functions. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet\'s system requirements</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p> 162 <?php 193<table style="width: 100%;"> 194<thead><th><?php _e('Akismet server'); ?></th><th><?php _e('Network Status'); ?></th></thead> 195<tbody> 202 <td><?php echo htmlspecialchars($ip); ?></td> 203 <td style="padding: 0 .5em; font-weight:bold; color: #fff; background-color: <?php echo $color; ?>"><?php echo ($status ? __('No problems') : __('Obstructed') ); ?></td> 204media.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1561 lines
168</script> 169<?php 170 exit; 256 $file = $file['file']; 257 $title = preg_replace('/\.[^.]+$/', '', basename($file)); 258 $content = ''; 300<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 301<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 302<head> 303<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 304<title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title> 305<?php 316addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 317var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time(); ?>'}; 318var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup';file.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1039 lines
20 'archive.php' => __( 'Archives' ), 21 'author.php' => __( 'Author Template' ), 22 'tag.php' => __( 'Tag Template' ), 35 'application.php' => __('Application Attachment Template'), 36 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 37 '.htaccess' => __( '.htaccess (for rewrite rules )' ), 38 // Deprecated files 39 'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); 40 298 else 299 $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 300 return call_user_func($upload_error_handler, $file, $error_msg); 381 382 // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error']. 383 $upload_error_strings = array( false,press-this.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 610 lines
139 <a href="#" class="select"> 140 <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr(__('Click to insert.')); ?>" title="<?php echo esc_attr(__('Click to insert.')); ?>" /> 141 </a> 143 144 <p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p> 145 <?php break; 293 } 294 jQuery('#extra-fields').html('<div class="postbox"><h2>Add Photos <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 295 jQuery('#img_container').html(strtoappend); 318addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 319var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'}; 320var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this'; 361 case 'video' : 362 jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() { 363 <?phpnetwork.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 520 lines
1<?php 2/** 15/** WordPress Administration Bootstrap */ 16require_once( './admin.php' ); 17 194 <tr> 195 <th><label><input type='radio' name='subdomain_install' value='1'<?php checked( $subdomain_install ); ?> /> <?php _e( 'Sub-domains' ); ?></label></th> 196 <td><?php printf( _x( 'like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples' ), $hostname ); ?></td> 198 <tr> 199 <th><label><input type='radio' name='subdomain_install' value='0'<?php checked( ! $subdomain_install ); ?> /> <?php _e( 'Sub-directories' ); ?></label></th> 200 <td><?php printf( _x( 'like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples' ), $hostname ); ?></td> 298?> 299 <div class="updated"><p><strong><?php _e( 'Notice: The Network feature is already enabled.' ); ?></strong> <?php _e( 'The original configuration steps are shown here for reference.' ); ?></p></div> 300<?php } else { 302?> 303 <div class="error"><p><strong><?php _e('Warning:'); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div> 304 <p><?php _e( 'Please complete the configuration steps. To create a new network, you will need to empty or remove the network database tables.' ); ?></p>edit.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 465 lines
39 $submenu_file = 'edit.php'; 40 $post_new_file = 'post-new.php'; 41} 199<?php screen_icon(); ?> 200<h2><?php echo esc_html( $post_type_object->labels->name ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php 201if ( isset($_GET['s']) && $_GET['s'] ) 206if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 207<div id="message" class="updated"><p><strong><?php _e('This has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View Post'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit Post'); ?></a></p></div> 208<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 247 248<form id="posts-filter" action="<?php echo admin_url('edit.php'); ?>" method="get"> 249 303<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" /> 304<input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" /> 305custom-header.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 721 lines
343 <?php if ( $color = get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?> 344 pickColor('#<?php echo $color; ?>'); 345 <?php } ?> 351</script> 352<?php 353 } 396 maxHeight: <?php echo HEADER_IMAGE_HEIGHT; ?>, 397 maxWidth: <?php echo HEADER_IMAGE_WIDTH; ?>, 398 onInit: function () { 445 ?> 446 <div id="headimg" style="max-width:<?php echo HEADER_IMAGE_WIDTH; ?>px;height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;background-image:url(<?php esc_url ( header_image() ) ?>);"> 447 <?php 452 ?> 453 <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1> 454 <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>wp-signup.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 457 lines
106 <label class="checkbox" for="blog_public_on"> 107 <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> /> 108 <strong><?php _e( 'Yes' ); ?></strong> 110 <label class="checkbox" for="blog_public_off"> 111 <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> /> 112 <strong><?php _e( 'No' ); ?></strong> 142 <?php } ?> 143 <input name="user_email" type="text" id="user_email" value="<?php echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('We send your registration email to this address. (Double-check your email address before continuing.)') ?> 144 <?php 193 <?php do_action( "signup_hidden_fields" ); ?> 194 <?php show_blog_form($blogname, $blog_title, $errors); ?> 195 <p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ) ?>" /></p> 226 <p> 227 <?php printf( __( '<a href="http://%1$s">http://%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' ), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name ) ?> 228 </p>wp-login.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 654 lines
64 <title><?php bloginfo('name'); ?> › <?php echo $title; ?></title> 65 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 66<?php 87<?php if ( !is_multisite() ) { ?> 88<div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', 'http://wordpress.org/'); ?>" title="<?php echo apply_filters('login_headertitle', __('Powered by WordPress')); ?>"><?php bloginfo('name'); ?></a></h1> 89<?php } else { ?> 89<?php } else { ?> 90<div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', network_home_url() ); ?>" title="<?php echo apply_filters('login_headertitle', $current_site->site_name ); ?>"><span class="hide"><?php bloginfo('name'); ?></span></a></h1> 91<?php } 131</script> 132<?php 133} 342 if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) 343 $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); 344wp-app.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1611 lines
1<?php 2/** 15/** Set up WordPress environment */ 16require_once('./wp-load.php'); 17 18/** Atom Publishing Protocol Class */ 19require_once(ABSPATH . WPINC . '/atomlib.php'); 20 21/** Admin Image API for metadata updating */ 22require_once(ABSPATH . '/wp-admin/includes/image.php'); 23 23 24$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); 25 218 /** 219 * PHP4 constructor - Sets up object properties. 220 *lens.php https://gitlab.com/Mirros/jsdelivr | PHP | 489 lines
1<?php 2class SlideDeckLens_ToolKit extends SlideDeckLens_Scaffold { 163 if( $slidedeck['source'] == 'twitter' ){ 164 $slide['content'] = preg_replace( '/\<a /', '<a class="accent-color" ', $slide['content'] ); 165 }infinity.php https://gitlab.com/Mirros/jsdelivr | PHP | 983 lines
1<?php 2 100 } else { 101 $value = preg_replace( $css_pattern, '', $value ); 102 121 } elseif ( is_string( $value ) ) { 122 $value = preg_replace( $css_pattern, '', $value ); 123 153 // Container to append new posts to 154 $settings['container'] = preg_replace( $css_pattern, '', $_settings[0] ); 155infinity.php https://gitlab.com/Mirros/jsdelivr | PHP | 913 lines
1<?php 2/* 96 else { 97 $value = preg_replace( $css_pattern, '', $value ); 98 118 elseif ( is_string( $value ) ) { 119 $value = preg_replace( $css_pattern, '', $value ); 120 142 // Container to append new posts to 143 $settings['container'] = preg_replace( $css_pattern, '', $_settings[0] ); 144File.php https://github.com/sitengine/sitengine.git | PHP | 465 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 293 require_once 'Zend/CodeGenerator/Php/Exception.php'; 294 throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class'); 295 } 391 if (preg_match('#(?:\s*)<\?php#', $this->getBody()) == false) { 392 $output = '<?php' . PHP_EOL; 393 } 457 if ($this->_filename == '' || !is_writable(dirname($this->_filename))) { 458 require_once 'Zend/CodeGenerator/Php/Exception.php'; 459 throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.');smarty_resource.php https://gitlab.com/fiesta-framework/Documentation | PHP | 913 lines
1<?php 2/** 47 'eval' => true, 48 'php' => true 49 ); 126 { 127 $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null; 128 $_filepath = $compiled->source->uid; 149 if ($_basename === null) { 150 $_basename = basename(preg_replace('![^\w\/]+!', '_', $compiled->source->name)); 151 } 156 157 $compiled->filepath = $_compile_dir . $_filepath . '.' . $compiled->source->type . $_basename . $_cache . '.php'; 158 } 177 // resolve simples 178 $_path = preg_replace('#/\./(\./)*#', '/', $_path); 179 // resolve parentssmarty_internal_utility.php https://gitlab.com/fiesta-framework/Documentation | PHP | 837 lines
1<?php 2/** 2/** 3 * Project: Smarty: the PHP compiling template engine 4 * File: smarty_internal_utility.php 194 $_compile_dir = realpath($smarty->getCompileDir()) . '/'; 195 $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; 196 $_dir_sep = $smarty->use_sub_dirs ? '/' : '^'; 221 222 $_resource_part_2 = str_replace('.php', '.cache.php', $_resource_part_1); 223 $_resource_part_2_length = strlen($_resource_part_2); 235 $_compileDirs = new RecursiveDirectoryIterator($_dir); 236 // NOTE: UnexpectedValueException thrown for PHP >= 5.3 237 } 328 if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) { 329 // try PHP include_path 330 if ($_stream_resolve_include_path) {smarty_internal_templatelexer.php https://gitlab.com/fiesta-framework/Documentation | PHP | 1399 lines
1<?php 2/** 22 public $taglineno; 23 public $is_phpScript = false; 24 public $state = 1; 71 'TEXT' => 'text', 72 'FAKEPHPSTARTTAG' => 'Fake PHP start tag', 73 'PHPSTARTTAG' => 'PHP start tag', 73 'PHPSTARTTAG' => 'PHP start tag', 74 'PHPENDTAG' => 'PHP end tag', 75 'LITERALSTART' => 'Literal start', 84 { 85 // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); 86 $this->data = $data; 171 } 172 $yy_global_pattern = "/\G(\\{\\})|\G(" . $this->ldel . "\\*([\S\s]*?)\\*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*strip\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*\/strip\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*(if|elseif|else if|while)\\s+)|\G(" . $this->ldel . "\\s*for\\s+)|\G(" . $this->ldel . "\\s*foreach(?![^\s]))|\G(" . $this->ldel . "\\s*setfilter\\s+)|\G(" . $this->ldel . "\\s*\/)|\G(" . $this->ldel . "\\s*)|\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(\\s*" . $this->rdel . ")|\G(<%)|\G(%>)|\G([\S\s])/iS"; 173smarty_cacheresource_keyvaluestore.php https://gitlab.com/fiesta-framework/Documentation | PHP | 493 lines
1<?php 2/** 222 223 return preg_replace('#[^\w\|]+#S', '_', $string); 224 }Base.php https://gitlab.com/fiesta-framework/Documentation | PHP | 509 lines
1<?php 2 239 * twister random generator. This function is therefore more random than 240 * PHP's shuffle() function, and it is seedable. 241 * 276 * twister random generator. This function is therefore more random than 277 * PHP's shuffle() function, and it is seedable. Additionally, it is 278 * UTF8 safe if the mb extension is available. 332 } 333 $string = preg_replace_callback('/\%/u', 'static::randomDigitNotNull', $string); 334 345 { 346 return preg_replace_callback('/\?/u', 'static::randomLetter', $string); 347 } 369 { 370 return preg_replace_callback('/\*/u', 'static::randomAscii', $string); 371 }Inline.php https://gitlab.com/ealexis.t/trends | PHP | 568 lines
1<?php 2 30 /** 31 * Converts a YAML string to a PHP array. 32 * 33 * @param string $value A YAML string 34 * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise 35 * @param bool $objectSupport true if object support is enabled, false otherwise 38 * 39 * @return array A PHP array representing the YAML string 40 * 74 // some comments are allowed at the end 75 if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { 76 throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); 86 /** 87 * Dumps a given PHP variable to a YAML string. 88 *Mbstring.php https://gitlab.com/ealexis.t/trends | PHP | 604 lines
1<?php 2 14/** 15 * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. 16 * 64{ 65 const MB_CASE_FOLD = PHP_INT_MAX; 66 101 102 return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); 103 } 151 if (MB_CASE_TITLE == $mode) { 152 $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_upper'), $s); 153 $s = preg_replace_callback('/\B[\p{Lu}\p{Lt}]+/u', array(__CLASS__, 'title_case_lower'), $s);ProgressBar.php https://gitlab.com/ealexis.t/trends | PHP | 585 lines
1<?php 2 82 * @param string $name The placeholder name (including the delimiter char like %) 83 * @param callable $callable A PHP callable 84 */ 98 * 99 * @return callable|null A PHP callable 100 */ 404 405 $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) { 406 if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {XML.php https://gitlab.com/ealexis.t/trends | PHP | 943 lines
1<?php 2/* 2/* 3 * This file is part of PHPUnit. 4 * 4 * 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 6 * 15 */ 16class PHPUnit_Util_XML 17{ 31 { 32 return preg_replace( 33 '/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/', 35 htmlspecialchars( 36 PHPUnit_Util_String::convertToUtf8($string), 37 ENT_QUOTES,Test.php https://gitlab.com/ealexis.t/trends | PHP | 1084 lines
46 */ 47 public static function describe(PHPUnit_Framework_Test $test, $asString = true) 48 { 200 201 // https://bugs.php.net/bug.php?id=63055 202 $matches = array(); 231 232 if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) { 233 $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']); 236 if (!empty($required['PHPUnit'])) { 237 $phpunitVersion = PHPUnit_Runner_Version::id(); 238 if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) { 238 if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) { 239 $missing[] = sprintf('PHPUnit %s (or later) is required.', $required['PHPUnit']); 240 }BladeCompiler.php https://gitlab.com/ealexis.t/trends | PHP | 1057 lines
1<?php 2 157 // Here we will loop through all of the tokens returned by the Zend lexer and 158 // parse each one into the corresponding valid PHP. We will then have this 159 // template as the correctly rendered PHP that can be rendered natively. 172 $result = ltrim($result, PHP_EOL) 173 .PHP_EOL.implode(PHP_EOL, array_reverse($this->footer)); 174 } 186 { 187 return preg_replace_callback('/(?<!@)@verbatim(.*?)@endverbatim/s', function ($matches) { 188 $this->verbatimBlocks[] = $matches[1]; 201 { 202 $result = preg_replace_callback('/'.preg_quote($this->verbatimPlaceholder).'/', function () { 203 return array_shift($this->verbatimBlocks); 254 255 return preg_replace($pattern, '<?php /*$1*/ ?>', $value); 256 }helpers.php https://gitlab.com/ealexis.t/trends | PHP | 893 lines
1<?php 2 601 602if (! function_exists('preg_replace_sub')) { 603 /** 610 */ 611 function preg_replace_sub($pattern, &$replacements, $subject) 612 { 612 { 613 return preg_replace_callback($pattern, function ($match) use (&$replacements) { 614 foreach ($replacements as $key => $value) {UrlGenerator.php https://gitlab.com/ealexis.t/trends | PHP | 754 lines
1<?php 2 208 209 // Once we get the root URL, we will check to see if it contains an index.php 210 // file in the paths. If it does, we will remove it since it is not needed 226 { 227 // Once we get the root URL, we will check to see if it contains an index.php 228 // file in the paths. If it does, we will remove it since it is not needed 235 /** 236 * Remove the index.php file from a path. 237 * 242 { 243 $i = 'index.php'; 244 365 366 $path = preg_replace_callback('/\{.*?\}/', function ($match) use (&$parameters) { 367 return (empty($parameters) && ! Str::endsWith($match[0], '?}'))Route.php https://gitlab.com/ealexis.t/trends | PHP | 945 lines
1<?php 2 209 210 $uri = preg_replace('/\{(\w+?)\?\}/', '{$1}', $this->uri); 211Request.php https://gitlab.com/ealexis.t/trends | PHP | 1058 lines
1<?php 2 96 { 97 return rtrim(preg_replace('/\?.*/', '', $this->getUri()), '/'); 98 }Uri.php https://gitlab.com/ealexis.t/trends | PHP | 606 lines
1<?php 2namespace GuzzleHttp\Psr7; 578 { 579 return preg_replace_callback( 580 '/(?:[^' . self::$charUnreserved . self::$charSubDelims . ':@\/%]+|%(?![A-Fa-fText.php https://gitlab.com/oritadeu/dompdf | PHP | 487 lines
1<?php 2/** 56// $text = ltrim($text, " \n\r\t"); 57 return preg_replace(self::$_whitespace_pattern, " ", $text); 58 } 243 // Collapse white-space except for \n 244 $frame->set_text($text = preg_replace("/[ \t]+/u", " ", $text)); 245 392 case "normal": 393 $str = preg_replace(self::$_whitespace_pattern, " ", $str); 394 case "pre-wrap": 433 case "nowrap": 434 $str = preg_replace(self::$_whitespace_pattern, " ", $text); 435 break; 438 //XXX: Is this correct? 439 $str = preg_replace("/[ \t]+/u", " ", $text); 440Helpers.php https://gitlab.com/oritadeu/dompdf | PHP | 733 lines
1<?php 2namespace Dompdf; 22 23 if (php_sapi_name() !== "cli") { 24 echo "<pre>"; 28 29 if (php_sapi_name() !== "cli") { 30 echo "</pre>"; 72 //drive: followed by a relative path would be a drive specific default folder. 73 //not known in php app code, treat as abs path 74 //($url[1] !== ':' || ($url[2]!=='\\' && $url[2]!=='/')) 74 //($url[1] !== ':' || ($url[2]!=='\\' && $url[2]!=='/')) 75 if ($url[0] !== '/' && (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' || ($url[0] !== '\\' && $url[1] !== ':'))) { 76 // For rel path and local acess we ignore the host, and run the path through realpath() 422 * PDF streaming is impossible. 423 * @see http://www.php.net/manual/en/function.set-error_handler.php 424 *Frame.php https://gitlab.com/oritadeu/dompdf | PHP | 1109 lines
1<?php 2 229 if ($node->nodeName === "#text" && !empty($node->nodeValue)) { 230 $node->nodeValue = preg_replace("/[ \t\r\n\f]+/u", " ", trim($node->nodeValue)); 231 self::$_ws_state = self::WS_TEXT;