本文整理汇总了PHP中t3lib_div::inList方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::inList方法的具体用法?PHP t3lib_div::inList怎么用?PHP t3lib_div::inList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_div
的用法示例。
在下文中一共展示了t3lib_div::inList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Rendering the cObject, HMENU
*
* @param array Array of TypoScript properties
* @return string Output
*/
public function render($conf = array())
{
$theValue = '';
if ($this->cObj->checkIf($conf['if.'])) {
$cls = strtolower($conf[1]);
if (t3lib_div::inList($GLOBALS['TSFE']->tmpl->menuclasses, $cls)) {
if (isset($conf['special.']['value.'])) {
$conf['special.']['value'] = $this->cObj->stdWrap($conf['special.']['value'], $conf['special.']['value.']);
}
$GLOBALS['TSFE']->register['count_HMENU']++;
$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] = 0;
$GLOBALS['TSFE']->register['count_MENUOBJ'] = 0;
$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'] = array();
$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'] = array();
$menu = t3lib_div::makeInstance('tslib_' . $cls);
$menu->parent_cObj = $this->cObj;
$menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);
$menu->makeMenu();
$theValue .= $menu->writeMenu();
}
$wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
if ($wrap) {
$theValue = $this->cObj->wrap($theValue, $wrap);
}
if (isset($conf['stdWrap.'])) {
$theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
}
}
return $theValue;
}
示例2: render
/**
* Renders <f:then> child if BE user is allowed to edit given table, otherwise renders <f:else> child.
*
* @param string $table Name of the table
* @return string the rendered string
* @api
*/
public function render($table)
{
if ($GLOBALS['BE_USER']->isAdmin() || t3lib_div::inList($GLOBALS['BE_USER']->groupData['tables_modify'], $table)) {
return $this->renderThenChild();
}
return $this->renderElseChild();
}
示例3: isValidOrdering
/**
* Validate ordering as extbase can't handle that currently
*
* @param string $fieldToCheck
* @param string $allowedSettings
* @return boolean
*/
public static function isValidOrdering($fieldToCheck, $allowedSettings)
{
$isValid = TRUE;
if (empty($fieldToCheck)) {
return $isValid;
} elseif (empty($allowedSettings)) {
return FALSE;
}
$fields = t3lib_div::trimExplode(',', $fieldToCheck, TRUE);
foreach ($fields as $field) {
if ($isValid === TRUE) {
$split = t3lib_div::trimExplode(' ', $field, TRUE);
$count = count($split);
switch ($count) {
case 1:
if (!t3lib_div::inList($allowedSettings, $split[0])) {
$isValid = FALSE;
}
break;
case 2:
if (strtolower($split[1]) !== 'desc' && strtolower($split[1]) !== 'asc' || !t3lib_div::inList($allowedSettings, $split[0])) {
$isValid = FALSE;
}
break;
default:
$isValid = FALSE;
}
}
}
return $isValid;
}
示例4: listAvailableOrderingsForAdmin
function listAvailableOrderingsForAdmin(&$config)
{
$this->init();
$this->lang->init($GLOBALS['BE_USER']->uc['lang']);
// get orderings
$fieldLabel = $this->lang->sL('LLL:EXT:ke_search/locallang_db.php:tx_kesearch_index.relevance');
$notAllowedFields = 'uid,pid,tstamp,crdate,cruser_id,starttime,endtime,fe_group,targetpid,content,params,type,tags,abstract,language,orig_uid,orig_pid,hash';
if (!$config['config']['relevanceNotAllowed']) {
$config['items'][] = array($fieldLabel . ' UP', 'score asc');
$config['items'][] = array($fieldLabel . ' DOWN', 'score desc');
}
$res = $GLOBALS['TYPO3_DB']->sql_query('SHOW COLUMNS FROM tx_kesearch_index');
while ($col = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
if (TYPO3_VERSION_INTEGER >= 7000000) {
$isInList = TYPO3\CMS\Core\Utility\GeneralUtility::inList($notAllowedFields, $col['Field']);
} else {
$isInList = t3lib_div::inList($notAllowedFields, $col['Field']);
}
if (!$isInList) {
$file = $GLOBALS['TCA']['tx_kesearch_index']['columns'][$col['Field']]['label'];
$fieldLabel = $this->lang->sL($file);
$config['items'][] = array($fieldLabel . ' UP', $col['Field'] . ' asc');
$config['items'][] = array($fieldLabel . ' DOWN', $col['Field'] . ' desc');
}
}
}
示例5: get_right_language_uid
function get_right_language_uid($lang_id)
{
$ext_conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['p2_realurl']);
if (isset($ext_conf['language_uids']) && strlen(trim($ext_conf['language_uids']))) {
if (t3lib_div::inList($ext_conf['language_uids'], $lang_id) || strtolower(trim($ext_conf['language_uids'])) == 'all') {
// set language to default
$lang_id = isset($ext_conf['default_language_uid']) ? intval($ext_conf['default_language_uid']) : 0;
}
}
return $lang_id;
}
示例6: evaluateCondition
/**
* Evaluates a TypoScript condition given as input, eg. "[browser=net][...(other conditions)...]"
*
* @param string $string: The condition to match against its criterias.
* @return boolean Whether the condition matched
* @see t3lib_tsparser::parse()
*/
protected function evaluateCondition($string)
{
list($key, $value) = t3lib_div::trimExplode('=', $string, FALSE, 2);
$result = parent::evaluateConditionCommon($key, $value);
if (is_bool($result)) {
return $result;
} else {
switch ($key) {
case 'usergroup':
$groupList = $this->getGroupList();
$values = t3lib_div::trimExplode(',', $value, TRUE);
foreach ($values as $test) {
if ($test == '*' || t3lib_div::inList($groupList, $test)) {
return TRUE;
}
}
break;
case 'adminUser':
if ($this->isUserLoggedIn()) {
$result = !((bool) $value xor $this->isAdminUser());
return $result;
}
break;
case 'treeLevel':
$values = t3lib_div::trimExplode(',', $value, TRUE);
$treeLevel = count($this->rootline) - 1;
// If a new page is being edited or saved the treeLevel is higher by one:
if ($this->isNewPageWithPageId($this->pageId)) {
$treeLevel++;
}
foreach ($values as $test) {
if ($test == $treeLevel) {
return TRUE;
}
}
break;
case 'PIDupinRootline':
case 'PIDinRootline':
$values = t3lib_div::trimExplode(',', $value, TRUE);
if ($key == 'PIDinRootline' || !in_array($this->pageId, $values) || $this->isNewPageWithPageId($this->pageId)) {
foreach ($values as $test) {
foreach ($this->rootline as $rl_dat) {
if ($rl_dat['uid'] == $test) {
return TRUE;
}
}
}
}
break;
}
}
return FALSE;
}
示例7: main
/**
* Adding fe_users field list to selector box array
*
* @param array Parameters, changing "items". Passed by reference.
* @param object Parent object
* @return void
*/
function main(&$params, &$pObj)
{
global $TCA;
t3lib_div::loadTCA('fe_users');
$params['items'] = array();
if (is_array($TCA['fe_users']['columns'])) {
foreach ($TCA['fe_users']['columns'] as $key => $config) {
if ($config['label'] && !t3lib_div::inList('password', $key)) {
$label = t3lib_div::fixed_lgd(ereg_replace(':$', '', $GLOBALS['LANG']->sL($config['label'])), 30) . ' (' . $key . ')';
$params['items'][] = array($label, $key);
}
}
}
}
示例8: filterMenuPages
/**
* Checks if a page is OK to include in the final menu item array. Pages can be excluded if the doktype is wrong, if they are hidden in navigation, have a uid in the list of banned uids etc.
*
* @param array Array of menu items
* @param array Array of page uids which are to be excluded
* @param boolean If set, then the page is a spacer.
* @return boolean Returns true if the page can be safely included.
*/
function filterMenuPages(&$data, $banUidArray, $spacer)
{
if ($data['_SAFE']) {
return TRUE;
}
$uid = $data['uid'];
if ($this->mconf['SPC'] || !$spacer) {
// If the spacer-function is not enabled, spacers will not enter the $menuArr
if (!t3lib_div::inList($this->doktypeExcludeList, $data['doktype'])) {
// Page may not be 'not_in_menu' or 'Backend User Section'
if (!$data['nav_hide'] || $this->conf['includeNotInMenu']) {
// Not hidden in navigation
if (!t3lib_div::inArray($banUidArray, $uid)) {
// not in banned uid's
// Checks if the default language version can be shown:
// Block page is set, if l18n_cfg allows plus: 1) Either default language or 2) another language but NO overlay record set for page!
$blockPage = $data['l18n_cfg'] & 1 && (!$GLOBALS['TSFE']->sys_language_uid || $GLOBALS['TSFE']->sys_language_uid && !$data['_PAGES_OVERLAY']);
if (!$blockPage) {
// Checking if a page should be shown in the menu depending on whether a translation exists:
$tok = TRUE;
if ($GLOBALS['TSFE']->sys_language_uid && t3lib_div::hideIfNotTranslated($data['l18n_cfg'])) {
// There is an alternative language active AND the current page requires a translation:
if (!$data['_PAGES_OVERLAY'] || $data['_PAGES_OVERLAY'] && $data['_PAGES_OVERLAY_LUID'] != $GLOBALS['TSFE']->sys_language_uid) {
$tok = FALSE;
}
}
// Continue if token is true:
if ($tok) {
// Checking if "&L" should be modified so links to non-accessible pages will not happen.
if ($this->conf['protectLvar']) {
$languageUid = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']);
if ($languageUid && ($this->conf['protectLvar'] == 'all' || t3lib_div::hideIfNotTranslated($data['l18n_cfg']))) {
$olRec = $GLOBALS['TSFE']->sys_page->getPageOverlay($data['uid'], $languageUid);
if (!count($olRec)) {
// If no pages_language_overlay record then page can NOT be accessed in the language pointed to by "&L" and therefore we protect the link by setting "&L=0"
$data['_ADD_GETVARS'] .= '&L=0';
}
}
}
return TRUE;
}
}
}
}
}
}
}
示例9: getParserInstance
/**
* Obtains a xml parser instance.
*
* This function will return an instance of a class that implements
* em_extensionxml_abstract_parser.
*
* TODO use autoload if possible (might require EM to be moved in a sysext)
*
* @access public
* @param string $parserType: type of parser, one of extension and mirror
* @param string $excludeClassNames: (optional) comma-separated list of class names
* @return em_extensionxml_abstract_parser an instance of an extension.xml parser
*/
public static function getParserInstance($parserType, $excludeClassNames = '')
{
if (!isset(self::$instance[$parserType]) || !is_object(self::$instance[$parserType]) || !empty($excludeClassNames)) {
// reset instance
self::$instance[$parserType] = $objParser = NULL;
foreach (self::$parsers[$parserType] as $className => $file) {
if (!t3lib_div::inList($excludeClassNames, $className)) {
//require_once(dirname(__FILE__) . '/' . $file);
$objParser = t3lib_div::makeInstance($className);
if ($objParser->isAvailable()) {
self::$instance[$parserType] =& $objParser;
break;
}
$objParser = NULL;
}
}
}
return self::$instance[$parserType];
}
示例10: evaluateFieldValue
/**
* Function uses Portable PHP Hashing Framework to create a proper password string if needed
*
* @param mixed $value: The value that has to be checked.
* @param string $is_in: Is-In String
* @param integer $set: Determines if the field can be set (value correct) or not, e.g. if input is required but the value is empty, then $set should be set to FALSE. (PASSED BY REFERENCE!)
* @return The new value of the field
*/
function evaluateFieldValue($value, $is_in, &$set)
{
$isEnabled = $this->mode ? tx_saltedpasswords_div::isUsageEnabled($this->mode) : tx_saltedpasswords_div::isUsageEnabled();
if ($isEnabled) {
$set = FALSE;
$isMD5 = preg_match('/[0-9abcdef]{32,32}/', $value);
$isSaltedHash = t3lib_div::inList('$1$,$2$,$2a,$P$', substr($value, 0, 3));
$this->objInstanceSaltedPW = tx_saltedpasswords_salts_factory::getSaltingInstance(NULL, $this->mode);
if ($isMD5) {
$set = TRUE;
$value = 'M' . $this->objInstanceSaltedPW->getHashedPassword($value);
} else {
if (!$isSaltedHash) {
$set = TRUE;
$value = $this->objInstanceSaltedPW->getHashedPassword($value);
}
}
}
return $value;
}
示例11: includeStaticTypoScriptSources
/**
* Includes static template records from static_template table, loaded through a hook
*
* @param string A list of already processed template ids including the current; The list is on the form "[prefix]_[uid]" where [prefix] is "sys" for "sys_template" records, "static" for "static_template" records and "ext_" for static include files (from extensions). The list is used to check that the recursive inclusion of templates does not go into circles: Simply it is used to NOT include a template record/file which has already BEEN included somewhere in the recursion.
* @param string The id of the current template. Same syntax as $idList ids, eg. "sys_123"
* @param array The PID of the input template record
* @param array A full TypoScript template record
* @return void
*/
public function includeStaticTypoScriptSources(&$params, &$pObj)
{
// Static Template Records (static_template): include_static is a
// list of static templates to include
if (trim($params['row']['include_static'])) {
$includeStaticArr = t3lib_div::intExplode(',', $params['row']['include_static']);
// traversing list
foreach ($includeStaticArr as $id) {
// if $id is not already included ...
if (!t3lib_div::inList($params['idList'], 'static_' . $id)) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'static_template', 'uid = ' . intval($id));
// there was a template, then we fetch that
if ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$subrow = $pObj->prependStaticExtra($subrow);
$pObj->processTemplate($subrow, $params['idList'] . ',static_' . $id, $params['pid'], 'static_' . $id, $params['templateId']);
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
}
}
}
}
示例12: transform_rte
/**
* Transformation handler: 'txdam_media' / direction: "rte"
* Processing linked images from database content going into the RTE.
* Processing includes converting the src attribute to an absolute URL.
*
* @param string Content input
* @return string Content output
*/
function transform_rte($value, &$pObj)
{
// Split content by the TYPO3 pseudo tag "<media>":
$blockSplit = $pObj->splitIntoBlock('media', $value, 1);
foreach ($blockSplit as $k => $v) {
$error = '';
if ($k % 2) {
// block:
$tagCode = t3lib_div::unQuoteFilenames(trim(substr($pObj->getFirstTag($v), 0, -1)), true);
$link_param = $tagCode[1];
$href = '';
$useDAMColumn = FALSE;
// Checking if the id-parameter is int and get meta data
if (t3lib_div::testInt($link_param)) {
$meta = tx_dam::meta_getDataByUid($link_param);
}
if (is_array($meta)) {
$href = tx_dam::file_url($meta);
if (!$tagCode[4]) {
require_once PATH_txdam . 'lib/class.tx_dam_guifunc.php';
$displayItems = '';
if (t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['additionalAttributes'], 'usedamcolumn') && $pObj->thisConfig['buttons.']['link.']['media.']['properties.']['title.']['useDAMColumn']) {
$displayItems = $pObj->thisConfig['buttons.']['link.']['media.']['properties.']['title.']['useDAMColumn.']['displayItems'] ? $pObj->thisConfig['buttons.']['link.']['media.']['properties.']['title.']['useDAMColumn.']['displayItems'] : '';
$useDAMColumn = TRUE;
}
$tagCode[4] = tx_dam_guiFunc::meta_compileHoverText($meta, $displayItems, ', ');
}
} else {
$href = $link_param;
$error = 'No media file found: ' . $link_param;
}
// Setting the A-tag:
$bTag = '<a href="' . htmlspecialchars($href) . '" txdam="' . htmlspecialchars($link_param) . '"' . ($tagCode[2] && $tagCode[2] != '-' ? ' target="' . htmlspecialchars($tagCode[2]) . '"' : '') . ($tagCode[3] && $tagCode[3] != '-' ? ' class="' . htmlspecialchars($tagCode[3]) . '"' : '') . ($tagCode[4] ? ' title="' . htmlspecialchars($tagCode[4]) . '"' : '') . ($useDAMColumn ? ' usedamcolumn="true"' : '') . ($error ? ' rteerror="' . htmlspecialchars($error) . '" style="background-color: yellow; border:2px red solid; color: black;"' : '') . '>';
$eTag = '</a>';
$blockSplit[$k] = $bTag . $this->transform_rte($pObj->removeFirstAndLastTag($blockSplit[$k]), $pObj) . $eTag;
}
}
$value = implode('', $blockSplit);
return $value;
}
示例13: getDatastructuresByStoragePidAndScope
/**
* Retrieve a collection (array) of tx_templavoila_datastructure objects
*
* @param integer $pid
* @param integer $scope
* @return array
*/
public function getDatastructuresByStoragePidAndScope($pid, $scope)
{
$dscollection = array();
$confArr = self::getStaticDatastructureConfiguration();
if (count($confArr)) {
foreach ($confArr as $key => $conf) {
if ($conf['scope'] == $scope) {
$ds = $this->getDatastructureByUidOrFilename($conf['path']);
$pids = $ds->getStoragePids();
if ($pids == '' || t3lib_div::inList($pids, $pid)) {
$dscollection[] = $ds;
}
}
}
}
if (!self::isStaticDsEnabled()) {
$dsRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'tx_templavoila_datastructure', 'scope=' . intval($scope) . ' AND pid=' . intval($pid) . t3lib_BEfunc::deleteClause('tx_templavoila_datastructure') . ' AND pid!=-1 ' . t3lib_BEfunc::versioningPlaceholderClause('tx_templavoila_datastructure'));
foreach ($dsRows as $ds) {
$dscollection[] = $this->getDatastructureByUidOrFilename($ds['uid']);
}
}
usort($dscollection, array($this, 'sortDatastructures'));
return $dscollection;
}
示例14: makeFieldTCA
/**
* Creates the TCA for fields
*
* @param array &$DBfields: array of fields (PASSED BY REFERENCE)
* @param array $columns: $array of fields (PASSED BY REFERENCE)
* @param array $fConf: field config
* @param string $WOP: ???
* @param string $table: tablename
* @param string $extKey: extensionkey
* @return void
*/
function makeFieldTCA(&$DBfields, &$columns, $fConf, $WOP, $table, $extKey)
{
if (!(string) $fConf['type']) {
return;
}
$id = $table . '_' . $fConf['fieldname'];
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
$configL = array();
$t = (string) $fConf['type'];
switch ($t) {
case 'input':
case 'input+':
$isString = true;
$configL[] = '\'type\' => \'input\', ' . $this->WOPcomment('WOP:' . $WOP . '[type]');
if ($version < 4006000) {
$configL[] = '\'size\' => \'' . t3lib_div::intInRange($fConf['conf_size'], 5, 48, 30) . '\', ' . $this->WOPcomment('WOP:' . $WOP . '[conf_size]');
if (intval($fConf['conf_max'])) {
$configL[] = '\'max\' => \'' . t3lib_div::intInRange($fConf['conf_max'], 1, 255) . '\', ' . $this->WOPcomment('WOP:' . $WOP . '[conf_max]');
}
} else {
$configL[] = '\'size\' => \'' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_size'], 5, 48, 30) . '\', ' . $this->WOPcomment('WOP:' . $WOP . '[conf_size]');
if (intval($fConf['conf_max'])) {
$configL[] = '\'max\' => \'' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_max'], 1, 255) . '\', ' . $this->WOPcomment('WOP:' . $WOP . '[conf_max]');
}
}
$evalItems = array();
if ($fConf['conf_required']) {
$evalItems[0][] = 'required';
$evalItems[1][] = $WOP . '[conf_required]';
}
if ($t == 'input+') {
$isString = (bool) (!$fConf['conf_eval']) || t3lib_div::inList('alphanum,upper,lower', $fConf['conf_eval']);
$isDouble2 = (bool) (!$fConf['conf_eval']) || t3lib_div::inList('double2', $fConf['conf_eval']);
if ($fConf['conf_varchar'] && $isString) {
$evalItems[0][] = 'trim';
$evalItems[1][] = $WOP . '[conf_varchar]';
}
if ($fConf['conf_eval'] === 'int+') {
$configL[] = '\'range\' => array(\'lower\' => 0, \'upper\' => 1000), ' . $this->WOPcomment('WOP:' . $WOP . '[conf_eval] = int+ results in a range setting');
$fConf['conf_eval'] = 'int';
}
if ($fConf['conf_eval']) {
$evalItems[0][] = $fConf['conf_eval'];
$evalItems[1][] = $WOP . '[conf_eval]';
}
if ($fConf['conf_check']) {
$configL[] = '\'checkbox\' => \'' . ($isString ? '' : '0') . '\', ' . $this->WOPcomment('WOP:' . $WOP . '[conf_check]');
}
if ($fConf['conf_stripspace']) {
$evalItems[0][] = 'nospace';
$evalItems[1][] = $WOP . '[conf_stripspace]';
}
if ($fConf['conf_pass']) {
$evalItems[0][] = 'password';
$evalItems[1][] = $WOP . '[conf_pass]';
}
if ($fConf['conf_md5']) {
$evalItems[0][] = 'md5';
$evalItems[1][] = $WOP . '[conf_md5]';
}
if ($fConf['conf_unique']) {
if ($fConf['conf_unique'] == 'L') {
$evalItems[0][] = 'uniqueInPid';
$evalItems[1][] = $WOP . '[conf_unique] = Local (unique in this page (PID))';
}
if ($fConf['conf_unique'] == 'G') {
$evalItems[0][] = 'unique';
$evalItems[1][] = $WOP . '[conf_unique] = Global (unique in whole database)';
}
}
$wizards = array();
if ($fConf['conf_wiz_color']) {
$wizards[] = trim($this->sPS('
' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_color]') . '
\'color\' => array(
\'title\' => \'Color:\',
\'type\' => \'colorbox\',
\'dim\' => \'12x12\',
\'tableStyle\' => \'border:solid 1px black;\',
\'script\' => \'wizard_colorpicker.php\',
\'JSopenParams\' => \'height=300,width=250,status=0,menubar=0,scrollbars=1\',
),
'));
}
if ($fConf['conf_wiz_link']) {
$wizards[] = trim($this->sPS('
' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_link]') . '
\'link\' => array(
\'type\' => \'popup\',
//.........这里部分代码省略.........
示例15: view_result
/**
* View result
*
* @return HTML with filelist and fileview
*/
function view_result()
{
$this->makeFilesArray($this->saveKey);
$keyA = array_keys($this->fileArray);
asort($keyA);
$filesOverview1 = array();
$filesOverview2 = array();
$filesContent = array();
$filesOverview1[] = '<tr' . $this->bgCol(1) . '>
<td><strong>' . $this->fw('Filename:') . '</strong></td>
<td><strong>' . $this->fw('Size:') . '</strong></td>
<td><strong>' . $this->fw(' ') . '</strong></td>
<td><strong>' . $this->fw('Overwrite:') . '</strong></td>
</tr>';
foreach ($keyA as $fileName) {
$data = $this->fileArray[$fileName];
$fI = pathinfo($fileName);
if (t3lib_div::inList('php,sql,txt,xml', strtolower($fI['extension']))) {
$linkToFile = '<strong><a href="#' . md5($fileName) . '">' . $this->fw(" View ") . '</a></strong>';
if ($fI['extension'] == 'xml') {
$data['content'] = $GLOBALS['LANG']->csConvObj->utf8_decode($data['content'], $GLOBALS['LANG']->charSet);
}
$filesContent[] = '<tr' . $this->bgCol(1) . '>
<td><a name="' . md5($fileName) . '"></a><strong>' . $this->fw($fileName) . '</strong></td>
</tr>
<tr>
<td>' . $this->preWrap($data['content'], $fI['extension']) . '</td>
</tr>';
} else {
$linkToFile = $this->fw(' ');
}
$line = '<tr' . $this->bgCol(2) . '>
<td>' . $this->fw($fileName) . '</td>
<td>' . $this->fw(t3lib_div::formatSize($data['size'])) . '</td>
<td>' . $linkToFile . '</td>
<td>';
if ($fileName == 'doc/wizard_form.dat' || $fileName == 'doc/wizard_form.html') {
$line .= '<input type="hidden" name="' . $this->piFieldName('wizArray_upd') . '[save][overwrite_files][' . $fileName . ']" value="1" />';
} else {
$checked = '';
if (!is_array($this->wizArray['save']['overwrite_files']) || isset($this->wizArray['save']['overwrite_files'][$fileName]) && $this->wizArray['save']['overwrite_files'][$fileName] == '1' || !isset($this->wizArray['save']['overwrite_files'][$fileName])) {
$checked = ' checked="checked"';
}
$line .= '<input type="hidden" name="' . $this->piFieldName('wizArray_upd') . '[save][overwrite_files][' . $fileName . ']" value="0" />';
$line .= '<input type="checkbox" name="' . $this->piFieldName('wizArray_upd') . '[save][overwrite_files][' . $fileName . ']" value="1"' . $checked . ' />';
}
$line .= '</td>
</tr>';
if (strstr($fileName, '/')) {
$filesOverview2[] = $line;
} else {
$filesOverview1[] = $line;
}
}
$content = '<table border="0" cellpadding="1" cellspacing="2">' . implode('', $filesOverview1) . implode('', $filesOverview2) . '</table>';
$content .= '<br /><input type="submit" name="' . $this->piFieldName('updateResult') . '" value="Update result" /><br />';
$content .= $this->fw('<br /><strong>Author name:</strong> ' . $this->wizArray['emconf'][1]['author'] . '
<br /><strong>Author email:</strong> ' . $this->wizArray['emconf'][1]['author_email']);
$content .= '<br /><br />';
if (!$this->EMmode) {
$content .= '<input type="submit" name="' . $this->piFieldName('WRITE') . '" value="WRITE to \'' . $this->saveKey . '\'" />';
} else {
// $content.='
// <strong>'.$this->fw('Write to location:').'</strong><br />
// <select name="'.$this->piFieldName('loc').'">'.
// '<option value="L" selected="selected">Local: '.$this->pObj->typePaths['L'].$this->saveKey.'/'.(@is_dir(PATH_site.$this->pObj->typePaths['L'].$this->saveKey)?' (OVERWRITE)':' (empty)').'</option>':'').
// '</select>
// <input type="submit" name="'.$this->piFieldName('WRITE').'" value="WRITE" onclick="return confirm(\'If the setting in the selectorbox says OVERWRITE\nthen the marked files of the current extension in that location will be OVERRIDDEN! \nPlease decide if you want to continue.\n\n(Remember, this is a *kickstarter* - NOT AN editor!)\');" />
// ';
}
$this->afterContent = '<br /><table border="0" cellpadding="1" cellspacing="2">' . implode('', $filesContent) . '</table>';
return $content;
}