当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_div::view_array方法代码示例

本文整理汇总了PHP中t3lib_div::view_array方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::view_array方法的具体用法?PHP t3lib_div::view_array怎么用?PHP t3lib_div::view_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_div的用法示例。


在下文中一共展示了t3lib_div::view_array方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: viewArray

 /**
  * @param array $array
  */
 public static function viewArray($array)
 {
     if (class_exists('t3lib_utility_Debug') && is_callable('t3lib_utility_Debug::viewArray')) {
         t3lib_utility_Debug::viewArray($array);
     } else {
         t3lib_div::view_array($array);
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:11,代码来源:Compatibility.php

示例2: user_getParams

 public function user_getParams($PA, $fobj)
 {
     $params = unserialize($PA['itemFormElValue']);
     return '<input
             readonly="readonly" style="display:none" 
             name="' . $PA['itemFormElName'] . '"
             value="' . htmlspecialchars($PA['itemFormElValue']) . '"
             onchange="' . htmlspecialchars(implode('', $PA['fieldChangeFunc'])) . '"
             ' . $PA['onFocus'] . '/>' . t3lib_div::view_array($params);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:10,代码来源:class.tx_formhandler_tcafuncs.php

示例3: outputDebugLog

 public function outputDebugLog()
 {
     $out = '';
     foreach ($this->debugLog as $section => $logData) {
         $out .= Tx_Formhandler_Globals::$cObj->wrap($section, $this->settings['sectionHeaderWrap']);
         $sectionContent = '';
         foreach ($logData as $messageData) {
             $message = str_replace("\n", '<br />', $messageData['message']);
             $message = Tx_Formhandler_Globals::$cObj->wrap($message, $this->settings['severityWrap.'][$messageData['severity']]);
             $sectionContent .= Tx_Formhandler_Globals::$cObj->wrap($message, $this->settings['messageWrap']);
             if ($messageData['data']) {
                 if (t3lib_div::int_from_ver(TYPO3_branch) < t3lib_div::int_from_ver('4.5')) {
                     $sectionContent .= t3lib_div::view_array($messageData['data']);
                 } else {
                     $sectionContent .= t3lib_utility_Debug::viewArray($messageData['data']);
                 }
                 $sectionContent .= '<br />';
             }
         }
         $out .= Tx_Formhandler_Globals::$cObj->wrap($sectionContent, $this->settings['sectionWrap']);
     }
     print $out;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:23,代码来源:Tx_Formhandler_Debugger_Print.php

示例4: main

    /**
     * The main method of the PlugIn
     *
     * @param	string		$content: The PlugIn content
     * @param	array		$conf: The PlugIn configuration
     * @return	The content that is displayed on the website
     */
    function main($content, $conf)
    {
        return 'Hello World!<HR>
			Here is the TypoScript passed to the method:' . t3lib_div::view_array($conf);
    }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:12,代码来源:class.tx_othtml5boilerplate_pi1.php

示例5: array

 /**
  * Find the best service and check if it works.
  * Returns object of the service class.
  *
  * @param	string		Type of service (service key).
  * @param	string		Sub type like file extensions or similar. Defined by the service.
  * @param	mixed		List of service keys which should be exluded in the search for a service. Array or comma list.
  * @return	object		The service object or an array with error info's.
  * @author	René Fritz <r.fritz@colorcube.de>
  */
 function &makeInstanceService($serviceType, $serviceSubType = '', $excludeServiceKeys = array())
 {
     global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
     $error = FALSE;
     if (!is_array($excludeServiceKeys)) {
         $excludeServiceKeys = t3lib_div::trimExplode(',', $excludeServiceKeys, 1);
     }
     while ($info = t3lib_extMgm::findService($serviceType, $serviceSubType, $excludeServiceKeys)) {
         // Check persistent object and if found, call directly and exit.
         if (is_object($GLOBALS['T3_VAR']['makeInstanceService'][$info['className']])) {
             // reset service and return object
             $T3_VAR['makeInstanceService'][$info['className']]->reset();
             return $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']];
             // include file and create object
         } else {
             $requireFile = t3lib_div::getFileAbsFileName($info['classFile']);
             if (@is_file($requireFile)) {
                 require_once $requireFile;
                 $obj = t3lib_div::makeInstance($info['className']);
                 if (is_object($obj)) {
                     if (!@is_callable(array($obj, 'init'))) {
                         // use silent logging??? I don't think so.
                         die('Broken service:' . t3lib_div::view_array($info));
                     }
                     $obj->info = $info;
                     if ($obj->init()) {
                         // service available?
                         // create persistent object
                         $T3_VAR['makeInstanceService'][$info['className']] =& $obj;
                         // needed to delete temp files
                         register_shutdown_function(array(&$obj, '__destruct'));
                         return $obj;
                         // object is passed as reference by function definition
                     }
                     $error = $obj->getLastErrorArray();
                     unset($obj);
                 }
             }
         }
         // deactivate the service
         t3lib_extMgm::deactivateService($info['serviceType'], $info['serviceKey']);
     }
     return $error;
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:54,代码来源:class.t3lib_div.php

示例6: user_renderint

function user_renderint($content, $conf)
{
    $key = t3lib_div::_GET('key');
    $identifier = t3lib_div::_GET('identifier');
    if (empty($key) || empty($identifier)) {
        header('X-TYPO3-DISABLE-VARNISHCACHE: true');
        echo 'Missing GET parameters, can\'t proceed.';
        exit;
    }
    // Find records in "cache_pages" which have the the requested $key set in cache_data[INTincScript].
    if (TYPO3_UseCachingFramework) {
        // Caching framework access
        $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
        $row = $pageCache->get($identifier);
        $data = unserialize($row['cache_data']);
    } else {
        // Traditional database cache
        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'cache_pages', 'hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($identifier, 'cache_pages'));
        if (count($rows) === 1) {
            $row = $rows[0];
            $data = unserialize($row['cache_data']);
        }
    }
    //Copied from tslib_fe
    if ($data['INTincScript'][$key]) {
        $INTiS_cObj = unserialize($data['INTincScript'][$key]['cObj']);
        /* @var $INTiS_cObj tslib_cObj */
        $INTiS_cObj->INT_include = 1;
        switch ($data['INTincScript'][$key]['type']) {
            case 'SCRIPT':
                $incContent = $INTiS_cObj->PHP_SCRIPT($data['INTincScript'][$key]['conf']);
                break;
            case 'COA':
                $incContent = $INTiS_cObj->COBJ_ARRAY($data['INTincScript'][$key]['conf']);
                break;
            case 'FUNC':
                $incContent = $INTiS_cObj->USER($data['INTincScript'][$key]['conf']);
                break;
            case 'POSTUSERFUNC':
                $incContent = $INTiS_cObj->callUserFunction($data['INTincScript'][$key]['postUserFunc'], $data['INTincScript'][$key]['conf'], $data['INTincScript'][$key]['content']);
                break;
        }
        header('X-ESI-RESPONSE: 1');
        $EXTconfArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['moc_varnish']);
        $conf = $data['INTincScript'][$key]['conf'];
        $max_age = $INTiS_cObj->stdWrap($conf['max_age'], $conf['max_age.']);
        if ($max_age) {
            header('Cache-control: max-age=' . intval($max_age));
        } elseif (intval($EXTconfArr['userINT_forceTTL']) > 0) {
            header('Cache-control: max-age=' . intval($EXTconfArr['userINT_forceTTL']));
        }
        return $incContent;
    } else {
        header('X-TYPO3-DISABLE-VARNISHCACHE: true');
        print date('d/m-Y H:m:i') . ': Cache for page found, but there is no configuration for USER_INT with hash ' . $key . ' in cache record...' . t3lib_div::view_array($data);
        exit;
    }
    // @TODO: Somehow tell Varnish, that this content is not available, or somehow render it...
    header('X-TYPO3-DISABLE-VARNISHCACHE: true');
    print date('d/m-Y H:m:i') . ': Unable to find cache for page';
    exit;
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:62,代码来源:user_renderInt.php

示例7: getOutput

    /**
     * Call gui item functions and return the output
     *
     * @param	string		Type name: header, footer
     * @param	string		List of item function which should be called instead of the default defined
     * @return	string		Items output
     */
    function getOutput($type = 'footer', $itemList = '')
    {
        if (is_null($itemList)) {
            return;
        }
        if ($itemList) {
            $itemListArr = t3lib_div::trimExplode(',', $itemList, 1);
        } else {
            $type = 'items_' . $type;
            if (!is_array($this->{$type})) {
                return;
            }
            $itemListArr = array_keys($this->{$type});
        }
        $elementList =& $this->{$type};
        $out = '';
        foreach ($itemListArr as $item) {
            $content = $this->items_callFunc($elementList[$item]);
            $out .= '
				<!-- GUI element section: ' . htmlspecialchars($item) . ' -->
					' . $content . '
				<!-- GUI element section end -->';
        }
        if ($type === 'items_footer' and is_array($GLOBALS['SOBE']->debugContent) and tx_dam::config_getValue('setup.devel')) {
            $content = '<div class="itemsFooter">' . '<h4>GUI Elements</h4>' . t3lib_div::view_array($GLOBALS['SOBE']->develAvailableGuiItems) . '</div>';
            $content .= '<div class="itemsFooter">' . '<h4>Options</h4>' . t3lib_div::view_array($GLOBALS['SOBE']->develAvailableOptions) . '</div>';
            $content .= '<div class="itemsFooter">' . '<h4>Registered actions (all)</h4>' . t3lib_div::view_array(array_keys($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dam']['actionClasses'])) . '</div>';
            $out .= $GLOBALS['SOBE']->buttonToggleDisplay('devel', 'Module Info', $content);
            $content = '<div class="itemsFooter">' . implode('', $GLOBALS['SOBE']->debugContent) . '</div>';
            $out .= $GLOBALS['SOBE']->buttonToggleDisplay('debug', 'Debug output', $content);
        }
        return $out;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:40,代码来源:class.tx_dam_guirenderlist.php

示例8: drawDataStructureMap


//.........这里部分代码省略.........
                        }
                        // CMD links; Content when current element is under mapping, then display control panel or message:
                        if ($this->mapElPath == $formPrefix . '[' . $key . ']') {
                            if ($this->doMappingOfPath) {
                                // Creating option tags:
                                $lastLevel = end($pathLevels);
                                $tagsMapping = $this->explodeMappingToTagsStr($value['tx_templavoila']['tags']);
                                $mapDat = is_array($tagsMapping[$lastLevel['el']]) ? $tagsMapping[$lastLevel['el']] : $tagsMapping['*'];
                                unset($mapDat['']);
                                if (is_array($mapDat) && !count($mapDat)) {
                                    unset($mapDat);
                                }
                                // Create mapping options:
                                $didSetSel = 0;
                                $opt = array();
                                foreach ($optDat as $k => $v) {
                                    list($pI) = $this->markupObj->splitPath($k);
                                    if ($value['type'] == 'attr' && $pI['modifier'] == 'ATTR' || $value['type'] != 'attr' && $pI['modifier'] != 'ATTR') {
                                        if ((!$this->markupObj->tags[$lastLevel['el']]['single'] || $pI['modifier'] != 'INNER') && (!is_array($mapDat) || $pI['modifier'] != 'ATTR' && isset($mapDat[strtolower($pI['modifier'] ? $pI['modifier'] : 'outer')]) || $pI['modifier'] == 'ATTR' && (isset($mapDat['attr']['*']) || isset($mapDat['attr'][$pI['modifier_value']])))) {
                                            if ($k == $currentMappingInfo[$key]['MAP_EL']) {
                                                $sel = ' selected="selected"';
                                                $didSetSel = 1;
                                            } else {
                                                $sel = '';
                                            }
                                            $opt[] = '<option value="' . htmlspecialchars($k) . '"' . $sel . '>' . htmlspecialchars($v) . '</option>';
                                        }
                                    }
                                }
                                // Finally, put together the selector box:
                                $rowCells['cmdLinks'] = '<img src="../html_tags/' . $lastLevel['el'] . '.gif" height="9" border="0" alt="" class="absmiddle" title="---' . htmlspecialchars(t3lib_div::fixed_lgd_cs($lastLevel['path'], -80)) . '" /><br />
									<select name="dataMappingForm' . $formPrefix . '[' . $key . '][MAP_EL]">
										' . implode('
										', $opt) . '
										<option value=""></option>
									</select>
									<br />
									<input type="submit" name="_save_data_mapping" value="Set" />
									<input type="submit" name="_" value="Cancel" />';
                                $rowCells['cmdLinks'] .= $this->cshItem('xMOD_tx_templavoila', 'mapping_modeset', $this->doc->backPath, '', FALSE, 'margin-bottom: 0px;');
                            } else {
                                $rowCells['cmdLinks'] = '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/icon_note.gif" width="18" height="16" border="0" alt="" class="absmiddle" /><strong>Click a tag-icon in the window below to map this element.</strong>';
                                $rowCells['cmdLinks'] .= '<br />
										<input type="submit" value="Cancel" name="_" onclick="document.location=\'' . $this->linkThisScript(array()) . '\';return false;" />';
                            }
                        } elseif (!$rowCells['cmdLinks'] && $mapOK && $value['type'] != 'no_map') {
                            $rowCells['cmdLinks'] = '
										<input type="submit" value="Map" name="_" onclick="document.location=\'' . $this->linkThisScript(array('mapElPath' => $formPrefix . '[' . $key . ']', 'htmlPath' => $path, 'mappingToTags' => $value['tx_templavoila']['tags'])) . '\';return false;" />';
                        }
                    }
                    // Display mapping rules:
                    $rowCells['tagRules'] = implode('<br />', t3lib_div::trimExplode(',', strtolower($value['tx_templavoila']['tags']), 1));
                    if (!$rowCells['tagRules']) {
                        $rowCells['tagRules'] = '(ALL)';
                    }
                    // Display edit/delete icons:
                    if ($this->editDataStruct) {
                        $editAddCol = '<a href="' . $this->linkThisScript(array('DS_element' => $formPrefix . '[' . $key . ']')) . '">' . '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/edit2.gif" width="11" height="12" hspace="2" border="0" alt="" title="Edit entry" />' . '</a>';
                        $editAddCol .= '<a href="' . $this->linkThisScript(array('DS_element_DELETE' => $formPrefix . '[' . $key . ']')) . '">' . '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/garbage.gif" width="11" height="12" hspace="2" border="0" alt="" title="DELETE entry" onclick=" return confirm(\'Are you sure to delete this Data Structure entry?\');" />' . '</a>';
                        $editAddCol = '<td nowrap="nowrap">' . $editAddCol . '</td>';
                    } else {
                        $editAddCol = '';
                    }
                    // Description:
                    if ($this->_preview) {
                        $rowCells['description'] = is_array($value['tx_templavoila']['sample_data']) ? t3lib_div::view_array($value['tx_templavoila']['sample_data']) : '[No sample data]';
                    }
                    // Put row together
                    if (!$this->mapElPath || $this->mapElPath == $formPrefix . '[' . $key . ']') {
                        $tRows[] = '

							<tr class="bgColor4">
							<td nowrap="nowrap" valign="top">' . $rowCells['title'] . '</td>
							' . ($this->editDataStruct ? '<td nowrap="nowrap">' . $key . '</td>' : '') . '
							<td>' . $rowCells['description'] . '</td>
							' . ($mappingMode ? '<td nowrap="nowrap">' . $rowCells['htmlPath'] . '</td>
								<td>' . $rowCells['cmdLinks'] . '</td>' : '') . '
							<td>' . $rowCells['tagRules'] . '</td>
							' . $editAddCol . '
						</tr>';
                    }
                    // Getting editing row, if applicable:
                    list($addEditRows, $placeBefore) = $this->drawDataStructureMap_editItem($formPrefix, $key, $value, $level);
                    // Add edit-row if found and destined to be set BEFORE:
                    if ($addEditRows && $placeBefore) {
                        $tRows[] = $addEditRows;
                    }
                    // Recursive call:
                    if ($value['type'] == 'array') {
                        $tRows = $this->drawDataStructureMap($value['el'], $mappingMode, $currentMappingInfo[$key]['el'], $pathLevels, $optDat, $contentSplittedByMapping['sub'][$key], $level + 1, $tRows, $formPrefix . '[' . $key . '][el]', $path . ($path ? '|' : '') . $currentMappingInfo[$key]['MAP_EL'], $isMapOK);
                    }
                    // Add edit-row if found and destined to be set AFTER:
                    if ($addEditRows && !$placeBefore) {
                        $tRows[] = $addEditRows;
                    }
                }
            }
        }
        return $tRows;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例9: quickDBlookUp

 function quickDBlookUp()
 {
     $output = 'Enter [table]:[uid]:[fieldlist (optional)] <input name="table_uid" value="' . htmlspecialchars(t3lib_div::_POST('table_uid')) . '" />';
     $output .= '<input type="submit" name="_" value="REFRESH" /><br />';
     // Show record:
     if (t3lib_div::_POST('table_uid')) {
         list($table, $uid, $fieldName) = t3lib_div::trimExplode(':', t3lib_div::_POST('table_uid'), 1);
         if ($GLOBALS['TCA'][$table]) {
             $rec = t3lib_BEfunc::getRecordRaw($table, 'uid=' . intval($uid), $fieldName ? $fieldName : '*');
             if (count($rec)) {
                 if (t3lib_div::_POST('_EDIT')) {
                     $output .= '<hr />Edit:<br /><br />';
                     foreach ($rec as $field => $value) {
                         $output .= htmlspecialchars($field) . '<br /><input name="record[' . $table . '][' . $uid . '][' . $field . ']" value="' . htmlspecialchars($value) . '" /><br />';
                     }
                     $output .= '<input type="submit" name="_SAVE" value="SAVE" />';
                 } elseif (t3lib_div::_POST('_SAVE')) {
                     $incomingData = t3lib_div::_POST('record');
                     $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid=' . intval($uid), $incomingData[$table][$uid]);
                     $output .= '<br />Updated ' . $table . ':' . $uid . '...';
                     $this->updateRefIndex($table, $uid);
                 } else {
                     if (t3lib_div::_POST('_DELETE')) {
                         $GLOBALS['TYPO3_DB']->exec_DELETEquery($table, 'uid=' . intval($uid));
                         $output .= '<br />Deleted ' . $table . ':' . $uid . '...';
                         $this->updateRefIndex($table, $uid);
                     } else {
                         $output .= '<input type="submit" name="_EDIT" value="EDIT" />';
                         $output .= '<input type="submit" name="_DELETE" value="DELETE" onclick="return confirm(\'Are you sure you wish to delete?\');" />';
                         $output .= t3lib_div::view_array($rec);
                         $output .= md5(implode($rec));
                     }
                 }
             } else {
                 $output .= 'No record existed!';
             }
         }
     }
     return $output;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:40,代码来源:class.tx_lowlevel_cleaner.php

示例10: moduleContent

 function moduleContent()
 {
     switch ((string) $this->MOD_SETTINGS["function"]) {
         case 1:
             $content = "<div align=center><strong>Hello World!</strong></div><BR>\n\t\t\t\t\tThe 'Kickstarter' has made this module automatically, it contains a default framework for a backend module but apart from it does nothing useful until you open the script '" . substr(t3lib_extMgm::extPath("fab_form_mail"), strlen(PATH_site)) . "tx_fabformmail_abonne_comment/index.php' and edit it!\n\t\t\t\t\t<HR>\n\t\t\t\t\t<BR>This is the GET/POST vars sent to the script:<BR>" . "GET:" . t3lib_div::view_array($GLOBALS["HTTP_GET_VARS"]) . "<BR>" . "POST:" . t3lib_div::view_array($GLOBALS["HTTP_POST_VARS"]) . "<BR>" . "";
             $this->content .= $this->doc->section("Message #1:", $content, 0, 1);
             break;
         case 2:
             $content = "<div align=center><strong>Menu item #2...</strong></div>";
             $this->content .= $this->doc->section("Message #2:", $content, 0, 1);
             break;
         case 3:
             $content = "<div align=center><strong>Menu item #3...</strong></div>";
             $this->content .= $this->doc->section("Message #3:", $content, 0, 1);
             break;
     }
 }
开发者ID:BackupTheBerlios,项目名称:stypo3dext,代码行数:17,代码来源:index.php

示例11: drawLog

    /**
     * Shows the log of indexed URLs
     *
     * @return	string		HTML output
     */
    function drawLog()
    {
        global $BACK_PATH;
        $output = '';
        // Init:
        $this->crawlerObj = t3lib_div::makeInstance('tx_crawler_lib');
        $this->crawlerObj->setAccessMode('gui');
        $this->crawlerObj->setID = t3lib_div::md5int(microtime());
        $this->CSVExport = t3lib_div::_POST('_csv');
        // Read URL:
        if (t3lib_div::_GP('qid_read')) {
            $this->crawlerObj->readUrl(intval(t3lib_div::_GP('qid_read')), TRUE);
        }
        // Look for set ID sent - if it is, we will display contents of that set:
        $showSetId = intval(t3lib_div::_GP('setID'));
        // Show details:
        if (t3lib_div::_GP('qid_details')) {
            // Get entry record:
            list($q_entry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid=' . intval(t3lib_div::_GP('qid_details')));
            // Explode values:
            $resStatus = $this->getResStatus($q_entry);
            $q_entry['parameters'] = unserialize($q_entry['parameters']);
            $q_entry['result_data'] = unserialize($q_entry['result_data']);
            if (is_array($q_entry['result_data'])) {
                $q_entry['result_data']['content'] = unserialize($q_entry['result_data']['content']);
            }
            if (!$this->pObj->MOD_SETTINGS['log_resultLog']) {
                unset($q_entry['result_data']['content']['log']);
            }
            // Print rudimentary details:
            $output .= '
				<br /><br />
				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back') . '" name="_back" />
				<input type="hidden" value="' . $this->pObj->id . '" name="id" />
				<input type="hidden" value="' . $showSetId . '" name="setID" />
				<br />
				Current server time: ' . date('H:i:s', time()) . '<br />' . 'Status: ' . $resStatus . '<br />' . (version_compare(TYPO3_version, '4.5.0', '<') ? t3lib_div::view_array($q_entry) : t3lib_utility_Debug::viewArray($q_entry));
        } else {
            // Show list:
            // If either id or set id, show list:
            if ($this->pObj->id || $showSetId) {
                if ($this->pObj->id) {
                    // Drawing tree:
                    $tree = t3lib_div::makeInstance('t3lib_pageTree');
                    $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                    $tree->init('AND ' . $perms_clause);
                    // Set root row:
                    $HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pObj->pageinfo);
                    $HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pObj->pageinfo);
                    $tree->tree[] = array('row' => $this->pObj->pageinfo, 'HTML' => $HTML);
                    // Get branch beneath:
                    if ($this->pObj->MOD_SETTINGS['depth']) {
                        $tree->getTree($this->pObj->id, $this->pObj->MOD_SETTINGS['depth'], '');
                    }
                    // Traverse page tree:
                    $code = '';
                    $count = 0;
                    foreach ($tree->tree as $data) {
                        $code .= $this->drawLog_addRows($data['row'], $data['HTML'] . t3lib_BEfunc::getRecordTitle('pages', $data['row'], TRUE), intval($this->pObj->MOD_SETTINGS['itemsPerPage']));
                        if (++$count == 1000) {
                            break;
                        }
                    }
                } else {
                    $code = '';
                    $code .= $this->drawLog_addRows($showSetId, 'Set ID: ' . $showSetId);
                }
                if ($code) {
                    $output .= '
						<br /><br />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.reloadlist') . '" name="_reload" />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.downloadcsv') . '" name="_csv" />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushvisiblequeue') . '" name="_flush" onclick="return confirm(\'' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure') . '\');" />
						<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushfullqueue') . '" name="_flush_all" onclick="return confirm(\'' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure') . '\');" />
						<input type="hidden" value="' . $this->pObj->id . '" name="id" />
						<input type="hidden" value="' . $showSetId . '" name="setID" />
						<br />
						' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime') . ': ' . date('H:i:s', time()) . '
						<br /><br />


						<table class="lrPadding c-list crawlerlog">' . $this->drawLog_printTableHeader() . $code . '</table>';
                }
            } else {
                // Otherwise show available sets:
                $setList = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('set_id, count(*) as count_value, scheduled', 'tx_crawler_queue', '', 'set_id, scheduled', 'scheduled DESC');
                $code = '
					<tr class="bgColor5 tableheader">
						<td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.setid') . ':</td>
						<td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count') . 't:</td>
						<td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.time') . ':</td>
					</tr>
				';
                $cc = 0;
                foreach ($setList as $set) {
//.........这里部分代码省略.........
开发者ID:b13,项目名称:crawler,代码行数:101,代码来源:class.tx_crawler_modfunc1.php

示例12: moduleContent

    /**
     * [Describe function...]
     *
     * @return	[type]		...
     */
    function moduleContent()
    {
        switch ((string) $this->MOD_SETTINGS['function']) {
            case 1:
                $content = '<div align=center><strong>Hello World!</strong></div><br />
					The "Kickstarter" has made this module automatically, it contains a default framework for a backend module but apart from that it does nothing useful until you open the script "' . substr(t3lib_extMgm::extPath('listfeusers'), strlen(PATH_site)) . $pathSuffix . index . php . '" and edit it!
					<hr />
					<br />This is the GET/POST vars sent to the script:<br />' . 'GET:' . t3lib_div::view_array($_GET) . '<br />' . 'POST:' . t3lib_div::view_array($_POST) . '<br />' . '';
                $this->content .= $this->doc->section('Message #1:', $content, 0, 1);
                break;
            case 2:
                $content = '<div align=center><strong>Menu item #2...</strong></div>';
                $this->content .= $this->doc->section('Message #2:', $content, 0, 1);
                break;
            case 3:
                $content = '<div align=center><strong>Menu item #3...</strong></div>';
                $this->content .= $this->doc->section('Message #3:', $content, 0, 1);
                break;
        }
    }
开发者ID:snoblucha,项目名称:typo3_listfeusers,代码行数:25,代码来源:index.php

示例13: debugArray

 /**
  * Prints the debug output of an array
  *
  * Compatibility wrapper for obsolete Core methods
  *
  * @param array $array Array to output
  * @return string
  */
 protected function debugArray($array)
 {
     if (class_exists('t3lib_utility_Debug')) {
         return t3lib_utility_Debug::viewArray($array);
     } else {
         t3lib_div::view_array($array);
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:16,代码来源:class.tx_devlog_tceforms.php

示例14: printLogMgm

    /**
     * Printing the debug-log from the DBAL extension
     *
     * To enabled debugging, you will have to enabled it in the configuration!
     *
     * @return	string HTML content
     */
    protected function printLogMgm()
    {
        // Disable debugging in any case...
        $GLOBALS['TYPO3_DB']->debug = FALSE;
        // Get cmd:
        $cmd = (string) t3lib_div::_GP('cmd');
        switch ($cmd) {
            case 'flush':
                $res = $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('tx_dbal_debuglog');
                $res = $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('tx_dbal_debuglog_where');
                $outStr = 'Log FLUSHED!';
                break;
            case 'joins':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('table_join,exec_time,query,script', 'tx_dbal_debuglog', 'table_join!=\'\'', 'table_join,script,exec_time,query');
                // Init vars in which to pick up the query result:
                $tableIndex = array();
                $tRows = array();
                $tRows[] = '
					<tr>
						<td>Execution time</td>
						<td>Table joins</td>
						<td>Script</td>
						<td>Query</td>
					</tr>';
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    $tableArray = $GLOBALS['TYPO3_DB']->SQLparser->parseFromTables($row['table_join']);
                    // Create table name index:
                    foreach ($tableArray as $a) {
                        foreach ($tableArray as $b) {
                            if ($b['table'] != $a['table']) {
                                $tableIndex[$a['table']][$b['table']] = 1;
                            }
                        }
                    }
                    // Create output row
                    $tRows[] = '
						<tr>
							<td>' . htmlspecialchars($row['exec_time']) . '</td>
							<td>' . htmlspecialchars($row['table_join']) . '</td>
							<td>' . htmlspecialchars($row['script']) . '</td>
							<td>' . htmlspecialchars($row['query']) . '</td>
						</tr>';
                }
                // Printing direct joins:
                $outStr .= '<h4>Direct joins:</h4>' . t3lib_div::view_array($tableIndex);
                // Printing total dependencies:
                foreach ($tableIndex as $priTable => $a) {
                    foreach ($tableIndex as $tableN => $v) {
                        foreach ($v as $tableP => $vv) {
                            if ($tableP == $priTable) {
                                $tableIndex[$priTable] = array_merge($v, $a);
                            }
                        }
                    }
                }
                $outStr .= '<h4>Total dependencies:</h4>' . t3lib_div::view_array($tableIndex);
                // Printing data rows:
                $outStr .= '
					<table border="1" cellspacing="0">' . implode('', $tRows) . '
					</table>';
                break;
            case 'errors':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('serdata,exec_time,query,script', 'tx_dbal_debuglog', 'errorFlag>0', '', 'tstamp DESC');
                // Init vars in which to pick up the query result:
                $tRows = array();
                $tRows[] = '
					<tr>
						<td>Execution time</td>
						<td>Error data</td>
						<td>Script</td>
						<td>Query</td>
					</tr>';
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    // Create output row
                    $tRows[] = '
						<tr>
							<td>' . htmlspecialchars($row['exec_time']) . '</td>
							<td>' . t3lib_div::view_array(unserialize($row['serdata'])) . '</td>
							<td>' . htmlspecialchars($row['script']) . '</td>
							<td>' . htmlspecialchars($row['query']) . '</td>
						</tr>';
                }
                // Printing data rows:
                $outStr .= '
					<table border="1" cellspacing="0">' . implode('', $tRows) . '
					</table>';
                break;
            case 'parsing':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('query,serdata', 'tx_dbal_debuglog', 'errorFlag&2=2');
                $tRows = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    // Create output row
                    $tRows[] = '
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例15: reindexPhash

    /**
     * Re-indexing files/records attached to a page.
     *
     * @param	integer		Phash value
     * @param	integer		The page uid for the section record (file/url could appear more than one place you know...)
     * @return	string		HTML content
     */
    function reindexPhash($phash, $pageId)
    {
        // Query:
        list($resultRow) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('ISEC.*, IP.*', 'index_phash IP, index_section ISEC', 'IP.phash = ISEC.phash
						AND IP.phash = ' . intval($phash) . '
						AND ISEC.page_id = ' . intval($pageId));
        $content = '';
        if (is_array($resultRow)) {
            if ($resultRow['item_type'] && $resultRow['item_type'] !== '0') {
                // (Re)-Indexing file on page.
                $indexerObj = t3lib_div::makeInstance('tx_indexedsearch_indexer');
                $indexerObj->backend_initIndexer($pageId, 0, 0, '', $this->getUidRootLineForClosestTemplate($pageId));
                // URL or local file:
                if ($resultRow['externalUrl']) {
                    $indexerObj->indexExternalUrl($resultRow['data_filename']);
                } else {
                    $indexerObj->indexRegularDocument($resultRow['data_filename'], TRUE);
                }
                if ($indexerObj->file_phash_arr['phash'] != $resultRow['phash']) {
                    $content .= 'ERROR: phash (' . $indexerObj->file_phash_arr['phash'] . ') did NOT match ' . $resultRow['phash'] . ' for strange reasons!';
                }
                $content .= '<h4>Log for re-indexing of "' . htmlspecialchars($resultRow['data_filename']) . '":</h4>';
                $content .= t3lib_div::view_array($indexerObj->internal_log);
                $content .= '<h4>Hash-array, page:</h4>';
                $content .= t3lib_div::view_array($indexerObj->hash);
                $content .= '<h4>Hash-array, file:</h4>';
                $content .= t3lib_div::view_array($indexerObj->file_phash_arr);
            }
        }
        // Link back to list.
        $content .= $this->linkList();
        return $content;
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:40,代码来源:class.tx_indexedsearch_modfunc1.php


注:本文中的t3lib_div::view_array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。