100+ results for 'php isset'
Not the results you expected?
ezisbn10to13converter.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 355 lines
translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines
1 <?php
3 /**
93 $id = (int) $id;
95 if ( ( $lang = $this->get_language( $id ) ) && isset( $translations ) && is_array( $translations ) ) {
96 // sanitize the translations array
97 $translations = array_map( 'intval', $translations );
206 $translations = $this->get_translations( $id );
208 return isset( $translations[ $lang->slug ] ) ? $translations[ $lang->slug ] : false;
209 }
DB_result.php (https://gitlab.com/ricoru21/py_incidencia) PHP · 410 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * @package CodeIgniter
177 }
179 // array_key_exists() instead of isset() to allow for MySQL NULL values
180 if (array_key_exists($n, $this->row_data))
181 {
240 }
242 if ($n != $this->current_row AND isset($result[$n]))
243 {
244 $this->current_row = $n;
ClassRegistry.php (https://github.com/masihnewbie/cakephp.git) PHP · 341 lines
7 * PHP 5
8 *
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
11 *
14 *
15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
16 * @link http://cakephp.org CakePHP(tm) Project
17 * @package Cake.Utility
18 * @since CakePHP(tm) v 0.9.2
139 }
140 }
141 if (!isset(${$class})) {
142 if ($strict) {
143 return false;
tabs_helper.php (https://github.com/rickogden/joind.in.git) PHP · 337 lines
1 <?php
2 /**
3 * Helpers for creating Accessible Tabs.
4 *
5 * PHP version 5
6 *
7 * @category Joind.in
78 public function setSelectedTab($id) {
80 if (isset($this->_tabs[$id])) {
81 $this->_tabs[$id]->setSelected();
82 }
119 public function getTab($id) {
120 if (isset($this->_tabs[$id])) {
121 return $this->_tabs[$id];
122 }
field_link_color.php (https://gitlab.com/rubengrb/ws.vidrialum) PHP · 207 lines
class-cp-user-relationships.php (https://gitlab.com/dev73/clusterpress) PHP · 543 lines
1 <?php
2 /**
3 * ClusterPress User Relationships.
105 $type['name'] = sanitize_key( $type['name'] );
107 if ( isset( $this->types[ $type['name'] ] ) ) {
108 return false;
109 }
153 $name = sanitize_key( $name );
155 if ( ! isset( $this->types[ $name ] ) ) {
156 return false;
157 }
190 }
192 if ( ! isset( $this->types[ $r['name'] ] ) ) {
193 return false;
194 }
Annotation.php (https://bitbucket.org/cryofrost/portal.git) PHP · 267 lines
1 <?php
3 namespace Gedmo\Tree\Mapping\Driver;
17 * @subpackage Annotation
18 * @link http://www.gediminasm.org
19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20 */
21 class Annotation implements AnnotationDriverInterface
102 public function validateFullMetadata(ClassMetadata $meta, array $config)
103 {
104 if (isset($config['strategy'])) {
105 if (is_array($meta->identifier) && count($meta->identifier) > 1) {
106 throw new InvalidMappingException("Tree does not support composite identifiers in class - {$meta->name}");
136 if ($meta->isMappedSuperclass && !$property->isPrivate() ||
137 $meta->isInheritedField($property->name) ||
138 isset($meta->associationMappings[$property->name]['inherited'])
139 ) {
140 continue;
class-wc-report-taxes-by-date.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 264 lines
33 <a
34 href="#"
35 download="report-<?php echo esc_attr( $current_range ); ?>-<?php echo date_i18n( 'Y-m-d', current_time( 'timestamp' ) ); ?>.csv"
36 class="export_csv"
37 data-export="table"
212 <th class="total_row"><?php _e( 'Number of orders', 'woocommerce' ); ?></th>
213 <th class="total_row"><?php _e( 'Total sales', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Order total' field within your orders.", 'woocommerce' ) ); ?></th>
214 <th class="total_row"><?php _e( 'Total shipping', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Shipping total' field within your orders.", 'woocommerce' ) ); ?></th>
215 <th class="total_row"><?php _e( 'Total tax', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ) ); ?></th>
216 <th class="total_row"><?php _e( 'Net profit', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Total sales minus shipping and tax.', 'woocommerce' ) ); ?></th>
217 </tr>
218 </thead>
228 <?php echo ( 'month' === $this->chart_groupby ) ? date_i18n( 'F', strtotime( $date . '01' ) ) : date_i18n( get_option( 'date_format' ), strtotime( $date ) ); ?>
229 </th>
230 <td class="total_row"><?php echo $tax_row->total_orders; ?></td>
231 <td class="total_row"><?php echo wc_price( $gross ); ?></td>
ClassRegistry.php (https://github.com/kimihito/cakephp.git) PHP · 341 lines
7 * PHP 5
8 *
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
11 *
14 *
15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
16 * @link http://cakephp.org CakePHP(tm) Project
17 * @package Cake.Utility
18 * @since CakePHP(tm) v 0.9.2
139 }
140 }
141 if (!isset($instance)) {
142 if ($strict) {
143 return false;
wc-meta-box-functions.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 223 lines
1 <?php
2 /**
3 * WooCommerce Meta Box Functions
25 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
26 $field['placeholder'] = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
27 $field['class'] = isset( $field['class'] ) ? $field['class'] : 'short';
28 $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
29 $field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
30 $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
31 $field['type'] = isset( $field['type'] ) ? $field['type'] : 'text';
61 if ( ! empty( $field['description'] ) ) {
63 if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
64 echo '<img class="help_tip" data-tip="' . esc_attr( $field['description'] ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />';
65 } else {
PlatformJobQueue.php (https://github.com/Exercise/zf2.git) PHP · 318 lines
1 <?php
2 /**
3 * Zend Framework
65 }
67 if (! isset($this->_options['daemonOptions'])) {
68 throw new Queue\Exception('Job Queue host and password should be provided');
69 }
186 $zendApiJob = new $classname($message);
188 // Unfortunately, the Platform JQ API is PHP4-style...
189 $platformJob = $zendApiJob->getJob();
sale.php (https://bitbucket.org/deringer/opencart.git) PHP · 309 lines
44 $sql .= " ORDER BY tmp.date_added DESC";
46 if (isset($data['start']) || isset($data['limit'])) {
47 if ($data['start'] < 0) {
48 $data['start'] = 0;
142 }
144 if (isset($data['start']) || isset($data['limit'])) {
145 if ($data['start'] < 0) {
146 $data['start'] = 0;
244 }
246 if (isset($data['start']) || isset($data['limit'])) {
247 if ($data['start'] < 0) {
248 $data['start'] = 0;
zone.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 441 lines
1 <?php
2 class ControllerLocalisationZone extends Controller {
3 private $error = array();
27 $url = '';
29 if (isset($this->request->get['sort'])) {
30 $url .= '&sort=' . $this->request->get['sort'];
31 }
33 if (isset($this->request->get['order'])) {
34 $url .= '&order=' . $this->request->get['order'];
35 }
37 if (isset($this->request->get['page'])) {
38 $url .= '&page=' . $this->request->get['page'];
39 }
HashMap.class.php (https://bitbucket.org/stk2k/charcoalphp2.1.git) PHP · 386 lines
1 <?php
2 /**
3 * 連想配列クラス
5 * キー、値ともに型は限定しない
6 *
7 * PHP version 5
8 *
9 * @package class.base
10 * @author CharcoalPHP Development Team
11 * @copyright 2008 stk2k, sazysoft
12 */
121 $offset = $offset->__toString();
122 }
123 return isset($this->values[ $offset ]) ? $this->values[ $offset ] : NULL;
124 }
fpdi_pdf_parser.php (https://github.com/pauln/moodle.git) PHP · 347 lines
1 <?php
2 /**
3 * This file is part of FPDI
11 if (!class_exists('pdf_parser')) {
12 require_once('pdf_parser.php');
13 }
125 // it. Otherwise, we move back to its
126 // parent object.
127 if (isset($obj[1][1]['/Resources'])) {
128 $res = $this->resolveObject($obj[1][1]['/Resources']);
129 if ($res[0] == pdf_parser::TYPE_OBJECT)
132 }
134 if (!isset($obj[1][1]['/Parent'])) {
135 return false;
136 }
GeneralItemCollection.php (https://gitlab.com/laher01/factu40) PHP · 201 lines
GetCharactersCharacterIdMailMailIdOk.php (https://gitlab.com/mglinski/php-esi-lib) PHP · 394 lines
1 <?php
2 /**
3 * GetCharactersCharacterIdMailMailIdOk
4 *
5 * PHP version 5
6 *
7 * @category Class
155 public function __construct(array $data = null)
156 {
157 $this->container['body'] = isset($data['body']) ? $data['body'] : null;
158 $this->container['from'] = isset($data['from']) ? $data['from'] : null;
159 $this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
160 $this->container['read'] = isset($data['read']) ? $data['read'] : null;
DelegatingValidator.php (https://github.com/xbojer/gfw.git) PHP · 259 lines
1 <?php
3 /*
66 foreach ($propertyPath->getElements() as $element) {
67 $children = $child->getChildren();
68 if (!isset($children[$element])) {
69 $form->addError($error);
70 break;
168 $nestedNamePath = $namePath.'.'.$child->getName();
170 if ($child->hasChildren() || isset($parts[1])) {
171 $nestedFormPath = $formPath.'['.trim($parts[0], '[]').']';
172 }
175 }
177 if (isset($parts[1])) {
178 $nestedFormPath .= '.data.'.$parts[1];
179 }
jigoshop_shipping.class.php (https://github.com/annzaan/jigoshop.git) PHP · 257 lines
1 <?php
2 /**
3 * Shipping class
141 if ($method_error_message) :
142 self::$shipping_error_message .= $method_error_message . PHP_EOL;
143 endif;
213 // select chosen method.
214 if (isset($_available_methods[$chosen_method]) && $_available_methods[$chosen_method] && !$_available_methods[$chosen_method]->has_error()) :
215 $chosen_method = $_available_methods[$chosen_method]->id;
227 $chosen_method = $_cheapest_method;
228 else :
229 if ($calc_cheapest || !isset($_available_methods[$chosen_method])) :
230 $chosen_method = $_cheapest_method;
231 endif;
Parser.php (https://bitbucket.org/icosplays/friendica.git) PHP · 349 lines
1 <?php
3 /**
9 * @copyright 2006
10 * @license BSD
11 * @version CVS: $Id: Parser.php 322327 2012-01-15 17:55:59Z cweiske $
12 * @link http://pear.php.net/package/Text_LanguageDetect/
258 if ($this->_compile_trigram) {
259 if (!($b == ' ' && ($a == ' ' || $char == ' '))) {
260 if (!isset($this->_trigram[$a . $b . $char])) {
261 $this->_trigram[$a . $b . $char] = 1;
262 } else {
285 // build an array of all the characters
286 if (isset($unicode_chars[$char])) {
287 $unicode_chars[$char]++;
288 } else {
UserController.php (https://gitlab.com/RonLab1987/YupePlusClear) PHP · 262 lines
1 <?php
2 namespace application\modules\social\controllers;
140 $form = new RegistrationForm();
142 if (isset($authData['email'])) {
143 $form->email = $authData['email'];
144 }
150 $form->setAttributes(Yii::app()->getRequest()->getPost('RegistrationForm'));
152 if (!isset($authData['email']) && Yii::app()->userManager->isUserExist($form->email)) {
154 Yii::app()->getUser()->setFlash(
edit.php (https://github.com/sansanwawa/e-commerse.git) PHP · 337 lines
1 <?php
2 class ControllerAffiliateEdit extends Controller {
3 private $error = array();
67 $this->data['button_back'] = $this->language->get('button_back');
69 if (isset($this->error['warning'])) {
70 $this->data['error_warning'] = $this->error['warning'];
71 } else {
73 }
75 if (isset($this->error['firstname'])) {
76 $this->data['error_firstname'] = $this->error['firstname'];
77 } else {
79 }
81 if (isset($this->error['lastname'])) {
82 $this->data['error_lastname'] = $this->error['lastname'];
83 } else {
frontpage.php (https://github.com/tcubansk/moodle.git) PHP · 228 lines
45 echo $OUTPUT->doctype() ?>
46 <html <?php echo $OUTPUT->htmlattributes() ?>>
47 <head>
48 <title><?php echo $PAGE->title ?></title>
49 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
50 <?php echo $OUTPUT->standard_head_html() ?>
51 </head>
52 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
53 <?php echo $OUTPUT->standard_top_of_body_html(); ?>
97 <!-- begin of navigation bar -->
98 <?php if ($hasnavbar) { ?>
99 <div class="navbar clearfix">
100 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
Store.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 510 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Adminhtml
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
362 public function getStoreName($storeId)
363 {
364 if (isset($this->_storeCollection[$storeId])) {
365 return $this->_storeCollection[$storeId]->getName();
366 }
length_class.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 412 lines
1 <?php
2 class ControllerLocalisationLengthClass extends Controller {
3 private $error = array();
27 $url = '';
29 if (isset($this->request->get['sort'])) {
30 $url .= '&sort=' . $this->request->get['sort'];
31 }
33 if (isset($this->request->get['order'])) {
34 $url .= '&order=' . $this->request->get['order'];
35 }
37 if (isset($this->request->get['page'])) {
38 $url .= '&page=' . $this->request->get['page'];
39 }
admin_snippets_edit.php (https://github.com/Sweil/Frogsystem-2.git) PHP · 326 lines
1 <?php if (!defined('ACP_GO')) die('Unauthorized access!');
3 /////////////////////////////
7 if (
8 isset ( $_POST['sended'] ) && $_POST['sended'] == 'edit'
9 && isset ( $_POST['snippet_action'] ) && $_POST['snippet_action'] == 'edit'
10 && isset ( $_POST['snippet_id'] )
11 )
12 {
37 elseif (
38 $_SESSION['snippets_delete']
39 && isset ( $_POST['sended'] ) && $_POST['sended'] == 'delete'
40 && isset ( $_POST['snippet_action'] ) && $_POST['snippet_action'] == 'delete'
git.php (https://github.com/plastic/Cake-boilerplate.git) PHP · 304 lines
1 <?php
2 /**
3 * Fatty: Simple Git repogitory browser plugin for CakePHP.
8 *
9 * @copyright Copyright (C) 2010 by 101000code/101000LAB
10 * @since CakePHP(tm) v 1.2
11 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
13 set_time_limit(0);
14 ini_set('memory_limit', '256M');
15 require APP . 'plugins' . DS . 'fatty' . DS . 'config' . DS . 'core.php';
16 class GitComponent extends Object {
39 function startup(&$controller){
40 $controller->helpers['Fatty.Tip'] = array(
41 'forceEnable' => isset($this->settings['forceEnable'])? true : null,
42 );
43 $this->branch();
collator_test.php (https://github.com/vadimonus/moodle.git) PHP · 333 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
19 *
20 * @package core
21 * @category phpunit
22 * @copyright 2011 Sam Hemelryk
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30 *
31 * @package core
32 * @category phpunit
33 * @copyright 2011 Sam Hemelryk
34 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
51 protected function setUp() {
52 global $SESSION;
53 if (isset($SESSION->lang)) {
54 $this->initiallang = $SESSION->lang;
55 }
table_torch.php (https://github.com/splitfeed/Table-Torch.git) PHP · 374 lines
1 <?php
3 if (! defined('BASEPATH')) exit('No direct script access');
20 'key'=>'' );
22 //php 5 constructor
23 function __construct() {
88 $tbl_settings = $data[ 'tables' ][ TORCH_TABLE ];
90 if( isset( $tbl_settings[ 'add' ] )){
91 $data[ 'add' ] = $tbl_settings[ 'add' ];
92 }else{
156 }
158 if( isset($_POST[ 'refer'])){
159 redirect( $_POST[ 'refer' ] );
160 }else{
Deal.php (https://gitlab.com/Japang-Jawara/jawara-penilaian) PHP · 461 lines
1 <?php
2 /*
3 * Copyright 2014 Google Inc.
78 * @var bool
79 */
80 public $isSetupComplete;
81 /**
82 * @var string
333 * @param bool
334 */
335 public function setIsSetupComplete($isSetupComplete)
336 {
337 $this->isSetupComplete = $isSetupComplete;
340 * @return bool
341 */
342 public function getIsSetupComplete()
343 {
344 return $this->isSetupComplete;
submissionsoap.class.php (https://github.com/danmarsden/moodle-plagiarism_turnitin.git) PHP · 236 lines
1 <?php
2 /* @ignore
3 * To change this template, choose Tools | Templates
5 */
7 require_once( 'soap.class.php' );
8 require_once( 'tiisubmission.class.php' );
9 require_once( 'response.class.php' );
10 require_once( 'sdkexception.class.php' );
62 } else {
63 $submissions = array();
64 if ( isset( $soap->resultRecordSet->resultRecord ) ) {
65 if ( !is_array( $soap->resultRecordSet->resultRecord ) ) $soap->resultRecordSet->resultRecord = array( $soap->resultRecordSet->resultRecord );
66 foreach ( $soap->resultRecordSet->resultRecord as $submission ) {
Config.php (https://bitbucket.org/webpolis/liiv.git) PHP · 514 lines
1 <?php
2 /*
3 * CKFinder
21 * Include access control config class
22 */
23 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php";
24 /**
25 * Include resource type config class
26 */
27 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php";
28 /**
29 * Include thumbnails config class
30 */
31 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php";
32 /**
33 * Include thumbnails config class
ast_tree_output.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 550 lines
1 <?php
2 /**
3 * File containing the ezcTemplateAstNodeGenerator class
445 /**
446 * visitIssetAstNode
447 *
448 * @param ezcTemplateIssetAstNode $node
449 * @return void
450 */
451 public function visitIssetAstNode( ezcTemplateIssetAstNode $node )
452 {
453 $this->text .= $this->outputNode( $node );
LocationFeedItem.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 385 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/ads/googleads/v9/common/extensions.proto
102 public function getBusinessName()
103 {
104 return isset($this->business_name) ? $this->business_name : '';
105 }
107 public function hasBusinessName()
108 {
109 return isset($this->business_name);
110 }
138 public function getAddressLine1()
139 {
140 return isset($this->address_line_1) ? $this->address_line_1 : '';
141 }
Cdn_CloudFrontFsd_Popup.php (https://gitlab.com/karlen/ayo_wp) PHP · 345 lines
33 ) );
35 include W3TC_DIR . '/Cdn_CloudFrontFsd_Popup_View_Intro.php';
36 exit();
37 }
68 if ( empty( $i['Comment'] ) )
69 $i['Comment'] = $i['DomainName'];
70 if ( isset( $i['Origins']['Items']['Origin'] ) )
71 $i['Origin_DomainName'] = $i['Origins']['Items']['Origin'][0]['DomainName'];
147 if ( isset( $c['DefaultCacheBehavior'] ) &&
148 isset( $c['DefaultCacheBehavior']['ForwardedValues'] ) )
149 $b = $c['DefaultCacheBehavior']['ForwardedValues'];
150 else
154 ( isset( $b['QueryString'] ) && $b['QueryString'] == 'true' );
155 $details['forward_cookies']['current'] =
156 ( isset( $b['Cookies'] ) && isset( $b['Cookies']['Forward'] ) &&
157 $b['Cookies']['Forward'] == 'all' );
definitions.php (https://gitlab.com/scsistemas/superprime) PHP · 262 lines
1 <?php
2 //$urlWS = 'http://qa.superprimeweb.com/admin/index.php?';
3 $urlWS = 'http://localhost:8080/superprime/admin/index.php?';
4 $rutaFotos = '../images/fotos/';
5 //$rutaFotos = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . '/backend/images/fotos/';
87 //print_r($responseToken);
89 if(!isset($responseToken['message'])){
90 $dataML['ml_fecToken'] = (time() - 30);
91 $dataML['ml_expires'] = $responseToken['expires_in'];
130 //print_r($responseToken);
132 if(!isset($responseToken['message'])){
133 $dataML['ml_authCode'] = $responseToken['refresh_token'];
134 $dataML['ml_fecToken'] = (time() - 30);
ResourceTypeConfig.php (https://github.com/talesam/sgce.git) PHP · 357 lines
1 <?php
2 /*
3 * CKFinder
93 function __construct($resourceTypeNode)
94 {
95 if (isset($resourceTypeNode["name"])) {
96 $this->_name = $resourceTypeNode["name"];
97 }
99 if (isset($resourceTypeNode["url"])) {
100 $this->_url = $resourceTypeNode["url"];
101 }
108 }
110 if (isset($resourceTypeNode["maxSize"])) {
111 $this->_maxSize = CKFinder_Connector_Utils_Misc::returnBytes((string)$resourceTypeNode["maxSize"]);
112 }
TargetCpaSimulationPoint.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 488 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/ads/googleads/v9/common/simulation.proto
149 public function getBiddableConversions()
150 {
151 return isset($this->biddable_conversions) ? $this->biddable_conversions : 0.0;
152 }
154 public function hasBiddableConversions()
155 {
156 return isset($this->biddable_conversions);
157 }
185 public function getBiddableConversionsValue()
186 {
187 return isset($this->biddable_conversions_value) ? $this->biddable_conversions_value : 0.0;
188 }
Data.php (https://github.com/arush/desparation-deprecated.git) PHP · 309 lines
1 <?php
2 class Evogue_Customer_Helper_Data extends Mage_Core_Helper_Abstract {
183 if (is_null($inputType)) {
184 return $inputTypes;
185 } else if (isset($inputTypes[$inputType])) {
186 return $inputTypes[$inputType];
187 }
235 public function getAttributeDefaultValueByInput($inputType) {
236 $inputTypes = $this->getAttributeInputTypes();
237 if (isset($inputTypes[$inputType])) {
238 $value = $inputTypes[$inputType]['default_value'];
239 if ($value) {
247 $inputTypes = $this->getAttributeInputTypes();
248 $rules = array();
249 if (isset($inputTypes[$inputType])) {
250 foreach ($inputTypes[$inputType]['validate_types'] as $validateType) {
251 if (!empty($data[$validateType])) {
Alignment.php (https://gitlab.com/ptisky/API_prestashop) PHP · 409 lines
22 * @package PHPExcel_Style
23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version 1.7.9, 2013-06-02
34 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36 class PHPExcel_Style_Alignment extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
37 {
38 /* Horizontal alignment styles */
160 ->applyFromArray($this->getStyleArray($pStyles));
161 } else {
162 if (isset($pStyles['horizontal'])) {
163 $this->setHorizontal($pStyles['horizontal']);
164 }
166 $this->setVertical($pStyles['vertical']);
167 }
168 if (isset($pStyles['rotation'])) {
169 $this->setTextRotation($pStyles['rotation']);
170 }
Component.php (https://github.com/michaelmcandrew/citylink.git) PHP · 318 lines
1 <?php
2 /*
3 +--------------------------------------------------------------------+
31 *
32 */
33 require_once 'CRM/Core/DAO.php';
34 require_once 'CRM/Utils/Type.php';
311 $enumFields = &CRM_Mailing_DAO_Component::getEnums();
312 foreach($enumFields as $enum) {
313 if (isset($values[$enum])) {
314 $values[$enum . '_display'] = CRM_Mailing_DAO_Component::tsEnum($enum, $values[$enum]);
315 }
SimpleHeaderSet.php (https://bitbucket.org/amitholkar/zenfile-18-05.git) PHP · 387 lines
1 <?php
3 /*
42 {
43 $this->_factory = $factory;
44 if (isset($charset)) {
45 $this->setCharset($charset);
46 }
192 public function getAll($name = null)
193 {
194 if (!isset($name)) {
195 $headers = array();
196 foreach ($this->_headers as $collection) {
333 private function _storeHeader($name, Swift_Mime_Header $header, $offset = null)
334 {
335 if (!isset($this->_headers[strtolower($name)])) {
336 $this->_headers[strtolower($name)] = array();
337 }
sale.php (https://github.com/sansanwawa/e-commerse.git) PHP · 307 lines
42 }
44 if (isset($data['start']) || isset($data['limit'])) {
45 if ($data['start'] < 0) {
46 $data['start'] = 0;
140 }
142 if (isset($data['start']) || isset($data['limit'])) {
143 if ($data['start'] < 0) {
144 $data['start'] = 0;
242 }
244 if (isset($data['start']) || isset($data['limit'])) {
245 if ($data['start'] < 0) {
246 $data['start'] = 0;
Driver.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 280 lines
1 <?php
2 /*
3 * $Id: Driver.php 48519 2012-02-03 23:18:52Z btowles $
25 * @package Doctrine
26 * @subpackage Cache
27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28 * @link www.doctrine-project.org
29 * @since 1.0
58 public function setOption($option, $value)
59 {
60 if (isset($this->_options[$option])) {
61 $this->_options[$option] = $value;
62 return true;
73 public function getOption($option)
74 {
75 if ( ! isset($this->_options[$option])) {
76 return null;
77 }
query_builder.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 302 lines
Tmx.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 233 lines
1 <?php
2 /**
3 * Zend Framework
23 /** Zend_Locale */
24 // require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 // require_once 'Zend/Translate/Adapter.php';
59 $this->_data = array();
60 if (!is_readable($filename)) {
61 // require_once 'Zend/Translate/Exception.php';
62 throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
63 }
AbstractPaginator.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 487 lines
1 <?php
3 namespace Illuminate\Pagination;
287 public static function resolveCurrentPath($default = '/')
288 {
289 if (isset(static::$currentPathResolver)) {
290 return call_user_func(static::$currentPathResolver);
291 }
314 public static function resolveCurrentPage($pageName = 'page', $default = 1)
315 {
316 if (isset(static::$currentPageResolver)) {
317 return call_user_func(static::$currentPageResolver, $pageName);
318 }
BannerServiceImpl.php (https://github.com/skynet/OpenX-2.8.7.git) PHP · 344 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: BannerServiceImpl.php 62345 2010-09-14 21:16:38Z chris.nutting $
26 */
34 // Base class BaseLogonService
35 require_once MAX_PATH . '/www/api/v1/common/BaseServiceImpl.php';
37 // Banner Dll class
38 require_once MAX_PATH . '/lib/OA/Dll/Banner.php';
40 /**
PropertyPathBuilder.php (https://github.com/deviantintegral/symfony.git) PHP · 299 lines
1 <?php
3 /*
94 public function remove($offset, $length = 1)
95 {
96 if (!isset($this->elements[$offset])) {
97 throw new OutOfBoundsException(sprintf('The offset %s is not within the property path', $offset));
98 }
122 if ($offset < 0 && abs($offset) <= $this->getLength()) {
123 $offset = $this->getLength() + $offset;
124 } elseif (!isset($this->elements[$offset])) {
125 throw new OutOfBoundsException('The offset '.$offset.' is not within the property path');
126 }
149 public function replaceByIndex($offset, $name = null)
150 {
151 if (!isset($this->elements[$offset])) {
152 throw new OutOfBoundsException(sprintf('The offset %s is not within the property path', $offset));
153 }
CakeValidationSetTest.php (https://gitlab.com/wewo/evina-cake) PHP · 337 lines
3 * CakeValidationSetTest file
4 *
5 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
6 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7 *
11 *
12 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
14 * @package Cake.Test.Case.Model.Validator
15 * @since CakePHP(tm) v 2.2.0
16 * @license http://www.opensource.org/licenses/mit-license.php MIT License
17 */
220 $this->assertTrue(isset($Set['other']));
221 $this->assertFalse(isset($Set['fail']));
222 }
submitchoices.php (https://github.com/adivik2000/nigraha.git) PHP · 304 lines
1 <?php
2 $conn = mysql_connect("localhost", "root", "password") or die(mysql_error());
3 mysql_select_db("mnit_profiles", $conn);
200 <td valign="top" bgcolor="#E0E0E0">
201 <p>
202 <?php
203 $count=1;
204 while(isset($_POST['add'.$count])) {
206 $count++;
207 }
208 if (($arr['semester'] == 6) and (isset($_POST['miniproj'])) and (trim($_POST['facultymp']) != ''))
209 $courses[] = trim($_POST['facultymp'])." - MP";
210 $toadd = serialize($courses);
216 <table width="100%" border="0">
217 <tr>
218 <td><font face="Verdana, Arial, Helvetica, sans-serif">Branch: <?php echo $arr['dept'] ?>
219 </font></td>
Clients.php (https://gitlab.com/my-application.bjoernbartels.earth/module-admin) PHP · 322 lines
1 <?php
2 /**
3 * BB's Zend Framework 2 Components
40 public function exchangeArray($data)
41 {
42 $this->clients_id = (isset($data['clients_id'])) ? $data['clients_id'] : null;
43 $this->name = (isset($data['name'])) ? $data['name'] : null;
44 $this->extraname = (isset($data['extraname'])) ? $data['extraname'] : null;
45 $this->homepage = (isset($data['homepage'])) ? $data['homepage'] : null;
46 $this->email = (isset($data['email'])) ? $data['email'] : null;
47 $this->contact = (isset($data['contact'])) ? $data['contact'] : null;
48 $this->phone = (isset($data['phone'])) ? $data['phone'] : null;
49 $this->statistics = (isset($data['statistics'])) ? $data['statistics'] : null;
BannerServiceImpl.php (https://bitbucket.org/blackriver/openx.git) PHP · 344 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: BannerServiceImpl.php 81772 2012-09-11 00:07:29Z chris.nutting $
26 */
34 // Base class BaseLogonService
35 require_once MAX_PATH . '/www/api/v1/common/BaseServiceImpl.php';
37 // Banner Dll class
38 require_once MAX_PATH . '/lib/OA/Dll/Banner.php';
40 /**
LeadImportFieldType.php (https://gitlab.com/mautic-master/mautic) PHP · 290 lines
voucher.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 263 lines
1 <?php
2 class ControllerAccountVoucher extends Controller {
3 private $error = array();
8 $this->document->setTitle($this->language->get('heading_title'));
10 if (!isset($this->session->data['vouchers'])) {
11 $this->session->data['vouchers'] = array();
12 }
62 $this->data['button_continue'] = $this->language->get('button_continue');
64 if (isset($this->error['warning'])) {
65 $this->data['error_warning'] = $this->error['warning'];
66 } else {
68 }
70 if (isset($this->error['to_name'])) {
71 $this->data['error_to_name'] = $this->error['to_name'];
72 } else {
Driver.php (https://github.com/makerlabs/Symfohub.git) PHP · 280 lines
1 <?php
2 /*
3 * $Id: Driver.php 7490 2010-03-29 19:53:27Z jwage $
25 * @package Doctrine
26 * @subpackage Cache
27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28 * @link www.doctrine-project.org
29 * @since 1.0
58 public function setOption($option, $value)
59 {
60 if (isset($this->_options[$option])) {
61 $this->_options[$option] = $value;
62 return true;
73 public function getOption($option)
74 {
75 if ( ! isset($this->_options[$option])) {
76 return null;
77 }
4975e0f5fe3b209b6ae299a0b4dcacd96964a1b21c3c1a9bac84d3983e4d8884.php (https://gitlab.com/bofbof93/PISprintWeb) PHP · 218 lines
1 <?php
3 /* TunisiaMallGestionStockBundle:GestionStock:AjouterStock.html.twig */
52 <div> ";
53 // line 21
54 echo $this->env->getExtension('form')->renderer->renderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'form_start');
55 echo "
56 ";
57 // line 22
58 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'errors');
59 echo "
63 ";
64 // line 26
65 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "Quantiteproduit", array()), 'errors');
66 echo "
67 <div class=\"col-sm-10\">
Atom.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 400 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Atom.php 23775 2011-03-01 17:25:24Z ralph $
20 */
23 * @see Zend_Feed_Reader
24 */
25 // // // // // // // // // // require_once 'Zend/Feed/Reader.php';
27 /**
28 * @see Zend_Feed_Reader_EntryInterface
29 */
30 // // // // // // // // // // require_once 'Zend/Feed/Reader/EntryInterface.php';
32 /**
register.php (https://github.com/sansanwawa/e-commerse.git) PHP · 187 lines
1 <?php
2 class ControllerCheckoutRegister extends Controller {
3 public function index() {
12 }
14 if ((!$this->cart->hasProducts() && (!isset($this->session->data['vouchers']) || !$this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
15 $json['redirect'] = $this->url->link('checkout/cart');
16 }
75 $information_info = $this->model_catalog_information->getInformation($this->config->get('config_account_id'));
77 if ($information_info && !isset($this->request->post['agree'])) {
78 $json['error']['warning'] = sprintf($this->language->get('error_agree'), $information_info['title']);
79 }
88 $this->session->data['payment_address_id'] = $this->customer->getAddressId();
90 if (isset($this->request->post['shipping_address']) && $this->request->post['shipping_address']) {
91 $this->session->data['shipping_address_id'] = $this->customer->getAddressId();
92 }
move.php (https://github.com/MarxGames/E-Hobused.git) PHP · 328 lines
1 <?php
2 include_once 'models/game.php';
123 function append_to_model(Game $game){
124 // TODO: better error handling
125 if (!isset($game->players[$this->color])) {
126 Log::e("Player with this color isn't logged in.");
127 return false;
191 function append_to_model(Game $game){
192 // player with this color couldn't participate in game
193 if (!isset($game->players[$this->color])) {
194 Log::e("Player with this color isn't logged in.");
195 return false;
242 function append_to_model(Game $game){
243 if (!isset($game->players[$this->color])) {
244 Log::e("Player with this color isn't logged in.");
245 return false;
Barcode.php (https://github.com/leerbag/zf2.git) PHP · 323 lines
1 <?php
2 /**
3 * Zend Framework
132 if ($barcode instanceof Traversable) {
133 $barcode = IteratorToArray::convert($barcode);
134 if (isset($barcode['rendererParams'])) {
135 $rendererConfig = $barcode['rendererParams'];
136 }
137 if (isset($barcode['renderer'])) {
138 $renderer = (string) $barcode['renderer'];
139 }
140 if (isset($barcode['barcodeParams'])) {
141 $barcodeConfig = $barcode['barcodeParams'];
142 }
tests.php (https://github.com/pyrsmk/Chernozem.git) PHP · 515 lines
1 <?php
3 use Symfony\Component\ClassLoader\Psr4ClassLoader;
7 error_reporting(E_ALL);
9 require __DIR__.'/vendor/autoload.php';
10 require __DIR__.'/../vendor/autoload.php';
87 ->that(function($suite) {
88 $suite['chernozem']['final'] = 'fantasy';
89 return isset($suite['chernozem']['final']);
90 })
91 ->equals(true);
95 $suite['chernozem']['final'] = 'fantasy';
96 unset($suite['chernozem']['final']);
97 return isset($suite['chernozem']['final']);
98 })
99 ->equals(false);
registry.php (https://github.com/elinw/joomla-cms.git) PHP · 476 lines
1 <?php
2 /**
3 * @package Joomla.Platform
89 *
90 * @since 12.2
91 * @note The interface is only present in PHP 5.4 and up.
92 */
93 public function jsonSerialize()
134 for ($i = 0, $n = count($nodes); $i < $n; $i++)
135 {
136 if (isset($node->$nodes[$i]))
137 {
138 $node = $node->$nodes[$i];
169 if (!strpos($path, '.'))
170 {
171 return (isset($this->data->$path) && $this->data->$path !== null && $this->data->$path !== '') ? $this->data->$path : $default;
172 }
admin.inc.php (https://github.com/BenBE/ispCP.git) PHP · 189 lines
1 <?php
3 // -------------------------------------------------------------------------------
97 // Include
98 echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"". $net2ftp_globals["application_rootdir_url"] . "/skins/" . $net2ftp_globals["skin"] . "/css/main.css.php?ltr=" . __("ltr") . "&image_url=" . urlEncode2($net2ftp_globals["image_url"]) . "\" />\n";
100 } // end net2ftp_printCssInclude
150 global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
152 if (isset($_POST["input_admin_username"]) == true) { $input_admin_username = htmlEncode2(validateGenericInput($_POST["input_admin_username"])); }
153 else { $input_admin_username = ""; }
154 if (isset($_POST["input_admin_password"]) == true) { $input_admin_password = htmlEncode2(validateGenericInput($_POST["input_admin_password"])); }
178 // Print the output
179 // -------------------------------------------------------------------------
180 require_once($net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/manage.template.php");
182 } // End net2ftp_printBody
gallery.tpl.php (https://gitlab.com/endomorphosis/jeffersonsmithmayor) PHP · 122 lines
37 <div class="tubepress_thumb">
38 <a id="tubepress_image_<?php echo $video->getId(); ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" rel="tubepress_<?php echo ${org_tubepress_api_const_template_Variable::EMBEDDED_IMPL_NAME}; ?>_<?php echo ${org_tubepress_api_const_template_Variable::PLAYER_NAME}; ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>">
39 <img alt="<?php echo htmlspecialchars($video->getTitle(), ENT_QUOTES, "UTF-8"); ?>" src="<?php echo $video->getThumbnailUrl(); ?>" width="<?php echo ${org_tubepress_api_const_template_Variable::THUMBNAIL_WIDTH}; ?>" height="<?php echo ${org_tubepress_api_const_template_Variable::THUMBNAIL_HEIGHT}; ?>" />
43 <?php if (${org_tubepress_api_const_template_Variable::META_SHOULD_SHOW}[org_tubepress_api_const_options_names_Meta::TITLE]): ?>
44 <dt class="tubepress_meta tubepress_meta_title"><?php echo ${org_tubepress_api_const_template_Variable::META_LABELS}[org_tubepress_api_const_options_names_Meta::TITLE]; ?></dt><dd class="tubepress_meta tubepress_meta_title"><a id="tubepress_title_<?php echo $video->getId(); ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" rel="tubepress_<?php echo ${org_tubepress_api_const_template_Variable::EMBEDDED_IMPL_NAME}; ?>_<?php echo ${org_tubepress_api_const_template_Variable::PLAYER_NAME}; ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>"><?php echo htmlspecialchars($video->getTitle(), ENT_QUOTES, "UTF-8"); ?></a></dd>
45 <?php endif; ?>
62 <?php if (${org_tubepress_api_const_template_Variable::META_SHOULD_SHOW}[org_tubepress_api_const_options_names_Meta::URL]): ?>
64 <dt class="tubepress_meta tubepress_meta_url"><?php echo ${org_tubepress_api_const_template_Variable::META_LABELS}[org_tubepress_api_const_options_names_Meta::URL]; ?></dt><dd class="tubepress_meta tubepress_meta_url"><a rel="external nofollow" href="<?php echo $video->getHomeUrl(); ?>"><?php echo ${org_tubepress_api_const_template_Variable::META_LABELS}[org_tubepress_api_const_options_names_Meta::URL]; ?></a></dd>
65 <?php endif; ?>
100 <?php if (${org_tubepress_api_const_template_Variable::META_SHOULD_SHOW}[org_tubepress_api_const_options_names_Meta::VIEWS]): ?>
102 <dt class="tubepress_meta tubepress_meta_views"><?php echo ${org_tubepress_api_const_template_Variable::META_LABELS}[org_tubepress_api_const_options_names_Meta::VIEWS]; ?></dt><dd class="tubepress_meta tubepress_meta_views"><?php echo $video->getViewCount(); ?></dd>
103 <?php endif; ?>
Model.class.php (https://github.com/dzx0315/509.git) PHP · 295 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2010 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
13 /**
14 +------------------------------------------------------------------------------
15 * ThinkPHP 简洁模式Model模型类
16 * 只支持原生SQL操作 支持多数据库连接和切换
17 +------------------------------------------------------------------------------
220 */
221 public function addConnect($config,$linkNum=NULL) {
222 if(isset($this->_db[$linkNum]))
223 return false;
224 if(NULL === $linkNum && is_array($config)) {
DefaultCacheFactory.php (https://gitlab.com/mario.uriarte/doctrine2.5-tutorial) PHP · 254 lines
MonthSelect.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 361 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
10 namespace Zend\Form\Element;
12 use DateTime as PhpDateTime;
13 use Traversable;
14 use Zend\Form\Element;
109 }
111 if (isset($options['month_attributes'])) {
112 $this->setMonthAttributes($options['month_attributes']);
113 }
115 if (isset($options['year_attributes'])) {
116 $this->setYearAttributes($options['year_attributes']);
117 }
WufooApiWrapper.php (https://github.com/Fourshift/Wufoo-API-Wrappers.git) PHP · 270 lines
SnsClient.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 378 lines
Rsa.php (https://github.com/sidealice/zf2.git) PHP · 306 lines
1 <?php
2 /**
3 * Zend Framework
58 public function __construct(array $options = null)
59 {
60 if (isset($options)) {
61 $this->setOptions($options);
62 }
65 public function setOptions(array $options)
66 {
67 if (isset($options['passPhrase'])) {
68 $this->_passPhrase = $options['passPhrase'];
69 }
108 {
109 $signature = '';
110 if (isset($privateKey)) {
111 $opensslKeyResource = $privateKey->getOpensslKeyResource();
112 } else {
Configuration.php (https://gitlab.com/CORP-RESELLER/shopping-cart-lite) PHP · 346 lines
1 <?php
2 /**
3 *
80 }
82 if (!isset(self::$_cache[$key])) {
83 throw new Braintree_Exception_Configuration($key .
84 ' is not a valid configuration setting.');
104 {
105 // throw an exception if the value hasn't been set
106 if (isset(self::$_cache[$key]) &&
107 (empty(self::$_cache[$key]))) {
108 throw new Braintree_Exception_Configuration(
ckfinder_php5.php (https://gitlab.com/manuvelasco/agostoliquida) PHP · 231 lines
181 $dir = substr( $url, 0, strrpos( $url, "/" ) + 1 ) ;
182 $editorObj->Config['LinkUploadURL'] = $dir . urlencode( 'core/connector/php/connector.php?command=QuickUpload&type=Files' ) ;
183 $editorObj->Config['ImageUploadURL'] = $dir . urlencode( 'core/connector/php/connector.php?command=QuickUpload&type=') . ( empty( $imageType ) ? 'Images' : $imageType ) ;
184 $editorObj->Config['FlashUploadURL'] = $dir . urlencode( 'core/connector/php/connector.php?command=QuickUpload&type=') . ( empty( $flashType ) ? 'Flash' : $flashType ) ;
185 }
226 $dir = substr( $url, 0, strrpos( $url, "/" ) + 1 ) ;
227 $editorObj->config['filebrowserUploadUrl'] = $dir . 'core/connector/php/connector.php?command=QuickUpload&type=Files' ;
228 $editorObj->config['filebrowserImageUploadUrl'] = $dir . 'core/connector/php/connector.php?command=QuickUpload&type=' . ( empty( $imageType ) ? 'Images' : $imageType ) ;
229 $editorObj->config['filebrowserFlashUploadUrl'] = $dir . 'core/connector/php/connector.php?command=QuickUpload&type=' . ( empty( $flashType ) ? 'Flash' : $flashType ) ;
230 }
231 }
EntityTypeBundleInfoTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 314 lines
UpdateQueryBuilderTest.php (https://github.com/csanquer/QueryBuilder.git) PHP · 326 lines
Cloud.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 410 lines
220 if (is_array($decorator)) {
221 if (isset($decorator['options'])) {
222 $options = $decorator['options'];
223 }
342 public function addPrefixPaths(array $paths)
343 {
344 if (isset($paths['prefix']) && isset($paths['path'])) {
345 return $this->addPrefixPath($paths['prefix'], $paths['path']);
346 }
348 foreach ($paths as $path) {
349 if (!isset($path['prefix']) || !isset($path['path'])) {
350 continue;
351 }
registry.php (https://github.com/Paladin/joomla-platform.git) PHP · 472 lines
1 <?php
2 /**
3 * @package Joomla.Platform
89 *
90 * @since 12.2
91 * @note The interface is only present in PHP 5.4 and up.
92 */
93 public function jsonSerialize()
134 for ($i = 0, $n = count($nodes); $i < $n; $i++)
135 {
136 if (isset($node->$nodes[$i]))
137 {
138 $node = $node->$nodes[$i];
169 if (!strpos($path, '.'))
170 {
171 return (isset($this->data->$path) && $this->data->$path !== null && $this->data->$path !== '') ? $this->data->$path : $default;
172 }
173 // Explode the registry path into an array
compras_recibo.php (https://gitlab.com/cosouth.battle/sartinofi) PHP · 370 lines
1 <?php
3 /**
6 */
8 require_model('asiento.php');
9 require_model('cuenta_banco.php');
10 require_model('cuenta_banco_proveedor.php');
11 require_model('ejercicio.php');
12 require_model('factura_proveedor.php');
13 require_model('forma_pago.php');
14 require_model('pago_recibo_proveedor.php');
15 require_model('partida.php');
shipping.php (https://gitlab.com/reclamare/mao) PHP · 268 lines
30 foreach ($keys as $key) {
31 if (!isset($this->request->post[$key])) {
32 $this->request->post[$key] = '';
33 }
153 $json = array();
155 if (!isset($this->session->data['api_id'])) {
156 $json['error'] = $this->language->get('error_permission');
157 } elseif ($this->cart->hasShipping()) {
239 $shipping = explode('.', $this->request->post['shipping_method']);
241 if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) {
242 $json['error'] = $this->language->get('error_method');
243 }
PluginInfo.php (https://gitlab.com/fabiorf/chat) PHP · 383 lines
Maillog.php (https://github.com/ewandor/horde.git) PHP · 266 lines
Media.php (https://bitbucket.org/acidel/buykoala.git) PHP · 228 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
101 foreach (array_keys($result) as $index) {
102 if (!isset($fileToId[$result[$index]['file']])) {
103 $fileToId[$result[$index]['file']] = $result[$index]['value_id'];
104 } elseif ($fileToId[$result[$index]['file']] != $result[$index]['value_id']) {
class-wp-customize-setting.php (https://gitlab.com/Gashler/dp) PHP · 439 lines
1 <?php
2 /**
3 * Customize Setting Class.
37 $keys = array_keys( get_class_vars( __CLASS__ ) );
38 foreach ( $keys as $key ) {
39 if ( isset( $args[ $key ] ) )
40 $this->$key = $args[ $key ];
41 }
108 $value = $this->post_value();
110 if ( ! $this->check_capabilities() || ! isset( $value ) )
111 return false;
125 */
126 public final function post_value( $default = null ) {
127 if ( isset( $this->_post_value ) )
128 return $this->_post_value;
MimePartTest.php (https://github.com/nattaphat/hgis.git) PHP · 252 lines
1 <?php
3 require_once 'Swift/Mime/MimeEntity.php';
4 require_once 'Swift/Mime/MimePart.php';
5 require_once 'Swift/Mime/AbstractMimeEntityTest.php';
6 require_once 'Swift/Mime/Grammar.php';
8 class Swift_Mime_MimePartTest extends Swift_Mime_AbstractMimeEntityTest
42 }
44 public function testCharsetIsSetInHeader()
45 {
46 $cType = $this->_createHeader('Content-Type', 'text/plain',
Base.php (https://github.com/ewandor/horde.git) PHP · 305 lines
1 <?php
2 /**
3 * Utilities for the various XML handlers.
4 *
5 * PHP version 5
6 *
7 * @category Kolab
190 protected function generateWriteValue($name, $attributes, $params)
191 {
192 if (isset($attributes[$name])) {
193 return $attributes[$name];
194 } else {
248 protected function checkMissing($key, $params, $attribute)
249 {
250 if (!isset($params[$key])) {
251 throw new Horde_Kolab_Format_Exception(
252 sprintf(
Alignment.php (https://gitlab.com/dmsapiens/physicians) PHP · 409 lines
22 * @package PHPExcel_Style
23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
34 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36 class PHPExcel_Style_Alignment extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
37 {
38 /* Horizontal alignment styles */
160 ->applyFromArray($this->getStyleArray($pStyles));
161 } else {
162 if (isset($pStyles['horizontal'])) {
163 $this->setHorizontal($pStyles['horizontal']);
164 }
166 $this->setVertical($pStyles['vertical']);
167 }
168 if (isset($pStyles['rotation'])) {
169 $this->setTextRotation($pStyles['rotation']);
170 }
User_agent.php (https://github.com/usagi-project/mynets1.git) PHP · 500 lines
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
59 function CI_User_agent()
60 {
61 if (isset($_SERVER['HTTP_USER_AGENT']))
62 {
63 $this->agent = trim($_SERVER['HTTP_USER_AGENT']);
92 $return = FALSE;
94 if (isset($platforms))
95 {
96 $this->platforms = $platforms;
reader.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 279 lines
1 <?php
2 /**
3 * File containing the ezcDbSchemaMysqlReader class.
11 /**
12 * Handler for files containing PHP arrays that represent DB schema.
13 *
14 * @package DatabaseSchema
162 {
163 preg_match( "@([a-z]*)(\((\d*)(,(\d+))?\))?@", $typeString, $matches );
164 if ( !isset( self::$typeMap[$matches[1]] ) )
165 {
166 throw new ezcDbSchemaUnsupportedTypeException( 'MySQL', $matches[1] );
168 $genericType = self::$typeMap[$matches[1]];
170 if ( in_array( $genericType, array( 'text', 'decimal', 'float', 'integer' ) ) && isset( $matches[3] ) && $typeString != 'bigint(20)' )
171 {
172 $typeLength = $matches[3];
tests.php
(https://swig.svn.sourceforge.net/svnroot/swig)
PHP · 233 lines
✨ Summary
This PHP code is a comprehensive set of functions for validating and checking various aspects of PHP code, including classes, functions, globals, resources, and variables. It provides a robust framework for detecting errors, warnings, and potential issues in PHP code, making it useful for developers to ensure their code is correct and reliable.
This PHP code is a comprehensive set of functions for validating and checking various aspects of PHP code, including classes, functions, globals, resources, and variables. It provides a robust framework for detecting errors, warnings, and potential issues in PHP code, making it useful for developers to ensure their code is correct and reliable.
1 <?php
3 // do we have true global vars or just GETSET functions?
83 $extra=array();
84 foreach($methods as $method) {
85 if (! isset($classmethods[$method])) $missing[]=$method;
86 else unset($classmethods[$method]);
87 }
170 foreach ($globals as $glob) {
171 if (GETSET) {
172 if (! isset($extra[$glob])) $missing[]=$glob;
173 else unset($extra[$glob]);
174 } else {
175 if (! isset($GLOBALS[$glob])) $missing[]=$glob;
176 else unset($extra[$glob]);
177 }
TabItemWidget.java
(http://keywatch.googlecode.com/svn/trunk/)
Java · 180 lines
✨ Summary
This Java code defines a TabItemWidget
class, which represents a single tab item on a desktop panel. It displays a label and a close button, allowing users to rename or remove the associated desktop. When the close button is clicked, it prompts the user to confirm removal. If renamed, it updates the desktop’s name and saves changes.
This Java code defines a TabItemWidget
class, which represents a single tab item on a desktop panel. It displays a label and a close button, allowing users to rename or remove the associated desktop. When the close button is clicked, it prompts the user to confirm removal. If renamed, it updates the desktop’s name and saves changes.
XMLHttpRequest.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 1131 lines
132 }
134 static bool isSetCookieHeader(const AtomicString& name)
135 {
136 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set-cookie2");
865 // know any widely used technique that requires access to them.
866 // 3) Firefox has implemented this policy.
867 if (isSetCookieHeader(it->first) && !scriptExecutionContext()->securityOrigin()->canLoadLocalResources())
868 continue;
891 // See comment in getAllResponseHeaders above.
892 if (isSetCookieHeader(name) && !scriptExecutionContext()->securityOrigin()->canLoadLocalResources()) {
893 reportUnsafeUsage(scriptExecutionContext(), "Refused to get unsafe header \"" + name + "\"");
894 return String();
bp-core-options.php (https://bitbucket.org/simplemediacode/bptrunk.git) PHP · 538 lines
session.php
(http://forceworkbench.googlecode.com/svn/trunk/workbench/)
PHP · 106 lines
✨ Summary
This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.
This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.
50 //clear ResultsWithData and retrievedZips from session unless downloading them
51 if (isset($_SESSION['resultsWithData']) && basename($_SERVER['PHP_SELF']) != 'downloadResultsWithData.php') {
52 unset($_SESSION['resultsWithData']);
53 }
55 if (isset($_SESSION['retrievedZips']) && basename($_SERVER['PHP_SELF']) != 'metadataStatus.php') {
56 unset($_SESSION['retrievedZips']);
57 }
94 if (isLoggedIn()) {
95 // todo: should this be in the ctx?
96 if (!in_array(basename($_SERVER['PHP_SELF'], ".php"), array("login", "logout")) && isset($_SESSION['lastRequestTime'])) {
97 $idleTime = microtime(true) - $_SESSION['lastRequestTime'];
98 if ($idleTime > (getConfig("sessionIdleMinutes") * 60)) {
dhd_common.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1733 lines
✨ Summary
This C code snippet appears to be part of a wireless networking driver, specifically related to Wi-Fi scanning and management. It provides functions for requesting Wi-Fi scans, deleting BSS (Basic Service Set) entries, and retrieving partial scan results. The code also handles various error conditions and manages internal data structures, such as the iscan_chain
buffer.
This C code snippet appears to be part of a wireless networking driver, specifically related to Wi-Fi scanning and management. It provides functions for requesting Wi-Fi scans, deleting BSS (Basic Service Set) entries, and retrieving partial scan results. The code also handles various error conditions and manages internal data structures, such as the iscan_chain
buffer.
7 * agreement governing use of this software, this software is licensed to you
8 * under the terms of the GNU General Public License version 2 (the "GPL"),
9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10 * following added to such license:
11 *
209 DHD_TRACE(("%s: Enter\n", __FUNCTION__));
211 if ((bcmerror = bcm_iovar_lencheck(vi, arg, len, IOV_ISSET(actionid))) != 0)
212 goto exit;
sanitize.php
(https://bitbucket.org/AzuiSleet/cdr-web/)
PHP · 349 lines
✨ Summary
This PHP code provides a set of utility functions for sanitizing and formatting data, including HTML escaping, string manipulation, and database connection management. It also includes functions for cleaning and formatting column data in a model, likely used in a database-driven application. The code appears to be part of a larger framework or library, providing a foundation for building robust and secure applications.
This PHP code provides a set of utility functions for sanitizing and formatting data, including HTML escaping, string manipulation, and database connection management. It also includes functions for cleaning and formatting column data in a model, likely used in a database-driven application. The code appears to be part of a larger framework or library, providing a foundation for building robust and secure applications.
7 * PHP versions 4 and 5
8 *
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
11 *
14 *
15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
16 * @link http://cakephp.org CakePHP(tm) Project
17 * @package cake
18 * @subpackage cake.cake.libs
89 * - remove (boolean) if true strips all HTML tags before encoding
90 * - charset (string) the charset used to encode the string
91 * - quotes (int) see http://php.net/manual/en/function.htmlentities.php
92 *
93 * @param string $string String from where to strip tags
musicbrainz.php
(https://code.google.com/p/ontowiki/)
PHP · 435 lines
✨ Summary
This PHP code retrieves music metadata from MusicBrainz, a collaborative music database. It checks if the requested data is available in the cache and returns the result. If not, it sends an HTTP request to MusicBrainz, parses the response, and stores the result in the cache for future use. The code supports both album and track metadata retrieval.
This PHP code retrieves music metadata from MusicBrainz, a collaborative music database. It checks if the requested data is available in the cache and returns the result. If not, it sends an HTTP request to MusicBrainz, parses the response, and stores the result in the cache for future use. The code supports both album and track metadata retrieval.
1 <?php
2 require_once 'Erfurt/Wrapper.php';
11 * @author Thomas K??nig <koenig.thomas@googlemail.com>
12 * @copyright Copyright (c) 2009 {@link http://aksw.org aksw}
13 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
14 * @version ???
15 */
76 if ($result !== false)
77 {
78 if (!isset($this->_cachedData[$graphUri]))
79 {
80 $this->_cachedData[$graphUri] = array($uri => $result['data']);
123 //Cache the retrieved data if possible.
124 if (!isset($this->_cachedData[$graphUri]))
125 {
126 $this->_cachedData[$graphUri] = array($uri => $data);
bp-core-cache.php (https://bitbucket.org/simplemediacode/bptrunk.git) PHP · 130 lines
1 <?php
2 /**
3 * Caching functions handle the clearing of cached objects and pages on specific
109 // Force subkeys to be array type:
110 if ( !isset( $cache[$mpid] ) || !is_array( $cache[$mpid] ) )
111 $cache[$mpid] = array();
112 if ( !isset( $cache[$mpid][$mkey] ) || !is_array( $cache[$mpid][$mkey] ) )
120 foreach ( $object_ids as $id ) {
121 if ( ! isset($cache[$id]) )
122 $cache[$id] = array();
TwitterAlikeExample.html
(http://redis.googlecode.com/svn/trunk/)
HTML · 253 lines
✨ Summary
This HTML code outputs a blog post about Redis, a popular in-memory data store. The content explains how to implement a Twitter-like clone using Redis, including setting up followers and posting messages. It also discusses horizontal scaling of the system, including hashing keys, distributing user data across servers, and handling special cases like incrementing IDs and retrieving timeline data.
This HTML code outputs a blog post about Redis, a popular in-memory data store. The content explains how to implement a Twitter-like clone using Redis, including setting up followers and posting messages. It also discusses horizontal scaling of the system, including hashing keys, distributing user data across servers, and handling special cases like incrementing IDs and retrieving timeline data.
17 <div class="index">
18 <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19 <b>TwitterAlikeExample: Contents</b><br> <a href="#A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a><br> <a href="#Key-value stores basics">Key-value stores basics</a><br> <a href="#Atomic operations">Atomic operations</a><br> <a href="#Beyond key-value stores">Beyond key-value stores</a><br> <a href="#The set data type">The set data type</a><br> <a href="#Prerequisites">Prerequisites</a><br> <a href="#Data layout">Data layout</a><br> <a href="#Following, followers and updates">Following, followers and updates</a><br> <a href="#Authentication">Authentication</a><br> <a href="#Updates">Updates</a><br> <a href="#Paginating updates">Paginating updates</a><br> <a href="#Following users">Following users</a><br> <a href="#Making it horizontally scalable">Making it horizontally scalable</a><br> <a href="#Hashing the key">Hashing the key</a><br> <a href="#Special keys">Special keys</a>
20 </div>
28 <div class="narrow">
29 <h1><a name="A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a></h1>In this article I'll explain the design and the implementation of a <a href="http://retwis.antirez.com" target="_blank">simple clone of Twitter</a> written using PHP and <a href="http://code.google.com/p/redis/" target="_blank">Redis</a> as only database. The programming community uses to look at key-value stores like special databases that can't be used as drop in replacement for a relational database for the development of web applications. This article will try to prove the contrary.<br/><br/>Our Twitter clone, <a href="http://retwis.antirez.com" target="_blank">called Retwis</a>, is structurally simple, has very good performances, and can be distributed among N web servers and M Redis servers with very little efforts. You can find the source code <a href="http://code.google.com/p/redis/downloads/list" target="_blank">here</a>.<br/><br/>We use PHP for the example since it can be read by everybody. The same (or... much better) results can be obtained using Ruby, Python, Erlang, and so on.
30 <h1><a name="Key-value stores basics">Key-value stores basics</a></h1>
31 The essence of a key-value store is the ability to store some data, called <i>value</i>, inside a key. This data can later be retrieved only if we know the exact key used to store it. There is no way to search something by value. So for example I can use the command SET to store the value <b>bar</b> at key <b>foo</b>:<br/><br/><pre class="codeblock python" name="code">
79 </pre>Ok I think we are ready to start coding!
80 <h2><a name="Prerequisites">Prerequisites</a></h2>
81 If you didn't download it already please <a href="http://code.google.com/p/redis/wiki/README" target="_blank">grab the source code of Retwis</a>. It's a simple tar.gz file with a few of .php files inside. The implementation is very simple. You will find the PHP library client inside (redis.php) that is used to talk with the Redis server from PHP. This library was written by <a href="http://qix.it" target="_blank">Ludovico Magnocavallo</a> and you are free to reuse this in your own projects, but for updated version of the library please download the Redis distribution.<br/><br/>Another thing you probably want is a working Redis server. Just get the source, compile with make, and run with ./redis-server and you are done. No configuration is required at all in order to play with it or to run Retwis in your computer.
82 <h2><a name="Data layout">Data layout</a></h2>
83 Working with a relational database this is the stage were the database layout should be produced in form of tables, indexes, and so on. We don't have tables, so what should be designed? We need to identify what keys are needed to represent our objects and what kind of values this keys need to hold.<br/><br/>Let's start from Users. We need to represent this users of course, with the username, userid, password, followers and following users, and so on. The first question is, what should identify an user inside our system? The username can be a good idea since it is unique, but it is also too big, and we want to stay low on memory. So like if our DB was a relational one we can associate an unique ID to every user. Every other reference to this user will be done by id. That's very simple to do, because we have our atomic INCR operation! When we create a new user we can do something like this, assuming the user is callled "antirez":<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">
tc.php
(http://typecho.googlecode.com/svn/trunk/)
PHP · 29 lines
✨ Summary
This PHP script processes a PHP file by removing unnecessary whitespace, stripping out require_once
statements, and appending the contents of an optional input file to the end of the script. The modified script is then written back to the original output file.
This PHP script processes a PHP file by removing unnecessary whitespace, stripping out require_once
statements, and appending the contents of an optional input file to the end of the script. The modified script is then written back to the original output file.
1 <?php
3 /** ???????? */
4 if (!isset($argv[1])) {
5 echo 'no args';
6 exit(1);
12 /** ?????? */
13 if (!isset($options['in']) || !isset($options['out'])) {
14 echo 'no input or output file';
15 exit(1);
16 }
18 $str = php_strip_whitespace($options['in']);
19 $str = preg_replace("/require_once\s+('|\")[_0-9a-z-\/\.]+\\1\s*;/is", '', $str);
20 $str = trim(ltrim($str, '<?php'));