/** * Constructeur de la classe faisant appel au constructeur parent */ public function __construct() { parent::__construct(); require_once 'Zend/Loader/Autoloader.php'; $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('Az_'); $this->initLog(); }
function __construct($path) { parent::__construct(); // constructor for t3lib_div::makeInstance; the first parameter overwrites public $scriptRelPath to load the correct translation file if ($path) { $this->scriptRelPath = $path; } }
/** * Class constructor. */ function __construct() { parent::__construct(); $this->local = new tx_gopibase_local($this); $this->img = new imageResize(); if (t3lib_extMgm::isLoaded('dam')) { foreach (explode(',', tx_dam_db::getPidList()) as $damPid) { $this->damMediaPid = $damPid; break; } } }
function start($conf, $piVars, $cObj) { // config $this->conf = $conf; $this->piVars = $piVars; $this->cObj = $cObj; $this->pi_loadLL(); $this->div = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_wtgallery_div'); // Create new instance for div class $this->dynamicMarkers = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_wtgallery_dynamicmarkers'); // Create new instance for dynamicmarker function $this->pagebrowser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_wtgallery_list_pagebrowser'); // Create new instance for pagebrowser function $this->tmpl = $this->markerArray = $this->outerMarkerArray = $subpartArray = array(); $content_item = ''; // init $this->tmpl[$this->mode]['all'] = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['template.'][$this->mode]), '###WTGALLERY_LIST###'); // Load HTML Template $this->tmpl[$this->mode]['item'] = $this->cObj->getSubpart($this->tmpl[$this->mode]['all'], '###ITEM###'); // work on subpart 2 // let's go $startpath = $this->div->validatePicturePath($this->piVars['category'] ? $this->div->hash2folder($this->piVars['category'], $this->conf['main.']['path']) : $this->conf['main.']['path']); // startpath from piVars or from ts if (strpos($startpath, ':')) { $storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository'); $f = $storageRepository->findByUid(explode(':', $startpath)[0]); $startpath = $f->getConfiguration()['basePath'] . explode(':', $startpath)[1]; } $pictures = $this->div->getFiles($this->conf, $startpath, $this->conf[$this->mode . '.']['order'], $this->conf[$this->mode . '.']['limit']); // get all pictures from current folder $pictures_current = array_chunk((array) $pictures, $this->conf[$this->mode . '.']['rows'] * $this->conf[$this->mode . '.']['columns']); // split array in parts for pagebrowser $this->overall = count($pictures); // count all pictures $pointer = $this->piVars['listpointer'] > 0 ? $this->piVars['listpointer'] : 0; // pointer //var_dump($pictures); if (count($pictures_current[$pointer]) > 0) { // if there are pictures for ($i = 0; $i < count($pictures_current[$pointer]); $i++) { // one loop for every picture in current folder // let's start $row = array('picture' => $pictures_current[$pointer][$i], 'tstamp' => filemtime($pictures_current[$pointer][$i]), 'filename' => $this->div->fileInfo($pictures_current[$pointer][$i], 'filename'), 'dirname' => $this->div->fileInfo($pictures_current[$pointer][$i], 'dirname'), 'basename' => $this->div->fileInfo($pictures_current[$pointer][$i], 'basename'), 'extension' => $this->div->fileInfo($pictures_current[$pointer][$i], 'extension'), 'currentfolder' => $this->div->fileInfo($pictures_current[$pointer][$i], 'currentfolder'), 'picturehash' => $this->div->hashCode($pictures_current[$pointer][$i]), 'pid_single' => $this->conf['single.']['pid_single'] > 0 ? $this->conf['single.']['pid_single'] : $GLOBALS['TSFE']->id, 'link_single' => tslib_pibase::pi_linkTP_keepPIvars_url(array('show' => $this->div->hashCode($pictures_current[$pointer][$i])), 1, 0, $this->conf['single.']['pid_single'] > 0 ? $this->conf['single.']['pid_single'] : 0)); $metarow = $this->div->EXIForTXT($row['picture'], $this->conf[$this->mode . '.']['metainformation']); // get metainformation $row = array_merge((array) $row, (array) $metarow); // add array from txt or exif to normal row $this->cObj->start($row, 'tt_content'); // enable .field in typoscript for singleview $this->markerArray = $this->div->markersClassStyle($i, $this->mode, $this->conf); // fill ###CLASS### if ($this->piVars['show'] == $this->div->hashCode($pictures_current[$pointer][$i]) || !isset($this->piVars['show']) && $i == 0) { $this->markerArray['###CLASS###'] .= ' wtgallery_list_current'; } // add string to div if current picture if (!empty($this->conf[$this->mode . '.']['width'])) { $this->conf[$this->mode . '.']['image.']['file.']['width'] = $this->conf[$this->mode . '.']['width']; } // set width from config (e.g. flexform if not empty) if (!empty($this->conf[$this->mode . '.']['height'])) { $this->conf[$this->mode . '.']['image.']['file.']['height'] = $this->conf[$this->mode . '.']['height']; } // set height from config (e.g. flexform if not empty) foreach ($this->conf[$this->mode . '.'] as $key => $value) { // one loop for every main level in typoscript (single.image, single.text, single.listviewlink, etc...) if ($key != 'pagebrowser' && !is_array($this->conf[$this->mode . '.'][$key])) { // don't use pagebrowser here but everything else $this->markerArray['###' . strtoupper($key) . '###'] = $this->cObj->cObjGetSingle($this->conf[$this->mode . '.'][$key], $this->conf[$this->mode . '.'][$key . '.']); // values from ts } } foreach ($row as $key => $value) { // one loop for every row entry $this->markerArray['###' . strtoupper($key) . '###'] = $value; // fill marker with value of row } $this->wrappedSubpartArray['###SINGLELINK###'][0] = '<a href="' . tslib_pibase::pi_linkTP_keepPIvars_url(array('show' => $this->div->hashCode($row['picture'])), 1, 0, $this->conf['single.']['pid_single'] > 0 ? $this->conf['single.']['pid_single'] : 0) . '">'; // Link with piVars "show" $this->wrappedSubpartArray['###SINGLELINK###'][1] = '</a>'; // postfix for linkwrap $this->hook_inner(); // add hook $content_item .= $this->div->rowWrapper($this->cObj->substituteMarkerArrayCached($this->tmpl[$this->mode]['item'], $this->markerArray, array(), $this->wrappedSubpartArray), $i, $this->mode, count($pictures_current[$pointer]), $this->conf); // add inner html to variable } } $this->num = $i; // current pictures for pagebrowser $subpartArray['###CONTENT###'] = $content_item; // work on subpart 3 $this->outerMarkerArray['###PAGEBROWSER###'] = $this->pagebrowser->start($this->conf, $this->piVars, $this->cObj, array('overall' => $this->overall, 'overall_cur' => $this->conf[$this->mode . '.']['rows'] * $this->conf[$this->mode . '.']['columns'], 'pointer' => $pointer, 'perPage' => $this->conf[$this->mode . '.']['rows'] * $this->conf[$this->mode . '.']['columns'])); // includes pagebrowser function $this->outerMarkerArray = array_merge((array) $this->markerArray, (array) $this->outerMarkerArray); // add all markers of last picture to the outermarker Array $this->hook_outer(); // add hook $this->content = $this->cObj->substituteMarkerArrayCached($this->tmpl[$this->mode]['all'], $this->outerMarkerArray, $subpartArray); // Get html template $this->content = $this->dynamicMarkers->main($this->conf, $this->cObj, $this->content); // Fill dynamic locallang or typoscript markers $this->content = preg_replace("|###.*?###|i", "", $this->content); // Finally clear not filled markers if (!empty($this->content) && $i > 0) { return $this->content; } // return HTML if $content is not empty and if there are pictures }
/** * Retrieves the localized string for the local language key $key, using the * FE localization methods. * * In $this->conf['salutation'], a suffix to the key may be set (which may * be either 'formal' or 'informal'). If a corresponding key exists, the * formal/informal localized string is used instead. * If the formal/informal key doesn't exist, this function just uses the * regular string. * * Example: key = 'greeting', suffix = 'informal'. If the key * 'greeting_informal' exists, that string is used. * If it doesn't exist, this functions tries to use the string with the key * 'greeting'. * * @param string $key the local language key for which to return the value, must not be empty * * @return string the requested local language key, might be empty */ private function translateInFrontEnd($key) { $hasFoundATranslation = FALSE; $result = ''; $availableLanguages = $this->getAvailableLanguages(); foreach ($this->getSuffixesToTry() as $suffix) { foreach ($availableLanguages as $language) { $completeKey = $key . $suffix; if (isset($this->LOCAL_LANG[$language][$completeKey])) { $result = parent::pi_getLL($completeKey); $hasFoundATranslation = TRUE; break 2; } } } if (!$hasFoundATranslation) { $result = $key; } return $result; }
function main($content, $conf) { $this->Bol = new BlumenbachOnline(); $this->conf = $conf; $this->pi_setPiVarDefaults(); $this->pi_loadLL(); $this->fe_user = $this->Bol->fe_userdata; @session_start(); $submitbutton = ""; // include_once("./bolonline.main.conf.php"); /* Spezialfelder und Felder an/aus */ include_once "bolonline.main.conf.php"; $content .= $jscript_special_inputfields; //javascript fuer Spezialfelder // if($this->Bol->debug) $content .= "<xmp>".print_r($_REQUEST, 1)."</xmp>"; // $GLOBALS['TYPO3_DB']->sql_free_result($res); #$content = $this->Bol->showAll($this->piVars['limit']); // $content .= $this->Bol->show($_POST['id']); $_SESSION['todo'] = $_REQUEST["todo"] != "" ? $_REQUEST["todo"] : $_SESSION['todo']; $_SESSION['update_id'] = $_REQUEST["kerndaten_id"][0] != "" ? $_REQUEST["kerndaten_id"][0] : $_SESSION['update_id']; $_SESSION['hauptkategorie_id'] = $_REQUEST['hauptkategorie_id'] != "" ? $_REQUEST['hauptkategorie_id'] : $_SESSION['hauptkategorie_id']; $_SESSION['hauptkategorie_update_id'] = $_REQUEST['hauptkategorie_update_id'] != "" ? $_REQUEST['hauptkategorie_update_id'] : $_SESSION['hauptkategorie_update_id']; ######## XAJAX-Initialisieren: //require('/var/www/produktion.blumenbach.de/typo3conf/ext/bolonline/pi1/fileupload.ajax.server.php'); require t3lib_extMgm::extPath('xajax') . 'class.tx_xajax.php'; $xajax = t3lib_div::makeInstance('tx_xajax'); $xajax->errorHandlerOn(); $xajax->outputEntitiesOn(); $xajax->cleanBufferOn(); //wichtig! $xajax->setTimeout(500); //disabled $xajax->setLogFile("/var/www/produktion.blumenbach.de/typo3conf/ext/bolonline/test_ajax.log"); $xajax->decodeUTF8InputOn(); // for input $xajax->setCharEncoding('utf-8'); //for output $xajax->statusMessagesOn(); $xajax->debugOff(); $xajax->registerExternalFunction('setUploadFields', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/fileupload.ajax.incl.php'); $xajax->registerExternalFunction('setNoAssignedUploadFields', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/fileupload.ajax.incl.php'); $xajax->registerExternalFunction('delImage', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/fileupload.ajax.incl.php'); $xajax->registerExternalFunction('setFields', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/fileupload.ajax.incl.php'); $xajax->registerExternalFunction('getDBDumpfile', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/datensicherung.php'); $xajax->registerExternalFunction('getAccociationIDs', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/associations.pulldown.ajax.incl.php'); $xajax->registerExternalFunction('setAccociationIDs', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/associations.pulldown.ajax.incl.php'); $xajax->registerExternalFunction('getGettyData', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/gettySearch.ajax.incl.php'); $xajax->registerExternalFunction('putGettyValues', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/gettySearch.ajax.incl.php'); $xajax->registerExternalFunction('getGNDData', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/gndSearch.ajax.incl.php'); $xajax->registerExternalFunction('putGNDValues', t3lib_extMgm::siteRelPath('bolonline') . '/pi1/gndSearch.ajax.incl.php'); /*-------------- under development.... ---------------------*/ // $bis = rand(11,2999); // echo $bis; // for($i=0;$i<$bis;$i++) { // echo chr(rand(0,150))." "; // } // die(); /*------------ //under development.... ---------------------*/ //print_r($_POST); $GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = $xajax->getJavascript(t3lib_extMgm::siteRelPath('xajax')); $xajax->processRequests(); $content .= '<table style="width:100%;border: 1px solid black">'; if ($_SESSION['todo'] == "update" && isset($_SESSION['update_id'])) { require_once "hauptkategorie.changer.incl.php"; } //###### Backup-Link: ############################################################################################ include_once "db_backup.php"; $content .= '<tr><td colspan="2"><div style="padding:5px;" id="db_backuplink" onClick="xajax_getDBDumpfile()">o <u>Hier klicken um eine Datensicherungsdatei zu erzeugen...</u></div></td></tr>'; ################################################################################################################## $content .= '<tr><td colspan="2" style="background-color:lightgrey;height:1px;padding:1px"></td></tr>'; // $content .= 'Mediafiles: <xmp style="color:green">'.print_r($_FILES,1 ).'</xmp>'; // ################################# Datensatz editieren ################################# $content .= '<tr><td style="width:50%">'; $content .= '<form name="todo" action="' . $this->pi_getPageLink($GLOBALS['TSFE']->id) . '" method="POST">'; $content .= '<select style="background-color:#fcfbc4;width:100%;padding:2px" name="todo" onChange="document.todo.submit()"> <option value="">bitte wählen</option> <option style="color:blue" value="insert"' . ($_SESSION['todo'] == "insert" ? " selected" : "") . '>neuer Datensatz</option> <option style="color:red" value="update"' . ($_SESSION['todo'] == "update" ? " selected" : "") . '>bestehenden Datensatz editieren</option> </select>'; $content .= '</form></td>'; //print_r($_POST); if ($_SESSION['todo'] == 'update') { $content .= '<td style="width:50%"><form name="update" action="' . $this->pi_getPageLink($GLOBALS['TSFE']->id) . '" method="POST">'; $content .= '<input type="hidden" name="todo" value="update">'; $content .= '<select style="background-color:#fda92a;width:100%;padding:2px" name="kerndaten_id[]" onChange="document.update.submit()"> <option value="">bitte wählen</option>'; /****** Hauptkategorie-Zuordnung aendern: *******************/ $datensatz_ids = array(); $datensatz_ids = $this->Bol->getUpdateTeaser($_SESSION['hauptkategorie_id']); // $content .= $this->Bol->dump($datensatz_ids); foreach ($datensatz_ids as $id => $value) { $zugeordnete_kategorie = $this->Bol->getMainCategories($id); $content .= '<option value="' . $id . '"' . ($_SESSION['update_id'] == $id ? " selected" : "") . '>' . substr($value, 0, 250) . ' ->' . $zugeordnete_kategorie[0]['kategorie'] . '</option>'; } $content .= '</select>'; $content .= '</form></td></tr>'; } // ################################# Ende Datensatz editieren ################################# $content .= '<tr><td colspan="2" style="background-color:lightgrey;height:1px;padding:1px"></td></tr>'; if ($_SESSION['todo'] == "update" && isset($_SESSION['update_id'])) { require "hauptkategorie.updater.incl.php"; } /*--------- Funktion fuer Multiple Select der Tabellenzuordnung gelb ------*/ $content .= '<script language="JavaScript"> function getMultiple(ob) { var arSelected = ""; var counter = 0; while (ob.selectedIndex != -1) { if (counter==0) arSelected+= ob.options[ob.selectedIndex].value; else arSelected+="|"+ob.options[ob.selectedIndex].value; ob.options[ob.selectedIndex].selected = false; counter++; } // You can use the arSelected array for further processing. return arSelected; } </script>'; /*-------- /Funktion fuer Multiple Select der Tabellenzuordnung gelb ------*/ $content .= '<tr><td colspan="2" style="background-color:lightgrey;height:1px;padding:1px"></td></tr>'; $content .= '<tr><td colspan="2" style="height:10px"></td></tr>'; //$content .= '<form action="' . $this->pi_getPageLink($GLOBALS['TSFE']->id) . '" method="POST" id="stammdaten" name="stammdaten">'; //$content .= '<tr><td><br /><br />'.$this->setUploadFields().'</td></tr>'; // print_r($this->Bol->getTableColumns()); $content .= '<tr><td colspan="2">'; #if($_POST['todo']!=0){ switch ($_SESSION['todo']) { case "insert": $submitbutton = htmlspecialchars($this->pi_getLL('submit_button_label')); $submit_label = htmlspecialchars($this->pi_getLL('submit_label_new')); // $content .= 'insert'; // $content .= $this->Bol->show(); $content .= '<form name="neueintrag" method="POST">'; $this->Bol->tablename = 'tx_bolonline_Kerndaten'; $this->Bol->getTableColumns(); $blockbez = '<br /><b style="color:green">Block: ' . $this->Bol->tablename . '</b><br />'; $content .= $blockbez; $content .= $this->Bol->show(0) . '<br /><br /><br />'; $kerndaten_id = $this->Bol->insert(t3lib_div::_POST()); // da $this->Bol->tablename = 'tx_bolonline_Kerndaten' ist die hier zurückgegebene id die kerndaten_id! $this->Bol->tablename = 'tx_bolonline_PartI'; $this->Bol->getTableColumns(); $blockbez = '<br /><b style="color:red">Block: ' . $this->Bol->tablename . '</b><br />'; $content .= $blockbez; $content .= $this->Bol->show(0) . '<br /><br /><br />'; $this->Bol->insert(t3lib_div::_POST(), $kerndaten_id); $this->Bol->tablename = 'tx_bolonline_PartII'; $this->Bol->getTableColumns(); $blockbez = '<br /><b style="color:blue">Block: ' . $this->Bol->tablename . '</b><br />'; $content .= $blockbez; $content .= $this->Bol->show(0) . '<br /><br /><br />'; $this->Bol->insert(t3lib_div::_POST(), $kerndaten_id); $this->Bol->tablename = 'tx_bolonline_PartIII'; $this->Bol->getTableColumns(); $blockbez = '<br /><b style="color:yellow">Block: ' . $this->Bol->tablename . '</b><br />'; $content .= $blockbez; $content .= $this->Bol->show(0) . '<br /><br /><br />'; $this->Bol->insert(t3lib_div::_POST(), $kerndaten_id); $this->Bol->tablename = 'tx_bolonline_PartIV'; $this->Bol->getTableColumns(); // Blockbezeichner aus Sprachdatei holen: $__blockbez = parent::pi_getLL($this->tablename . '.d'); $blockbez = '<br /><b style="color:orange">' . $__blockbez . '</b><br />'; $content .= $blockbez; $content .= $this->Bol->show(0) . '<br /><br /><br />'; $this->Bol->insert(t3lib_div::_POST(), $kerndaten_id); $content .= '<input type="submit" value="' . $submit_label . '"></form>'; // echo 'UPDATE-ID:'.$kerndaten_id; if ($kerndaten_id > 0) { $_SESSION['todo'] = "update"; $_SESSION['update_id'] = $kerndaten_id; $text = "/intern/bol_db/?no_cache=1&kerndaten_id=" . $kerndaten_id; $link = $text; // $link = $text . $this->pi_getPageLink($GLOBALS['TSFE']->$kerndaten_id, ''); // echo 'WEITERLEITUNG nach: '.$link; @header("Location: " . $link); } break; case "update": $submitbutton = htmlspecialchars($this->pi_getLL('update_button_label')); $submit_label = htmlspecialchars($this->pi_getLL('submit_label_update')); if ($_SESSION['update_id'] > 0) { // $this->Bol->tablename = 'tx_bolonline_Kerndaten'; // $this->Bol->getTableColumns(); // echo $this->Bol->update(t3lib_div :: _POST(), $_SESSION['update_id']); // $blockbez = '<br /><b>Block: ' . $this->Bol->tablename . '</b><br />'; // $content .= $blockbez; // $content .= $this->Bol->show($_SESSION['update_id']); // File-Upload-Felder: // $content .= '<script language="JavaScript">xajax_setUploadFields(1,"_kerndaten")</script>'; $content .= '<style type="text/css">' . "\n"; $content .= '#partcontentdiv_kerndaten { border: 2px solid green; padding: 5px; } #partcontentdiv_partI { border: 2px solid red; padding: 5px; } #partcontentdiv_partII { border: 2px solid blue; padding: 5px; } #partcontentdiv_partIII { border: 2px solid yellow; padding: 5px; } #partcontentdiv_partIV { border: 2px solid orange; padding: 5px; } .blockbez_tx_bolonline_Kerndaten { color: green } .blockbez_tx_bolonline_PartI { color: red; } .blockbez_tx_bolonline_PartII { color: blue; } .blockbez_tx_bolonline_PartIII { color: yellow; } .blockbez_tx_bolonline_PartIV { color: orange; } ' . "\n"; $content .= '</style>' . "\n"; // alle anderen Felder: $content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_Kerndaten","kerndaten",1,0,0)</script>'; $content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_PartI","partI",1,1)</script>'; $content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_PartII","partII",1,1)</script>'; $content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_PartIII","partIII",1,1)</script>'; $content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_PartIV","partIV",1,1)</script>'; $content .= '<div id="partcontentdiv_kerndaten" style="width:700px;"><h1>Kerndaten</h1></div><br /><br />'; $content .= '<div id="partcontentdiv_partII" style="width:700px;"><h1>PartII-FELDER</h1></div><br /><br />'; $content .= '<div id="partcontentdiv_partI" style="width:700px;"><h1>PartI-FELDER</h1></div><br /><br />'; $content .= '<div id="partcontentdiv_partIII" style="width:700px;"><h1>PartIII-FELDER</h1></div><br /><br />'; $content .= '<div id="partcontentdiv_partIV" style="width:700px;"><h1>PartIV-FELDER</h1></div><br /><br />'; // if ($_SESSION['todo'] != 'delete' && $_SESSION['todo'] != '') { // $content .= '</td></tr><tr><td> // <br><br> // <h3>' . $submit_label . '</h3><br> // <input type="submit" name="' . $this->prefixId . '[submit_button]" value="' . $submitbutton . '"> // </form> // <br /> // <!--<p>You can click here to ' . $this->pi_linkToPage('get to this page again', $GLOBALS['TSFE']->id) . '</p>--> // '; // } $this->Bol->tablename = 'tx_bolonline_Kerndaten'; $this->Bol->getTableColumns(); // $this->Bol->update(t3lib_div :: _POST(), $_SESSION['update_id']); $this->Bol->update(t3lib_div::_POST(), $_SESSION['update_id']); /* $this->Bol->tablename = 'tx_bolonline_Kerndaten'; $this->Bol->getTableColumns(); $this->Bol->update(t3lib_div :: _POST(), $_SESSION['update_id']); $blockbez = '<br /><b>Block: '.$this->Bol->tablename.'</b><br />'; $content .= $blockbez; $content .= $this->Bol->show($_SESSION['update_id']); */ $this->Bol->tablename = 'tx_bolonline_PartI'; $this->Bol->getTableColumns(); $this->Bol->update(t3lib_div::_POST(), $_SESSION['update_id']); /* $blockbez = '<br /><b>Block: '.$this->Bol->tablename.'</b><br />'; $content .= $blockbez; $content .= $this->Bol->show($_SESSION['update_id']); */ $this->Bol->tablename = 'tx_bolonline_PartII'; $this->Bol->getTableColumns(); $this->Bol->update(t3lib_div::_POST(), $_SESSION['update_id']); // $content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_PartII","partII",1)</script>'; /* $blockbez = '<br /><b>Block: '.$this->Bol->tablename.'</b><br />'; $content .= $blockbez; $content .= $this->Bol->show($_SESSION['update_id']); */ $this->Bol->tablename = 'tx_bolonline_PartIII'; $this->Bol->getTableColumns(); $this->Bol->update(t3lib_div::_POST(), $_SESSION['update_id']); /* $blockbez = '<br /><b>Block: '.$this->Bol->tablename.'</b><br />'; $content .= $blockbez; $content .= $this->Bol->show($_SESSION['update_id']); */ $this->Bol->tablename = 'tx_bolonline_PartIV'; $this->Bol->getTableColumns(); $this->Bol->update(t3lib_div::_POST(), $_SESSION['update_id']); #$content .= '<script language="JavaScript">xajax_setFields("tx_bolonline_PartIV","partIV",1)</script>'; /* $blockbez = '<br /><b>Block: '.$this->Bol->tablename.'</b><br />'; $content .= $blockbez; $content .= $this->Bol->show($_SESSION['update_id']); */ } break; case "delete": $deleted = $this->Bol->delete($_REQUEST['id'], $_REQUEST['tablename']); if ($deleted) { $content .= 'Der Datensatz Nr. ' . $_REQUEST['id'] . 'aus Tabelle ' . $_REQUEST['tablename'] . ' wurde gelöscht!'; } else { $content .= "<div style='color:red'>something went wrong, couldǹt delete!</div>"; } break; default: // $content .= $this->Bol->show($_GET['id']); // $content .= "Bitte Aktion wählen!"; break; } $content .= '</td></tr></table>'; return $this->pi_wrapInBaseClass($content); }
/** * Shows login form * * @return string content */ protected function showLogin() { $subpart = $this->cObj->getSubpart($this->template, '###TEMPLATE_LOGIN###'); $subpartArray = $linkpartArray = array(); $gpRedirectUrl = ''; $markerArray['###LEGEND###'] = $this->pi_getLL('oLabel_header_welcome', '', 1); $markerArray['###ERROR###'] = ""; $markerArray['###CLASS###'] = ""; if ($this->logintype === 'login') { if ($this->userIsLoggedIn) { // login success $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('success_header', $this->conf['successHeader_stdWrap.']); $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('success_message', $this->conf['successMessage_stdWrap.']); $markerArray = array_merge($markerArray, $this->getUserFieldMarkers()); $subpartArray['###LOGIN_FORM###'] = ''; // Hook for general actions after after login has been confirmed (by Thomas Danzl <*****@*****.**>) if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['login_confirmed']) { $_params = array(); foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['login_confirmed'] as $_funcRef) { if ($_funcRef) { t3lib_div::callUserFunction($_funcRef, $_params, $this); } } } // show logout form directly if ($this->conf['showLogoutFormAfterLogin']) { // BOf Erwand 9/02/12 //$this->redirectUrl = ''; // EOf Erwand 9/02/12 return $this->showLogout(); } } else { // login error /* BOf Erwand 9/12/11 $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('error_header',$this->conf['errorHeader_stdWrap.']); $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('error_message',$this->conf['errorMessage_stdWrap.']); */ // Affiche le message d'erreur dans le sous menu $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('welcome_header', $this->conf['welcomeHeader_stdWrap.']); $markerArray['###ERROR###'] = $this->getDisplayText('error_header', $this->conf['errorHeader_stdWrap.']); $markerArray['###CLASS###'] = "active"; //EOF Erwand 9/12/11 $gpRedirectUrl = t3lib_div::_GP('redirect_url'); } } else { if ($this->logintype === 'logout') { // login form after logout /* BOf Erwand 9/12/11 $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('logout_header', $this->conf['logoutHeader_stdWrap.']); */ $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('logout_header', $this->conf['welcomeHeader_stdWrap.']); $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('logout_message', $this->conf['welcomeMessage_stdWrap.']); // EOF Erwand 9/12/11 } else { // login form $markerArray['###STATUS_HEADER###'] = $this->getDisplayText('welcome_header', $this->conf['welcomeHeader_stdWrap.']); $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('welcome_message', $this->conf['welcomeMessage_stdWrap.']); } } // Hook (used by kb_md5fepw extension by Kraft Bernhard <*****@*****.**>) // This hook allows to call User JS functions. // The methods should also set the required JS functions to get included $onSubmit = ''; $extraHidden = ''; $onSubmitAr = array(); $extraHiddenAr = array(); // check for referer redirect method. if present, save referer in form field if (t3lib_div::inList($this->conf['redirectMode'], 'referer') || t3lib_div::inList($this->conf['redirectMode'], 'refererDomains')) { $referer = $this->referer ? $this->referer : t3lib_div::getIndpEnv('HTTP_REFERER'); if ($referer) { $extraHiddenAr[] = '<input type="hidden" name="referer" value="' . htmlspecialchars($referer) . '" />'; } } if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['loginFormOnSubmitFuncs'])) { $_params = array(); foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['loginFormOnSubmitFuncs'] as $funcRef) { list($onSub, $hid) = t3lib_div::callUserFunction($funcRef, $_params, $this); $onSubmitAr[] = $onSub; $extraHiddenAr[] = $hid; } } if (count($onSubmitAr)) { $onSubmit = implode('; ', $onSubmitAr) . '; return true;'; } if (count($extraHiddenAr)) { $extraHidden = implode(LF, $extraHiddenAr); } if (!$gpRedirectUrl && $this->redirectUrl) { $gpRedirectUrl = $this->redirectUrl; } // Login form $markerArray['###ACTION_URI###'] = $this->getPageLink('', array(), true); $markerArray['###EXTRA_HIDDEN###'] = $extraHidden; // used by kb_md5fepw extension... $markerArray['###LEGEND###'] = $this->pi_getLL('login', '', 1); $markerArray['###LOGIN_LABEL###'] = $this->pi_getLL('login', '', 1); $markerArray['###ON_SUBMIT###'] = $onSubmit; // used by kb_md5fepw extension... $markerArray['###PASSWORD_LABEL###'] = $this->pi_getLL('password', '', 1); $markerArray['###STORAGE_PID###'] = $this->spid; $markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1); $markerArray['###REDIRECT_URL###'] = htmlspecialchars($gpRedirectUrl); $markerArray['###NOREDIRECT###'] = $this->noRedirect ? '1' : '0'; $markerArray['###PREFIXID###'] = $this->prefixId; $markerArray = array_merge($markerArray, $this->getUserFieldMarkers()); if ($this->flexFormValue('showForgotPassword', 'sDEF') || $this->conf['showForgotPasswordLink']) { $markerArray['###FORGOT_PASSWORD###'] = $this->pi_getLL('ll_forgot_header', '', 1); // BOF ErwanD redirection un page // print_r($this->conf); if (isset($this->conf['ForgotPasswordLinkPID'])) { $url = tslib_pibase::pi_getPageLink(194, '', array($this->prefixId . '[forgot]' => 1)); $linkpartArray['###FORGOT_PASSWORD###'] = '<a href="' . $url . '">' . $this->pi_getLL('ll_forgot_header', '', 1) . '</a>'; $linkpartArray['###FORGOT_PASSWORD_LINK###'] = ''; } else { $linkpartArray['###FORGOT_PASSWORD_LINK###'] = explode('|', $this->getPageLink('|', array($this->prefixId . '[forgot]' => 1))); } } else { $subpartArray['###FORGOTP_VALID###'] = ''; } // The permanent login checkbox should only be shown if permalogin is not deactivated (-1), not forced to be always active (2) and lifetime is greater than 0 if ($this->conf['showPermaLogin'] && t3lib_div::inList('0,1', $GLOBALS['TYPO3_CONF_VARS']['FE']['permalogin']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['lifetime'] > 0) { $markerArray['###PERMALOGIN###'] = $this->pi_getLL('permalogin', '', 1); if ($GLOBALS['TYPO3_CONF_VARS']['FE']['permalogin'] == 1) { $markerArray['###PERMALOGIN_HIDDENFIELD_ATTRIBUTES###'] = 'disabled="disabled"'; $markerArray['###PERMALOGIN_CHECKBOX_ATTRIBUTES###'] = 'checked="checked"'; } else { $markerArray['###PERMALOGIN_HIDDENFIELD_ATTRIBUTES###'] = ''; $markerArray['###PERMALOGIN_CHECKBOX_ATTRIBUTES###'] = ''; } } else { $subpartArray['###PERMALOGIN_VALID###'] = ''; } return $this->cObj->substituteMarkerArrayCached($subpart, $markerArray, $subpartArray, $linkpartArray); }
/** * Gets our organizing partners comma-separated (as HTML code with * hyperlinks to their homepage, if they have any). * * Returns an empty string if this event has no organizing partners or * something went wrong with the database query. * * @param tslib_pibase $plugin a tslib_pibase object for a live page * * @return string the hyperlinked names of our organizing partners, or an empty string */ public function getOrganizingPartners(tslib_pibase $plugin) { if (!$this->hasOrganizingPartners()) { return ''; } $result = array(); /** @var tx_seminars_Bag_Organizer $organizerBag */ $organizerBag = t3lib_div::makeInstance('tx_seminars_Bag_Organizer', 'tx_seminars_seminars_organizing_partners_mm.uid_local = ' . $this->getUid() . ' AND ' . 'tx_seminars_seminars_organizing_partners_mm.uid_foreign = tx_seminars_organizers.uid', 'tx_seminars_seminars_organizing_partners_mm'); /** @var tx_seminars_OldModel_Organizer $organizer */ foreach ($organizerBag as $organizer) { $result[] = $plugin->cObj->getTypoLink($organizer->getName(), $organizer->getHomepage(), array(), $plugin->getConfValueString('externalLinkTarget')); } return implode(', ', $result); }
/** * Creates an HTML link to the unregistration page (if a user is logged in). * * @param tslib_pibase $plugin an object for a live page * @param tx_seminars_registration $registration a registration from which we'll get the UID for our GET parameters * * @return string HTML code with the link */ public function getLinkToUnregistrationPage(tslib_pibase $plugin, tx_seminars_registration $registration) { return $plugin->cObj->getTypoLink($plugin->translate('label_onlineUnregistration'), $plugin->getConfValueInteger('registerPID'), array('tx_seminars_pi1[registration]' => $registration->getUid(), 'tx_seminars_pi1[action]' => 'unregister')); }
function autoTableGenerator($rowbez, $rowobj, $empty = FALSE, $show_deletionlink = TRUE) { $content = '<div style="border: 1px dashed gray;padding: 5px"><table>'; if ($this->debug) { $content .= print_r($rowobj, 1); } // $content .= $this->dump($rowbez, 1); if ($show_deletionlink) { if ($_SESSION['todo'] != 'insert' && $_SESSION['todo'] != "") { $content .= '<tr><td><br /><u title="delete whole part" alt="delete whole part" style="background-color:yellow;padding:5px;border: 1px solid gray;color:red" onClick="status=confirm(\'wirklich löschen?\');if(status){window.location=\'' . $_SERVER["REQUEST_URI"] . '&todo=delete&id=' . $rowobj["id"] . '&tablename=' . $this->tablename . '\';} else{}">Datensatz löschen</u><br clear="all" /><br /><br /><br /></td></tr>' . "\n"; } } // get Mediafiles from Database: $mediafiles = $this->getMediafileURIs($rowobj['kerndaten_id'], $rowobj['block_nr']); if ($this->debug) { $content .= 'getMediafileURIs(' . $rowobj['kerndaten_id'] . ', ' . $rowobj['block_nr'] . ')'; } foreach ($mediafiles as $nr => $data) { $id = $data['id']; $uri = $data['file_uri']; $sortorder = $data['sortorder']; $tabellenname = isset($data['partI_id']) ? 'tx_bolonline_Mediafiles_PartI' : 'tx_bolonline_Mediafiles'; $tabellenname = isset($data['partII_id']) ? 'tx_bolonline_Mediafiles_PartII' : $tabellenname; $tabellenname = isset($data['partIII_id']) ? 'tx_bolonline_Mediafiles_PartIII' : $tabellenname; $tabellenname = isset($data['partIV_id']) ? 'tx_bolonline_Mediafiles_PartIV' : $tabellenname; // print_r($tabellenname);die(); //if (preg_match("|Part|i", $this->tabellenname)) $tabellenname = $this->tabellenname; $content .= "\n" . '<div id="bild_' . $id . '"> <img onClick="window.open(\'/' . $this->workpath_rel . $uri . '\')" src="/' . $this->workpath_rel . $uri . '" title="' . $uri . '" alt="' . $uri . '" style="width:80px;border:0px;float:left;border:1px solid gray;padding:1px;"> <span title="delete image no. ' . $id . ', ' . $tabellenname . '" alt="delete image no. ' . $id . ', ' . $tabellenname . '" onClick="del=confirm(\'are you shure, that you will delete the selected file?\');if(del){xajax_delImage(\'' . $id . '\',\'' . $tabellenname . '\');}else{/* do nothing */}" style="background-color:yellow;padding-left:10px;padding-right:10px;padding-top:1px;padding-bottom:1px;;border: 1px solid gray;color:red;text-decoration:underline;cursor:pointer;">'; $content .= 'del</span>'; $content .= '<br/><br/> <span style="padding-left:10px;padding-right:10px;"> order: <input id="orderInput_' . $id . '" type="text" size="5" value="' . $sortorder . '"/> <span onClick="console.log(document.getElementById(\'orderInput_' . $id . '\').value); xajax_setImageOrder(\'' . $tabellenname . '\',' . $id . ',document.getElementById(\'orderInput_' . $id . '\').value);"/ style="background-color:white;padding-left:10px;padding-right:10px;padding-top:1px;padding-bottom:1px;;border: 1px solid gray;color:blue;text-decoration:underline;cursor:pointer;">set</span> </span>'; $content .= '</div><br clear="all"/>' . "\n"; } $tabellenname = $this->tablename; // Einbau Zuordnungstabellen: ##################################################### $content .= '<div id="association_pd_' . $rowobj['id'] . '">'; $content .= $this->getAccociationMenueHtmlElements($rowobj['kerndaten_id'], $tabellenname, $rowobj['id']); $content .= '</div>'; // Ende Einbau Zuordnungstabellen ##################################################### if ($rowobj['kerndaten_id'] != 0) { //wenn Kerddaten-ID 0, keine Upload-Felder. Dann werden die Upload-Felder schon in der Ajax-Funktion setFields erzeugt. //Upload-Felder: for ($ii = 0; $ii < 5; $ii++) { $content .= '<input style="font-size:11px;width:200px;height:22px;margin:2px" type="file" name="fupload_' . $this->tablename . '_' . $rowobj['id'] . '_' . $rowobj['kerndaten_id'] . '_' . $ii . '_' . $rowobj['block_nr'] . '"><br />' . "\n"; } } $bgcolor = ""; if (preg_match("|Kerndaten|i", $this->tablename)) { $content .= '<tr><td style="padding: 4px">Kerndaten-ID:</td><td>' . $rowobj['kerndaten_id'] . "</td></tr>\n"; } else { $content .= '<tr><td style="padding: 4px">Datensatz-ID:</td><td>' . $rowobj['id'] . "</td></tr>\n"; } foreach ($rowbez as $key => $bez) { $label = parent::pi_getLL($this->tablename . '.' . $bez); $label = $label == "" ? ucfirst($bez) : $label; if ($_SESSION['todo'] != 'insert') { if (!preg_match("|^[a-zA-Z]\\d+|", $bez)) { //Kerndaten, nicht editierbar $trans = $rowobj[$bez]; // echo '<bR>$tabellenname:'.$tabellenname.' - $bez: '.$bez;die(); if (preg_match("|Part|i", $tabellenname)) { //wenn Haupttabelle tx_bolonline_Kerndaten, dann ist datensatz_id=kerndaten_id! if ($bez == "id" || $bez == "datensatz_id") { $content .= '<input type="hidden" name="datensatz_id[]" value="' . $rowobj[$bez] . '">' . "\n"; continue; } } else { if ($bez == "kerndaten_id") { $content .= '<input type="hidden" name="datensatz_id[]" value="' . $rowobj[$bez] . '">' . "\n"; continue; } } if ($bez == "kerndaten_id") { if ($_SESSION['update_id']) { $trans = $_SESSION['update_id']; $rowobj[$bez] = $_SESSION['update_id']; } } if ($bez == "crdate") { $trans = @date("r", $rowobj[$bez]); } if ($bez == "tstamp") { $trans = @date("r", $rowobj[$bez]); } $bgcolor = ' style="padding: 4px"'; $content .= '<tr><td' . $bgcolor . '>' . $label . ':</td><td><input type="hidden" name="' . $bez . '[]" value="' . $rowobj[$bez] . '">' . $trans . '</td></tr>' . "\n"; } } else { if (!preg_match("|^[a-zA-Z]\\d+|", $bez)) { //Kerndaten, nicht editierbar $content .= '<input type="hidden" name="' . $bez . '[]" value="' . $rowobj[$bez] . '">' . "\n"; } } if (preg_match("|^[a-zA-Z]\\d+|", $bez)) { //edtierbare Daten if ($empty) { $rowobj[$bez] = ""; } //fuer Neueintrag mit leeren Datenfeldern $bgcolor = $key % 2 != 0 ? ' style="width:300px;background-color: lightgrey;padding: 4px"' : ' style="padding: 4px"'; /* alle Tabellenspalten, welche, in Abhaengigkeit * von der Hauptkategorie, nicht angezeigt werden * sollen, als hidden-Felder anlegen: */ //$_REQUEST["hauptkategorie_id"] $zugeordnete_kategorie = $this->getMainCategories($_SESSION['update_id']); // $content .= print_r($zugeordnete_kategorie,1); $zugeordnete_kategorie = $zugeordnete_kategorie[0]['kategorie']; /* Spezialfelder und Felder an/aus */ include "bolonline.main.conf.php"; // $content = $jscript_special_inputfields;//javascript fuer Spezialfelder // $content.= print_r($special_inputfields,1); // $content .= print_r($zugeordnete_kategorie,1); // $content.='<H1>'.$fakultative_felder[$zugeordnete_kategorie][$bez].'</H1>'; if (!isset($fakultative_felder[$zugeordnete_kategorie][$bez]) || $fakultative_felder[$zugeordnete_kategorie][$bez] == "true") { // $content.= print_r($special_inputfields[$bez],1); /* * ### Ersetzung der Werte durch Vordefinierte * in $special_inputfields aus * include_once ("bolonline.main.conf.php") : */ if ($special_inputfields[$bez] != "") { $content .= '<tr><td' . $bgcolor . '>' . $label . ':</td><td>' . $special_inputfields[$bez] . '</td></tr>' . "\n"; } else { // normaler Wert, keine Ersetzung: //Berechnung der Textfeldgroessen. Autom. Anpassung: $height = round(strlen($rowobj[$bez]) / 65) * 16; //max(40,abs(strlen($rowobj[$bez])/40)); // $height = $height>90||strlen($rowobj[$bez])<1?90:$height;//=leere Felder mit Hoehe 90px $height = $height > 90 ? 90 : $height; //=leere Felder mit Hoehe 16px $height = $height < 20 ? $height + 20 : $height; $content .= '<tr><td' . $bgcolor . '>' . $label . ':</td><td><textarea name="' . $bez . '[]" style="width:400px;height:' . $height . 'px;">' . $rowobj[$bez] . '</textarea></td></tr>' . "\n"; } } else { $content .= '<input type="hidden" name="' . $bez . '[]" value="' . $rowobj[$bez] . '">'; // $content .= '<tr><td style="background-color:orange">' . $label . ':</td><td style="background-color:orange"><textarea name="' . $bez . '[]" style="width:400px;background-color:orange">' . $rowobj[$bez] . '</textarea></td></tr>' . "\n"; } } } $content .= "</table></div>" . "\n"; return $content; }
/** * Main function, called from TypoScript * A content object that renders "tt_content" records. See the comment to this class for TypoScript example of how to trigger it. * This detects the CType of the current content element and renders it accordingly. Only wellknown types are rendered. * * @param tslib_pibase $invokingObj the tt_news object * @return string Plain text content */ function extraCodesProcessor(&$invokingObj) { $content = ''; $this->conf = $invokingObj->conf; if ($this->conf['code'] == 'PLAINTEXT') { $this->cObj = $invokingObj->cObj; $this->config = $invokingObj->config; $this->tt_news_uid = $invokingObj->tt_news_uid; $this->enableFields = $invokingObj->enableFields; $this->sys_language_mode = $invokingObj->sys_language_mode; $this->templateCode = $invokingObj->templateCode; $this->renderPlainText = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_directmail_pi1'); $this->renderPlainText->init($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_directmail_pi1.']); $this->renderPlainText->cObj = $this->cObj; $this->renderPlainText->labelsList = 'tt_news_author_prefix,tt_news_author_date_prefix,tt_news_author_email_prefix,tt_news_short_header,tt_news_bodytext_header'; $lines = array(); $singleWhere = 'tt_news.uid=' . intval($this->tt_news_uid); $singleWhere .= ' AND type=0' . $this->enableFields; // type=0->only real news. $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_news', $singleWhere); $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $GLOBALS['TYPO3_DB']->sql_free_result($res); // get the translated record if the content language is not the default language if ($GLOBALS['TSFE']->sys_language_content) { $OLmode = $this->sys_language_mode == 'strict' ? 'hideNonTranslated' : ''; $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tt_news', $row, $GLOBALS['TSFE']->sys_language_content, $OLmode); } if (is_array($row)) { // Render the title $lines[] = $this->renderPlainText->renderHeader($row['title']); // Render author of the tt_news record $lines[] = $this->renderAuthor($row); // Render the short version of the tt_news record $lines[] = $this->renderPlainText->breakContent(strip_tags($this->renderPlainText->parseBody($row['short'], 'tt_news_short'))); // Render the main text of the tt_news record $lines[] = $this->renderPlainText->breakContent(strip_tags($this->renderPlainText->parseBody($row['bodytext'], 'tt_news_bodytext'))); // Render the images of the tt_news record. $lines[] = $this->getImages($row); // Render the downloads of the tt_news record. $lines[] = $this->renderPlainText->renderUploads($row['news_files']); } elseif ($this->sys_language_mode == 'strict' && $this->tt_news_uid) { $noTranslMsg = $this->cObj->stdWrap($invokingObj->pi_getLL('noTranslMsg', 'Sorry, there is no translation for this news-article'), $this->conf['noNewsIdMsg_stdWrap.']); $content .= $noTranslMsg; } if (!empty($lines)) { $content = implode(LF, $lines) . $content; } // Substitute labels if (!empty($content)) { $markerArray = array(); $markerArray = $this->renderPlainText->addLabelsMarkers($markerArray); $content = $this->cObj->substituteMarkerArray($content, $markerArray); } } return $content; }
/** * initializing the parent class * * @param array $conf: TS conf * @return void ... */ function init($conf) { tslib_pibase::__construct(); $this->conf = $conf; $this->pi_loadLL(); $this->siteUrl = $this->conf['siteUrl']; // Default linebreak; $this->linebreak = LF; if ($this->conf['flowedFormat']) { $this->linebreak = chr(32) . LF; } }
/** * The constructor for a view setting the component manager and the configuration. * * @param Tx_Formhandler_Component_Manager $componentManager * @param Tx_Formhandler_Configuration $configuration * @return void */ public function __construct(Tx_Formhandler_Component_Manager $componentManager, Tx_Formhandler_Configuration $configuration) { parent::__construct(); $this->componentManager = $componentManager; $this->configuration = $configuration; $this->cObj = Tx_Formhandler_Globals::$cObj; $this->pi_loadLL(); $this->initializeView(); }
/** * Gets our description. * * @param tslib_pibase $plugin the live pibase object * * @return string our description (or '' if there is an error) */ public function getDescription(tslib_pibase $plugin) { return $plugin->pi_RTEcssText($this->getRecordPropertyString('description')); }
function browser() { $this->filearray = $this->div->getFiles($this->conf, $this->startpath, $this->conf[$this->mode . '.']['order'], $this->conf['list.']['limit'], 1); // get picture array with hash code if (is_array($this->filearray)) { // if is array $this->curPicNo = !isset($this->piVars['show']) ? 0 : array_search($this->piVars['show'], $this->filearray); // Number of current picture (key in array) if (array_key_exists($this->curPicNo + 1, $this->filearray)) { // if next exists in array $this->hash['next'] = $this->filearray[$this->curPicNo + 1]; // hash of next pic in array $this->wrappedSubpartArray['###NEXT###'][0] = '<a href="' . tslib_pibase::pi_linkTP_keepPIvars_url(array('show' => $this->hash['next']), 1, 0, 0) . '">'; // Link with new "show" vars $this->wrappedSubpartArray['###NEXT###'][1] = '</a>'; // postfix for linkwrap } if (array_key_exists($this->curPicNo - 1, $this->filearray)) { // if previous exists in array $this->hash['previous'] = $this->filearray[$this->curPicNo - 1]; // hash of previous pic in array $this->wrappedSubpartArray['###PREVIOUS###'][0] = '<a href="' . tslib_pibase::pi_linkTP_keepPIvars_url(array('show' => $this->hash['previous']), 1, 0, 0) . '">'; // Link with new "show" vars $this->wrappedSubpartArray['###PREVIOUS###'][1] = '</a>'; // postfix for linkwrap } } }