* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . '/core/template/tags/form/control_tag.class.php';
class control_button_tag_info
{
    var $tag = 'control_button';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'control_button_tag';
}
register_tag(new control_button_tag_info());
/**
* Compile time component for button tags
*/
class control_button_tag extends control_tag
{
    var $runtime_component_path = '/core/template/components/form/control_button_component';
    function check_nesting_level()
    {
        if (!isset($this->attributes['action'])) {
            error('ATTRIBUTE_REQUIRED', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'attribute' => 'action', 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
    }
    function get_rendered_tag()
    {
        return 'button';
Пример #2
0
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id: outputcache.tag.php 441 2004-02-13 16:07:39Z server $
*
***********************************************************************************/ 
class core_output_cache_tag_info
{
	var $tag = 'core:OUTPUTCACHE';
	var $end_tag = ENDTAG_REQUIRED;
	var $tag_class = 'core_output_cache_tag';
} 

register_tag(new core_output_cache_tag_info());

class core_output_cache_tag extends server_component_tag
{
	var $runtime_component_path = '/core/template/components/output_cache_component';

	/**
	* Name of runtime variable reference where cached content is stored
	* 
	* @var string 
	* @access private 
	*/
	var $content_ref;
	/**
	* 
	* @param code $ _writer
Пример #3
0
<?php
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/

class hint_link_tag_info
{
  var $tag = 'hint:LINK';
  var $end_tag = ENDTAG_REQUIRED;
  var $tag_class = 'hint_link_tag';
}

register_tag(new hint_link_tag_info());

class hint_link_tag extends compiler_directive_tag
{
}

?>
Пример #4
0
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/


class actions_tag_info
{
	var $tag = 'actions';
	var $end_tag = ENDTAG_REQUIRED;
	var $tag_class = 'actions_tag';
} 

register_tag(new actions_tag_info());

class actions_tag extends server_component_tag
{
	var $runtime_component_path = '/core/template/components/actions_component';


	function pre_generate(&$code)
	{
		parent :: pre_generate($code);

		$actions_array = '$' . $code->get_temp_variable();
		$node_id = '$' . $code->get_temp_variable();
		$node = '$' . $code->get_temp_variable();
		$code->write_php("{$actions_array} = ".  $this->parent->get_dataspace_ref_code() . '->get("actions");'."\n");
		
Пример #5
0
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class poll_tag_info
{
    var $tag = 'poll';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'poll_tag';
}
register_tag(new poll_tag_info());
/**
* The parent compile time component for lists
*/
class poll_tag extends server_component_tag
{
    var $runtime_component_path = '/core/template/components/poll_component';
    function pre_generate(&$code)
    {
        parent::pre_generate($code);
        $code->write_php($this->get_component_ref_code() . '->prepare();');
    }
    function generate_contents(&$code)
    {
        $form_child =& $this->find_child('poll_form');
        $results_child =& $this->find_child('poll_results');
Пример #6
0
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class user_attribute_tag_info
{
    var $tag = 'user:ATTRIBUTE';
    var $end_tag = ENDTAG_FORBIDDEN;
    var $tag_class = 'user_attribute_tag';
}
register_tag(new user_attribute_tag_info());
class user_attribute_tag extends compiler_directive_tag
{
    var $name;
    function pre_parse()
    {
        $name = $this->attributes['name'];
        if (empty($name)) {
            error('MISSINGREQUIREATTRIBUTE', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'attribute' => 'name', 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
        return PARSER_REQUIRE_PARSING;
    }
    function generate_contents(&$code)
    {
        $user_methods = get_class_methods('user');
        $user = '******' . $code->get_temp_variable();
***********************************************************************************
*
* $Id$
*
***********************************************************************************/

require_once(LIMB_DIR . '/core/template/tags/form/button.tag.php');

class action_button_tag_info
{
	var $tag = 'action_button';
	var $end_tag = ENDTAG_FORBIDDEN;
	var $tag_class = 'action_button_tag';
} 

register_tag(new action_button_tag_info());

class action_button_tag extends button_tag
{
	var $runtime_component_path = '/core/template/components/form/input_submit_component';
	
	function check_nesting_level()
	{
		if (!isset($this->attributes['action']))
		{
			error('ATTRIBUTE_REQUIRED', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, array('tag' => $this->tag,
					'attribute' => 'action',
					'file' => $this->source_file,
					'line' => $this->starting_line_no));
		} 
	}
Пример #8
0
define('TREE_SPACER_IMG', "<img src='/shared/images/0.gif' width=20>");
define('TREE_END_IMG', 	"<table border=0 cellspacing=0 cellpadding=0 height=100% style='display:inline'><tr><td valign=top><img src='/shared/images/t_e.gif'></td></tr></table>");
define('TREE_END_P_IMG', "<table border=0 cellspacing=0 cellpadding=0 height=100%% style='display:inline'><tr><td><a href='%s'><img src='/shared/images/t_e_p.gif'></a></td></tr><tr><td height=100%%></td></tr></table>");
define('TREE_END_M_IMG', "<table border=0 cellspacing=0 cellpadding=0 height=100%% style='display:inline'><tr><td><a href='%s'><img src='/shared/images/t_e_m.gif' border=0></a></td></tr><tr><td height=100%%></td></tr></table>");
define('TREE_CROSS_IMG', "<table border=0 cellspacing=0 cellpadding=0 height=100%% style='display:inline'><tr><td background='/shared/images/t_l.gif' valign=top><img src='/shared/images/t_c.gif' border=0></td></tr></table>");
define('TREE_CROSS_P_IMG', "<table border=0 cellspacing=0 cellpadding=0 height=100%% style='display:inline'><tr><td background='/shared/images/t_l.gif' valign=top><a href='%s'><img src='/shared/images/t_c_p.gif' border=0></a></td></tr></table>");
define('TREE_CROSS_M_IMG', "<table border=0 cellspacing=0 cellpadding=0 height=100%% style='display:inline'><tr><td background='/shared/images/t_l.gif' valign=top><a href='%s'><img src='/shared/images/t_c_m.gif' border=0></a></td></tr></table>");

class grid_tree_item_tag_info
{
	var $tag = 'grid:TREE_ITEM';
	var $end_tag = ENDTAG_FORBIDDEN;
	var $tag_class = 'grid_tree_item_tag';
} 

register_tag(new grid_tree_item_tag_info());

class grid_tree_item_tag extends compiler_directive_tag 
{
	function check_nesting_level()
	{
		if (!is_a($this->parent, 'grid_iterator_tag'))
		{
			error('MISSINGENCLOSURE', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, array('tag' => $this->tag,
					'enclosing_tag' => 'grid:ITERATOR',
					'file' => $this->source_file,
					'line' => $this->starting_line_no));
		} 
	} 

	function generate_contents(&$code)
Пример #9
0
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class core_literal_tag_info
{
    var $tag = 'core:LITERAL';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'core_literal_tag';
}
register_tag(new core_literal_tag_info());
/**
* Prevents a section of the template from being parsed, placing the contents
* directly into the compiled template
*/
class core_literal_tag extends compiler_directive_tag
{
    /**
     *
     * @return void
     * @access protected
     */
    function check_nesting_level()
    {
        if ($this->find_parent_by_class('core_literal_tag')) {
            error('BADSELFNESTING', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'file' => $this->source_file, 'line' => $this->starting_line_no));
Пример #10
0
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id: session_id.tag.php 14 2004-03-03 17:37:32Z server $
*
***********************************************************************************/
class ip_tag_info
{
	var $tag = 'core:IP';
	var $end_tag = ENDTAG_FORBIDDEN;
	var $tag_class = 'ip_tag';
} 

register_tag(new ip_tag_info());

class ip_tag extends compiler_directive_tag
{
	function generate_contents(&$code)
	{
		if(isset($this->attributes['hash_id']))
		{
			$code->write_php(
				'echo ip :: decode_ip(' . $this->get_dataspace_ref_code() . '->get("' . $this->attributes['hash_id'] . '"));');
		}
		else
			$code->write_php('echo sys :: client_ip();');
	} 
} 
Пример #11
0
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/ 
class datasource_tag_info
{
	var $tag = 'DATASOURCE';
	var $end_tag = ENDTAG_REQUIRED;
	var $tag_class = 'datasource_tag';
} 

register_tag(new datasource_tag_info());

class datasource_tag extends server_component_tag
{
	var $runtime_component_path = '/core/template/components/datasource_component';
	
	function check_nesting_level()
	{
		if (!isset($this->attributes['target']))
		{
			error('ATTRIBUTE_REQUIRED', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, array('tag' => $this->tag,
					'attribute' => 'target',
					'file' => $this->source_file,
					'line' => $this->starting_line_no));
		} 
	}
Пример #12
0
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class tabs_labels_tag_info
{
    var $tag = 'tabs:labels';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'tabs_labels_tag';
}
register_tag(new tabs_labels_tag_info());
class tabs_labels_tag extends compiler_directive_tag
{
    /**
     *
     * @return void
     * @access protected
     */
    function check_nesting_level()
    {
        if (!is_a($this->parent, 'tabs_tag')) {
            error('MISSINGENCLOSURE', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'enclosing_tag' => 'tabs', 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
    }
    function pre_generate(&$code)
    {
Пример #13
0
*
* $Id: sys_param.tag.php 32 2004-03-11 18:00:48Z server $
*
***********************************************************************************/


require_once(LIMB_DIR . '/core/template/compiler/server_component_tag.class.php');

class sys_param_tag_info
{
	var $tag = 'core:SYS_PARAM';
	var $end_tag = ENDTAG_FORBIDDEN;
	var $tag_class = 'sys_param_tag';
} 

register_tag(new sys_param_tag_info());

class sys_param_tag extends server_component_tag
{
	var $runtime_component_path = '/core/template/components/sys_param_component';
	
	function generate_contents(&$code)
	{
		if(isset($this->attributes['name']) && isset($this->attributes['type']))
		{

			$code->write_php(
				$this->get_component_ref_code() . '->get_param("' . $this->attributes['name'] . '","' . $this->attributes['type'] . '");');
		}
		
		parent :: generate_contents($code);
Пример #14
0
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class metadata_title_tag_info
{
    var $tag = 'METADATA:TITLE';
    var $end_tag = ENDTAG_FORBIDDEN;
    var $tag_class = 'metadata_title_tag';
}
register_tag(new metadata_title_tag_info());
class metadata_title_tag extends server_component_tag
{
    var $runtime_component_path = '/core/template/components/metadata_component';
    function generate_contents(&$code)
    {
        $ref = $this->get_component_ref_code();
        if (isset($this->attributes['separator'])) {
            $code->write_php("{$ref}->set_title_separator(\"" . $this->attributes['separator'] . "\");\n");
        }
        $ref = $this->get_component_ref_code();
        $code->write_php("echo {$ref}->get_title();\n");
        parent::generate_contents($code);
    }
}
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/


class user_not_logged_in_tag_info
{
	var $tag = 'user:NOT_LOGGED_IN';
	var $end_tag = ENDTAG_REQUIRED;
	var $tag_class = 'user_not_logged_in_tag';
} 

register_tag(new user_not_logged_in_tag_info());

class user_not_logged_in_tag extends compiler_directive_tag
{
	function generate_contents(&$code)
	{
		$user = '******' . $code->get_temp_variable();
		$code->write_php("{$user} =& user :: instance();");

		$code->write_php("if (!{$user}->is_logged_in()) {");
			parent :: generate_contents($code);
		$code->write_php("}");
	}
} 

?>
Пример #16
0
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/ 
class metadata_charset_tag_info
{
	var $tag = 'metadata:CHARSET';
	var $end_tag = ENDTAG_FORBIDDEN;
	var $tag_class = 'metadata_charset_tag';
} 

register_tag(new metadata_charset_tag_info());

class metadata_charset_tag extends compiler_directive_tag
{

	/**
	* 
	* @param code $ _writer
	* @return void 
	* @access protected 
	*/
	function generate_contents(&$code)
	{
		//<meta http-equiv="Content-Type" content="text/html; charset=' . locale . '">
		$locale = '$' . $code->get_temp_variable();
		
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
//require_once(LIMB_DIR . '/core/template/tags/form/compiler_directive_tag.class.php');
class radio_selector_tag_info
{
    var $tag = 'radio_selector';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'radio_selector_tag';
}
register_tag(new radio_selector_tag_info());
class radio_selector_tag extends compiler_directive_tag
{
    function pre_generate(&$code)
    {
        $value = '$' . $code->get_temp_variable();
        $parent = $this->get_dataspace_ref_code();
        $radio_child =& $this->find_child_by_class('input_tag');
        $label_child =& $this->find_child_by_class('label_tag');
        $radio = $radio_child->get_component_ref_code();
        $label = $label_child->get_component_ref_code();
        $code->write_php("\r\n    if ({$value} = {$parent}->get('id'))\r\n    {\r\n      {$radio}->set_attribute('value', {$value});\r\n      {$radio}->set_attribute('id', {$value});\r\n      {$label}->set_attribute('for', {$value});\r\n    }\r\n    ");
        parent::pre_generate($code);
    }
}
Пример #18
0
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/

class admin_list_footer_tag_info
{
  var $tag = 'admin:list:footer';
  var $end_tag = ENDTAG_REQUIRED;
  var $tag_class = 'admin_list_footer_tag';
}

register_tag(new  admin_list_footer_tag_info());

class  admin_list_footer_tag extends compiler_directive_tag
{
  function generate_now(&$code)
  {
    parent :: generate(&$code);
  }

  function generate(&$code)
  {
  }

}

?>
Пример #19
0
<?php

/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class form_error_status_tag_info
{
    var $tag = 'form:ERROR_STATUS';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'error_status_tag';
}
register_tag(new form_error_status_tag_info());
class error_status_tag extends compiler_directive_tag
{
    function check_nesting_level()
    {
        if (!$this->find_parent_by_class('form_status_tag')) {
            error('BADSELFNESTING', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
    }
}
Пример #20
0
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . 'core/template/compiler/var_file_compiler.inc.php';
class core_import_tag_info
{
    var $tag = 'core:IMPORT';
    var $end_tag = ENDTAG_FORBIDDEN;
    var $tag_class = 'core_import_tag';
}
register_tag(new core_import_tag_info());
/**
* Imports a var file into the dataspace (e.g. a configuration file)
*/
class core_import_tag extends silent_compiler_directive_tag
{
    /**
     * 
     * @return void 
     * @access protected 
     */
    function check_nesting_level()
    {
        if ($this->find_parent_by_class('core_import_tag')) {
            error('BADSELFNESTING', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/

class core_request_transfer_tag_info
{
	var $tag = 'core:REQUEST_TRANSFER';
	var $end_tag = ENDTAG_REQUIRED;
	var $tag_class = 'core_request_transfer_tag';
} 

register_tag(new core_request_transfer_tag_info());

class core_request_transfer_tag extends server_tag_component_tag
{
	var $runtime_component_path = '/core/template/components/request_transfer_component'; 
	
	function pre_parse()
	{
		if (! array_key_exists('attributes', $this->attributes) || empty($this->attributes['attributes'])) 
			error('MISSINGREQUIREATTRIBUTE', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, 
						array('tag' => $this->tag,
									'attribute' => 'attributes',
									'file' => $this->source_file,
									'line' => $this->starting_line_no));
									
		return PARSER_REQUIRE_PARSING;
Пример #22
0
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/

class admin_list_head_tag_info
{
  var $tag = 'admin:list:head';
  var $end_tag = ENDTAG_REQUIRED;
  var $tag_class = 'admin_list_head_tag';
}

register_tag(new  admin_list_head_tag_info());

class  admin_list_head_tag extends server_tag_component_tag 
{
  var $runtime_component_path = '/core/template/tag_component';

  function get_rendered_tag()
  {
    return 'th';
  }
  
 
  function post_generate(&$code)
  {
    parent :: post_generate(&$code);
    $code->write_html("<th class=\"sep\"><img src='/shared/images/1x1.gif'></th>");
Пример #23
0
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . '/core/template/tags/form/control_tag.class.php';
class select_tag_info
{
    var $tag = 'select';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'select_tag';
}
register_tag(new select_tag_info());
/**
* Compile time component for building runtime select components
*/
class select_tag extends control_tag
{
    var $runtime_component_path;
    /**
     *
     * @return void
     * @access protected
     */
    function prepare()
    {
        if (array_key_exists('multiple', $this->attributes)) {
            $this->attributes['multiple'] = 1;
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class tabs_contents_tag_info
{
    var $tag = 'tabs:contents';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'tabs_contents_tag';
}
register_tag(new tabs_contents_tag_info());
class tabs_contents_tag extends compiler_directive_tag
{
    /**
     *
     * @return void
     * @access protected
     */
    function check_nesting_level()
    {
        if (!is_a($this->parent, 'tabs_tag')) {
            error('MISSINGENCLOSURE', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'enclosing_tag' => 'tabs', 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
    }
    function pre_generate(&$code)
    {
Пример #25
0
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/


class pager_current_tag_info
{
	var $tag = 'pager:current';
	var $end_tag = ENDTAG_REQUIRED;
	var $tag_class = 'pager_current_tag';
} 

register_tag(new pager_current_tag_info());

class pager_current_tag extends server_component_tag
{
	var $runtime_component_path = '/core/template/component';
	
	/**
	* 
	* @return void 
	* @access private 
	*/
	function check_nesting_level()
	{
		if ($this->find_parent_by_class('pager_current_tag'))
		{
			error('BADSELFNESTING', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, array('tag' => $this->tag,
Пример #26
0
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class user_in_groups_tag_info
{
    var $tag = 'user:IN_GROUPS';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'user_in_groups_tag';
}
register_tag(new user_in_groups_tag_info());
class user_in_groups_tag extends compiler_directive_tag
{
    function pre_parse()
    {
        $groups = $this->attributes['groups'];
        if (empty($groups)) {
            error('MISSINGREQUIREATTRIBUTE', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'attribute' => 'groups', 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
        return PARSER_REQUIRE_PARSING;
    }
    function generate_contents(&$code)
    {
        $groups = $this->attributes['groups'];
        $user = '******' . $code->get_temp_variable();
        $code->write_php("{$user} =& user :: instance();");
Пример #27
0
* Copyright 2004 BIT, Ltd. http://www.limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id: selector.tag.php 21 2004-03-05 11:43:13Z server $
*
***********************************************************************************/
require_once LIMB_DIR . '/core/template/tags/form/control_tag.class.php';
class js_selector_tag_info
{
    var $tag = 'js_selector';
    var $end_tag = ENDTAG_FORBIDDEN;
    var $tag_class = 'js_selector_tag';
}
register_tag(new js_selector_tag_info());
class js_selector_tag extends control_tag
{
    var $runtime_component_path = '/core/template/components/form/js_checkbox_component';
    function prepare()
    {
        if (!isset($this->attributes['selector_name'])) {
            $this->attributes['name'] = 'selector_name';
        } else {
            $this->attributes['name'] = $this->attributes['selector_name'];
        }
        unset($this->attributes['selector_name']);
    }
    function get_rendered_tag()
    {
        return 'input';
Пример #28
0
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id: actions.tag.php 916 2004-11-23 09:14:28Z pachanga $
*
***********************************************************************************/

class admin_list_actions_tag_info
{
  var $tag = 'admin:list:actions';
  var $end_tag = ENDTAG_REQUIRED;
  var $tag_class = 'admin_list_actions_tag';
}

register_tag(new admin_list_actions_tag_info());

class admin_list_actions_tag extends compiler_directive_tag
{
  var $actions = array();

  function check_nesting_level()
  {
    if (!$this->find_parent_by_class('grid_list_tag'))
    {
      error('INVALIDNESTING', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, array('tag' => $this->tag,
          'enclosing_tag' => 'grid:LIST',
          'file' => $this->source_file,
          'line' => $this->starting_line_no));
    }
  }
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
class grid_site_map_tree_item_tag_info
{
    var $tag = 'grid:SITE_MAP_TREE_ITEM';
    var $end_tag = ENDTAG_REQUIRED;
    var $tag_class = 'grid_site_map_tree_item_tag';
}
register_tag(new grid_site_map_tree_item_tag_info());
class grid_site_map_tree_item_tag extends compiler_directive_tag
{
    function check_nesting_level()
    {
        if (!is_a($this->parent, 'grid_iterator_tag')) {
            error('MISSINGENCLOSURE', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('tag' => $this->tag, 'enclosing_tag' => 'grid:SITE_MAP_TREE_ITEM', 'file' => $this->source_file, 'line' => $this->starting_line_no));
        }
    }
    function generate_contents(&$code)
    {
        $ref = $this->get_component_ref_code();
        $code->write_html("<table border='0' cellpadding='0' cellspacing='0' height='100%'><tr><td>");
        $i = '$' . $code->get_temp_variable();
        $node_htm = '$' . $code->get_temp_variable();
        $level = '$' . $code->get_temp_variable();
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/ 
class grid_selectors_toggler_tag_info
{
	var $tag = 'grid:SELECTORS_TOGGLER';
	var $end_tag = ENDTAG_FORBIDDEN;
	var $tag_class = 'grid_selectors_toggler_tag';
} 

register_tag(new grid_selectors_toggler_tag_info());

class grid_selectors_toggler_tag extends compiler_directive_tag
{
	/**
	* 
	* @return void 
	* @access private 
	*/
	function check_nesting_level()
	{
		if (!$this->find_parent_by_class('grid_list_tag'))
		{
			error('INVALIDNESTING', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__, array('tag' => $this->tag,
					'enclosing_tag' => 'grid:LIST',
					'file' => $this->source_file,