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 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[1] );
|
---|
22 | $type = empty( $options[2] ) ? false : true ;
|
---|
23 | $limit = empty( $options[3] ) ? '10' : $options[3] ;
|
---|
24 | $show_post_count = empty( $options[4] ) ? false : true ;
|
---|
25 | $drop_down = empty( $options[5] ) ? false : true ;
|
---|
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 | $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
|
---|
31 | $form .= "<br />";
|
---|
32 | $a_month = _MB_XPRESS_ARC_MONTH ;
|
---|
33 | $a_week = _MB_XPRESS_ARC_WEEK ;
|
---|
34 |
|
---|
35 | $form .= "<br />" . yes_no_radio_option('options[2]', _MB_XPRESS_ARC_TYPE , $type,$a_month,$a_week);
|
---|
36 | $form .= "<br />" . _MB_XPRESS_COUNT . " <input type='text' name='options[3]' value='" . $limit . "' />";
|
---|
37 | $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_SHOW_NUM_OF_POST , $show_post_count);
|
---|
38 | $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XPRESS_SHOW_DROP_DOWN , $drop_down);
|
---|
39 | // $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
|
---|
40 |
|
---|
41 | return $form;
|
---|
42 | }
|
---|
43 |
|
---|
44 | function _b_archives_show($options)
|
---|
45 | {
|
---|
46 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
47 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
48 | $block_function_name = basename( __FILE__ );
|
---|
49 |
|
---|
50 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
51 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
52 | }
|
---|
53 |
|
---|
54 |
|
---|
55 | }
|
---|
56 |
|
---|
57 | ?> |
---|