Ejemplo n.º 1
0
function process_form()
{
    show_calendar($_POST['month'], $_POST['year']);
}
Ejemplo n.º 2
0
        JSubMenuHelper::addEntry(JText::_('Calendar'), 'index.php?option=com_spidercalendar&task=calendar');
        JSubMenuHelper::addEntry(JText::_('Event Category'), 'index.php?option=com_spidercalendar&task=event_category', true);
        JSubMenuHelper::addEntry(JText::_('Themes'), 'index.php?option=com_spidercalendar&task=theme');
        JSubMenuHelper::addEntry(JText::_('Plugin Code Generator'), 'index.php?option=com_spidercalendar&task=plugin');
        JSubMenuHelper::addEntry(JText::_('Licensing'), 'index.php?option=com_spidercalendar&task=license');
        break;
    case 'cancel_event_category':
        cancel_event_category();
        break;
    case 'cancel_event_category':
        cancel_event_category();
        break;
        ////////////
    ////////////
    default:
        show_calendar();
        JSubMenuHelper::addEntry(JText::_('Calendar'), 'index.php?option=com_spidercalendar&task=calendar', true);
        JSubMenuHelper::addEntry(JText::_('Event Category'), 'index.php?option=com_spidercalendar&task=event_category');
        JSubMenuHelper::addEntry(JText::_('Themes'), 'index.php?option=com_spidercalendar&task=theme');
        JSubMenuHelper::addEntry(JText::_('Plugin Code Generator'), 'index.php?option=com_spidercalendar&task=plugin');
        JSubMenuHelper::addEntry(JText::_('Licensing'), 'index.php?option=com_spidercalendar&task=license');
        break;
}
if ($task == 'theme') {
    JSubMenuHelper::addEntry(JText::_('Calendar'), 'index.php?option=com_spidercalendar&task=calendar');
    JSubMenuHelper::addEntry(JText::_('Event Category'), 'index.php?option=com_spidercalendar&task=event_category');
    JSubMenuHelper::addEntry(JText::_('Themes'), 'index.php?option=com_spidercalendar&task=theme', true);
    JSubMenuHelper::addEntry(JText::_('Plugin Code Generator'), 'index.php?option=com_spidercalendar&task=plugin');
    JSubMenuHelper::addEntry(JText::_('Licensing'), 'index.php?option=com_spidercalendar&task=license');
}
if ($task == 'license') {
Ejemplo n.º 3
0
    function draw()
    {
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        #
        #	draw the table editor screen
        #
        global $_TBL_DEFS, $_T_TBL_DEFS, $_FIELDS, $_T_FIELDS, $_RESERVED_FIELDS;
        $_ALLOWED_TYPES = explode('|', MED_FLD_TYPES);
        #	0.0.4
        ?>
<h3>Table: <?php 
        echo EDIT_TABLE_DESC;
        ?>
</h3>
		<hr class="line" />

		<input name="_action" type="hidden" value="" />
		<input name="type" type="hidden" value="<?php 
        echo $_POST['type'];
        ?>
" />

		<div style="width:100%;margin:0;background:#fff;padding:0px;">
		<table cellspacing="6" cellpadding="4"><?php 
        #
        #	prepare the data table contents pending on the fields definitions
        #
        for ($i = 0; $i < $_T_FIELDS; $i++) {
            #	for each field
            #
            $post_name = $_FIELDS[$i]['Field'];
            #
            #	0.0.4: BEG
            #-------------
            $clean_type = get_field_type_clean($_FIELDS[$i]['Type']);
            $readonly = '';
            //if($_FIELDS[$i]['Comment']!='*PRIVATE' && !in_array($post_name, $_RESERVED_FIELDS))
            if ($_FIELDS[$i]['Comment'] == '*PRIVATE' || in_array($post_name, $_RESERVED_FIELDS) || !in_array($clean_type, $_ALLOWED_TYPES)) {
                $readonly = ' readonly="readonly"';
            }
            #-------------
            #	0.0.4: END
            #
            #	if is not a reserved field
            #
            $label = $_FIELDS[$i]['Comment'];
            if ($label == '') {
                #	if there is no comment, use the field name as the label
                #
                $label = strtoupper(substr($_FIELDS[$i]['Field'], 0, 1)) . substr($_FIELDS[$i]['Field'], 1);
                #	capitalize
                $label = str_replace('_', ' ', $label);
                #	replace underscore
            }
            if ($_FIELDS[$i]['Key'] != '') {
                $label .= '<code style="margin-left:4px;">Key</code>';
            }
            #	0.0.4 - debug
            $field_len_info = table_editor_get_field_len_info($_FIELDS[$i]['Type']);
            //var_dump($field_len_info);echo '<hr>';
            #
            #	write the table row for this field
            #
            echo '<tr>' . '<td valign="top">' . $label . '<div id="' . $post_name . 'Msg"></div></td>' . '<td valign="top">';
            //$_TBL_DEFS, $_T_TBL_DEFS
            $iii = 0;
            $isREFERENCED = false;
            while ($iii < $_T_TBL_DEFS && $isREFERENCED == false) {
                //if($_FIELDS[$i]['Field']==$table_defs[$iii]['referenceField'])
                if ($_FIELDS[$i]['Field'] == $_TBL_DEFS[$iii]['referenceField']) {
                    $isREFERENCED = true;
                    #
                    #	build a selection item
                    #
                    $selectReferenced = get_referenced_options($_POST[$post_name], $_TBL_DEFS[$iii]['referencedTable'], $_TBL_DEFS[$iii]['referencedID'], $_TBL_DEFS[$iii]['referencedDesc'], $post_name);
                }
                $iii++;
            }
            if ($isREFERENCED == true) {
                echo $selectReferenced;
            } else {
                if ($_FIELDS[$i]['Type'] == 'date') {
                    echo show_calendar('table_editor', $post_name);
                } else {
                    if ($_FIELDS[$i]['Type'] == 'timestamp' || $_FIELDS[$i]['Type'] == 'datetime') {
                        echo show_calendar('table_editor', $post_name, true);
                    } else {
                        if ($field_len_info['len'] == 0 && $field_len_info['isTEXT'] == true) {
                            echo '<textarea class="form"' . $readonly . ' name="' . $post_name . '" rows="' . 4 . '" cols="' . 50 . '" style="/*width:100%;*/">' . stripslashes($_POST[$post_name]) . '</textarea>';
                            #	0.0.2, 0.0.4
                        } else {
                            if ($field_len_info['len'] > 50) {
                                $size = 50;
                            } else {
                                $size = $field_len_info['len'];
                            }
                            echo '<input class="form"' . $readonly . ' type="text" name="' . $post_name . '" value="' . stripslashes($_POST[$post_name]) . '" size="' . $size . '" maxlength="' . $field_len_info['len'] . '" />';
                            #	0.0.2, 0.0.4
                        }
                    }
                }
            }
            echo '</td>' . '</tr>';
            //}		#	0.0.4 - ex closing: if($_FIELDS[$i]['Comment']!='*PRIVATE' && !in_array($post_name, $_RESERVED_FIELDS))
        }
        ?>
</table>
		</div><?php 
    }