/** * directly get inaccessible but exists properties, if in $this->accessible array * @param string $name * @return mixed */ public function __get($name) { //Do not return if not accessible if (!_in_array(@name, $this->accessible)) { return NULL; } return isset($this->{$name}) ? $this->{$name} : NULL; }
$gateway_list = explode(',', $gateways_data['gateways']); $p_first = true; foreach ($gateway_list as $v) { $v = strtolower($v); if ($gateways_data[$v . '_active'] == 1 && _in_array($v, $payment)) { if (!$p_first) { $payment_methods .= ', '; } else { $p_first = false; } $payment_methods .= $system->SETTINGS['gatways'][$v]; } } $payment_options = unserialize($system->SETTINGS['payment_options']); foreach ($payment_options as $k => $v) { if (_in_array($k, $payment)) { if (!$p_first) { $payment_methods .= ', '; } else { $p_first = false; } $payment_methods .= $v; } } $bn_link = !$has_ended ? ' <a href="' . $system->SETTINGS['siteurl'] . 'buy_now.php?id=' . $id . '"><img border="0" align="absbottom" alt="' . $MSG['496'] . '" src="' . get_lang_img('buy_it_now.gif') . '"></a>' : ''; $page_title = $system->uncleanvars($auction_data['title']); $sslurl = $system->SETTINGS['usersauth'] == 'y' && $system->SETTINGS['https'] == 'y' ? str_replace('http://', 'https://', $system->SETTINGS['siteurl']) : $system->SETTINGS['siteurl']; $sslurl = !empty($system->SETTINGS['https_url']) ? $system->SETTINGS['https_url'] : $sslurl; $shipping = ''; if ($auction_data['shipping'] == 1) { $shipping = $MSG['031'];
// payments $payment_methods = ''; $query = "SELECT * FROM " . $DBPrefix . "gateways"; $db->direct_query($query); $gateways_data = $db->result(); $gateway_list = explode(',', $gateways_data['gateways']); foreach ($gateway_list as $v) { if ($gateways_data[$v . '_active'] == 1 && check_gateway($v)) { $v = strtolower($v); $checked = _in_array($v, $payment) ? 'checked' : ''; $payment_methods .= '<p><input type="checkbox" name="payment[]" value="' . $v . '" ' . $checked . '>' . $system->SETTINGS['gatways'][$v] . '</p>'; } } $payment_options = unserialize($system->SETTINGS['payment_options']); foreach ($payment_options as $k => $v) { $checked = _in_array($k, $payment) ? 'checked' : ''; $payment_methods .= '<p><input type="checkbox" name="payment[]" value="' . $k . '" ' . $checked . '>' . $v . '</p>'; } // make hour if ($system->SETTINGS['datesformat'] == 'USA') { $gmdate_string = 'm-d-Y H:i:s'; } else { $gmdate_string = 'd-m-Y H:i:s'; } if ($_SESSION['SELL_action'] != 'edit') { if (empty($a_starts)) { $TPL_start_date = date($gmdate_string, $system->ctime); } else { if (strpos($a_starts, '-') === false) { $a_starts = date($gmdate_string, $a_starts); }
<h3 class="title"><i class="material-icons <?php echo $color; ?> "><?php echo $icon; ?> </i> <?php echo $term->name; ?> </h3> <ul> <?php foreach ($articles as $post) { setup_postdata($post); $cats = wp_get_post_terms($post->ID, 'databank-category', array("fields" => "ids")); if (!_in_array($term->term_id, $cats)) { continue; } $active = $current_post == $post->ID ? ' class="active"' : ''; ?> <li<?php echo $active; ?> ><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></li> <?php
function iard_member_access($template) { global $post; $user = wp_get_current_user(); $member_sub_role = get_field('member_sub_role', 'user_' . $user->ID); $required_access_level = get_field('member_access', $post->ID); if (!empty($required_access_level) && !_in_array($member_sub_role, $required_access_level) && !current_user_can('manage_options')) { $template = locate_template(array('page-templates/tpl-access-denied.php')); } return $template; }
function _get_link_target($url) { $extension = pathinfo($url, PATHINFO_EXTENSION); $is_doc = array('doc', 'docx', 'pdf', 'ppt', 'pptx', 'xls', 'xlsx', 'zip'); $host = home_url(); if (_in_array($extension, $is_doc) || strpos($url, $host) === false) { $target = ' target="_blank"'; } else { $target = ''; } return $target; }