PageRenderTime 2032ms queryFilters 0ms Sphinxql 1939ms GetByIds 45ms meta 0ms repositoryFilters 11ms languageFilters 12ms sourceFilters 2ms

1,427,616 results for 'php empty' (2032 ms)

Source

Language

Repository

View.class.php https://github.com/guodont/easycart.git | PHP | 212 lines
1<?php
2// +----------------------------------------------------------------------
2// +----------------------------------------------------------------------
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4// +----------------------------------------------------------------------
12/**
13 * ThinkPHP 视图类
14 */
87    private function render($content,$charset='',$contentType=''){
88        if(empty($charset))  $charset = C('DEFAULT_CHARSET');
89        if(empty($contentType)) $contentType = C('TMPL_CONTENT_TYPE');
92        header('Cache-control: '.C('HTTP_CACHE_CONTROL'));  // 页面缓存控制
93        header('X-Powered-By:ThinkPHP');
94        // 输出模板文件
114        ob_implicit_flush(0);
115        if('php' == strtolower(C('TMPL_ENGINE_TYPE'))) { // 使用PHP原生模板
116            // 模板阵列变量分解成为独立变量
View.class.php https://github.com/398360167/workflow.git | PHP | 228 lines
1<?php
2// +----------------------------------------------------------------------
2// +----------------------------------------------------------------------
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4// +----------------------------------------------------------------------
12/**
13 * ThinkPHP 视图类
14 * @category   Think
91    private function render($content,$charset='',$contentType=''){
92        if(empty($charset))  $charset = C('DEFAULT_CHARSET');
93        if(empty($contentType)) $contentType = C('TMPL_CONTENT_TYPE');
96        header('Cache-control: '.C('HTTP_CACHE_CONTROL'));  // 页面缓存控制
97        header('X-Powered-By:ThinkPHP');
98        // 输出模板文件
119        ob_implicit_flush(0);
120        if('php' == strtolower(C('TMPL_ENGINE_TYPE'))) { // 使用PHP原生模板
121            // 模板阵列变量分解成为独立变量
CValidator.php https://github.com/ashie1287/headfirst.git | PHP | 233 lines
1<?php
2/**
137			else
138				$on=preg_split('/[\s,]+/',$params['on'],-1,PREG_SPLIT_NO_EMPTY);
139		}
163
164		$validator->on=empty($on) ? array() : array_combine($on,$on);
165
191	 * <ul>
192	 * <li>the validator's "on" property is empty</li>
193	 * <li>the validator's "on" property contains the specified scenario</li>
200	{
201		return empty($this->on) || isset($this->on[$scenario]);
202	}
219	 * Checks if the given value is empty.
220	 * A value is considered empty if it is null, an empty array, or the trimmed result is an empty string.
221	 * Note that this method is different from PHP empty(). It will return false when the value is 0.
2009-02-04-phps-empty-in-place-of-isset.markdown https://github.com/johnantoni/red91.com.git | Unknown | 18 lines
2layout: post
3title: php's empty() in place of isset()
4category: php
8
9[Using PHP's empty() Instead of isset() and count()](http://www.thefutureoftheweb.com/blog/using-php-empty-instead-of-isset-count)
10
View.class.php https://gitlab.com/yoage/thinkphp.git | PHP | 229 lines
1<?php
2// +----------------------------------------------------------------------
2// +----------------------------------------------------------------------
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4// +----------------------------------------------------------------------
12/**
13 * ThinkPHP 视图类
14 */
87    private function render($content,$charset='',$contentType=''){
88        if(empty($charset))  $charset = C('DEFAULT_CHARSET');
89        if(empty($contentType)) $contentType = C('TMPL_CONTENT_TYPE');
92        header('Cache-control: '.C('HTTP_CACHE_CONTROL'));  // 页面缓存控制
93        header('X-Powered-By:ThinkPHP');
94        // 输出模板文件
116        ob_implicit_flush(0);
117        if('php' == strtolower(C('TMPL_ENGINE_TYPE'))) { // 使用PHP原生模板
118            $_content   =   $content;
group.php https://gitlab.com/mahara-contrib/janrain-auth.git | PHP | 1,476 lines
641            $SESSION->add_ok_msg(get_string('groupinvitedeclined', 'group'));
642            redirect($values['returnto'] == 'find' ? '/group/find.php' : '/group/mygroups.php');
643        }
704    foreach ($viewdata as $view) {
705        if (empty($view->submittedgroup) && empty($view->submittedhost)) {
706            $options[$view->id] = $view->title;
789/**
790 * Sets up groups for display in mygroups.php and find.php
791 *
836/*
837 * Used by admin/groups/groups.php and admin/groups/groups.json.php for listing groups.
838 */
877                'datatable' => 'admgroupslist',
878                'url' => get_config('wwwroot') . 'admin/groups/groups.php' . (!empty($query) ? '?query=' . urlencode($query) : ''),
879                'jsonscript' => 'admin/groups/groups.json.php',
institution.php https://gitlab.com/mahara-contrib/janrain-auth.git | PHP | 609 lines
1<?php
2/**
81        } elseif ($name == 'theme') {
82            if (!empty($value) && is_string($value) && strlen($value) > 255) {
83                throw new ParamOutOfRangeException("'theme' ($value) should be less than 255 characters in length");
85        } elseif ($name == 'defaultmembershipperiod') {
86            if (!empty($value) && (!is_numeric($value) || $value < 0 || $value > 9999999999)) {
87                throw new ParamOutOfRangeException("'defaultmembershipperiod' should be a number between 1 and 9,999,999,999");
89        } elseif ($name == 'maxuseraccounts') {
90            if (!empty($value) && (!is_numeric($value) || $value < 0 || $value > 9999999999)) {
91                throw new ParamOutOfRangeException("'maxuseraccounts' should be a number between 1 and 9,999,999,999");
534/* The institution selector does exactly the same thing in both
535   institutionadmins.php and institutionstaff.php (in /admin/users/).
536   This function creates the form for the page. */
594                'datatable' => 'adminstitutionslist',
595                'url' => get_config('wwwroot') . 'admin/users/institutions.php' . (!empty($query) ? '?query=' . urlencode($query) : ''),
596                'jsonscript' => 'admin/users/institutions.json.php',
admin_update_tournaments.php https://gitlab.com/zanzilan/alp.git | PHP | 439 lines
30				require_once 'include/_top_smallwindow.php';
31				if (!empty($_GET['matchid']) && !empty($_GET['i']) && !empty($_GET['j'])) {
32					$str = 'incorrect usage';
89			} else {
90				if(!empty($_POST["i"])&&!empty($_POST["j"])&&isset($_POST["topscore"])&&isset($_POST["bottomscore"])&&!empty($_POST["matchid"])&&!empty($_POST["b"])) {
91					if($tournament["per_team"]==1) {
174						}
175						if($_POST["b"]=="w"&&!empty($_POST["L_rnd"])&&!empty($_POST["L_mtc"])&&isset($_POST["L_top"])&&!empty($_POST["matchid"])) {
176							$loser = $dbc->database_fetch_assoc($dbc->database_query("SELECT team FROM tournament_matches_teams WHERE tourneyid='".$tournament["tourneyid"]."' AND matchid='".$_POST["matchid"]."' AND team!='".$currwinner["team"]."'"));
253					}
254				} elseif(!empty($_GET['matchid'])&&!empty($_GET['team'])&&!empty($_GET['act'])&&$_GET['act']=='del') {
255					$t_bool = true;
300				}			
301			} elseif(!empty($_GET["i"])&&!empty($_GET["j"])&&!empty($_GET["w"])&&!empty($_GET["b"])) {
302				//($i+1),ceil($j/4),($j%4==3)||($j%4==0)
card.php git://github.com/Dolibarr/dolibarr.git | PHP | 411 lines
1<?php
2/* Copyright (C) 2005      Rodolphe Quiedeville  <rodolphe@quiedeville.org>
31require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
32require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
33require DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
89if ($action == 'confirm_valide' && $confirm == 'yes' &&
90	((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->facture->creer))
91	|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate)))
178
179	$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/paiement.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
180
347			if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->facture->creer))
348		   	|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate)))
349			{
383		$delallowed = $user->rights->fournisseur->facture->creer;
384		$modelpdf = (!empty($object->modelpdf) ? $object->modelpdf : (empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF) ? '' : $conf->global->SUPPLIER_PAYMENT_ADDON_PDF));
385
card.php git://github.com/Dolibarr/dolibarr.git | PHP | 425 lines
1<?php
2/* Copyright (C) 2007-2017 Laurent Destailleur  <eldy@users.sourceforge.net>
24require '../../main.inc.php';
25include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
26include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
26include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
27include_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php';
28
40
41if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
42{
68
69if (empty($action) && empty($id) && empty($ref)) $action = 'view';
70
253	// ------------------------------------------------------------
254	$linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
255
inventory.php git://github.com/Dolibarr/dolibarr.git | PHP | 433 lines
1<?php
2/* Copyright (C) 2019 Laurent Destailleur  <eldy@users.sourceforge.net>
24require '../../main.inc.php';
25include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
26include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
26include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
27include_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php';
28
40
41if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
42{
68
69if (empty($action) && empty($id) && empty($ref)) $action = 'view';
70
187	// ------------------------------------------------------------
188	$linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
189
empty.html git://github.com/kvz/phpjs.git | HTML | 93 lines
36  Here’s what our current JavaScript equivalent to <a
37  href="https://php.net/manual/en/function.empty.php">PHP's empty</a> looks like.
38function: empty
40language: php
41permalink: php/var/empty/
42alias:
42alias:
43  - /functions/php/empty/
44  - /functions/var/empty/
44  - /functions/var/empty/
45  - /php/empty/
46  - /functions/empty/
48{% codeblock lang:javascript %}module.exports = function empty (mixedVar) {
49  //  discuss at: https://locutus.io/php/empty/
50  // original by: Philippe Baumann
class-jobtype-file.php https://github.com/90rdon/bric.git | PHP | 541 lines
78						   type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backuproot' ), TRUE, TRUE );?>
79						   name="backuproot" id="idbackuproot" value="1" /> <code title="<?php echo sprintf( __( 'Path as set by user (symlink?): %s', 'backwpup' ), esc_attr( ABSPATH ) ); ?>"><?php echo esc_attr( $folder ); ?></code><?php echo $folder_size; ?>
80
108                           type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupcontent' ), TRUE, TRUE );?>
109                           name="backupcontent" id="idbackupcontent" value="1" /> <code title="<?php echo sprintf( __( 'Path as set by user (symlink?): %s', 'backwpup' ), esc_attr( WP_CONTENT_DIR ) ); ?>"><?php echo esc_attr( $folder ); ?></code><?php echo $folder_size; ?>
110
168                           type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupthemes' ), TRUE, TRUE );?>
169                           name="backupthemes" id="idbackupthemes" value="1" /> <code title="<?php echo sprintf( __( 'Path as set by user (symlink?): %s', 'backwpup' ), esc_attr( get_theme_root() ) ); ?>"><?php echo esc_attr( $folder ); ?></code><?php echo $folder_size; ?>
170
198                           type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupuploads' ), TRUE, TRUE );?>
199                           name="backupuploads" id="idbackupuploads" value="1" /> <code title="<?php echo sprintf( __( 'Path as set by user (symlink?): %s', 'backwpup' ), esc_attr( BackWPup_File::get_upload_dir() ) ); ?>"><?php echo esc_html( $folder ); ?></code><?php echo $folder_size; ?>
200
251						   type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupspecialfiles' ), TRUE, TRUE );?>
252						   name="backupspecialfiles" value="1" /> <?php _e( 'Backup wp-config.php, robots.txt, .htaccess, .htpasswd and favicon.ico from root.', 'backwpup' ); BackWPup_Help::add_tab( __( 'If the WordPress root folder is not included in this backup job, check this option to additionally include wp-config.php, robots.txt, .htaccess, .htpasswd and favicon.ico into the backup. Your wp-config.php will be included even if you placed it in the parent directory of your root folder.', 'backwpup' ) ); ?></label>
253				</td>
em-admin.php https://github.com/90rdon/bric.git | PHP | 272 lines
57	}
58	if( !empty($events_num) && !empty($submenu['edit.php?post_type='.EM_POST_TYPE_EVENT]) ){ //Submenu Event Item
59		//go through the menu array and modify the events menu if found
66	}
67	if( !empty($events_recurring_num) && !empty($submenu['edit.php?post_type='.EM_POST_TYPE_EVENT]) ){ //Submenu Recurring Event Item
68		//go through the menu array and modify the events menu if found
78	if( $pagenow == 'post-new.php' && !empty($_REQUEST['post_type']) ){
79		if( $_REQUEST['post_type'] == EM_POST_TYPE_LOCATION && !empty($_wp_submenu_nopriv['edit.php']['post-new.php']) && current_user_can('edit_locations') ){
80			unset($_wp_submenu_nopriv['edit.php']['post-new.php']);
81		}
82		if( $_REQUEST['post_type'] == 'event-recurring' && !empty($_wp_submenu_nopriv['edit.php']['post-new.php']) && current_user_can('edit_recurring_events') ){
83			unset($_wp_submenu_nopriv['edit.php']['post-new.php']);
170				<div id="em_page_error" class="updated">
171					<p><?php echo sprintf(__('Whilst they will still appear using placeholders, you need to <a href="%s">migrate your location and event images</a> in order for them to appear in your edit forms and media library. <a href="%s">Dismiss message</a>','dbem'),admin_url().'edit.php?post_type=event&page=events-manager-options&em_migrate_images=1&_wpnonce='.wp_create_nonce('em_migrate_images'), em_add_get_params($_SERVER['REQUEST_URI'], array('disable_dbem_migrate_images_nag' => 1))); ?></p>
172				</div>
em-admin.php https://github.com/AdminAcens/semine.git | PHP | 272 lines
57	}
58	if( !empty($events_num) && !empty($submenu['edit.php?post_type='.EM_POST_TYPE_EVENT]) ){ //Submenu Event Item
59		//go through the menu array and modify the events menu if found
66	}
67	if( !empty($events_recurring_num) && !empty($submenu['edit.php?post_type='.EM_POST_TYPE_EVENT]) ){ //Submenu Recurring Event Item
68		//go through the menu array and modify the events menu if found
78	if( $pagenow == 'post-new.php' && !empty($_REQUEST['post_type']) ){
79		if( $_REQUEST['post_type'] == EM_POST_TYPE_LOCATION && !empty($_wp_submenu_nopriv['edit.php']['post-new.php']) && current_user_can('edit_locations') ){
80			unset($_wp_submenu_nopriv['edit.php']['post-new.php']);
81		}
82		if( $_REQUEST['post_type'] == 'event-recurring' && !empty($_wp_submenu_nopriv['edit.php']['post-new.php']) && current_user_can('edit_recurring_events') ){
83			unset($_wp_submenu_nopriv['edit.php']['post-new.php']);
170				<div id="em_page_error" class="updated">
171					<p><?php echo sprintf(__('Whilst they will still appear using placeholders, you need to <a href="%s">migrate your location and event images</a> in order for them to appear in your edit forms and media library. <a href="%s">Dismiss message</a>','dbem'),admin_url().'edit.php?post_type=event&page=events-manager-options&em_migrate_images=1&_wpnonce='.wp_create_nonce('em_migrate_images'), em_add_get_params($_SERVER['REQUEST_URI'], array('disable_dbem_migrate_images_nag' => 1))); ?></p>
172				</div>
em-admin.php https://github.com/ahubcap/invernesscalvary.git | PHP | 272 lines
57	}
58	if( !empty($events_num) && !empty($submenu['edit.php?post_type='.EM_POST_TYPE_EVENT]) ){ //Submenu Event Item
59		//go through the menu array and modify the events menu if found
66	}
67	if( !empty($events_recurring_num) && !empty($submenu['edit.php?post_type='.EM_POST_TYPE_EVENT]) ){ //Submenu Recurring Event Item
68		//go through the menu array and modify the events menu if found
78	if( $pagenow == 'post-new.php' && !empty($_REQUEST['post_type']) ){
79		if( $_REQUEST['post_type'] == EM_POST_TYPE_LOCATION && !empty($_wp_submenu_nopriv['edit.php']['post-new.php']) && current_user_can('edit_locations') ){
80			unset($_wp_submenu_nopriv['edit.php']['post-new.php']);
81		}
82		if( $_REQUEST['post_type'] == 'event-recurring' && !empty($_wp_submenu_nopriv['edit.php']['post-new.php']) && current_user_can('edit_recurring_events') ){
83			unset($_wp_submenu_nopriv['edit.php']['post-new.php']);
170				<div id="em_page_error" class="updated">
171					<p><?php echo sprintf(__('Whilst they will still appear using placeholders, you need to <a href="%s">migrate your location and event images</a> in order for them to appear in your edit forms and media library. <a href="%s">Dismiss message</a>','dbem'),admin_url().'edit.php?post_type=event&page=events-manager-options&em_migrate_images=1&_wpnonce='.wp_create_nonce('em_migrate_images'), em_add_get_params($_SERVER['REQUEST_URI'], array('disable_dbem_migrate_images_nag' => 1))); ?></p>
172				</div>
wumii-related-posts.php https://github.com/allengaller/zenx-news.git | PHP | 703 lines
1<?php
2/*
53        // treated as regular method since PHP 5.3.3
54        // PHP 4 style constructor
55        function WumiiRelatedPosts() {
89            if ($file == plugin_basename(__FILE__)) {
90                $links[] = '<a href="options-general.php?page=wumii-related-posts.php">' . __('Settings') . '</a>';
91            }
102                // 2. "the_excerpt_rss" apply filters process:
103                //         (1. Only run when empty(post->excerpt) && post_password_required(post))
104                //            the_content (Get the whole content and then extract excerpt.
113                //    to do a lot to check if the current user is admin, we don't show rss related items
114                //    if post excerpt is empty and it's a password required post.
115                if (!has_excerpt() && !in_array($post->ID, $this->canFilledRssContentPostIds)) {
172            // 2. For some reason the client php is misconfigurated, the wp_remote_get function can not work properly.
173            //    Currently know wp_remote_get($url, $args) will crash if wordpress do request with WP_Http_ExtHTTP(in /wp-includes/http.php) and the PECL extension is not bundled with PHP.
174            // (empty($response) === true) if match one of the above reasons.
empty.html https://github.com/andriuspetrauskis/phpjs.git | HTML | 93 lines
36  Here’s what our current JavaScript equivalent to <a
37  href="http://php.net/manual/en/function.empty.php">PHP's empty</a> looks like.
38function: empty
40language: php
41permalink: php/var/empty/
42alias:
42alias:
43  - /functions/php/empty/
44  - /functions/var/empty/
44  - /functions/var/empty/
45  - /php/empty/
46  - /functions/empty/
48{% codeblock lang:javascript %}module.exports = function empty (mixedVar) {
49  //  discuss at: http://locutus.io/php/empty/
50  // original by: Philippe Baumann
Themes.php https://github.com/ArsenArsen/SMF2.1.git | PHP | 1,973 lines
326		foreach ($context['themes'] as $k => $v)
327			if (empty($v['theme_dir']) || (!file_exists($v['theme_dir'] . '/Settings.template.php') && empty($v['num_members'])))
328				unset($context['themes'][$k]);
832	// And remove all its files and folders too.
833	if (!empty($theme_info) && !empty($theme_info['theme_dir']))
834		remove_dir($theme_info['theme_dir']);
1161		// Are there any variants?
1162		if (file_exists($theme_data['theme_dir'] . '/index.template.php') && (empty($theme_data['disable_user_variant']) || allowedTo('admin_forum')))
1163		{
1182
1183					$context['available_themes'][$id_theme]['selected_variant'] = isset($_GET['vrt']) ? $_GET['vrt'] : (!empty($variant_preferences[$id_theme]) ? $variant_preferences[$id_theme] : (!empty($settings['default_variant']) ? $settings['default_variant'] : $settings['theme_variants'][0]));
1184					if (!isset($context['available_themes'][$id_theme]['variants'][$context['available_themes'][$id_theme]['selected_variant']]['thumbnail']))
1394	// Copy over the default non-theme files.
1395	$to_copy = array('/index.php', '/index.template.php', '/css/index.css', '/css/index.responsive.css', '/css/rtl.css', '/css/calendar.css', '/css/calendar.rtl.css', '/css/admin.css', '/scripts/theme.js');
1396
v1.php https://github.com/asuper114/openx.git | PHP | 1,603 lines
16 * @copyright  1997-2006 The PHP Group
17 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
18 * @version    CVS: $Id$
1049                PEAR_PACKAGEFILE_ERROR_PHP5 =>
1050                    'Error, PHP5 token encountered in %file%, analysis should be in PHP5',
1051                PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND =>
1157                }
1158                if ($d['type'] == 'php' && !empty($d['name'])) {
1159                    $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED,
1160                        array('index' => $i, 'name' => $d['name']));
1161                } elseif ($d['type'] != 'php' && empty($d['name'])) {
1162                    $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPNAME,
1164                }
1165                if ($d['type'] == 'php' && empty($d['version'])) {
1166                    $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21