Ejemplo n.º 1
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_bookmarks($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden, Text and Ref widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Text');
 }
Ejemplo n.º 2
0
 /**
  * Constructor Method.  Also sets the $passover_isset property
  * to false.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_multiple($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // initialize custom widget settings
     $this->size = 3;
     $this->passover_isset = true;
 }
Ejemplo n.º 3
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_linker($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden, Text and Ref widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Hidden');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Text');
     //$GLOBALS['loader']->import ('saf.MailForm.Widget.Ref');
     $GLOBALS['loader']->import('wffolderbrowser.Widget.Pagebrowser');
 }
Ejemplo n.º 4
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     $len = $this->length > 0 ? 'maxlength="' . $this->length . '" ' : '';
     if ($generate_html) {
         return "\t" . '<tr>' . "\n\t\t" . '<td class="label"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $len . $this->extra . ' />' . ' &nbsp; <a href="#" onclick="window.open (\'' . site_prefix() . '/index/siteinvoice-currencies-action?sel=\' + document.forms[0].elements.' . $this->name . '.value, \'CurrencyWindow\', \'top=100,left=100,width=300,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no\'); return false">Currency List</a>' . '</td>' . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
Ejemplo n.º 5
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     $len = $this->length > 0 ? 'maxlength="' . $this->length . '" ' : '';
     if ($generate_html) {
         return "\t" . '<tr>' . "\n\t\t" . '<td class="label" valign="top"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><textarea rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $attrstr . ' ' . $len . $this->extra . '>' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea><br />' . '<a href="#" onclick="this.blur (); window.open (\'' . site_prefix() . '/index/cms-keywords-action?el=' . $this->name . '&sel=\' + document.forms[0].elements.' . $this->name . '.value, \'KeywordsWindow\', \'top=100,left=100,width=350,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no\'); return false">' . intl_get('Global Keyword List') . '</a>' . '</td>' . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
Ejemplo n.º 6
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_set($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden and Select widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Hidden');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Text');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Select');
     // initialize custom widget settings
     //$this->lowest_year = date ('Y') - 25;
     //$this->highest_year = date ('Y') + 1;
     /*
     		$this->data_value_YEAR = date ('Y');
     		$this->data_value_MONTH = date ('m');
     		$this->data_value_DAY = date ('d');*/
 }
Ejemplo n.º 7
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     if (empty($this->data_value)) {
         if (empty($this->default_value)) {
             $this->data_value = session_username();
         } else {
             $this->data_value = $this->default_value;
         }
     }
     $adv = $this->advanced ? ' class="advanced"' : '';
     if ($generate_html) {
         return "\t" . '<tr' . $adv . '>' . "\n\t\t" . '<td class="label"><label for="' . $this->name . '"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><strong>' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</strong><input type="hidden" name="' . $this->name . '" value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" /></td>' . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
Ejemplo n.º 8
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     $len = $this->length > 0 ? 'maxlength="' . $this->length . '" ' : '';
     $adv = $this->advanced ? ' class="advanced"' : '';
     if ($this->reference !== false) {
         if (empty($this->reference)) {
             $this->reference = '&nbsp;';
         }
         $ref = '<td class="reference">' . $this->reference . '</td>';
     } else {
         $ref = '';
     }
     if ($generate_html) {
         return "\t" . '<tr' . $adv . '>' . "\n\t\t" . '<td class="label"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field">' . $this->prepend . '<input type="text" ' . $attrstr . ' value="' . str_replace('"', '&quot;', htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset)) . '" ' . $len . $this->extra . ' />' . $this->append . '</td>' . $ref . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
Ejemplo n.º 9
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_calendar($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
 }
Ejemplo n.º 10
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     if ($this->cols == '') {
         $this->cols = 40;
     }
     if ($this->rows == '') {
         $this->rows = 8;
     }
     $attrstr = $this->getAttrs();
     if ($generate_html) {
         if ($this->labelPosition == 'left') {
             return "\t" . '<tr>' . "\n\t\t" . '<td class="label" valign="top"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea></td>' . "\n\t" . '</tr>' . "\n";
         } else {
             if (empty($this->alt)) {
                 return "\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea></td>' . "\n\t" . '</tr>' . "\n";
             } else {
                 return "\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="label"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t" . '</tr>' . "\n\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea></td>' . "\n\t" . '</tr>' . "\n";
             }
         }
     } else {
         return '<textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea>';
     }
 }
Ejemplo n.º 11
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     if ($this->filter) {
         if ($this->filter_import) {
             loader_import($this->filter_import);
         }
         $display = call_user_func($this->filter, $this->data_value);
     } else {
         $display = $this->data_value;
     }
     $disp = $display;
     if ($this->htmlentities) {
         $disp = htmlentities_compat($disp, ENT_COMPAT, $intl->charset);
     }
     if ($generate_html) {
         return "\t" . '<tr>' . "\n\t\t" . '<td class="label" valign="top"><label for="' . $this->name . '"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field" valign="top"><strong>' . $disp . '</strong><input type="hidden" name="' . $this->name . '" value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' /></td>' . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
Ejemplo n.º 12
0
 /**
  * Constructor Method.  Also sets the $passover_isset property
  * to true.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_image($name)
 {
     parent::MF_Widget($name);
     $this->passover_isset = true;
 }
Ejemplo n.º 13
0
 /**
  * Constructor Method.  This creates the first submit widget in
  * the list.  To retrieve a reference to this widget (to set it's value,
  * etc.), use the getButton() method before adding any additional buttons
  * with the addButton() method.  You can also set the value of the first
  * button immediately by passing a second parameter to the constructor.
  * 
  * @access	public
  * @param	string	$name
  * @param	string	$value
  * 
  */
 function MF_Widget_msubmit($name = 'submit_button', $value = '')
 {
     $this->addButton($name);
     if (!empty($value)) {
         $this->buttons[0]->setValues($value);
     }
     parent::MF_Widget($name);
 }
Ejemplo n.º 14
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     if ($this->verify_method == 'turing') {
         loader_import('saf.Security.Turing');
         if (!TURING_TEST_GD_LOADED) {
             die('Your server does not have GD support, which is necessary to render the turing test for this form.');
         }
         $sec = new Security_Turing();
     } else {
         loader_import('saf.Security.Figlet');
         $sec = new Security_Figlet();
     }
     list($pre, $hash) = $sec->makeTest();
     if ($generate_html) {
         return "\t" . '<tr>' . "\n\t\t" . '<td class="label" colspan="2"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td></tr>' . "\n\t\t" . '<tr><td class="field" colspan="2">' . $pre . intl_get('Please type the letters and numbers you see above in the field below') . ':<br /><input type="hidden" name="' . $this->name . '_hash" value="' . $hash . '" /><input type="text" ' . $attrstr . '" maxlength="6" size="20" style="margin-top: 5px" ' . $this->extra . ' /></td>' . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
Ejemplo n.º 15
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_dirlist($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden and Select widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Hidden');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Select');
     $GLOBALS['loader']->import('saf.File.Directory');
     // initialize custom widget settings
     $this->data_value_DIRLIST = '';
     $this->directory = '.';
     $this->show_viewbutton = false;
     $this->web_path = '';
     $this->formname = 'mainform';
     $this->recursive = 0;
 }
Ejemplo n.º 16
0
    /**
     * Returns the display HTML for this widget.  The optional
     * parameter determines whether or not to automatically display the widget
     * nicely, or whether to simply return the widget (for use in a template).
     * 
     * @access	public
     * @param	boolean	$generate_html
     * @return	string
     * 
     */
    function display($generate_html = 0)
    {
        parent::display($generate_html);
        global $intl, $simple;
        if ($this->cols == '') {
            $this->cols = 40;
        }
        if ($this->rows == '') {
            $this->rows = 8;
        }
        $attrstr = $this->getAttrs();
        if ($generate_html) {
            static $script = false;
            if (!$script) {
                $out = '<script language="javascript" type="text/javascript">
					function xed_wysiwyg_popup (f, field_name) {
						form_name = "' . $this->form->name . '";
						window.open ("' . site_prefix() . '/index/xed-editor-action?template=' . $this->template . '&form_name=" + form_name + "&field_name=" + field_name + "&body=" + f.elements[field_name].value, "wysiwygEditor", "top=50,left=50,height=550,width=700,resizable=yes");
						return false;
					}
				</script>';
                $script = true;
            } else {
                $out = '';
            }
            if ($this->labelPosition == 'left') {
                return $out . "\n\t" . '<tr>' . "\n\t\t" . '<td class="label" valign="top"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea><br />' . '<input type="submit" value="' . intl_get('WYSIWYG Editor') . '" onclick="return xed_wysiwyg_popup (this.form, \'' . $this->name . '\')" /></td>' . "\n\t" . '</tr>' . "\n";
            } else {
                return $out . "\n\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="label"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t" . '</tr>' . "\n\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea><br />' . '<input type="submit" value="' . intl_get('WYSIWYG Editor') . '" onclick="return xed_wysiwyg_popup (this.form, \'' . $this->name . '\')" /></td>' . "\n\t" . '</tr>' . "\n";
            }
        } else {
            return '<textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea>';
        }
    }
Ejemplo n.º 17
0
 /**
  * Constructor Method.  This creates the first submit widget in
  * the list.  To retrieve a reference to this widget (to set it's value,
  * etc.), use the getButton() method before adding any additional buttons
  * with the addButton() method.  You can also set the value of the first
  * button immediately by passing a second parameter to the constructor.
  * 
  * @access	public
  * @param	string	$name
  * @param	string	$value
  * 
  */
 function MF_Widget_radiogroup($name = 'radio_group', $value = '')
 {
     parent::MF_Widget($name);
     $this->passover_isset = true;
 }
Ejemplo n.º 18
0
 /**
  * Validates the widget against its set of $rules.  Returns false
  * on failure to pass any rule.
  * 
  * @access	public
  * @param	string	$value
  * @param	object	$form
  * @param	object	$cgi
  * @return	boolean
  * 
  */
 function validate($value, $form, $cgi)
 {
     if ($this->ignoreEmpty && (empty($cgi->{$this->name}) || !isset($cgi->{$this->name}))) {
         return true;
     } else {
         return parent::validate($value, $form, $cgi);
     }
 }
Ejemplo n.º 19
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_time($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden and Select widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Hidden');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Text');
     /*
     		// initialize custom widget settings
     		$this->data_value_HOUR = date ('H');
     		$this->data_value_MINUTE = date ('i');
     		$this->data_value_SECOND = date ('s');*/
 }
Ejemplo n.º 20
0
    /**
     * Returns the display HTML for this widget.  The optional
     * parameter determines whether or not to automatically display the widget
     * nicely, or whether to simply return the widget (for use in a template).
     * 
     * @access	public
     * @param	boolean	$generate_html
     * @return	string
     * 
     */
    function display($generate_html = 0)
    {
        parent::display($generate_html);
        if ($this->cols == '') {
            $this->cols = 60;
        }
        if ($this->rows == '') {
            $this->rows = 16;
        }
        if ($this->isHtml) {
            page_add_script('/js/tiny_mce/tiny_mce.js');
            page_add_script(template_simple('
				tinyMCE.init ({
					mode : "textareas",
					theme : "advanced",
					editor_selector : "tinyarea",
					plugins : "{tinyPlugins}",
					relative_urls : false,
					theme_advanced_buttons1 : "{tinyButtons1}",
					theme_advanced_buttons2 : "{tinyButtons2}",
					theme_advanced_buttons3 : "{tinyButtons3}",
					theme_advanced_toolbar_location : "top",
					theme_advanced_toolbar_align : "left",
					theme_advanced_path_location : "bottom",
					extended_valid_elements : "{tinyValidElements}"
				});
			', $this));
        }
        $this->attrstr = $this->getAttrs();
        $this->label = template_simple($this->label_template, $this, '', true);
        if ($generate_html) {
            if ($this->labelPosition == 'left') {
                return template_simple($this->_template_left, $this);
            }
            return template_simple($this->_template_top, $this);
        }
        return template_simple($this->_template_no_table, $this);
    }
Ejemplo n.º 21
0
 /**
  * Constructor Method.  Also sets the $passover_isset property
  * to false.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_filechooser($name)
 {
     parent::MF_Widget($name);
     $this->passover_isset = true;
 }
Ejemplo n.º 22
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl;
     $attrstr = $this->getAttrs();
     return '<input type="hidden" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
 }
Ejemplo n.º 23
0
 /**
  * Constructor Method.  This creates the first submit widget in
  * the list.  To retrieve a reference to this widget (to set it's value,
  * etc.), use the getButton() method before adding any additional buttons
  * with the addButton() method.  You can also set the value of the first
  * button immediately by passing a second parameter to the constructor.
  * 
  * @access	public
  * @param	string	$name
  * @param	string	$value
  * 
  */
 function MF_Widget_allowedbox($name = 'allowed_box', $value = '')
 {
     parent::MF_Widget($name);
     $this->passover_isset = true;
 }
Ejemplo n.º 24
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_datetimeinterval($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden and Select widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Hidden');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Date');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Timeinterval');
     /*
     		// initialize custom widget settings
     		$this->data_value_DATE = date ('Y-m-d');
     		list (
     			$this->data_value_DATE_YEAR,
     			$this->data_value_DATE_MONTH,
     			$this->data_value_DATE_DAY
     		) = split ('-', $this->data_value_DATE);
     		list (
     			$this->data_value_TIME_HOUR,
     			$this->data_value_TIME_MINUTE,
     			$this->data_value_TIME_AMPM
     		) = MF_Widget_timeinterval::parseTime (date ('H:i:s'));*/
 }
Ejemplo n.º 25
0
 /**
  * Constructor Method.  Also sets the $passover_isset property
  * to false.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_pagebrowser($name)
 {
     parent::MF_Widget($name);
     $this->passover_isset = true;
 }
Ejemplo n.º 26
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     if ($this->cols == '') {
         $this->cols = 40;
     }
     if ($this->rows == '') {
         $this->rows = 8;
     }
     $this->label_template = '{filter none}{display_value}{end filter}';
     $this->display_value = str_replace(array(' strong,', ' em,', ' a,', ' blockquote,', ' code)'), array(' <a href="#" onclick="return siteforum_insert_tag (\'strong\')">strong</a>,', ' <a href="#" onclick="return siteforum_insert_tag (\'em\')">em</a>,', ' <a href="#" onclick="return siteforum_insert_tag (\'a\')">a</a>,', ' <a href="#" onclick="return siteforum_insert_tag (\'blockquote\')">blockquote</a>,', ' <a href="#" onclick="return siteforum_insert_tag (\'code\')">code</a>)'), $this->display_value);
     $attrstr = $this->getAttrs();
     if ($generate_html) {
         if ($this->labelPosition == 'left') {
             return "\t" . '<tr>' . "\n\t\t" . '<td class="label" valign="top"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea></td>' . "\n\t" . '</tr>' . "\n";
         } else {
             return "\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="label"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t" . '</tr>' . "\n\t" . '<tr>' . "\n\t\t" . '<td colspan="2" class="field"><textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea></td>' . "\n\t" . '</tr>' . "\n";
         }
     } else {
         return '<textarea ' . $attrstr . ' rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $this->extra . ' >' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea>';
     }
 }
Ejemplo n.º 27
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_folder($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     $this->passover_isset = true;
 }
Ejemplo n.º 28
0
 /**
  * Constructor Method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_timeinterval($name)
 {
     // initialize core Widget settings
     parent::MF_Widget($name);
     // load Hidden and Select widgets, on which this widget depends
     $GLOBALS['loader']->import('saf.MailForm.Widget.Hidden');
     $GLOBALS['loader']->import('saf.MailForm.Widget.Select');
     // initialize custom widget settings
     /*
     		list (
     			$this->data_value_HOUR,
     			$this->data_value_MINUTE,
     			$this->data_value_AMPM
     		) = $this->parseTime (date ('H:i:s'));*/
 }
Ejemplo n.º 29
0
 function getValue($cgi = '')
 {
     $res = parent::getValue($cgi);
     if (!$this->include_url) {
         //$url = parse_url ($res);
         //parse_str ($url['query'], $params);
         //return $params['file'];
         // new webfiles urls are of the form:
         // /cms-filesystem-action/path/to/file.ext
         return array_pop(explode('/cms-filesystem-action', $res));
     }
     return $res;
 }
Ejemplo n.º 30
0
 /**
  * Constructor method.
  * 
  * @access	public
  * @param	string	$name
  * 
  */
 function MF_Widget_tie($name)
 {
     global $_SERVER;
     //echo dirname ($_SERVER['DOCUMENT_ROOT'] . '/index') . '<br />' . dirname (__FILE__);
     //exit;
     $this->jsFile = str_replace(dirname($_SERVER['DOCUMENT_ROOT'] . '/index'), '', dirname(__FILE__)) . '/tie.js';
     parent::MF_Widget($name);
 }