[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] ;
|
---|
[195] | 21 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_archives_block.html' : trim( $options[1] );
|
---|
[125] | 22 | $type = empty( $options[2] ) ? 'monthly' : $options[2] ;
|
---|
| 23 | $limit = !is_numeric( $options[3] ) ? 0 : $options[3] ;
|
---|
[120] | 24 | $show_post_count = empty( $options[4] ) ? false : true ;
|
---|
| 25 | $drop_down = empty( $options[5] ) ? false : true ;
|
---|
[110] | 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 />";
|
---|
[488] | 30 | $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
|
---|
[121] | 31 | $form .= "<br />";
|
---|
[183] | 32 | $a_month = _MB_XP2_ARC_MONTH ;
|
---|
| 33 | $a_week = _MB_XP2_ARC_WEEK ;
|
---|
[110] | 34 |
|
---|
[183] | 35 | $form .= _MB_XP2_ARC_TYPE .": ";
|
---|
[125] | 36 | $form .= "<select name='options[2]'>";
|
---|
| 37 | if ($type =='yearly')
|
---|
[183] | 38 | $form .= "<option value='yearly' selected='selected'>". _MB_XP2_ARC_YEAR;
|
---|
[125] | 39 | else
|
---|
[183] | 40 | $form .= "<option value='yearly'>". _MB_XP2_ARC_YEAR;
|
---|
[125] | 41 |
|
---|
| 42 | if ($type =='monthly')
|
---|
[183] | 43 | $form .= "<option value='monthly' selected='selected'>". _MB_XP2_ARC_MONTH;
|
---|
[125] | 44 | else
|
---|
[183] | 45 | $form .= "<option value='monthly'>". _MB_XP2_ARC_MONTH;
|
---|
[125] | 46 |
|
---|
| 47 | if ($type =='weekly')
|
---|
[183] | 48 | $form .= "<option value='weekly' selected='selected'>". _MB_XP2_ARC_WEEK;
|
---|
[125] | 49 | else
|
---|
[183] | 50 | $form .= "<option value='weekly'>". _MB_XP2_ARC_WEEK;
|
---|
[125] | 51 |
|
---|
| 52 | if ($type =='daily')
|
---|
[183] | 53 | $form .= "<option value='daily' selected='selected'>". _MB_XP2_ARC_DAY;
|
---|
[125] | 54 | else
|
---|
[183] | 55 | $form .= "<option value='daily'>". _MB_XP2_ARC_DAY;
|
---|
[125] | 56 |
|
---|
| 57 | if ($type =='postbypost')
|
---|
[183] | 58 | $form .= "<option value='postbypost' selected='selected'>". _MB_XP2_ARC_POST;
|
---|
[125] | 59 | else
|
---|
[183] | 60 | $form .= "<option value='postbypost'>". _MB_XP2_ARC_POST;
|
---|
[125] | 61 |
|
---|
| 62 | $form .= "</select><br/>";
|
---|
| 63 |
|
---|
[488] | 64 | $form .= "<br />" . _MB_XP2_COUNT_ZERO_ALL . " <input type='text' size='3' name='options[3]' value='" . $limit . "' />";
|
---|
[183] | 65 | $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_NUM_OF_POST , $show_post_count);
|
---|
| 66 | $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_SHOW_DROP_DOWN , $drop_down);
|
---|
[110] | 67 | // $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
|
---|
| 68 |
|
---|
| 69 | return $form;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | function _b_archives_show($options)
|
---|
| 73 | {
|
---|
| 74 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 75 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 76 | $block_function_name = basename( __FILE__ );
|
---|
| 77 |
|
---|
| 78 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
| 79 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
| 80 | }
|
---|
| 81 |
|
---|
| 82 |
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | ?> |
---|