[109] | 1 | <?php
|
---|
| 2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
| 3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
| 4 |
|
---|
| 5 | eval( '
|
---|
| 6 | function b_'.$mydirname.'_calender_show($options){
|
---|
| 7 | return _b_calender_show($options) ;
|
---|
| 8 | }
|
---|
| 9 | function b_'.$mydirname.'_calender_edit($options){
|
---|
| 10 | return _b_calender_edit($options) ;
|
---|
| 11 | }
|
---|
| 12 | ' ) ;
|
---|
| 13 |
|
---|
| 14 | if( ! defined( 'XPRESS_CALENDAR_BLOCK_INCLUDED' ) ) {
|
---|
| 15 | define( 'XPRESS_CALENDAR_BLOCK_INCLUDED' , 1 ) ;
|
---|
| 16 |
|
---|
| 17 | function _b_calender_edit($options)
|
---|
| 18 | {
|
---|
| 19 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
[120] | 20 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_calender_block.html' : trim( $options[1] );
|
---|
| 21 | $sun_color = empty( $options[2] ) ? '#DB0000' : $options[2] ;
|
---|
| 22 | $sat_color = empty( $options[3] ) ? '#004D99' : $options[3] ;
|
---|
[109] | 23 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 24 |
|
---|
| 25 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
|
---|
| 26 |
|
---|
| 27 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
|
---|
[121] | 28 | $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
|
---|
| 29 | $form .= "<br />";
|
---|
| 30 | $form .= _MB_XPRESS_SUN_COLOR .": <input type='text' name='options[2]' value='" . $sun_color . "' /><br />\n";
|
---|
| 31 | $form .= _MB_XPRESS_SAT_COLOR .": <input type='text' name='options[3]' value='" . $sat_color . "' /><br />\n";
|
---|
[109] | 32 |
|
---|
| 33 | return $form;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | function _b_calender_show($options)
|
---|
| 37 | {
|
---|
| 38 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 39 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 40 | $block_function_name = basename( __FILE__ );
|
---|
| 41 |
|
---|
| 42 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
| 43 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
| 44 |
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | ?> |
---|