[110] | 1 | <?php
|
---|
| 2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
| 3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
| 4 |
|
---|
| 5 | eval( '
|
---|
| 6 | function b_'.$mydirname.'_archives_show($options){
|
---|
| 7 | return _b_archives_show($options) ;
|
---|
| 8 | }
|
---|
| 9 | function b_'.$mydirname.'_archives_edit($options){
|
---|
| 10 | return _b_archives_edit($options) ;
|
---|
| 11 | }
|
---|
| 12 | ' ) ;
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | if( ! defined( 'XPRESS_ARCHIVES_BLOCK_INCLUDED' ) ) {
|
---|
| 16 | define( 'XPRESS_ARCHIVES_BLOCK_INCLUDED' , 1 ) ;
|
---|
| 17 |
|
---|
| 18 | function _b_archives_edit($options)
|
---|
| 19 | {
|
---|
| 20 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 21 | $type = empty( $options[1] ) ? false : true ;
|
---|
| 22 | $limit = empty( $options[2] ) ? '10' : $options[2] ;
|
---|
| 23 | $show_post_count = empty( $options[3] ) ? false : true ;
|
---|
| 24 | $drop_down = empty( $options[4] ) ? false : true ;
|
---|
| 25 | $this_template = empty( $options[5] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[3] );
|
---|
| 26 |
|
---|
| 27 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
|
---|
| 28 |
|
---|
| 29 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
|
---|
| 30 | $a_month = _MB_XPRESS_ARC_MONTH ;
|
---|
| 31 | $a_week = _MB_XPRESS_ARC_WEEK ;
|
---|
| 32 |
|
---|
| 33 | $form .= "<br />" . yes_no_radio_option('options[1]', _MB_XPRESS_ARC_TYPE , $type,$a_month,$a_week);
|
---|
| 34 | $form .= "<br />" . _MB_XPRESS_COUNT . " <input type='text' name='options[2]' value='" . $limit . "' />";
|
---|
| 35 | $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XPRESS_SHOW_NUM_OF_POST , $show_post_count);
|
---|
| 36 | $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_SHOW_DROP_DOWN , $drop_down);
|
---|
| 37 | // $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
|
---|
| 38 |
|
---|
| 39 | return $form;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | function _b_archives_show($options)
|
---|
| 43 | {
|
---|
| 44 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 45 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 46 | $block_function_name = basename( __FILE__ );
|
---|
| 47 |
|
---|
| 48 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
| 49 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | ?> |
---|