コード例 #1
0
ファイル: trace_helper.php プロジェクト: vstorm83/propertease
 static function init_trace($config_model, $config_id)
 {
     self::delete_trace_file();
     @file_put_contents(LAFC_TRACE_FILE_PATH, LAFC_UTF8_HEADER . date("d/m/y H:i") . ' Tracing Initialised' . "\n");
     $locale = setlocale(LC_ALL, 0);
     $locale_string = print_r($locale, true);
     $langObj = JFactory::getLanguage();
     $language = $langObj->get('tag');
     $php_version = phpversion();
     $app = JFactory::getApplication();
     $session_lifetime = $app->getCfg('lifetime');
     // session lifetime in seconds
     $live_site = $app->getCfg('live_site');
     $caching = $app->getCfg('caching');
     self::trace(LAFC_COMPONENT_NAME . ' version ' . self::getComponentVersion());
     self::trace('FCP Plugin       : ' . self::getPluginStatus());
     self::trace("PHP version      : " . $php_version);
     self::trace("PHP Locale       : " . $locale_string);
     self::trace("Server           : " . PHP_OS);
     self::trace("Joomla Version   : " . JVERSION);
     self::trace("Joomla Language  : " . $language);
     self::trace("Session Lifetime : " . $session_lifetime . ' minutes');
     self::trace("JURI::root()     : " . JURI::root());
     self::trace("Config live_site : " . $live_site);
     self::trace("Config caching   : " . $caching);
     jimport('joomla.plugin.plugin');
     if (JPluginHelper::isEnabled('system', 'cache')) {
         self::trace("Sys Cache Plugin : Enabled");
     } else {
         self::trace("Sys Cache Plugin : Not enabled");
     }
     if (function_exists('get_magic_quotes_gpc') and get_magic_quotes_gpc()) {
         self::trace("Magic Quotes     : ON");
     }
     $tmp_dir = $app->getCfg('tmp_path');
     if (is_writable($tmp_dir)) {
         self::trace("Temp directory is writeable: " . $tmp_dir);
     } else {
         self::trace("Temp directory is not writeable: " . $tmp_dir);
     }
     self::trace("Installed languages:");
     $language_list = FCP_Admin::make_lang_list();
     foreach ($language_list as $tag => $name) {
         self::trace("   {$tag} => {$name}");
     }
     $config_list = $config_model->getList();
     $num_configs = count($config_list);
     self::trace("There are {$num_configs} configuration(s)");
     foreach ($config_list as $config) {
         if ($config->default_config) {
             self::trace('   ' . $config->name . ' (' . $config->language . ') ** DEFAULT **');
         } else {
             self::trace('   ' . $config->name . ' (' . $config->language . ')');
         }
     }
     //	$config_data = $config_model->getOneById($config_id);
     //	$config_text = print_r($config_data,true);
     //	self::trace("The current back-end configuration is $config_id: ".$config_data->name." [".$config_data->language."]:");
     //	self::trace($config_text);
     //	self::trace(str_repeat('=',80));
     self::trace('**********  End of header  **********');
     //	self::trace(str_repeat('=',80));
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: vstorm83/propertease
    function display($tpl = null)
    {
        if ($this->new_flag == 1) {
            FCP_Admin::make_title('COM_FLEXICONTACT_NEW_CONFIG');
        } else {
            FCP_Admin::make_title('COM_FLEXICONTACT_CONFIG_EDIT', $this->config_data, $this->config_count);
        }
        JToolBarHelper::apply();
        JToolBarHelper::save();
        JToolBarHelper::cancel();
        $langs = FCP_Admin::make_lang_list();
        $cur_lang = JFactory::getLanguage();
        $lang_text = JText::_('JFIELD_LANGUAGE_LABEL');
        ?>
	
	<form action="index.php" method="post" name="adminForm" id="adminForm" >
	<input type="hidden" name="option" value="<?php 
        echo LAFC_COMPONENT;
        ?>
" />
	<input type="hidden" name="controller" value="multiconfig" />
	<input type="hidden" name="task" value="add" />
	<input type="hidden" name="view" value="config_edit" />
	<input type="hidden" name="new_flag" value="<?php 
        echo $this->new_flag;
        ?>
" />
	<input type="hidden" name="copy_flag" value="<?php 
        echo $this->copy_flag;
        ?>
" />
	<table class="fc_table">
		
	<?php 
        // if we are creating a new configuration, show the "base" config selector
        if ($this->new_flag == 1 and $this->copy_flag == 0) {
            echo '<tr><td class="prompt">' . JText::_('COM_FLEXICONTACT_BASE_CONFIG') . '</td>';
            if ($this->config_count > 1) {
                $config_list = FCP_Common::make_list('config_id', $this->config_data->id, $this->config_names);
                $info = FCP_Admin::make_info(JText::_('COM_FLEXICONTACT_BASE_CONFIG_DESC'));
                echo '<td>' . $config_list . ' ' . $info . '</td></tr>';
            } else {
                echo '<input type="hidden" name="config_id" value="0" />';
                echo '<td>' . JText::_('COM_FLEXICONTACT_DEFAULT') . '</td></tr>';
            }
            echo '<tr><td colspan="2"><h3>' . JText::_('COM_FLEXICONTACT_NEW_CONFIG') . '</h3></td></tr>';
        } else {
            echo '<input type="hidden" name="config_id" value="' . $this->config_data->id . '" />';
        }
        // edit mode
        // the new configuration name
        echo '<tr><td class="prompt">' . JText::_('COM_FLEXICONTACT_CONFIG_NAME') . '</td>';
        if ($this->copy_flag == 1) {
            echo '<input type="hidden" name="name" value="' . $this->config_data->name . '" />';
            echo '<td>' . $this->config_data->name . '</td></tr>';
        } else {
            echo '<td><input type="text" size="40" name="name" value = "' . $this->config_data->name . '" /></td></tr>';
        }
        // the new configuration language
        echo '<tr><td class="prompt">' . $lang_text . '</td>';
        if (count($langs) > 1) {
            $lang_list = FCP_Common::make_list('config_lang', $this->config_data->language, $langs);
            echo '<td>' . $lang_list . '</td></tr>';
        } else {
            echo '<input type="hidden" name="config_lang" value="' . $cur_lang->getTag() . '" />';
            echo '<td>' . $cur_lang->getTag() . '</td></tr>';
        }
        // a description for the new config
        echo '<tr><td class="prompt">' . JText::_('COM_FLEXICONTACT_CONFIG_DESC') . '</td>';
        echo '<td><input type="text" size="120" name="description" value = "' . $this->config_data->description . '" /></td></tr>';
        echo '</table>';
        echo '</form>';
    }
コード例 #3
0
 function _allLang($name)
 {
     $langs = FCP_Admin::make_lang_list();
     $config_model = $this->getModel('config');
     foreach ($langs as $key => $value) {
         $ret = $config_model->_exists($name, $key);
         // Config does not exist in this language
         if (!$ret) {
             return false;
         }
     }
     return true;
 }