repnum = max(1, remositoryRepository::getParam($_REQUEST, 'repnum', 1)); $this->act = $_REQUEST['act']; $this->limit = $limit; $this->pageNav = $controller->pageNav; } function show ($string) { return $string; } function setUpCalendar () { $interface = remositoryInterface::getInstance(); $live_site = $interface->getCfg('live_site'); $links = << LINKS_CALENDAR; $interface->addCustomHeadTag($links); } function calendarSelector ($fieldname) { static $first = true; if ($first) $html = << CALENDAR_FIRST; else $html = << CALENDAR_AFTER; $first = false; return $html; } function tickBox ($object, $property) { if (is_object($object) AND $object->$property) $checked = "checked='checked'"; else $checked = ''; echo ""; } function yesNoList ($object, $property) { $yesno[] = $this->repository->makeOption( 0, _NO ); $yesno[] = $this->repository->makeOption( 1, _YES ); if ($object) $default = $object->$property; else $default = 0; echo ''; echo $this->repository->selectList($yesno, $property, 'class="inputbox" size="1"', $default);; echo ''; } function yesNoRadio ($object, $property, $title) { $yes = (is_object($object) AND isset($object->$property) AND (bool) $object->$property) ? true : false; $yescheck = $yes ? 'checked="checked"' : ''; $nocheck = $yes ? '' : 'checked="checked"'; $yestext = _YES; $notext = _NO; $html = << $yestext $notext INPUT_BOX; return $html; } function inputTop ($title, $redstar=false, $maxsize=0) { ?> *'; echo $title; if ($maxsize) echo " 
$maxsize "; ?>    tooltip($tooltip); ?> INPUT_BOX; if ($tooltip) $html .= $tooltip; return $html; } function narrowInputBox ($title, $name, $value, $width, $tooltip=null) { $html = <<$title
INPUT_BOX; if ($tooltip) $html .= $tooltip; return $html; } function fileUploadBox ($title, $width, $tooltip=null) { ?> tooltip($tooltip); ?> $title
SIMPLE_UPLOAD; if ($tooltip) $html .= $tooltip; return $html; } function fileInputArea ($title, $maxsize, $name, $value, $rows, $cols, $editor=false, $tooltip=null) { echo << $title 
$maxsize  FILE_INPUT; $interface = remositoryInterface::getInstance(); if ($editor) $interface->editorArea( 'description', $value, $name, 450, 200, $rows, $cols ); else echo ""; if ($tooltip) echo $this->tooltip($tooltip); echo ''; } function simpleInputArea ($title, $maxsize, $name, $value, $rows, $cols, $editor=false, $tooltip=null) { $interface = remositoryInterface::getInstance(); // last params were $rows, $cols ob_start(); if ($editor) $editbox = $interface->editorAreaText( 'description', $value, $name, 450, 350, $cols, $rows ); else $editbox = ""; $editbox .= ob_get_clean(); return <<
$editbox $tooltip
INPUT_AREA; } function tickBoxField ($object, $property, $title) { ?>   $property) $checked = "checked='checked'"; else $checked = ''; echo ""; echo ''; } function simpleTableTickBox ($title, $name, $checked=false) { if ($checked) $check = 'checked="checked"'; else $check = ''; ?>   />
FORM_START; } function simpleFormEnd () { echo <<
{$this->repository->RemositoryImageURL('header.gif',64,64)}  Remository $title
 
FORM_END; } function listFormEnd ($pagecontrol=true) { if ($pagecontrol) { ?> pageNav->writePagesLinks(); ?> pageNav->writePagesCounter(); ?>
FORM_END; } function listHeadingStart ($count) { echo << LIST_HEAD; } function headingItem ($width, $title) { echo "\n$title"; } function commonScripts ($edit_fields) { $interface = remositoryInterface::getInstance(); ?> EDIT_END; } function multiOptionList ($name, $title, $options, $current, $tooltip=null) { $alternatives = explode(',',$options); $already = explode(',', $current); ?>   $one"; } if ($tooltip) echo ' '.$this->tooltip($tooltip); echo ''; } function tooltip ($text) { return '' .RemositoryRepository::getInstance()->RemositoryImageURL('tooltip.png').''; } } class remositoryAdminHTML extends remositoryBasicHTML { var $repository = ''; var $pageNav = ''; var $clist = ''; var $act = ''; function __construct (&$controller, $limit, $clist) { parent::__construct($controller, $limit); $this->repository = $controller->repository; $this->clist = $clist; } function fieldset ($legend, $fields) { return <<
$legend $fields
FIELD_SET; } function displayIcons ($object, $iconList) { if (is_object($object)) $icon = $object->icon; else $icon = ''; echo << {$this->show(_DOWN_ICON)} 
$iconList
ICON_LIST; } function simpleIcons ($object, $iconList) { if (is_object($object)) $icon = $object->icon; else $icon = ''; $html = << function paste_strinL(strinL){ var input=document.forms["adminForm"].elements["icon"]; input.value=''; input.value=strinL; }
$iconList
ICON_HTML; return $html; } function listHeader ($descendants, $search) { $checked = $descendants ? 'checked="checked"' : ''; echo << {$this->show(_DOWN_SEARCH_COLON)} {$this->show(_DOWN_SHOW_DESCENDANTS)} {$this->clistInTable()} LIST_HEADER; } private function clistInTable () { if ($this->clist) return << $this->clist CLIST_ROW; } function containerSelectBox () { $suggesttext = _DOWN_SUGGEST_LOC; echo << $suggesttext  $this->clist SELECT_BOX; } function startEditHeader () { $tabclass_arr = $this->repository->getTableClasses(); echo << EDIT_HEADER; $this->containerSelectBox(); } function publishedBox (&$object) { $pubtext = _DOWN_PUB; $checked = (is_object($object) AND !empty($object->published)) ? 'checked="checked"' : ''; echo << PUB_BOX; } function simpleCheckBox (&$object, $property, $title, $value=1, $default=0) { if (is_object($object) AND @$object->$property) $checked = "checked='checked'"; else $checked = ''; $html = << INPUT_BOX; return $html; } function editLink ($id, $linkname, $containerid=0) { // Change for multiple repositories // $url = "index2.php?option=com_remository&repnum=$this->repnum&act=$this->act&task=edit&cfid=$id"; $url = "index2.php?option=com_remository&act=$this->act&task=edit&cfid=$id"; if ($containerid) $url .= "&containerid=$containerid"; return <<$linkname EDIT_LINK; } function visitLink ($id, $linkname) { $manager = remositoryContainerManager::getInstance(); $childcount = count($manager->getChildren($id, false)); if (0 == $childcount) return ''; // Change for multiple repositories // $linkname return <<$linkname VISIT_LINK; } protected function legalTypeList ($current) { $html = ''; foreach (explode(',',_REMOS_LEGAL_TYPES) as $one) { $mark = ($one == $current) ? 'selected="selected"' : ''; $html .= <<$one LEGAL_OPTION; } return $html; } }
$pubtext