[119] | 1 | <?php |
---|
| 2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; |
---|
| 3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; |
---|
| 4 | |
---|
| 5 | eval( ' |
---|
| 6 | function b_'.$mydirname.'_search_show($options){ |
---|
| 7 | return _b_search_show($options) ; |
---|
| 8 | } |
---|
| 9 | function b_'.$mydirname.'_search_edit($options){ |
---|
| 10 | return _b_search_edit($options) ; |
---|
| 11 | } |
---|
| 12 | ' ) ; |
---|
| 13 | |
---|
| 14 | if( ! defined( 'XPRESS_SEARCH_BLOCK_INCLUDED' ) ) { |
---|
| 15 | define( 'XPRESS_SEARCH_BLOCK_INCLUDED' , 1 ) ; |
---|
| 16 | |
---|
| 17 | function _b_search_edit($options) |
---|
| 18 | { |
---|
| 19 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; |
---|
[120] | 20 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_search_block.html' : trim( $options[1] ); |
---|
[119] | 21 | $disp_count = empty( $options[2] ) ? '18' : $options[2] ; |
---|
| 22 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname ; |
---|
| 23 | |
---|
| 24 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php') ; |
---|
| 25 | |
---|
| 26 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; |
---|
[488] | 27 | $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); |
---|
[121] | 28 | $form .= "<br />"; |
---|
[488] | 29 | $form .= _MB_XP2_SEARCH_LENGTH .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />"; |
---|
[119] | 30 | // $form .="<br /><input type='text' size='60' name='options[2]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; |
---|
| 31 | |
---|
| 32 | return $form; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | function _b_search_show($options) |
---|
| 36 | { |
---|
| 37 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; |
---|
| 38 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; |
---|
| 39 | $block_function_name = basename( __FILE__ ); |
---|
| 40 | |
---|
| 41 | require_once $mydirpath.'/include/xpress_block_render.php'; |
---|
| 42 | return xpress_block_render($mydirname,$block_function_name,$options); |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | ?> |
---|