function _getMoreLinkHref($class_id) { if ($this->_pager->getSubsetTotal('class', $class_id) < $this->_pager->getLimit()) { return false; } return AMP_URL_AddVars(AMP_CONTENT_URL_LIST_CLASS, array("class={$class_id}", "offset=" . $this->_pager->getLimit())); }
function _renderPreviewLink($id, &$source) { if (!isset($this->previewlink)) { return false; } return '<a href="' . AMP_URL_AddVars($this->previewlink, array('vid=' . $id, 'preview=1', 'id=' . $source->getArticleId())) . '" target="blank" title="' . AMP_TEXT_PREVIEW_ITEM . '">' . '<img src="' . AMP_SYSTEM_ICON_PREVIEW . '" width="16" height="16" border=0></a>'; }
function _allItemsLink() { if ($this->page_total >= $this->source_total && !$this->getOffset()) { return false; } $href = AMP_URL_AddVars($this->offsetURL(0), "all=1"); return '<a class="' . $this->_css_class_link . '" href="' . $href . '">« ' . $this->_text_all . ' »</a> '; }
function _preview_url() { if (AMP_CONTENT_HUMANIZE_URLS) { return AMP_route_for('section', $this->_section->id); } else { return AMP_URL_AddVars(AMP_SITE_URL . $this->_section->getURL_default(), array('preview=1', 'cache=0')); } }
function _HTML_previewLink($id) { if (!isset($this->previewlink)) { return false; } $renderer =& AMP_get_renderer(); return '<a href="' . AMP_URL_AddVars($this->previewlink, 'id=' . $id) . '" target="_blank" title="' . AMP_TEXT_PREVIEW_ITEM . '">' . '<img src="' . AMP_SYSTEM_ICON_PREVIEW . '" width="16" height="16" border=0></a>' . $renderer->space() . $renderer->link(AMP_URL_AddVars(AMP_SYSTEM_URL_ARTICLE, 'section=' . $id), $renderer->image(AMP_SYSTEM_ICON_VIEW, array('width' => 16, 'height' => 16, 'border' => 0)), array('title' => AMP_TEXT_CONTENT_PAGES)); }
function _dataActions(&$source, $fieldname) { $renderer =& $this->_getRenderer(); $list_url = AMP_URL_AddVars(AMP_SYSTEM_URL_FORM_DATA, array('modin=' . $source->id)); $form_url = AMP_URL_AddVars(AMP_SYSTEM_URL_FORM_ENTRY, array('modin=' . $source->id)); $import_url = AMP_URL_AddVars(AMP_SYSTEM_URL_FORMS, array('modin=' . $source->id, 'action=upload')); return $renderer->link($list_url, AMP_TEXT_VIEW) . $renderer->space(2) . $renderer->link($form_url, AMP_TEXT_ADD) . $renderer->space(2) . $renderer->link($import_url, AMP_TEXT_IMPORT); }
function _renderSheetLocations($locations, $names, $text_description, $system_edit_link) { $output = ''; $renderer =& $this->_getRenderer(); foreach ($locations as $location_id => $stylesheet_setting) { $output .= ucfirst($text_description) . ': ' . $renderer->link(AMP_URL_AddVars($system_edit_link, array('action=edit', 'id=' . $location_id)), $names[$location_id]) . $renderer->newline(); } return $renderer->inDiv($output, array('style' => 'padding:2px;')); }
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; }
function _saveModuleData() { $system_data_url = AMP_URL_AddVars(AMP_SYSTEM_URL_FORM_DATA, array('modin' => $this->_model_id)); require_once 'AMP/System/Tool.inc.php'; $module =& new AMPSystem_Tool(AMP_Registry::getDbcon()); $module_data = array('name' => $this->_model->getName(), 'userdatamod' => 1, 'userdatamodid' => $this->_model_id, 'file' => $system_data_url, 'perid' => AMP_PERMISSION_FORM_DATA_EDIT, 'publish' => 1, 'module_type' => 1); $module->setData($module_data); $result = $module->save(); $this->_saved_tool_id = $module->id; return $result; }
function _getMoreLinkHref($section_id, $limit) { return AMP_URL_AddVars(AMP_CONTENT_URL_LIST_SECTION, array("type={$section_id}", "offset=" . $limit)); }
function _HTML_addCommentLink($article_id) { return $this->_RDF_trackbacks($article_id) . $this->_HTML_link(AMP_URL_AddVars("comment.php", 'articleid=' . $article_id), AMP_TEXT_ADD_A_COMMENT); }
function get_url_edit() { if (!isset($this->id)) { return false; } return AMP_URL_AddVars(AMP_SYSTEM_URL_SECTION, array('id=' . $this->id)); }
function AMP_navCountDisplay_Introtext($introtext_id) { if (!$introtext_id) { return false; } static $renderer = false; static $layout_lists = false; static $navcount_layouts = false; if (!$renderer) { $renderer = new AMPDisplay_HTML(); } if (!$layout_lists) { $layout_lists =& AMPContent_Lookup::instance('navLayoutsByIntrotext'); } if (!$navcount_layouts) { $navcount_layouts =& AMPContent_Lookup::instance('navLayoutLocationCount'); } $count_lists = false; $url_vars_lists = array('action=add', 'introtext_id=' . $introtext_id); $layout_id_lists = $layout_lists ? array_search($introtext_id, $layout_lists) : false; if ($layout_id_lists) { $count_lists = "( " . $navcount_layouts[$layout_id_lists] . " )"; $url_vars_lists = array('id=' . $layout_id_lists); } $navlink_lists = $renderer->link(AMP_URL_AddVars(AMP_SYSTEM_URL_NAV_LAYOUT, $url_vars_lists), AMP_TEXT_CONTENT_PAGES . $count_lists); return $renderer->in_P($navlink_lists); }
require_once "Connections/freedomrising.php"; require_once "Connections/sysmenu.class.php"; require_once "AMP/Form/HTMLEditor.inc.php"; require_once "../includes/versionfunctions.php"; $buildform = new BuildForm(); $obj = new SysMenu(); /* foreach ($_POST as $ps_key=>$ps_value) { print $ps_key.": ".$ps_value."<BR>"; } */ if (!AMP_Authorized(AMP_PERMISSION_CONTENT_EDIT)) { ampredirect("index.php"); } if (isset($_GET['preview'])) { ampredirect(AMP_URL_AddVars(AMP_CONTENT_URL_ARTICLE, array("id=" . $_GET['id'], "preview=1"))); } ob_start(); if ($_GET['restore']) { articleversionrestore($_GET['restore']); $org_id = $_GET['id']; ampredirect("article_edit.php?id={$org_id}"); } if ($_POST['MM_update'] && $_POST['MM_recordId'] or $_POST['MM_insert'] or $_POST['MM_delete'] && $_POST['MM_recordId']) { //set non POST passed varablies $userlookup = AMPSystem_Lookup::instance('users'); $article = trim($_POST['article']); $_POST['updatedby'] = array_search($_SERVER['REMOTE_USER'], $userlookup); if (isset($_POST['MM_insert'])) { $_POST['datecreated'] = date("y-n-j"); $_POST['enteredby'] = $_POST['updatedby'];
function appendAddlinkVar($var) { if (!isset($this->_url_edit)) { $this->_url_edit = $this->editlink; } if (!isset($this->_url_add)) { $this->_url_add = $this->_url_edit; } $this->_url_add = AMP_URL_AddVars($this->_url_add, $var); }
function _HTML_previewLink($id) { if (!isset($this->previewlink)) { return false; } return '<a href="/' . AMP_URL_AddVars($this->previewlink, 'id=' . $id) . '" target="_blank" title="' . AMP_TEXT_PREVIEW_ITEM . '">' . '<img src="' . AMP_SYSTEM_ICON_PREVIEW . '" width="16" height="16" border=0></a>'; }