100+ results results for 'php printf' (485 ms)
1<?php 2 59 if (null !== $pattern && false === strpos($pattern, 'y') && false === strpos($pattern, 'M') && false === strpos($pattern, 'd')) { 60 throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" or "d". Its current value is "%s".', $pattern)); 61 } 72 if (null !== $pattern && (false === strpos($pattern, 'y') || false === strpos($pattern, 'M') || false === strpos($pattern, 'd'))) { 73 throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" and "d". Its current value is "%s".', $pattern)); 74 } 83 $timeFormat, 84 // see https://bugs.php.net/bug.php?id=66323 85 class_exists('IntlTimeZone', false) ? \IntlTimeZone::createDefault() : null, 89 90 // new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323 91 if (!$formatter) { 308 309 if ($setTimeZone = \PHP_VERSION_ID >= 50500 || method_exists($formatter, 'setTimeZone')) { 310 $formatter->setTimeZone('UTC');board.controller.php http://xe-board.googlecode.com/svn/trunk/ | PHP | 354 lines
1<?php 2 /** 89 $oMail->setTitle($obj->title); 90 $oMail->setContent( sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getFullUrl('','document_srl',$obj->document_srl), getFullUrl('','document_srl',$obj->document_srl), $obj->content)); 91 $oMail->setSender($obj->user_name, $obj->email_address); 213 $oMail->setTitle($oDocument->getTitleText()); 214 $oMail->setContent( sprintf("From : <a href=\"%s#comment_%d\">%s#comment_%d</a><br/>\r\n%s", getFullUrl('','document_srl',$obj->document_srl),$obj->comment_srl, getFullUrl('','document_srl',$obj->document_srl), $obj->comment_srl, $obj->content)); 215 $oMail->setSender($obj->user_name, $obj->email_address);WebSocketParserD08.java git://pkgs.fedoraproject.org/jetty | Java | 389 lines
11 * The Apache License v2.0 is available at 12 * http://www.opensource.org/licenses/apache2.0.php 13 * 24// The Apache License v2.0 is available at 25// http://www.opensource.org/licenses/apache2.0.php 26// You may elect to redistribute this code under either of these licenses. 174 175 // System.err.printf("%s %s %s >>\n",TypeUtil.toHexString(_flags),TypeUtil.toHexString(_opcode),data.length()); 176 events++; 344 345 // System.err.printf("%s %s %s >>\n",TypeUtil.toHexString(_flags),TypeUtil.toHexString(_opcode),data.length()); 346 events++;tools_webftp.php git://github.com/FSB/Fire-Soft-Board-2.git | PHP | 555 lines
64 */ 65 public $edit_file = array('php', 'php3', 'php4', 'php5', 'htm', 'html', 'tpl', 'txt', 'css', 'js', 'xml', 'rss', 'htaccess'); 66 113 'mode' => array( 114 'highlight_php' => 'page_php_highlight', 115 'codepress' => 'page_codepress', 192 { 193 $u_dir = sid('index.' . PHPEXT . '?p=tools_webftp&mode=highlight_php&dir=' . $this->dir . '&phpfile=' . $value['name']); 194 } 423 { 424 Display::confirmation(sprintf(Fsb::$session->lang('adm_webftp_confirm_delete'), $this->dir . $this->filename), 'index.' . PHPEXT . '?p=tools_webftp&mode=delete&dir=' . $this->dir . '&file=' . $this->filename); 425 } 497 { 498 $phpfile = Http::request('phpfile'); 499 if (file_exists(ROOT . $this->dir . $phpfile))actions.c git://github.com/DimaSmirnov/Archlinux-downgrader.git | C | 352 lines
15 strcpy(install_command,"sudo pacman -U "); strcat(install_command,user_pkgs[i].link); 16 //printf("%s\n", install_command); //DEBUG 17 system(install_command); 22 if (arm_pkgs[ret].link) { 23 if (!silent) { sprintf(tmp_string, "Downgrade %s from ARM to version %s\n", package,arm_pkgs[ret+2].version); dgr_output(tmp_string); } 24 strcpy(install_command,"sudo pacman -U "); strcat(install_command,arm_pkgs[ret+2].link); 125 126 sprintf(tmp_string,"%s-%s", user_pkgs[cntr].name, user_pkgs[cntr].version); 127 ret = IsPackageInCache(tmp_string); 210 curl = curl_easy_init(); 211 sprintf(tmp_string,"https://aur.archlinux.org/rpc.php?type=search&arg=%s",package); 212 curl_easy_setopt(curl, CURLOPT_URL, tmp_string); 310 } 311 else if (ret==1) { if(!silent) { sprintf(tmp_string, "Package '%s' not installed.\n", package); dgr_output(tmp_string); return 1; } } 312 pkgsinala=pkgsinarm=0;SearchHelper.php git://github.com/thorsten/phpMyFAQ.git | PHP | 382 lines
10 * @package phpMyFAQ\Helper 11 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 12 * @copyright 2009-2021 phpMyFAQ Team 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 14 * @link https://www.phpmyfaq.de 15 * @since 2009-09-07 27use phpMyFAQ\Strings; 28use phpMyFAQ\Utils; 29use stdClass; 156 // Build the link to the faq record 157 $currentUrl = $this->config->getDefaultUrl() . sprintf('index.php?solution_id=%d', $solutionId); 158 297 { 298 $html = sprintf('<span title="%01.2f%%">', $relevance); 299 $emptyStar = '<i aria-hidden="true" class="fa fa-star-o"></i>';silcconnauth-silc_connauth_free.html git://pkgs.fedoraproject.org/libsilc | HTML | 221 lines
119 <a href=silcstrutil.html><img src=box2.gif border=0 alt=>String Utility Interface</a><br /> 120 <a href=silcsnprintf.html><img src=box2.gif border=0 alt=>Snprintf Interface</a><br /> 121 <a href=silcutf8.html><img src=box2.gif border=0 alt=>UTF-8 String Interface</a><br /> 131 <a href=silchttpserver.html><img src=box2.gif border=0 alt=>SILC HTTP Server Interface</a><br /> 132 <a href=silchttpphp.html><img src=box2.gif border=0 alt=>SILC HTTP PHP Translator</a><br /> 133LangReplacer.php git://github.com/imagecms/ImageCMS.git | PHP | 446 lines
1<?php 2 94 $dir = self::getDomainPoFilePath($domain, $lang); 95 dump(sprintf('Po file saving.. : %s', $dir)); 96 $translation->toPoFile($dir); 98 $translation->toMoFile($dir); 99 dump(sprintf('Mo file saving.. : %s', $dir)); 100 } 161 ]; 162 dump(sprintf('%s replaced to %s', $signature, $newSignature)); 163 $newContent = str_replace($signature, $newSignature, $newContent); 163 $newContent = str_replace($signature, $newSignature, $newContent); 164 // dump(sprintf('Changed %s to %s', $word, $translation)); 165 } else { 332 public static function createReplacement($function, $word, $domain, $params) { 333 return sprintf("%s('%s'%s%s)", $function, $word, $domain ? sprintf(", '%s'", $domain) : '', $params ? sprintf(', %s', $params) : ''); 334 }GitRepo.php git://github.com/kbjr/Git.php.git | PHP | 630 lines
1<?php 2 208 foreach($this->envopts as $k => $v) { 209 putenv(sprintf("%s=%s",$k,$v)); 210 }RedisProfilerStorage.php git://github.com/snc/SncRedisBundle.git | PHP | 395 lines
1<?php 2 45 const REDIS_SERIALIZER_NONE = 0; 46 const REDIS_SERIALIZER_PHP = 1; 47 171 172 $profile = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP); 173 200 201 if ($this->setValue($this->getItemName($profile->getToken()), $data, $this->lifetime, self::REDIS_SERIALIZER_PHP)) { 202 if (!$profileIndexed) { 254 255 if (!$childProfileData = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP)) { 256 continue; 310 if ($length > 2147483648) { 311 throw new \RuntimeException(sprintf('The Redis item key "%s" is too long (%s bytes). Allowed maximum size is 2^31 bytes.', $name, $length)); 312 }AdminCarts.php http://marocmall.googlecode.com/svn/trunk/ | PHP | 286 lines
1<?php 2 3/** 4 * Customers tab for admin panel, AdminContacts.php 5 * @category admin 8 * @copyright PrestaShop 9 * @license http://www.opensource.org/licenses/osl-3.0.php Open-source licence 3.0 10 * @version 1.3 13 14include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php'); 15 59 // display cart header 60 echo '<h2>'.(($customer->id) ? $customer->firstname.' '.$customer->lastname : $this->l('Guest')).' - '.$this->l('Cart #').sprintf('%06d', $cart->id).' '.$this->l('from').' '.$cart->date_upd.'</h2>'; 61 91 echo ' 92 <a href="?tab=AdminOrders&id_order='.intval($order->id).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.intval(Tab::getIdFromClassName('AdminOrders')).intval($cookie->id_employee)).'"> '.$this->l('Order #').sprintf('%06d', $order->id).'</a></span> 93 <br /><br />class-walker-nav-menu-edit.php git://github.com/wordpress/wordpress.git | PHP | 313 lines
120 <div class="menu-item-handle"> 121 <span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span> 122 <span class="item-controls"> 187 <?php _e( 'URL' ); ?><br /> 188 <input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" /> 189 </label> 194 <?php _e( 'Navigation Label' ); ?><br /> 195 <input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" /> 196 </label> 200 <?php _e( 'Title Attribute' ); ?><br /> 201 <input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" /> 202 </label> 224 <?php _e( 'Description' ); ?><br /> 225 <textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea> 226 <span class="description"><?php _e( 'The description will be displayed in the menu if the current theme supports it.' ); ?></span>SluggableBehavior.php git://github.com/infinitas/infinitas.git | PHP | 342 lines
1<?php 2 /** 8 * @version $Revision: 36 $ 9 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 10 * @package Infinitas.Libs.Model.Behavior 70 if ($field == $this->__settings[$Model->alias]['slug']) { 71 throw new Exception(sprintf('Model "%s" can not slug its slug field "%s"', $Model->alias, $this->__settings[$Model->alias]['slug'])); 72 } 75 if (empty($this->__settings[$Model->alias]['label'])) { 76 throw new Exception(sprintf('Model "%s" has no sluggable fields', $Model->alias)); 77 } 79 if ($Model->_schema[$Model->displayField]['length'] > $Model->_schema[$this->__settings[$Model->alias]['slug']]['length']) { 80 throw new Exception(sprintf(__d('libs', '%s slugs will be truncated, slug field too short'), $Model->alias)); 81 } 121 $conditions = array( 122 sprintf('%s.%s LIKE', $Model->alias, $this->__settings[$Model->alias]['slug']) => $slug . '%' 123 );currency.php http://coderstalk.googlecode.com/svn/trunk/ | PHP | 460 lines
1<?php 2class ControllerLocalisationCurrency extends Controller { 448 if ($order_total) { 449 $this->error['warning'] = sprintf($this->language->get('error_order'), $order_total); 450 }shared_alloc_win32.c git://github.com/php/php-src.git | C | 393 lines
4 +----------------------------------------------------------------------+ 5 | Copyright (c) The PHP Group | 6 +----------------------------------------------------------------------+ 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 14 +----------------------------------------------------------------------+ 15 | Authors: Andi Gutmans <andi@php.net> | 16 | Zeev Suraski <zeev@php.net> |user_waiting.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 222 lines
34 { 35 Header( "Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name ); 36 die(); 73 $subject = $lang_module['adduser_register']; 74 $message = sprintf( $lang_module['adduser_register_info'], $full_name, $global_config['site_name'], NV_MY_DOMAIN . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name, $row['username'] ); 75 $message .= "<br /><br />------------------------------------------------<br /><br />"; 156$head_tds['full_name']['title'] = $lang_module['name']; 157$head_tds['full_name']['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=user_waiting&sortby=full_name&sorttype=ASC"; 158$head_tds['email']['title'] = $lang_module['email']; 160$head_tds['regdate']['title'] = $lang_module['register_date']; 161$head_tds['regdate']['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=user_waiting&sortby=regdate&sorttype=ASC"; 162 166 { 167 $head_tds[$order]['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=user_waiting&sortby=" . $order . "&sorttype=DESC"; 168 $head_tds[$order]['title'] .= " ↓";function_view_log_test.php git://github.com/phpbb/phpbb.git | PHP | 424 lines
5* 6* @copyright (c) phpBB Limited <https://www.phpbb.com> 7* @license GNU General Public License, version 2 (GPL-2.0) 157 'viewpost' => '', 158 'viewlogs' => append_sid("phpBB/mcp.$phpEx", 'i=logs&mode=topic_logs&t=56'), 159 ), 373 { 374 global $cache, $db, $user, $auth, $phpbb_log, $phpbb_dispatcher, $phpbb_root_path, $phpEx; 375 377 $cache = new phpbb_mock_cache; 378 $phpbb_dispatcher = new phpbb_mock_event_dispatcher(); 379 416 417 $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); 418BasicPermission.php git://github.com/thorsten/phpMyFAQ.git | PHP | 469 lines
1<?php 2 9 * 10 * @package phpMyFAQ 11 * @author Lars Tiedemann <php@larstiedemann.de> 11 * @author Lars Tiedemann <php@larstiedemann.de> 12 * @copyright 2005-2021 phpMyFAQ Team 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 14 * @link https://www.phpmyfaq.de 15 * @since 2005-09-17 17 18namespace phpMyFAQ\Permission; 19 19 20use phpMyFAQ\Configuration; 21use phpMyFAQ\Database;password_compat.php git://github.com/q2a/question2answer.git | PHP | 317 lines
1<?php 2/** 2/** 3 * A Compatibility library with PHP 5.5's simplified password hashing API. 4 * 4 * 5 * @author Anthony Ferrara <ircmaxell@php.net> 6 * @license http://www.opensource.org/licenses/mit-license.html MIT License 13 /** 14 * PHPUnit Process isolation caches constants, but not function declarations. 15 * So we need to check if the constants are defined separately from 57 if ($cost < 4 || $cost > 31) { 58 trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING); 59 return null; 65 $required_salt_len = 22; 66 $hash_format = sprintf("$2y$%02d$", $cost); 67 // The expected length of the final crypt() outputCommand.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 512 lines
1<?php 2 378 $name, 379 $_SERVER['PHP_SELF'].' '.$name 380 ); 415 { 416 return sprintf('%s %s', $this->getFullName(), $this->definition->getSynopsis()); 417 } 490 $commandXML->appendChild($usageXML = $dom->createElement('usage')); 491 $usageXML->appendChild($dom->createTextNode(sprintf($this->getSynopsis(), ''))); 492image.php git://github.com/bcosca/fatfree.git | PHP | 616 lines
1<?php 2 64 if (($len=strlen($hex))>6) 65 user_error(sprintf(self::E_Color,'0x'.$hex),E_USER_ERROR); 66 $color=str_split($hex,$len/3); 403 if ((!$ssl=extension_loaded('openssl')) && ($len<4 || $len>13)) { 404 user_error(sprintf(self::E_Length,$len),E_USER_ERROR); 405 return FALSE; 480 $format=$args?array_shift($args):'png'; 481 if (PHP_SAPI!='cli') { 482 header('Content-Type: image/'.$format);sfMigrator.class.php https://github.com/jcoby/sfPropelMigrationsPlugin.git | PHP | 582 lines
1<?php 2 16 * @author Martin Kreidenweis <sf@kreidenweis.com> 17 * @version SVN: $Id: sfMigrator.class.php 26873 2010-01-19 12:09:31Z Stefan.Koopmanschap $ 18 */ 95 { 96 throw new sfException(sprintf('Migration %d does not exist.', $destVersion)); 97 } 162 $newClass = <<<EOF 163<?php 164 189 // write new migration stub 190 $newFileName = $this->getMigrationsDir().DIRECTORY_SEPARATOR.$newVersion.'_'.$name.'.php'; 191 file_put_contents($newFileName, $newClass); 500 { 501 $migrations = sfFinder::type('file')->name('/^\d{3}.*\.php$/')->maxdepth(0)->in($this->getMigrationsDir()); 502 sort($migrations);sfPropelFormGenerator.class.php http://openirudi.googlecode.com/svn/trunk/ | PHP | 492 lines
99 100 file_put_contents($baseDir.'/base/Base'.$table->getPhpName().'Form.class.php', $this->evalTemplate('sfPropelFormGeneratedTemplate.php')); 101 if (!file_exists($classFile = $baseDir.'/'.$table->getPhpName().'Form.class.php')) 129 { 130 if ($relatedColumn->isForeignKey() && $relatedColumn->isPrimaryKey() && $this->table->getPhpName() != $this->getForeignTable($relatedColumn)->getPhpName()) 131 { 262 { 263 $options[] = sprintf('\'model\' => \'%s\', \'add_empty\' => %s', $this->getForeignTable($column)->getPhpName(), $column->isNotNull() ? 'false' : 'true'); 264 } 344 345 $options[] = sprintf('\'model\' => \'%s\', \'column\' => \'%s\'', $this->getForeignTable($column)->getPhpName(), strtolower($primaryKey->getColumnName())); 346 } 348 { 349 $options[] = sprintf('\'model\' => \'%s\', \'column\' => \'%s\'', $column->getTable()->getPhpName(), strtolower($column->getColumnName())); 350 }KurogoSite.php git://github.com/modolabs/Kurogo-Mobile-Web.git | PHP | 319 lines
1<?php 2 287 public function getURL() { 288 $url = sprintf("http%s://%s%s", $this->getRequiresSecure() ? 's' : '', $this->getHost(), $this->getUrlBase()); 289 return $url;BootstrapHelperTest.php git://github.com/loadsys/twitter-bootstrap-helper.git | PHP | 464 lines
1<?php 2 8if (!defined('FULL_BASE_URL')) { 9 define('FULL_BASE_URL', 'http://cakephp.org'); 10} 389 foreach ($keys as $key) { 390 $expected .= sprintf($tmpl, $key); 391 } 397 foreach ($keys as $key) { 398 $expected .= sprintf($tmpl, $key); 399 }DataBaseAction.class.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 417 lines
1<?php 2// +---------------------------------------------------------------------- 2// +---------------------------------------------------------------------- 3// | ?????????? (Build on ThinkPHP) 4// +---------------------------------------------------------------------- 93 $table_data = '$table_data = '.var_export($table_data, true).";"; 94 $db_table_file = $back_dir."tables.php"; 95 @file_put_contents($db_table_file,"<?php\n$table_data\n?>"); 117 { 118 echoFlush('<script type="text/javascript">showmessage(\''.sprintf(L('DUMP_TIPS2'),$table,U('DataBase/dumptable',array('index'=>$index,'begin'=>$begin))).'\',-1);</script>'); 119 exit; 122 { 123 echoFlush('<script type="text/javascript">showmessage(\''.sprintf(L('DUMP_TIPS3'),$table).'\',1);</script>'); 124 } 134 135 echoFlush('<script type="text/javascript">showmessage(\''.sprintf(L('DUMP_TIPS4'),$table,$begin,$begin + $limit).'\',1);</script>'); 136Svn.php git://github.com/composer/composer.git | PHP | 381 lines
1<?php 2 18/** 19 * @author Till Klampaeckel <till@php.net> 20 * @author Jordi Boggiano <j.boggiano@seld.be> 225 { 226 $cmd = sprintf( 227 '%s %s%s %s', 253 254 return sprintf( 255 ' %s--username %s --password %s ', 332 333 $host = parse_url($this->url, PHP_URL_HOST); 334 if (isset($authConfig[$host])) {transports.c http://php52-backports.googlecode.com/svn/trunk/ | C | 520 lines
270/* Get the next client and their address (as a string) */ 271PHPAPI int php_stream_xport_accept(php_stream *stream, php_stream **client, 272 char **textaddr, int *textaddrlen, 309 310PHPAPI int php_stream_xport_get_name(php_stream *stream, int want_peer, 311 char **textaddr, int *textaddrlen, 340 341PHPAPI int php_stream_xport_crypto_setup(php_stream *stream, php_stream_xport_crypt_method_t crypto_method, php_stream *session_stream TSRMLS_DC) 342{ 361 362PHPAPI int php_stream_xport_crypto_enable(php_stream *stream, int activate TSRMLS_DC) 363{ 383 * peeking, optionally retrieving OOB data */ 384PHPAPI int php_stream_xport_recvfrom(php_stream *stream, char *buf, size_t buflen, 385 long flags, void **addr, socklen_t *addrlen, char **textaddr, int *textaddrlenAbstractSmtpTransport.php git://github.com/snytkine/LampCMS.git | PHP | 559 lines
1<?php 2 321 $this->executeCommand( 322 sprintf("HELO %s\r\n", $this->_domain), array(250) 323 ); 329 $this->executeCommand( 330 sprintf("MAIL FROM: <%s>\r\n", $address), array(250) 331 ); 337 $this->executeCommand( 338 sprintf("RCPT TO: <%s>\r\n", $address), array(250, 251, 252) 339 ); 532 { 533 $this->_domain = sprintf('[%s]', $_SERVER['SERVER_ADDR']); 534 }graph_processor.h git://github.com/chromium/chromium.git | C Header | 231 lines
15 16class GraphProcessor { 17 public: 30 31 static std::map<base::ProcessId, uint64_t> ComputeSharedFootprintFromGraph( 32 const GlobalDumpGraph& global_graph); 34 private: 35 friend class GraphProcessorTest; 36create.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | PHP | 316 lines
17 <form action="<?php bp_group_creation_form_action(); ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data"> 18 <h3><?php _e( 'Create a Group', 'buddypress' ); ?> <a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ); ?>"><?php _e( 'Groups Directory', 'buddypress' ); ?></a></h3> 19 60 <div class="radio"> 61 <label><input type="radio" name="group-status" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 62 <strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong> 69 70 <label><input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 71 <strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong> 122 123 <p><?php printf( __( '<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_core_do_network_admin() ? network_admin_url( 'settings.php?page=bb-forums-setup' ) : admin_url( 'admin.php?page=bb-forums-setup' ) ); ?></p> 124 228 <div class="action"> 229 <a class="remove" href="<?php bp_group_invite_user_remove_invite_url(); ?>" id="<?php bp_group_invite_item_id(); ?>"><?php _e( 'Remove Invite', 'buddypress' ); ?></a> 230 </div>login.php git://git.savannah.nongnu.org/savane-cleanup.git | PHP | 257 lines
1<?php 2# Front page - news, latests projects, etc. 22require_once('../include/init.php'); 23require_once('../include/account.php'); 24require_once('../include/sane.php'); 67 session_cookie('cookie_probe', 1); 68 header('Location: login.php?uri='.$uri.'&cookie_test=1'); 69 } 71 { 72 fb(sprintf(_("Savane thinks your cookies are not activated for %s. To log-in, we need you to activate cookies in your web browser for this website. Please do so and click here:"), $sys_default_domain).' '.$GLOBALS['sys_https_url'].$GLOBALS['sys_home'].'account/login.php?uri='.$uri, 1); 73 } 132 # Go there saying hello to your brother 133 header ("Location: ".$http."://".$GLOBALS['sys_brother_domain'].$GLOBALS['sys_home']."/account/login.php?session_uid=".user_getid()."&session_hash=".$GLOBALS['session_hash']."&cookie_for_a_year=$cookie_for_a_year&from_brother=1&login=1&stay_in_ssl=$stay_in_ssl&brotherhood=1&uri=".urlencode($uri)); 134 exit; 185 print '<p>'._("If you need this email resent, please click below and a confirmation email will be sent to the email address you provided in registration.").'</p>'; 186 print '<p><a href="pending-resend.php?form_user='.htmlspecialchars($form_loginname, ENT_QUOTES).'">['._("Resend Confirmation Email").']</a></p>'; 187sk_basic_plugins.php http://spam-karma.googlecode.com/svn/trunk/ | PHP | 253 lines
1<?php 2/********************************************************************************************** 14************************************************************************************************/ 15?><?php 16// Basic plugins 43 $bonus = 25; 44 $log = sprintf(__("Commenter logged in. ID: %d, Level: %d", 'spam-karma'), $cmt_object->user_id, $cmt_object->user_level); 45 $this->log_msg($log , 2); 75 { 76 $log = sprintf(__ngettext("Comment %s contains %d <em>double</em> entity", "Comment %s contains %d <em>double</em> entities ", $double_entities, 'spam-karma'), $part, $double_entities) . " " . sprintf(__ngettext("and one regular entity coding for a letter (%d total).", " and %d regular entities coding for a letter (%d total).", $letter_entities, 'spam-karma'), $letter_entities, $total); 77 $hit = $double_entities * 5 + $letter_entities *2; 80 { 81 $log = sprintf(__ngettext("Comment %s contains %d entity coding for a letter (%d total).", "Comment one contains %d entities coding for a letter (%d total).", $letter_entities), $part, $letter_entities, $total, 'spam-karma'); 82 $hit = 1+ $letter_entities * 2; 128 $threshold = max($this->get_option_value('too_many_links'), 1); 129 $log = sprintf(__("Comment contains: %d linked URLs and %d unlinked URLs: total link coef: %d", 'spam-karma'), count($cmt_object->content_links), count($cmt_object->content_url_no_links), $url_count); 130logs.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 336 lines
1<?php 2 24$sql = "SELECT SQL_CALC_FOUND_ROWS * FROM `" . $db_config['prefix'] . "_logs` WHERE `id`!=0"; 25$base_url = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op; 26 41 { 42 nv_insert_logs( NV_LANG_DATA, $module_name, sprintf ( $lang_module['filter_check_log'], $op ), $admin_info['username'] . " - " . $admin_info['userid'], 0 ); 43 Header( "Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op ); 143 "url" => $base_url . "&order_" . $key . "=" . $opposite_order[$order[$key]['order']], // 144 "title" => sprintf ( $lang_module['filter_order_by'], $lang_order_2[$key] ) . " " . $lang_order_1[$order[$key]['order']] // 145 ); 278$xtpl->assign( 'URL_DEL', $base_url . "&" . NV_OP_VARIABLE . "=logs_del" ); 279$xtpl->assign( 'URL_CANCEL', NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op ); 280$xtpl->assign( 'DISABLE', $disabled ); 315 $xtpl->assign( 'CLASS', $a % 2 == 1 ? " class=\"second\"" : "" ); 316 $xtpl->assign( 'DEL_URL', NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=log&" . NV_OP_VARIABLE . "=logs_del&id=" . $data_i['id'] ); 317 $xtpl->assign( 'BACK_URL', $base_url );jqplot.donutRenderer.min.js git://github.com/webasyst/webasyst-framework.git | JavaScript | 34 lines
3 * jqPlot is currently available for use in all personal or commercial projects 4 * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL 5 * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can 9 * know of any substantial use of jqPlot. You can reach the author at: 10 * chris at jqplot or see http://www.jqplot.com/info.php . 11 * 14 * 15 * jqPlot includes date instance methods and printf/sprintf functions by other authors: 16 * 23 * 24 * JavaScript printf/sprintf functions contained in jqplot.sprintf.js: 25 * 27 * author Ash Searle 28 * http://hexmen.com/blog/2007/03/printf-sprintf/ 29 * http://hexmen.com/js/sprintf.js 33 */ 34(function(e){e.jqplot.DonutRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.DonutRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.DonutRenderer.prototype.constructor=e.jqplot.DonutRenderer;e.jqplot.DonutRenderer.prototype.init=function(p,t){this.diameter=null;this.innerDiameter=null;this.thickness=null;this.padding=20;this.sliceMargin=0;this.ringMargin=null;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.5;this.dataLabelNudge=0;this.startAngle=0;this.tickRenderer=e.jqplot.DonutTickRenderer;if(p.highlightMouseDown&&p.highlightMouseOver==null){p.highlightMouseOver=false}e.extend(true,this,p);if(this.diameter!=null){this.diameter=this.diameter-this.sliceMargin}this._diameter=null;this._innerDiameter=null;this._radius=null;this._innerRadius=null;this._thickness=null;this._previousSeries=[];this._numberSeries=1;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var r=0;r<this.seriesColors.length;r++){var q=e.jqplot.getColorComponents(this.seriesColors[r]);var n=[q[0],q[1],q[2]];var s=n[0]+n[1]+n[2];for(var o=0;o<3;o++){n[o]=(s>570)?n[o]*0.8:n[o]+0.3*(255-n[o]);n[o]=parseInt(n[o],10)}this.highlightColors.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}}t.postParseOptionsHooks.addOnce(l);t.postInitHooks.addOnce(g);t.eventListenerHooks.addOnce("jqplotMouseMove",b);t.eventListenerHooks.addOnce("jqplotMouseDown",a);t.eventListenerHooks.addOnce("jqplotMouseUp",j);t.eventListenerHooks.addOnce("jqplotClick",f);t.eventListenerHooks.addOnce("jqplotRightClick",m);t.postDrawHooks.addOnce(h)};e.jqplot.DonutRenderer.prototype.setGridData=function(s){var o=[];var t=[];var n=this.startAngle/180*Math.PI;var r=0;for(var q=0;q<this.data.length;q++){o.push(this.data[q][1]);t.push([this.data[q][0]]);if(q>0){o[q]+=o[q-1]}r+=this.data[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q<o.length;q++){t[q][1]=o[q]*p;t[q][2]=this.data[q][1]/r}this.gridData=t};e.jqplot.DonutRenderer.prototype.makeGridData=function(s,t){var o=[];var u=[];var r=0;var n=this.startAngle/180*Math.PI;for(var q=0;q<s.length;q++){o.push(s[q][1]);u.push([s[q][0]]);if(q>0){o[q]+=o[q-1]}r+=s[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q<o.length;q++){u[q][1]=o[q]*p;u[q][2]=s[q][1]/r}return u};e.jqplot.DonutRenderer.prototype.drawSlice=function(x,u,t,p,s){var n=this._diameter/2;var v=n-this._thickness;var w=this.fill;x.save();x.translate(this._center[0],this._center[1]);if(s){for(var q=0;q<this.shadowDepth;q++){x.save();x.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));o()}}else{o()}function o(){if(t>6.282+this.startAngle){t=6.282+this.startAngle;if(u>t){u=6.281+this.startAngle}}if(u>=t){return}x.beginPath();x.fillStyle=p;x.strokeStyle=p;x.arc(0,0,n,u,t,false);x.lineTo(v*Math.cos(t),v*Math.sin(t));x.arc(0,0,v,t,u,true);x.closePath();if(w){x.fill()}else{x.stroke()}}if(s){for(var q=0;q<this.shadowDepth;q++){x.restore()}}x.restore()};e.jqplot.DonutRenderer.prototype.draw=function(N,V,t,P){var Q;var J=(t!=undefined)?t:{};var q=0;var p=0;var u=1;if(t.legendInfo&&t.legendInfo.placement=="insideGrid"){var I=t.legendInfo;switch(I.location){case"nw":q=I.width+I.xoffset;break;case"w":q=I.width+I.xoffset;break;case"sw":q=I.width+I.xoffset;break;case"ne":q=I.width+I.xoffset;u=-1;break;case"e":q=I.width+I.xoffset;u=-1;break;case"se":q=I.width+I.xoffset;u=-1;break;case"n":p=I.height+I.yoffset;break;case"s":p=I.height+I.yoffset;u=-1;break;default:break}}var B=(J.shadow!=undefined)?J.shadow:this.shadow;var W=(J.showLine!=undefined)?J.showLine:this.showLine;var O=(J.fill!=undefined)?J.fill:this.fill;var s=N.canvas.width;var H=N.canvas.height;var G=s-q-2*this.padding;var R=H-p-2*this.padding;var v=Math.min(G,R);var T=v;var X=(this.ringMargin==null)?this.sliceMargin*2:this.ringMargin;for(var Q=0;Q<this._previousSeries.length;Q++){T-=2*this._previousSeries[Q]._thickness+2*X}this._diameter=this.diameter||T;if(this.innerDiameter!=null){var M=(this._numberSeries>1&&this.index>0)?this._previousSeries[0]._diameter:this._diameter;this._thickness=this.thickness||(M-this.innerDiameter-2*X*this._numberSeries)/this._numberSeries/2}else{this._thickness=this.thickness||v/2/(this._numberSeries+1)*0.85}var K=this._radius=this._diameter/2;this._innerRadius=this._radius-this._thickness;var o=this.startAngle/180*Math.PI;this._center=[(s-u*q)/2+u*q,(H-u*p)/2+u*p];if(this.shadow){var L="rgba(0,0,0,"+this.shadowAlpha+")";for(var Q=0;Q<V.length;Q++){var A=(Q==0)?o:V[Q-1][1]+o;A+=this.sliceMargin/180*Math.PI;this.renderer.drawSlice.call(this,N,A,V[Q][1]+o,L,true)}}for(var Q=0;Q<V.length;Q++){var A=(Q==0)?o:V[Q-1][1]+o;A+=this.sliceMargin/180*Math.PI;var z=V[Q][1]+o;this._sliceAngles.push([A,z]);this.renderer.drawSlice.call(this,N,A,z,this.seriesColors[Q],false);if(this.showDataLabels&&V[Q][2]*100>=this.dataLabelThreshold){var S,U=(A+z)/2,C;if(this.dataLabels=="label"){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,V[Q][0])}else{if(this.dataLabels=="value"){S=this.dataLabelFormatString||"%d";C=e.jqplot.sprintf(S,V[Q][1])}else{if(this.dataLabels=="percent"){S=this.dataLabelFormatString||"%d%%";C=e.jqplot.sprintf(S,V[Q][2]*100)}else{if(this.dataLabels.constructor==Array){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,this.dataLabels[Q])}}}}var n=this._innerRadius+this._thickness*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var F=this._center[0]+Math.cos(U)*n+this.canvas._offsets.left;var E=this._center[1]+Math.sin(U)*n+this.canvas._offsets.top;var D=e('<span class="jqplot-donut-series jqplot-data-label" style="position:absolute;">'+C+"</span>").insertBefore(P.eventCanvas._elem);F-=D.width()/2;E-=D.height()/2;F=Math.round(F);E=Math.round(E);D.css({left:F,top:E})}}};e.jqplot.DonutAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.DonutAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.DonutAxisRenderer.prototype.constructor=e.jqplot.DonutAxisRenderer;e.jqplot.DonutAxisRenderer.prototype.init=function(n){this.tickRenderer=e.jqplot.DonutTickRenderer;e.extend(true,this,n);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.DonutLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.DonutLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.DonutLegendRenderer.prototype.constructor=e.jqplot.DonutLegendRenderer;e.jqplot.DonutLegendRenderer.prototype.init=function(n){this.numberRows=null;this.numberColumns=null;e.extend(true,this,n)};e.jqplot.DonutLegendRenderer.prototype.draw=function(){var q=this;if(this.show){var y=this._series;var B="position:absolute;";B+=(this.background)?"background:"+this.background+";":"";B+=(this.border)?"border:"+this.border+";":"";B+=(this.fontSize)?"font-size:"+this.fontSize+";":"";B+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";B+=(this.textColor)?"color:"+this.textColor+";":"";B+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";B+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";B+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";B+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=e('<table class="jqplot-table-legend" style="'+B+'"></table>');var F=false,x=false,n,v;var z=y[0];var o=new e.jqplot.ColorGenerator(z.seriesColors);if(z.show){var G=z.data;if(this.numberRows){n=this.numberRows;if(!this.numberColumns){v=Math.ceil(G.length/n)}else{v=this.numberColumns}}else{if(this.numberColumns){v=this.numberColumns;n=Math.ceil(G.length/this.numberColumns)}else{n=G.length;v=1}}var E,D,p,t,r,u,w,C;var A=0;for(E=0;E<n;E++){if(x){p=e('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem)}else{p=e('<tr class="jqplot-table-legend"></tr>').appendTo(this._elem)}for(D=0;D<v;D++){if(A<G.length){u=this.labels[A]||G[A][0].toString();C=o.next();if(!x){if(E>0){F=true}else{F=false}}else{if(E==n-1){F=false}else{F=true}}w=(F)?this.rowSpacing:"0";t=e('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+w+';"><div><div class="jqplot-table-legend-swatch" style="border-color:'+C+';"></div></div></td>');r=e('<td class="jqplot-table-legend" style="padding-top:'+w+';"></td>');if(this.escapeHtml){r.text(u)}else{r.html(u)}if(x){r.prependTo(p);t.prependTo(p)}else{t.appendTo(p);r.appendTo(p)}F=true}A++}}}}return this._elem};function c(r,q,o){o=o||{};o.axesDefaults=o.axesDefaults||{};o.legend=o.legend||{};o.seriesDefaults=o.seriesDefaults||{};var n=false;if(o.seriesDefaults.renderer==e.jqplot.DonutRenderer){n=true}else{if(o.series){for(var p=0;p<o.series.length;p++){if(o.series[p].renderer==e.jqplot.DonutRenderer){n=true}}}}if(n){o.axesDefaults.renderer=e.jqplot.DonutAxisRenderer;o.legend.renderer=e.jqplot.DonutLegendRenderer;o.legend.preDraw=true;o.seriesDefaults.pointLabels={show:false}}}function g(r,q,o){for(var p=1;p<this.series.length;p++){if(!this.series[p]._previousSeries.length){for(var n=0;n<p;n++){if(this.series[p].renderer.constructor==e.jqplot.DonutRenderer&&this.series[n].renderer.constructor==e.jqplot.DonutRenderer){this.series[p]._previousSeries.push(this.series[n])}}}}for(p=0;p<this.series.length;p++){if(this.series[p].renderer.constructor==e.jqplot.DonutRenderer){this.series[p]._numberSeries=this.series.length;if(this.series[p].highlightMouseOver){this.series[p].highlightMouseDown=false}}}this.target.bind("mouseout",{plot:this},function(s){i(s.data.plot)})}var k=false;function l(n){for(var o=0;o<this.series.length;o++){this.series[o].seriesColors=this.seriesColors;this.series[o].colorGenerator=this.colorGenerator}}function d(r,q,p){var o=r.series[q];var n=r.plugins.donutRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);o._highlightedPoint=p;r.plugins.donutRenderer.highlightedSeriesIndex=q;o.renderer.drawSlice.call(o,n._ctx,o._sliceAngles[p][0],o._sliceAngles[p][1],o.highlightColors[p],false)}function i(p){var n=p.plugins.donutRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);for(var o=0;o<p.series.length;o++){p.series[o]._highlightedPoint=null}p.plugins.donutRenderer.highlightedSeriesIndex=null;p.target.trigger("jqplotDataUnhighlight")}function b(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataMouseOver");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);if(s.series[p[0]].highlightMouseOver&&!(p[0]==s.plugins.donutRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.pageX=r.pageX;n.pageY=r.pageY;s.target.trigger(n,p);d(s,p[0],p[1])}}else{if(t==null){i(s)}}}function a(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];if(r.series[o[0]].highlightMouseDown&&!(o[0]==r.plugins.donutRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o);d(r,o[0],o[1])}}else{if(s==null){i(r)}}}function j(p,o,s,r,q){var n=q.plugins.donutRenderer.highlightedSeriesIndex;if(n!=null&&q.series[n].highlightMouseDown){i(q)}}function f(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var n=jQuery.Event("jqplotDataClick");n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o)}}function m(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var n=s.plugins.donutRenderer.highlightedSeriesIndex;if(n!=null&&s.series[n].highlightMouseDown){i(s)}var o=jQuery.Event("jqplotDataRightClick");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}function h(){this.plugins.donutRenderer={highlightedSeriesIndex:null};this.plugins.donutRenderer.highlightCanvas=new e.jqplot.GenericCanvas();var o=e(this.targetId+" .jqplot-data-label");if(o.length){e(o[0]).before(this.plugins.donutRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-donutRenderer-highlight-canvas",this._plotDimensions))}else{this.eventCanvas._elem.before(this.plugins.donutRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-donutRenderer-highlight-canvas",this._plotDimensions))}var n=this.plugins.donutRenderer.highlightCanvas.setContext()}e.jqplot.preInitHooks.push(c);e.jqplot.DonutTickRenderer=function(){e.jqplot.AxisTickRenderer.call(this)};e.jqplot.DonutTickRenderer.prototype=new e.jqplot.AxisTickRenderer();e.jqplot.DonutTickRenderer.prototype.constructor=e.jqplot.DonutTickRenderer})(jQuery);Template.php git://github.com/jeromeschneider/Baikal.git | PHP | 451 lines
1<?php 2 112 } else { 113 throw new Twig_Error_Runtime(sprintf('The template has no parent and no traits defining the "%s" block', $name), -1, $this->getTemplateName()); 114 } 268 } catch (Exception $e) { 269 throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, null, $e); 270 } 288 * implementation detail that has been introduced to optimize variable 289 * access for versions of PHP before 5.4. This is not a way to override 290 * the way to get a variable value. 306 307 throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item)); 308 } 352 if (is_object($object)) { 353 throw new Twig_Error_Runtime(sprintf('Key "%s" in object (with ArrayAccess) of type "%s" does not exist', $item, get_class($object))); 354 } elseif (is_array($object)) {usercp_viewprofile.php http://torrentpier2.googlecode.com/svn/trunk/ | PHP | 241 lines
49{ 50 $email_uri = ($bb_cfg['board_email_form']) ? 'profile.php?mode=email&'. POST_USERS_URL .'='. $profiledata['user_id'] : 'mailto:'. $profiledata['user_email']; 51 $email = '<a class="editable" href="'. $email_uri .'">'. $profiledata['user_email'] .'</a>'; 61// 62include(INC_DIR ."functions_report.php"); 63$report_user = report_modules('name', 'report_user'); 68 $template->assign_vars(array( 69 'U_REPORT_USER' => 'report.php?mode='. $report_user->mode .'&id='. $profiledata['user_id'], 70 'L_REPORT_USER' => $report_user->lang['WRITE_REPORT']) 126 127 'L_VIEWING_PROFILE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']), 128 142 'TRAF_STATS' => !(IS_AM || $profile_user_id), 143 'U_MANAGE' => (IS_ADMIN) ? "profile.php?mode=editprofile&u={$profiledata['user_id']}" : 'profile.php?mode=editprofile', 144));Language.php git://github.com/thorsten/phpMyFAQ.git | PHP | 377 lines
1<?php 2/** 4 * 5 * PHP Version 5.3 6 * 10 * 11 * @category phpMyFAQ 12 * @package Language 12 * @package Language 13 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 14 * @author Matteo scaramuccia <matteo@phpmyfaq.de> 15 * @author Aurimas Fišeras <aurimas@gmail.com> 16 * @copyright 2009-2012 phpMyFAQ Team 17 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 17 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 18 * @link http://www.phpmyfaq.de 19 * @since 2009-05-14Communicator.php https://code.google.com/p/celebrio/ | PHP | 371 lines
1<?php 2 149 * 150 * @param string|NULL|array $command The command to send (can use printf 151 * style). If NULL, no command is sent 157 * of them are sent. 158 * @param mixed $args,... Optional printf-like arguments 159 * 162 * @throws InvalidStateException If the communicator is not connected 163 * @throws InvalidArgumentException If printf-like arguments are used for 164 * non-textual command (ie. array command) 178 throw new \InvalidArgumentException( 179 'Cannot use printf-like arguments to a command which' . 180 ' is not a string!'); 182 $args = func_get_args(); array_shift($args); 183 $command = vsprintf($command, $args); 184 }theme-editor.php https://bitbucket.org/ag_codeduck/site-erb-facis.git | PHP | 342 lines
93if ( isset( $allowed_files['functions.php'] ) ) { 94 $allowed_files = array( 'functions.php' => $allowed_files['functions.php'] ) + $allowed_files; 95} 269 <?php echo $docs_select; ?> 270 <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_user_locale() ) ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&redirect=true'); }" /> 271 </div> 278 <p> 279 <?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?> 280 <?php _e( 'This is a file in your current parent theme.' ); ?> 305 $referer = wp_get_referer(); 306 $excluded_referer_basenames = array( 'theme-editor.php', 'wp-login.php' ); 307 332 <p> 333 <a class="button file-editor-warning-go-back" href="<?php echo esc_url( $return_url ); ?>"><?php _e( 'Go back' ); ?></a> 334 <button type="button" class="file-editor-warning-dismiss button button-primary"><?php _e( 'I understand' ); ?></button>TranslationDebugCommand.php git://github.com/fabpot/symfony.git | PHP | 355 lines
1<?php 2 93 94 <info>php %command.full_name% en AcmeDemoBundle</info> 95 97 98 <info>php %command.full_name% --domain=messages en AcmeDemoBundle</info> 99 101 102 <info>php %command.full_name% --only-missing en AcmeDemoBundle</info> 103 105 106 <info>php %command.full_name% --only-unused en AcmeDemoBundle</info> 107 109 110 <info>php %command.full_name% en</info> 111Mysqli.php git://github.com/thorsten/phpMyFAQ.git | PHP | 401 lines
1<?php 2 3/** 4 * The phpMyFAQ\Database\Mysqli class provides methods and functions for MySQL and 5 * MariaDB databases. 10 * 11 * @package phpMyFAQ 12 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 13 * @author David Soria Parra <dsoria@gmx.net> 14 * @copyright 2005-2021 phpMyFAQ Team 15 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 15 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 16 * @link https://www.phpmyfaq.de 17 */ 18 19namespace phpMyFAQ\Database; 20OpenCage.php git://github.com/willdurand/Geocoder.git | PHP | 293 lines
1<?php 2 69 70 $url = sprintf(self::GEOCODE_ENDPOINT_URL, $this->apiKey, urlencode($address), $query->getLimit()); 71 if (null !== $countryCode = $query->getData('countrycode')) { 71 if (null !== $countryCode = $query->getData('countrycode')) { 72 $url = sprintf('%s&countrycode=%s', $url, $countryCode); 73 } 74 if (null !== $bounds = $query->getBounds()) { 75 $url = sprintf('%s&bounds=%s,%s,%s,%s', $url, $bounds->getWest(), $bounds->getSouth(), $bounds->getEast(), $bounds->getNorth()); 76 } 77 if (null !== $proximity = $query->getData('proximity')) { 78 $url = sprintf('%s&proximity=%s', $url, $proximity); 79 } 89 $coordinates = $query->getCoordinates(); 90 $address = sprintf('%f, %f', $coordinates->getLatitude(), $coordinates->getLongitude()); 91class-forms-edit-email.php https://bitbucket.org/daniellbraun/wildernessatthesmokies.git | PHP | 355 lines
1<?php 2/** 85 <input name="_vfbp_action" type="hidden" value="save-email-settings" /> 86 <input name="_vfbp_form_id" type="hidden" value="<?php echo $this->id; ?>" /> 87 <?php 166 <td> 167 <input type="email" value="<?php esc_html_e( $from_email ); ?>" placeholder=""<?php echo $readonly; ?> class="regular-text required" id="from-email" name="settings[from-email]" maxlength="255" /> 168 <?php _e( 'or', 'vfb-pro' ); ?> 184 </select> 185 <p class="description"><?php printf( __( 'This option sets the "From" email and can only be customized if <a href="%s">SMTP settings</a> have been configured.', 'vfb-pro' ), esc_url( admin_url( 'admin.php?page=vfbp-settings' ) ) ); ?></p> 186 </td> 214 <input type="hidden" name="settings[send-attachments]" value="0" /> <!-- This sends an unchecked value to the meta table --> 215 <input type="checkbox" name="settings[send-attachments]" id="send-attachments" value="1"<?php checked( $send_attachments, 1 ); ?> /> <?php _e( "If File Uploads are present, include the uploaded files with the email.", 'vfb-pro' ); ?> 216 </label> 322 <input type="hidden" name="settings[notify-entry-copy]" value="0" /> <!-- This sends an unchecked value to the meta table --> 323 <input type="checkbox" name="settings[notify-entry-copy]" id="notify-entry-copy" value="1"<?php checked( $notify_entry_copy, 1 ); ?> /> <?php _e( "Include a Copy of the User's Entry", 'vfb-pro' ); ?> 324 </label>weight_class.php http://coderstalk.googlecode.com/svn/trunk/ | PHP | 412 lines
1<?php 2class ControllerLocalisationWeightClass extends Controller { 400 if ($product_total) { 401 $this->error['warning'] = sprintf($this->language->get('error_product'), $product_total); 402 }webcam.c git://pkgs.fedoraproject.org/gyachi | C | 369 lines
24 * (Phrozensmoke ['at'] yahoo.com) 25 * http://phpaint.sourceforge.net/pyvoicechat/ 26 * 97 if (!frmsg) {return strdup("");} 98 sprintf( frmsg, "%s", ""); 99 this_friend = friend_list; 169 wmsg = malloc(strlen(msg) + strlen(launcher) + 4); 170 sprintf(wmsg, "%s:\n\n%s", msg, launcher); 171 show_ok_dialog(wmsg); 256 wmsg = malloc(strlen(msg) + strlen(launcher) + 4); 257 sprintf(wmsg, "%s:\n\n%s", msg, launcher); 258 show_ok_dialog(wmsg); 332 333 snprintf(buff, 254, _("The yahoo user <b>%s</b> has invited you to view their webcam. Do you want to accept?"), who); 334database.php git://git.savannah.nongnu.org/savane-cleanup.git | PHP | 389 lines
1<?php 2# Database access wrappers, with quoting/escaping 31 32 // Test the presence of php-mysql - you get a puzzling blank page 33 // when it's not installed 36 <ul> 37 <li>Debian-based: <code>aptitude install php4-mysql</code> 38 or <code>aptitude install php5-mysql</code></li> 38 or <code>aptitude install php5-mysql</code></li> 39 <li>Fedora Core: <code>yum install php-mysql</code></li> 40 </ul>"; 41 echo "Check the <a href='{$GLOBALS['sys_url_topdir']}/testconfig.php'>configuration 42 page</a> and the <a href='http://php.net/mysql'>PHP website</a> for 43 more information.<br />"; 55 56 if (version_compare(PHP_VERSION, '5.2.3', '>=')) 57 {function_vpn_ssl.php http://windowsfw.googlecode.com/svn/trunk/ | PHP | 343 lines
1<?php 2include_once "function_base_xml_class.php"; 144 $command_b = "/bin/cat /ldisk/vpn/ssl/keys/". $name. 145 ".crt | /bin/grep \"Not Before\" | /bin/awk -FBefore: '{printf $2}' "; 146 //print $command_b; 149 $command_a = "/bin/cat /ldisk/vpn/ssl/keys/". $name. 150 ".crt | /bin/grep \"Not After\" | /bin/awk -F\"After :\" '{printf $2}' "; 151 //print $command_a;admin_ranks.php https://github.com/openaustralia/publicwhip-matthew.git | PHP | 349 lines
8 * 9 * $Id: admin_ranks.php,v 1.2 2007/05/20 07:21:34 frabcus Exp $ 10 * 43{ 44 redirect('admin/' . append_sid("admin_ranks.$phpEx", true)); 45} 136 137 "S_RANK_ACTION" => append_sid("admin_ranks.$phpEx"), 138 "S_HIDDEN_FIELDS" => $s_hidden_fields) 207 208 $message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); 209 248 249 $message = $lang['Rank_removed'] . "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); 250myocamlbuild.ml git://github.com/mirage/dyntype.git | OCaml | 492 lines
102 failwith 103 (Printf.sprintf 104 (f_ "No result for the choice list '%s': %s") 107 failwith 108 (Printf.sprintf 109 (f_ "No result for a choice list: %s") 164 failwith 165 (Printf.sprintf 166 "Malformed data file '%s' line %d" 181 failwith 182 (Printf.sprintf 183 "Unable to load environment, the file '%s' doesn't exist." 198 failwith 199 (Printf.sprintf 200 "No variable %s defined when trying to expand %S."FormValidator.php git://github.com/symfony/symfony.git | PHP | 251 lines
1<?php 2 88 $this->resolvedGroups[$field] = (array) $group; 89 $validator->atPath(sprintf($fieldPropertyPath, $field->getPropertyPath()))->validate($field, $formConstraint); 90 }APIModule.php git://github.com/modolabs/Kurogo-Mobile-Web.git | PHP | 435 lines
1<?php 2 140 141 $redirect= sprintf("https://%s%s%s", $secure_host, $secure_port == 443 ? '': ":$secure_port", $_SERVER['REQUEST_URI']); 142 Kurogo::log(LOG_DEBUG, "Redirecting to secure url $redirect",'module'); 155 156 $redirect= sprintf("http://%s%s%s", $host, $port == 80 ? '': ":$port", $_SERVER['REQUEST_URI']); 157 Kurogo::log(LOG_DEBUG, "Redirecting to non-secure url $redirect",'module');gen_interface.go https://github.com/android/platform_external_skia.git | Go | 460 lines
40// OpenGL is typically abbreviated as just "GL". 41// https://www.khronos.org/registry/OpenGL/index_gl.php 42// https://www.khronos.org/opengles/ 167 } 168 line := fmt.Sprintf(`functions->%s =(%s*)get(ctx, "%s");`, hcf.PtrName, hcf.CastName, hcf.GetName) 169 block = addLine(block, line) 214 if req.Extension == CORE_FEATURE || suffix == "" { 215 block = addLine(block, fmt.Sprintf("GET_PROC(%s);", function)) 216 } else if req.Extension != "" { 216 } else if req.Extension != "" { 217 block = addLine(block, fmt.Sprintf("GET_PROC_SUFFIX(%s, %s);", function, suffix)) 218 } 232 if req.Extension == CORE_FEATURE && mv != nil { 233 return fmt.Sprintf("(glVer >= GR_GL_VER(%d,%d))", mv[0], mv[1]) 234 }AbstractDescriptorTest.php git://github.com/fabpot/symfony.git | PHP | 324 lines
1<?php 2 13 14use PHPUnit\Framework\TestCase; 15use Symfony\Component\Console\Input\ArrayInput; 246 } else { 247 $this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $output->fetch()))); 248 } 254 foreach ($objects as $name => $object) { 255 $file = sprintf('%s.%s', trim($name, '.'), $this->getFormat()); 256 $description = file_get_contents(__DIR__.'/../../Fixtures/Descriptor/'.$file); 275 foreach ($variations as $suffix => $options) { 276 $file = sprintf('%s_%s.%s', trim($name, '.'), $suffix, $this->getFormat()); 277 $description = file_get_contents(__DIR__.'/../../Fixtures/Descriptor/'.$file); 294 foreach ($variations as $suffix => $options) { 295 $file = sprintf('%s_%s.%s', trim($name, '.'), $suffix, $this->getFormat()); 296 $description = file_get_contents(__DIR__.'/../../Fixtures/Descriptor/'.$file);Analysis.php http://phpmemcacheadmin.googlecode.com/svn/trunk/ | PHP | 355 lines
1<?php 2/** 106 # Command set() 107 $stats['set_rate'] = ($stats['cmd_set'] == 0) ? '0.0' : sprintf('%.1f', $stats['cmd_set'] / $stats['uptime'], 1); 108 109 # Command get() 110 $stats['get_hits_percent'] = ($stats['cmd_get'] == 0) ? ' - ' : sprintf('%.1f', $stats['get_hits'] / $stats['cmd_get'] * 100, 1); 111 $stats['get_misses_percent'] = ($stats['cmd_get'] == 0) ? ' - ' : sprintf('%.1f', $stats['get_misses'] / $stats['cmd_get'] * 100, 1); 111 $stats['get_misses_percent'] = ($stats['cmd_get'] == 0) ? ' - ' : sprintf('%.1f', $stats['get_misses'] / $stats['cmd_get'] * 100, 1); 112 $stats['get_rate'] = ($stats['cmd_get'] == 0) ? '0.0' : sprintf('%.1f', $stats['cmd_get'] / $stats['uptime'], 1); 113 117 $stats['cmd_delete'] = $stats['delete_hits'] + $stats['delete_misses']; 118 $stats['delete_hits_percent'] = ($stats['cmd_delete'] == 0) ? ' - ' : sprintf('%.1f', $stats['delete_hits'] / $stats['cmd_delete'] * 100, 1); 119 $stats['delete_misses_percent'] = ($stats['cmd_delete'] == 0) ? ' - ' : sprintf('%.1f', $stats['delete_misses'] / $stats['cmd_delete'] * 100, 1); 126 } 127 $stats['delete_rate'] = ($stats['cmd_delete'] == 0) ? '0.0' : sprintf('%.1f', $stats['cmd_delete'] / $stats['uptime'], 1); 128comment.php http://lazycms.googlecode.com/svn/trunk/ | PHP | 358 lines
1<?php 2/** 39 'url' => $url, 40 'ip' => sprintf('%u',ip2long(get_ip())), 41 'agent' => esc_html($_SERVER['HTTP_USER_AGENT']), 77function comment_get_postid($cmtid) { 78 return get_conn()->result(sprintf("SELECT `postid` FROM `#@_comment` WHERE `cmtid`=%d;", $cmtid)); 79} 157 if ($postid) { 158 $where.= sprintf(" AND `postid`='%d'", $postid); 159 } 160 if ($status != 'all') { 161 $where.= sprintf(" AND `approved`='%s'", strval($status)); 162 } 171function comment_people($postid) { 172 return get_conn()->result(sprintf("SELECT COUNT(DISTINCT(`author`)) FROM `#@_comment` WHERE `postid`=%d;", $postid)); 173}ThemeManager.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 307 lines
1<?php 2 4 5namespace PhpMyAdmin; 6 14use function readdir; 15use function sprintf; 16use function trigger_error; 22/** 23 * phpMyAdmin theme manager 24 */ 85 trigger_error( 86 sprintf( 87 __('Default theme %s not found!'), 219 // force a change of a dummy session variable to avoid problems 220 // with the caching of phpmyadmin.css.php 221 $GLOBALS['config']->set('theme-update', $themeId);sprintf.js git://github.com/phpmyadmin/phpmyadmin.git | JavaScript | 217 lines
23function sprintf () { 24 // discuss at: https://locutus.io/php/sprintf/ 25 // original by: Ash Searle (https://hexmen.com/blog/) 35 // improved by: Rafał Kukawski (https://kukawski.pl) 36 // example 1: sprintf("%01.2f", 123.1) 37 // returns 1: '123.10' 37 // returns 1: '123.10' 38 // example 2: sprintf("[%10s]", 'monkey') 39 // returns 2: '[ monkey]' 39 // returns 2: '[ monkey]' 40 // example 3: sprintf("[%'#10s]", 'monkey') 41 // returns 3: '[####monkey]' 41 // returns 3: '[####monkey]' 42 // example 4: sprintf("%d", 123456789012345) 43 // returns 4: '123456789012345'File.php git://github.com/tcm-project/tangocms.git | PHP | 307 lines
1<?php 2 38 'cant_write' => 'failed to write file "%s" to disk', 39 'extension' => 'PHP extension blocked file upload for "%s"', 40 'mime' => 'requested file "%s" has invalid mime of "%s"', 94 * thrown in this method to indicate the errors that could occur 95 * (such as the main PHP error codes). 96 * 110 case UPLOAD_ERR_PARTIAL: 111 throw new Uploader_PartialUpload( sprintf( $this->errorMsg['partial'], $this->name ) ); 112 116 case UPLOAD_ERR_NO_TMP_DIR: 117 throw new Uploader_NoTmpDir( sprintf( $this->errorMsg['no_tmp_dir'], $this->name ) ); 118 119 case UPLOAD_ERR_CANT_WRITE: 120 throw new Uploader_NoWrite( sprintf( $this->errorMsg['cant_write'], $this->name ) ); 121Pagination.php git://github.com/thorsten/phpMyFAQ.git | PHP | 378 lines
1<?php 2/** 4 * 5 * PHP Version 5.3 6 * 10 * 11 * @category phpMyFAQ 12 * @package PMF_Pagination 12 * @package PMF_Pagination 13 * @author Anatoliy Belsky <ab@php.net> 14 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 14 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 15 * @copyright 2009-2012 phpMyFAQ Team 16 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 16 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 17 * @link http://www.phpmyfaq.de 18 * @since 2009-09-27TraitUsageGenerator.php git://github.com/zendframework/zf2.git | PHP | 354 lines
1<?php 2/** 318 if ($this->classGenerator->hasMethod($alias['alias'])) { 319 throw new Exception\RuntimeException(sprintf( 320 'Generation Error: Aliased method %s already exists on this class',class.DBInstance.php http://scalr.googlecode.com/svn/ | PHP | 370 lines
1<?php 2 99 if (!$instance_info) 100 throw new Exception(sprintf(_("Instance ID#%s not found in database"), $id)); 101 124 if (!$id) 125 throw new Exception(sprintf(_("Instance Amazon ID#%s not found in database"), $iid)); 126 134 if (!$instance_info) 135 throw new Exception(sprintf(_("Cannot reload DBInstance object. Instance ID#%s not found in database"), $this->ID)); 136 248 if (!self::$FieldPropertyMap[$prop]) 249 throw new Exception(sprintf(_("Invalid property name: %s"), $prop)); 250 301 </access> 302 <callback-service-url>".CONFIG::$HTTP_PROTO."://".CONFIG::$EVENTHANDLER_URL."/cb_service.php</callback-service-url> 303 </scalr>XmlUtils.php git://github.com/spotweb/spotweb.git | PHP | 269 lines
1<?php 2 126 if ('' === trim($content)) { 127 throw new \InvalidArgumentException(sprintf('File %s does not contain valid XML, it is empty.', $file)); 128 } 132 } catch (InvalidXmlException $e) { 133 throw new XmlParsingException(sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious()); 134 } 137 /** 138 * Converts a \DOMElement object to a PHP array. 139 * 165 } 166 $config[$name] = static::phpize($node->value); 167 $empty = false; 196 if (false !== $nodeValue) { 197 $value = static::phpize($nodeValue); 198 if (\count($config)) {cache.php http://skygames.googlecode.com/svn/trunk/ | PHP | 520 lines
3/** 4 * Caching for CakePHP. 5 * 6 * 7 * PHP versions 4 and 5 8 * 8 * 9 * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) 10 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) 16 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) 17 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project 18 * @package cake 19 * @subpackage cake.cake.libs 20 * @since CakePHP(tm) v 1.2.0.4933 21 * @version $Revision: 7847 $report_template.php http://gevion.googlecode.com/svn/trunk/ | PHP | 279 lines
1<?php 2 /* $Id: report_template.php,v 1.14 2010/01/16 14:39:06 devincen Exp $ 25 26require('../../library/tcpdf/tcpdf.php'); 27 34 $this->intesta1 = $admin_aziend['ragso1'].' '.$admin_aziend['ragso2']; 35 $this->intesta2 = $admin_aziend['indspe'].' '.sprintf("%05d",$admin_aziend['capspe']).' '.$admin_aziend['citspe'].' ('.$admin_aziend['prospe'].')'; 36 $this->intesta3 = 'Tel.'.$admin_aziend['telefo'].' C.F.:'.$admin_aziend['codfis'].' P.I.:'.$admin_aziend['pariva'];TableListFieldTest.php git://github.com/silverstripe/sapphire.git | PHP | 374 lines
1<?php 2 207 208 // fgetcsv doesn't handle escaped quotes in the string in PHP 5.2, so we're asserting the 209 // raw string instead. 234 $table->Link('test'), 235 sprintf('TableListFieldTest_TestController/TestForm/field/Tester/test?SecurityID=%s', $form->Fields()->dataFieldByName('SecurityID')->Value()) 236 );ConfigImporter.php https://bitbucket.org/aswinvk28/smartpan-stock-drupal.git | PHP | 326 lines
1<?php 2 204 // Another process is synchronizing configuration. 205 throw new ConfigImporterException(sprintf('%s is already importing', static::ID)); 206 }API.php https://code.google.com/p/molinos-cms/ | PHP | 383 lines
1<?php 2/** 114 if (isset($meta['content-length']) and $meta['content-length'] != $result['size']) 115 throw new RuntimeException(sprintf('Incomplete file received (%u bytes instead of %u).', $result['size'], $meta['content-length'])); 116 317 'method' => 'POST', 318 'header' => 'Content-Type: application/x-www-form-urlencoded' . PHP_EOL, 319 'content' => Molinos_Core_API::getInstance('http')->build_query($data), 348 else 349 $result['Content-Disposition'] = sprintf('attachment; filename="%s"', urlencode(basename($fileName))); 350 $result['Expires'] = gmdate("D, d M Y H:i:s", time() + $cacheLifeTime) . 'GMT';register.php git://git.savannah.nongnu.org/savane-cleanup.git | PHP | 370 lines
1<?php 2# Register an account, part 1 (part 2 is e-mail confirmation) 22 23require_once('../include/init.php'); 24require_once('../include/sane.php'); 24require_once('../include/sane.php'); 25require_once('../include/account.php'); 26require_once('../include/dnsbl.php'); 26require_once('../include/dnsbl.php'); 27require_once('../include/spam.php'); 28require_once('../include/form.php'); 28require_once('../include/form.php'); 29require_once('../include/utils.php'); 30require_once('../include/html.php'); 30require_once('../include/html.php'); 31require_once('../include/sendmail.php'); 32MySQL.php https://github.com/gabordemooij/redbean.git | PHP | 460 lines
1<?php 2 2 3namespace RedBeanPHP\QueryWriter; 4 5use RedBeanPHP\QueryWriter\AQueryWriter as AQueryWriter; 6use RedBeanPHP\QueryWriter as QueryWriter; 7use RedBeanPHP\Adapter\DBAdapter as DBAdapter; 7use RedBeanPHP\Adapter\DBAdapter as DBAdapter; 8use RedBeanPHP\Adapter as Adapter; 9use RedBeanPHP\RedException\SQL as SQLException; 12 * RedBeanPHP MySQLWriter. 13 * This is a QueryWriter class for RedBeanPHP. 14 * This QueryWriter provides support for the MySQL/MariaDB database platform. 15 * 16 * @file RedBeanPHP/QueryWriter/MySQL.php 17 * @author Gabor de Mooij and the RedBeanPHP Communityucp.php https://code.google.com/p/phpbbex/ | PHP | 361 lines
14define('IN_PHPBB', true); 15$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; 16$phpEx = substr(strrchr(__FILE__, '.'), 1); 96 97 $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> '); 98 trigger_error($message); 171 172 $message = $user->lang['COOKIES_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); 173 trigger_error($message); 209 210 $message = sprintf($user->lang['PERMISSIONS_TRANSFERRED'], $user_row['username']) . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); 211 trigger_error($message); 232 233 $message = $user->lang['PERMISSIONS_RESTORED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); 234 trigger_error($message);ms-load.php http://comanda2015.googlecode.com/svn/trunk/ | PHP | 254 lines
1<?php 2/** 32 * manually, define <code>WP_PLUGIN_DIR</code> and <code>WP_PLUGIN_URL</code> 33 * in wp-config.php. 34 * 49 if ( ! validate_file( $plugin ) // $plugin must validate as file 50 && '.php' == substr( $plugin, -4 ) // $plugin must end with '.php' 51 && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist 65 * To change the default message when a blog does not pass the check, 66 * use the wp-content/blog-deleted.php, blog-inactive.php and 67 * blog-suspended.php drop-ins. 84 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) 85 return WP_CONTENT_DIR . '/blog-deleted.php'; 86 else 90 if ( '2' == $current_blog->deleted ) { 91 if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) 92 return WP_CONTENT_DIR . '/blog-inactive.php';manufacturer.php http://coderstalk.googlecode.com/svn/trunk/ | PHP | 418 lines
1<?php 2class ControllerCatalogManufacturer extends Controller { 406 if ($product_total) { 407 $this->error['warning'] = sprintf($this->language->get('error_product'), $product_total); 408 }create.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 263 lines
6 <form action="<?php bp_group_creation_form_action() ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data"> 7 <h3><?php _e( 'Create a Group', 'buddypress' ) ?> <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/' ?>"><?php _e( 'Groups Directory', 'buddypress' ) ?></a></h3> 8 44 <div class="checkbox"> 45 <label><input type="checkbox" name="group-show-wire" id="group-show-wire" value="1"<?php if ( bp_get_new_group_enable_wire() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable comment wire', 'buddypress') ?></label> 46 </div> 51 <div class="checkbox"> 52 <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php if ( bp_get_new_group_enable_forum() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable discussion forum', 'buddypress') ?></label> 53 </div> 56 <div class="checkbox"> 57 <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ) ?></label> 58 </div> 190 <div class="action"> 191 <a class="remove" href="<?php bp_group_invite_user_remove_invite_url() ?>" id="<?php bp_group_invite_item_id() ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a> 192 </div>slot.c https://github.com/android/kernel_common.git | C | 380 lines
137 } 138 sprintf(new_name, "%s-%d", name, dup++); 139 } 212 * In most cases, @pci_bus, @slot_nr will be sufficient to uniquely identify 213 * a slot. There is one notable exception - pSeries (rpaphp), where the 214 * @slot_nr cannot be determined until a device is actually inserted intoCacheBase.php git://github.com/moodle/moodle.git | PHP | 369 lines
3/** 4 * PHPExcel_CachedObjectStorage_CacheBase 5 * 21 * 22 * @category PHPExcel 23 * @package PHPExcel_CachedObjectStorage 23 * @package PHPExcel_CachedObjectStorage 24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 81 * 82 * @return PHPExcel_Worksheet 83 */ 311 * 312 * @param PHPExcel_Worksheet $parent The new worksheet 313 * @return voidSfObjectBuilder.php http://opac-sbweb.googlecode.com/svn/trunk/ | PHP | 393 lines
2 3require_once 'propel/engine/builder/om/php5/PHP5ObjectBuilder.php'; 4 31 // remove all inline includes: object classes include the peers 32 $objectCode = preg_replace("/include_once\s*.*Base.*Peer\.php.*\s*/", "", $objectCode); 33 } 160 { 161 $className = $tblFK->getPhpName(); 162 $culture = ''; 167 { 168 $culture = $col->getPhpName(); 169 $culture_peername = PeerBuilder::getColumnName($col, $className); 383EOF; 384 $script .= sprintf($behavior_include_script, $behavior_file_path); 385 }Rds.php http://scalr.googlecode.com/svn/ | PHP | 378 lines
1<?php 2 class Modules_Platforms_Rds extends Modules_Platforms_Aws implements IPlatformModule 102 { 103 throw new Exception(sprintf("Cannot get list of servers for platfrom rds: %s", $e->getMessage())); 104 } 234 235 $BundleTask->Log(sprintf(_("Snapshot creation initialized. SnapshotID: %s"), $BundleTask->snapshotId)); 236 362 { 363 throw new Exception(sprintf(_("Cannot launch new instance. %s"), $e->getMessage())); 364 }VigenciaDocumentoDataGridGen.class.php http://logisticsouth.googlecode.com/svn/trunk/ | PHP | 362 lines
1<?php 2 /** 160 QApplication::Translate($strName), 161 sprintf('<?=(%s) ? %s::$NameArray[%s] : null;?>', $strProperty, $strTypeClassName, $strProperty), 162 array(trilulilu.php https://code.google.com/p/hdforall/ | PHP | 344 lines
98 <text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205"> 99 <script>sprintf("%s / ", focus-(-1))+itemCount;</script> 100 </text> 194 showIdle(); 195 url="<?php echo $host; ?>" + "/scripts/clip/php/trilulilu_link.php?file=" + getItemInfo(getFocusItemIndex(),"download"); 196 movie=getUrl(url); 200 do_down=1; 201 log_file="<?php echo $dir; ?>" + getItemInfo(getFocusItemIndex(),"name") + ".log"; 202 setRefreshTime(2000); 238<channel> 239 <title><?php echo $tit; ?></title> 240 <menu>main menu</menu> 306 showIdle(); 307 url="'.$host.'/scripts/clip/php/trilulilu_link.php?file='.$link.'"; 308 movie=getUrl(url);server.php http://arronwork.googlecode.com/svn/trunk/ | PHP | 429 lines
1#!/usr/bin/env php 2<?php 5$SOAR_DIR="../../../../.."; 6include "$SOAR_DIR/common/php/soar/soar.inc"; 7 22 { 23 printf("%s: ACCESS.SERVER_PORT invalid\n", __METHOD__); 24 return false; 28 { 29 printf("%s: ACCESS.MONITOR_PORT invalid\n", __METHOD__); 30 return false; 67 { 68 $respond.=sprintf("%-30s %8d\n", 69 $addr, $call_num); 83 { 84 $respond.=sprintf("%-30s %9d\n", 85 $name, $call_num);peteava_search.php https://code.google.com/p/hdforall/ | PHP | 334 lines
57 <text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205"> 58 <script>sprintf("%s / ", focus-(-1))+itemCount;</script> 59 </text> 178<destination> 179 <link>http://127.0.0.1/cgi-bin/scripts/util/level.php 180 </link> 182<channel> 183 <title>Cautare:<?php echo $search; ?></title> 184 <menu>main menu</menu> 198<item> 199<?php 200$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME']; 243 244 $link = $host.'/scripts/filme/php/peteava_link.php?file='.$link; 245 $name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";admin.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 299 lines
1<?php 2 76 * Cette meta contient le nom du script et, à un hachage près, du demandeur. 77 * Le code de ecrire/index.php dévie toute demande d'exécution d'un script 78 * vers le script d'administration indiqué par cette meta si elle est là . 100 include_spip('base/abstract_sql'); 101 $pref = sprintf('_%d_', $GLOBALS['visiteur_session']['id_auteur']); 102 $signal = fichier_admin($script, "$script$pref");web.php https://gitlab.com/f3/f3-skeleton.git | PHP | 510 lines
1<?php 2 3/** 4 Web pack for the PHP Fat-Free Framework 5 63 if (!is_file($path.$file)) { 64 trigger_error(sprintf(self::TEXT_Minify,$file)); 65 return $echo?NULL:FALSE; 205 if ($echo) { 206 if (PHP_SAPI!='cli' && !headers_sent()) 207 header(self::HTTP_Content.': '.$mime[$ext[1]].'; '. 295 self::HTTP_Agent.': Mozilla/5.0 '. 296 '(compatible;'.PHP_OS.')'.self::EOL. 297 ($reqhdrs? 485 // Sockets extension required 486 trigger_error(sprintf(self::TEXT_PHPExt,'sockets')); 487 // Default translationsTranscoding.php http://pumukit.googlecode.com/svn/trunk/ | PHP | 379 lines
1<?php 2/** 58 if ($this->getStatusId() == TranscodingPeer::STATUS_EJECUTANDOSE){ 59 $aux = sprintf('%.2f' , $this->getFileSizeTemp()/$this->getDuration()/$this->getPerfil()->getRelDurationSize()); 60 return ($aux < 1)?$aux:0.99; 119 $consulta = 'SELECT COUNT(%s) AS number FROM %s WHERE %s=%s AND (%s>%s OR %s<%s)'; 120 $consulta = sprintf($consulta, TrancodingPeer::ID, TrancodingPeer::TABLE_NAME, 121 TrancodingPeer::STATUS_ID, TrancodingPeer::STATUS_ESPERANDO, 136 $consulta = 'SELECT SUM(%s) AS duration FROM %s WHERE %s=%s AND (%s>%s OR %s<%s)'; 137 $consulta = sprintf($consulta, TrancodingPeer::DURATION, TrancodingPeer::TABLE_NAME, 138 TrancodingPeer::STATUS_ID, TrancodingPeer::STATUS_ESPERANDO,newtonraphson.m git://github.com/mikofski/IAPWS_IF97.git | Objective C | 251 lines
50% Numerical Recipes in C, Second Edition (1992), 51% http://www.nrbook.com/a/bookcpdf.php 52 102if DISPLAY 103 fprintf('\n%10s %10s %10s %10s %10s %12s\n', 'Niter', 'resnorm', 'stepnorm', ... 104 'lambda', 'rcond', 'convergence') 104 'lambda', 'rcond', 'convergence') 105 for n = 1:67,fprintf('-'),end,fprintf('\n') 106 fmtstr = '%10d %10.4g %10.4g %10.4g %10.4g %12.4g\n'; 106 fmtstr = '%10d %10.4g %10.4g %10.4g %10.4g %12.4g\n'; 107 printout = @(n, r, s, l, rc, c)fprintf(fmtstr, n, r, s, l, rc, c); 108endReport.php git://github.com/thorsten/phpMyFAQ.git | PHP | 152 lines
1<?php 2 9 * 10 * @package phpMyFAQ 11 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 12 * @author Gustavo Solt <gustavo.solt@mayflower.de> 13 * @copyright 2011-2021 phpMyFAQ Team 14 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 14 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 15 * @link https://www.phpmyfaq.de 16 * @since 2011-02-04 18 19namespace phpMyFAQ; 20 23 * 24 * @package phpMyFAQ 25 */Pelias.php git://github.com/willdurand/Geocoder.git | PHP | 257 lines
1<?php 2 45 { 46 $this->root = sprintf('%s/v%d', rtrim($root, '/'), $version); 47 $this->version = $version; 65 if (filter_var($address, FILTER_VALIDATE_IP)) { 66 throw new UnsupportedOperation(sprintf('The %s provider does not support IP addresses, only street addresses.', $this->getName())); 67 } 73 74 return sprintf('%s/search?%s', $this->root, http_build_query(array_merge($data, $query_data))); 75 } 104 105 return sprintf('%s/reverse?%s', $this->root, http_build_query(array_merge($data, $query_data))); 106 }data.php git://pkgs.fedoraproject.org/kronolith | PHP | 328 lines
1<?php 2/** 2/** 3 * $Horde: kronolith/data.php,v 1.72.2.18 2010-07-27 17:22:49 jan Exp $ 4 * 20@define('KRONOLITH_BASE', dirname(__FILE__)); 21require_once KRONOLITH_BASE . '/lib/base.php'; 22require_once 'Horde/Data.php'; 24if (!$conf['menu']['import_export']) { 25 require KRONOLITH_BASE . '/index.php'; 26 exit; 40 Kronolith::hasPermission('max_events') <= Kronolith::countEvents()) { 41 $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, NLS::getCharset()); 42 if (!empty($conf['hooks']['permsdenied'])) { 134 $row['private'] = (int)$event->private; 135 $row['start_date'] = sprintf('%d-%02d-%02d', $event->start->year, $event->start->month, $event->start->mday); 136 $row['start_time'] = sprintf('%02d:%02d:%02d', $event->start->hour, $event->start->min, $event->start->sec);class_qi.php git://github.com/phpbb/quickinstall.git | PHP | 406 lines
104 105 $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); 106 if (!$script_name) 263 * Error and message handler, call with trigger_error if reqd. 264 * Mostly borrowed from phpBB includes/functions.php. 265 */ 267 { 268 global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text, $quickinstall_path; 269 global $user; 300 $errfile = str_replace(array(phpbb_functions::phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile); 301 $msg_text = str_replace(array(phpbb_functions::phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text); 302 $error_name = ($errno === E_WARNING) ? 'PHP Warning' : 'PHP Notice'; 337 array('{L_QUICKINSTALL}', '{L_PHPBB_QI_TEXT}', '{QI_PATH}', '{MSG_TITLE}', '{MSG_EXPLAIN}', '{MSG_TEXT}', '{SETTINGS_FORM}', '{RETURN_LINKS}', '{QI_VERSION}', '{L_FOR_PHPBB_VERSIONS}', '{L_POWERED_BY_PHPBB}'), 338 array($user->lang['QUICKINSTALL'], $user->lang['PHPBB_QI_TEXT'], $quickinstall_path, $msg_title, '', $msg_text, '', $l_return_index, QI_VERSION, $user->lang['FOR_PHPBB_VERSIONS'], $user->lang['POWERED_BY_PHPBB']), 339 $error_outPelEntryTime.php git://github.com/lsolesen/pel.git | PHP | 318 lines
1<?php 2 3/** 4 * PEL: PHP Exif Library. 5 * A library with support for reading and 5 * A library with support for reading and 6 * writing all Exif headers in JPEG and TIFF images using PHP. 7 * 43 * the timestamp in two other formats: a simple string or a Julian Day 44 * Count. Please see the Calendar extension in the PHP Manual for more 45 * information about the Julian Day Count. 160 $seconds = $this->seconds % 60; 161 return sprintf('%04d:%02d:%02d %02d:%02d:%02d', $year, $month, $day, $hours, $minutes, $seconds); 162 case self::JULIAN_DAY_COUNT: 225 // forth between the date formats. They are used in preference to 226 // the ones from the PHP calendar extension to avoid having to 227 // fiddle with timezones and to avoid depending on the extension.settings.php https://code.google.com/p/osclass/ | PHP | 182 lines
79 <div> 80 <?php printf( __('An user has to wait %s seconds between each listing added'), '<input type="text" class="input-small" name="items_wait_time" value="' . osc_items_wait_time() . '" />') ; ?> 81 <div class="help-box"> 91 <div> 92 <?php printf( __("After %s validated listings the user doesn't need to validate the listings any more"), '<input type="text" class="input-small" name="num_moderate_items" value="' . ( ( osc_moderate_items() == -1 ) ? '' : osc_moderate_items() ) . '" />') ; ?> 93 <div class="help-box"> 98 <label> 99 <input type="checkbox" <?php echo ( osc_logged_user_item_validation() ? 'checked="checked"' : '' ) ; ?> name="logged_user_item_validation" value="1" <?php echo ( ( osc_moderate_items() != -1 ) ? '' : 'disabled="disabled"') ; ?> /> 100 <?php _e("Logged in users don't need to validate their listings") ; ?> 105 <input type="checkbox" <?php echo ( ( osc_recaptcha_items_enabled() == '0' ) ? '' : 'checked="checked"' ) ; ?> name="enabled_recaptcha_items" value="1" /> 106 <?php _e('Show reCAPTCHA in add/edit listing form') ; ?> 107 </label> 166 <div class="separate-top-medium"> 167 <?php printf( __('Attach %s images per listing'), '<input type="text" class="input-small" name="numImages@items" value="' . osc_max_images_per_item() . '" />' ) ; ?> 168 <div class="help-box"><?php _e('If the value is zero, it means an unlimited number of images is allowed') ; ?></div> 181</div> 182<?php osc_current_admin_theme_path( 'parts/footer.php' ) ; ?>nfslock.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 325 lines
1<?php 2 72 * 73 * Mod of 5/4/95: Change printf's to fprintf(stderr... in nfslock and nfslock1. 74 * 96 * @author Alexis Rosen <alexis@panix.com> (rewritter) 97 * @author Cedric Morin <cedric@yterium.com> (rewritter for php&SPIP) 98 * 118 $tpath = _DIR_TMP . "slock.$id"; 119 $tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ... 120 if (!$tmpfd) { /* open failed */unimisc.php git://pkgs.fedoraproject.org/unicornscan | PHP | 586 lines
1<?php 2 define(S_SHUFFLE_PORTS, 1); 118 case 1: 119 $str=sprintf("ICMP T%02xC%02x", (integer)$type, (integer)$subtype); break; 120 case 6: 120 case 6: 121 $str=sprintf("TCP %s", tcpflags_tostr((integer)$type)); break; 122 case 17:Glossary.php git://github.com/thorsten/phpMyFAQ.git | PHP | 393 lines
1<?php 2 9 * 10 * @package phpMyFAQ 11 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 11 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 12 * @copyright 2005-2021 phpMyFAQ Team 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 14 * @link https://www.phpmyfaq.de 15 * @since 2005-09-15 17 18namespace phpMyFAQ; 19 22 * 23 * @package phpMyFAQ 24 */webtools.php https://openxp.svn.sourceforge.net/svnroot/openxp | PHP | 299 lines
1<? 2/* $Id: webtools.php 5123 2002-05-20 11:34:38Z ma $ */ 3 8 if (ftp_login($fh,"anonymous","webmaster@openxp.de")) { 9 $result = sprintf ("(%01.2f MB)", (ftp_size($fh, $fn)/1024/1024)); 10 100 }; 101 echo("\n</td><td align=\"center\" width=\"50%\"><a href=\"http://sourceforge.net\"><img src=\"http://sourceforge.net/sflogo.php?group_id=3766&type=1\" width=\"88\" height=\"31\" border=\"0\" alt=\"SourceForge\" /></a>"); 102 echo("</td><td align=\"right\" width=\"25%\">"); 286 echo("<a href=\"".htmlspecialchars("http://www.happyarts.de/ftp".$line)."\">HTTP</a>, "); 287 echo(sprintf("%01.2f MB", $fsize/1024/1024).", ".$ftime.")"); 288 } else if($language=="de") echo (" (<i>z.Zt. nicht verfügbar</i>)"); else echo(" (<i>temporarily not available</i>)");Client.php git://github.com/moodle/moodle.git | PHP | 336 lines
1<?php 2 88 if ($secure !== true) { 89 throw new \InvalidArgumentException('Secure connections require the PHP openssl extension.'); 90 } 309 ); 310 $e->details = sprintf("[%u] %s", $error_number, $error_string); 311 throw $e;update.php http://cartonbank.googlecode.com/svn/trunk/ | PHP | 272 lines
102 case 'development' : 103 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], 'update-core.php'); 104 break; 106 case 'upgrade' : 107 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', 'update-core.php', $cur->current); 108 break; 132 if ( current_user_can('update_core') ) 133 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, 'update-core.php' ); 134 else 204 else 205 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s Details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); 206 262 if ( current_user_can('update_core') ) 263 $msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' ); 264 elseDefaultContext.php https://gitlab.com/lcp0578/Sylius.git | PHP | 525 lines
1<?php 2 103 throw new \InvalidArgumentException( 104 sprintf('%s for criteria "%s" was not found.', str_replace('_', ' ', ucfirst($type)), serialize($criteria)) 105 ); 355 356 throw new \Exception(sprintf('Column with name "%s" not found!', $columnName)); 357 } 407 if (!isset($columns[$index])) { 408 throw new \InvalidArgumentException(sprintf('There is no column with index %d', $index)); 409 } 480 481 throw new \RuntimeException(sprintf('Timeout reached (%f seconds)!', round($limit * $delay / 1000, 1))); 482 } 496 if (null === $isoName) { 497 throw new \InvalidArgumentException(sprintf( 498 'Country "%s" not found! Available names: %s.', $name, join(', ', $names)sub-activity-class-singlepost.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | PHP | 381 lines
1<?php 2 169 170 $action = sprintf( __( '%s - %s from the album %s', "bp-media" ), bp_core_get_userlink($media_item->owner_id), '<a href="'. $item_href .'">'.$media_item->title.'</a>', 171 '<a href="'. $album_href .'">'.$album->title.'</a>' ); 274 275 $action = sprintf( __( '%s - %s from the album %s', "bp-media" ), bp_core_get_userlink($owner_id), '<a href="'. $item_href .'">'.$media_item->title.'</a>', 276 '<a href="'. $album_href .'">'.$album->title.'</a>' );Type.php git://github.com/eryx/php-framework-benchmark.git | PHP | 303 lines
38 * @subpackage Util 39 * @author Sebastian Bergmann <sebastian@phpunit.de> 40 * @copyright 2001-2012 Sebastian Bergmann <sebastian@phpunit.de> 51 * @author Sebastian Bergmann <sebastian@phpunit.de> 52 * @copyright 2001-2012 Sebastian Bergmann <sebastian@phpunit.de> 53 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License 53 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License 54 * @link http://www.phpunit.de/ 55 * @since Class available since Release 3.0.0 159 // There seems to be no other way to check arrays for recursion 160 // http://www.php.net/manual/en/language.types.array.php#73936 161 preg_match_all('/\n \[(\w+)\] => Array\s+\*RECURSION\*/', print_r($value, TRUE), $matches); 233 if (is_array($value)) { 234 return sprintf( 235 "%s (%s)",Matcher.php git://github.com/eryx/php-framework-benchmark.git | PHP | 308 lines
40 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License 41 * @link http://github.com/sebastianbergmann/phpunit-mock-objects 42 * @since File available since Release 1.0.0 58 * @version Release: @package_version@ 59 * @link http://github.com/sebastianbergmann/phpunit-mock-objects 60 * @since Class available since Release 1.0.0 61 */ 62class PHPUnit_Framework_MockObject_Matcher implements PHPUnit_Framework_MockObject_Matcher_Invocation 63{ 79 /** 80 * @var PHPUnit_Framework_MockObject_Matcher_MethodName 81 */ 178 179 catch (PHPUnit_Framework_ExpectationFailedException $e) { 180 throw new PHPUnit_Framework_ExpectationFailedException(class-wpum-form-register.php https://bitbucket.org/cuongphanwp/thesis-management.git | PHP | 562 lines
1<?php 2/** 6 * @author Alessandro Tesoro 7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License 8 * @since 1.0.0 262 'type' => 'checkbox', 263 'description' => sprintf(__('By registering to this website you agree to the <a href="%s" target="_blank">terms & conditions</a>.', 'wpum'), get_permalink( wpum_get_option('terms_page') ) ), 264 'required' => true, 540 541 get_wpum_template( 'already-logged-in.php', 542 array( 549 550 get_wpum_template( 'forms/registration-form.php', 551 array(ProfilerController.php git://github.com/fabpot/symfony.git | PHP | 407 lines
1<?php 2 108 if (!$profile->hasCollector($panel)) { 109 throw new NotFoundHttpException(sprintf('Panel "%s" is not available for token "%s".', $panel, $token)); 110 } 316 /** 317 * Displays the PHP info. 318 * 322 */ 323 public function phpinfoAction() 324 { 331 ob_start(); 332 phpinfo(); 333 $phpinfo = ob_get_clean(); 334 335 return new Response($phpinfo, 200, ['Content-Type' => 'text/html']); 336 }customize.php git://github.com/wordpress/wordpress.git | PHP | 270 lines
47 * 48 * Because WP_Customize_Manager is not instantiated for customize.php with the `settings_previewed=false` 49 * argument, settings cannot be reliably saved. Some logic short-circuits if the current value is the 64 <script> 65 wp.ajax.post( 'customize_save', <?php echo wp_json_encode( $request_args ); ?> ); 66 </script> 155<script type="text/javascript"> 156var ajaxurl = <?php echo wp_json_encode( admin_url( 'admin-ajax.php', 'relative' ) ); ?>, 157 pagenow = 'customize'; 190 <a class="customize-controls-close" href="<?php echo esc_url( $wp_customize->get_return_url() ); ?>"> 191 <span class="screen-reader-text"><?php _e( 'Close the Customizer and go back to the previous page' ); ?></span> 192 </a> 248 ?> 249 <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ); ?>" data-device="<?php echo esc_attr( $device ); ?>"> 250 <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span>RequestDataCollectorTest.php git://github.com/symfony/symfony.git | PHP | 390 lines
1<?php 2 13 14use PHPUnit\Framework\TestCase; 15use Symfony\Component\EventDispatcher\EventDispatcher; 85 86 $this->assertSame($expected, $c->getController()->getValue(true), sprintf('Testing: %s', $name)); 87 } 333 334 throw new \InvalidArgumentException(sprintf('Cookie named "%s" is not in response', $name)); 335 }crudBrowser.class.php http://selfpublish.googlecode.com/svn/trunk/ | PHP | 338 lines
1<?php 2 27 28 require_once($this->projectDir.'/config/ProjectConfiguration.class.php'); 29 sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration('crud', 'test', true, $this->projectDir)); 76 checkElement('table tbody tr td:nth(8)', '')-> 77 checkElement(sprintf('a[href*="/%s/new"]', $this->urlPrefix))-> 78 checkElement(sprintf('tbody a[href*="/%s/1%s"]', $this->urlPrefix, in_array('with-show', $options) ? '' : '/edit'))-> 78 checkElement(sprintf('tbody a[href*="/%s/1%s"]', $this->urlPrefix, in_array('with-show', $options) ? '' : '/edit'))-> 79 checkElement(sprintf('tbody a[href*="/%s/2%s"]', $this->urlPrefix, in_array('with-show', $options) ? '' : '/edit'))-> 80 end() 94 checkElement('h1', 'New '.ucfirst($this->urlPrefix))-> 95 checkElement(sprintf('a[href*="/%s"]', $this->urlPrefix), 'Cancel')-> 96 checkElement(sprintf('a[href*="/%s/"]', $this->urlPrefix), false)-> 139 { 140 $this->get(sprintf('/%s/3/edit', $this->urlPrefix)); 141 }socal_gps_figs.m http://compearth.googlecode.com/svn/trunk/ | Objective C | 336 lines
122for jj=1:nump 123 fprintf(fid,'%10i%10i\n',iqvec(jj,1),iqvec(jj,2)); 124end 168ve0 = ve*1e3; vs0 = vs*1e3; 169stmag = [' |vmean| = ' num2str(sprintf('%.3f', mean(sqrt(ve0.^2 + vs0.^2)))) ' mm/yr']; 170 182 183 stmag = [' |vmean| = ' num2str(sprintf('%.3f', mean(sqrt(ve0.^2 + vs0.^2)))) ' mm/yr']; 184 276 (Drr.^2 + Dthth.^2 + Dphph.^2 ... 277 - Drr.*Dthth - Drr.*Dphph - Dthth.*Dphph ) ); % deviatoric 278 %shear = sqrt( Drth.^2 + Drph.^2 + Dthph.^2 ... 278 %shear = sqrt( Drth.^2 + Drph.^2 + Dthph.^2 ... 279 % - Drr.*Dthth - Drr.*Dphph - Dthth.*Dphph); % non-deviatoric 280vote.php https://gitlab.com/BGCX261/zishashop-svn-to-git.git | PHP | 399 lines
1<?php 2 12 * $Author: testyang $ 13 * $Id: vote.php 15013 2008-10-23 09:31:42Z testyang $ 14*/ 17 18require(dirname(__FILE__) . '/includes/init.php'); 19 39 $smarty->assign('ur_here', $_LANG['list_vote']); 40 $smarty->assign('action_link', array('text' => $_LANG['add_vote'], 'href'=>'vote.php?act=add')); 41 $smarty->assign('full_page', 1); 83 $smarty->assign('ur_here', $_LANG['add_vote']); 84 $smarty->assign('action_link', array('href'=>'vote.php?act=list', 'text' => $_LANG['list_vote'])); 85 121 $link[0]['text'] = $_LANG['continue_add_option']; 122 $link[0]['href'] = 'vote.php?act=option&id='.$new_id; 123database.php https://gitlab.com/kidaa/SeventhUmbral.git | PHP | 426 lines
1<?php 2 2 3include("config.php"); 4 364{ 365 $query = sprintf("SELECT * FROM ffxiv_characters WHERE userId = '%d' AND id = '%d'", 366 $userId, $characterId);date.php git://github.com/gallery/gallery3.git | PHP | 395 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 7 * @copyright (c) 2007-2009 Kohana Team 8 * @license http://kohanaphp.com/license 9 */ 55 * Returns the offset (in seconds) between two time zones. 56 * @see http://php.net/timezones 57 * 191 192 return sprintf('%02s', $hour); 193 }Router.php git://github.com/fabpot/symfony.git | PHP | 208 lines
1<?php 2 55 } else { 56 throw new \LogicException(sprintf('You should either pass a "%s" instance or provide the $parameters argument of the "%s" method.', SymfonyContainerInterface::class, __METHOD__)); 57 } 72 try { 73 $containerFile = ($this->paramFetcher)('kernel.cache_dir').'/'.($this->paramFetcher)('kernel.container_class').'.php'; 74 if (file_exists($containerFile)) { 88 * 89 * @return string[] A list of classes to preload on PHP 7.4+ 90 */ 177 if (preg_match('/^env\((?:\w++:)*+\w++\)$/', $match[1])) { 178 throw new RuntimeException(sprintf('Using "%%%s%%" is not allowed in routing configuration.', $match[1])); 179 } 192 193 throw new RuntimeException(sprintf('The container parameter "%s", used in the route configuration value "%s", must be a string or numeric, but it is of type "%s".', $match[1], $value, get_debug_type($resolved))); 194 }, $value);phpdbg_btree.c git://github.com/php/php-src.git | C | 260 lines
39 40phpdbg_btree_result *phpdbg_btree_find(phpdbg_btree *tree, zend_ulong idx) { 41 phpdbg_btree_branch *branch = tree->branch; 66 67phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong idx) { 68 phpdbg_btree_branch *branch = tree->branch; 121 122phpdbg_btree_position phpdbg_btree_find_between(phpdbg_btree *tree, zend_ulong lower_idx, zend_ulong higher_idx) { 123 phpdbg_btree_position pos; 131 132phpdbg_btree_result *phpdbg_btree_next(phpdbg_btree_position *pos) { 133 phpdbg_btree_result *result = phpdbg_btree_find_closest(pos->tree, pos->cur); 143 144int phpdbg_btree_insert_or_update(phpdbg_btree *tree, zend_ulong idx, void *ptr, int flags) { 145 int i = tree->depth - 1;QRadioButton.class.php http://logisticsouth.googlecode.com/svn/trunk/ | PHP | 281 lines
1<?php 2 /** 73 if ($this->intTabIndex) 74 $strTabIndex = sprintf('tabindex="%s" ', $this->intTabIndex); 75 else 78 if ($this->strToolTip) 79 $strToolTip = sprintf('title="%s" ', $this->strToolTip); 80 else 83 if ($this->strCssClass) 84 $strCssClass = sprintf('class="%s" ', $this->strCssClass); 85 else 88 if ($this->strAccessKey) 89 $strAccessKey = sprintf('accesskey="%s" ', $this->strAccessKey); 90 else 104 if (strlen($strStyle) > 0) 105 $strStyle = sprintf('style="%s" ', $strStyle); 106Route.php git://github.com/symfony/symfony.git | PHP | 568 lines
1<?php 2 557 if ('' === $regex) { 558 throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key)); 559 }class-foogallery.php https://bitbucket.org/hinzanhilmy/hinzan-sample-works.git | PHP | 477 lines
1<?php 2 378 default: 379 $count_text = sprintf( $plural_text === false ? __( '%s images', 'foogallery' ) : $plural_text, $count ); 380 } 391 return empty( $this->name ) ? 392 sprintf( __( '%s #%s', 'foogallery' ), foogallery_plugin_name(), $this->ID ) : 393 $this->name;