Пример #1
0
function AMP_navCalendarSearchState()
{
    $renderer = new AMPDisplay_HTML();
    $add_link = $renderer->link(AMP_CONTENT_URL_EVENT_ADD, 'Post an Event', array('class' => 'homeeventslink'));
    $search_link = $renderer->link(AMP_CONTENT_URL_EVENT_SEARCH, 'Search Events', array('class' => 'homeeventslink'));
    $state_values = AMPSystem_Lookup::instance('Regions_US');
    $select_values = array('' => 'Select Your State');
    if ($state_values) {
        $select_values = $select_values + $state_values;
    }
    return $search_link . $renderer->newline() . '<form method="GET" action="' . AMP_CONTENT_URL_EVENT_LIST . '">' . AMP_buildSelect('state', $select_values, null, $renderer->makeAttributes(array('onChange' => 'if ( this.value != "") this.form.submit( );'))) . '<input name="search" value="Search" type="hidden">' . '</form>' . $renderer->newline() . $add_link . $renderer->newline();
}
Пример #2
0
 function _formFooter()
 {
     if (isset($_REQUEST['id']) || isset($_REQUEST['file'])) {
         return false;
     }
     require_once 'AMP/Content/Display/HTML.inc.php';
     $renderer = new AMPDisplay_HTML();
     return $renderer->link(AMP_url_add_vars(AMP_SYSTEM_URL_IMAGES, 'action=megaupload'), 'Alternate upload page');
 }
Пример #3
0
 function execute($options = array())
 {
     $options = array_merge($this->getOptions(), $options);
     require_once 'AMP/UserData/Lookups.inc.php';
     $index_title = AMP_pluralize($this->udm->name) . " By " . $options['index_name'];
     $index_set =& FormLookup_Variant::instance($options['index_field'], $this->udm->instance);
     #$index['state']['sql'].="SELECT count(userdata.id) as qty, userdata.State as item_key, states.statename as item_name from userdata, states WHERE userdata.State=states.state and modin=".$_REQUEST['modin']." GROUP BY userdata.State ";
     $translated_values = isset($this->_region_lookups[$options['index_field']]) ? AMPSystem_Lookup::locate($this->_region_lookups[$options['index_field']]) : AMPSystem_Lookup::locate(array('instance' => AMP_pluralize($options['index_field'])));
     require_once 'AMP/Content/Display/HTML.inc.php';
     $renderer = new AMPDisplay_HTML();
     $output = $renderer->bold($index_title) . $renderer->newline();
     foreach ($index_set as $index_value => $index_count) {
         $display_value = $translated_values && isset($translated_values[$index_value]) ? $translated_values[$index_value] : $index_value;
         $display_value .= ' (' . $index_count . ')';
         $link_value = AMP_URL_AddVars($_SERVER['PHP_SELF'], array($options['index_field'] => strtolower($options['index_field']) . '=' . $index_value, 'modin' => 'modin=' . $this->udm->instance));
         $output .= $renderer->link($link_value, $display_value) . $renderer->newline();
         #$output .= '<a href="'.$_SERVER['PHP_SELF'].'?'.$options['index_field'].'='.$index_value.'&modin='.$_REQUEST['modin'].'">'.$index_item['item_name'].'</a> ('.$index_item['qty'].')<BR>';
     }
     return $output;
 }
Пример #4
0
 function AMP_publicPagePublishButton($id, $linkfield)
 {
     static $renderer = false;
     if (!$renderer) {
         require_once 'AMP/Content/Display/HTML.inc.php';
         $renderer = new AMPDisplay_HTML();
     }
     return $renderer->link(AMP_Url_AddVars(AMP_SYSTEM_URL_PUBLIC_PAGE_PUBLISH, array($linkfield . '=' . $id)), ucfirst(AMP_TEXT_PUBLISH));
     /* using POST is not required , and is kinda messy
        return '<form name="publish_Page_'.$id .'" method="POST" action="/system/module_contentadd.php">'
            . '<input type="hidden" name="'.$linkfield.'" value="'. $id . '">'
            . '<input type="submit" value="Publish" class="searchform_element"></form>';
            */
 }