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


PHP t3lib_iconWorks::skinImg方法代码示例

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


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

示例1: render

 /**
  * Render javascript in header
  *
  * @return string the rendered page info icon
  * @see template::getPageInfo() Note: can't call this method as it's protected!
  */
 public function render()
 {
     $doc = $this->getDocInstance();
     $id = t3lib_div::_GP('id');
     $pageRecord = t3lib_BEfunc::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
     // Add icon with clickmenu, etc:
     if ($pageRecord['uid']) {
         // If there IS a real page
         $alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
         $iconImg = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
         // Make Icon:
         $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
     } else {
         // On root-level of page tree
         // Make Icon
         $iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />';
         if ($BE_USER->user['admin']) {
             $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
         } else {
             $theIcon = $iconImg;
         }
     }
     // Setting icon with clickmenu + uid
     $pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
     return $pageInfo;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:32,代码来源:PageInfoViewHelper.php

示例2: render

 /**
  * Renders an icon link as known from the TYPO3 backend
  *
  * @param string $uri the target URI for the link. If you want to execute JavaScript here, prefix the URI with "javascript:"
  * @param string $icon Icon to be used. See self::allowedIcons for a list of allowed icon names
  * @param string $title Title attribte of the resulting link
  * @return string the rendered icon link
  */
 public function render($uri, $icon = 'closedok', $title = '')
 {
     if (!in_array($icon, $this->allowedIcons)) {
         throw new Tx_Fluid_Core_ViewHelper_Exception('"' . $icon . '" is no valid icon. Allowed are "' . implode('", "', $this->allowedIcons) . '".', 1253208523);
     }
     $skinnedIcon = t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/' . $icon . '.gif', '');
     return '<a href="' . $uri . '"><img' . $skinnedIcon . '" title="' . htmlspecialchars($title) . '" alt="" /></a>';
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:16,代码来源:IconViewHelper.php

示例3: manipulateCacheActions

 /**
  * modifies CacheMenuItems array
  *
  * @param	array	array of CacheMenuItems
  * @param	array	array of AccessConfigurations-identifiers (typically  used by userTS with options.clearCache.identifier)
  * @return	void
  */
 public function manipulateCacheActions(&$cacheActions, &$optionValues)
 {
     if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.clearRTECache')) {
         // Add new cache menu item
         $title = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/clearrtecache/locallang.xml:title');
         $cacheActions[] = array('id' => 'clearRTECache', 'title' => $title, 'href' => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=rtehtmlarea::clearTempDir', 'icon' => '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'sysext/rtehtmlarea/hooks/clearrtecache/clearrtecache.png', 'width="16" height="16"') . ' title="' . $title . '" alt="' . $title . '" />');
         $optionValues[] = 'clearRTECache';
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:16,代码来源:class.tx_rtehtmlarea_clearcachemenu.php

示例4: manipulateCacheActions

 public function manipulateCacheActions(&$cacheActions, &$optionValues)
 {
     if ($GLOBALS['BE_USER']->isAdmin()) {
         // Add new cache menu item
         $title = $GLOBALS['LANG']->sL('LLL:EXT:tq_seo/hooks/sitemap/locallang.xml:clearSeoSitemap');
         $cacheActions[] = array('id' => 'clearRTECache', 'title' => $title, 'href' => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=tx_tqseo_sitemap::clearSeoSitemap', 'icon' => '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, t3lib_extMgm::extRelPath('tq_seo') . 'res/images/clear-sitemap.png', 'width="16" height="16"') . ' title="' . $title . '" alt="' . $title . '" />');
         $optionValues[] = 'clearSeoSitemap';
     }
 }
开发者ID:paddyez,项目名称:tq_seo,代码行数:9,代码来源:class.cache_controller_hook.php

示例5: main

    /**
     * Main function, returning the HTML content of the module
     *
     * @return	string		HTML
     */
    function main()
    {
        global $BACK_PATH;
        // PHP and TYPO3 version check
        if (intval(phpversion()) < 5 || TYPO3_branch < 4.2) {
            return '<div style="padding-top: 10px;"></div><p>Updater <strong>requires</strong> PHP5 and TYPO3 v4.2+</p>';
        }
        $this->diffPath['required'] = t3lib_extMgm::extPath('tinymce_rte') . 'patcher/diffs/';
        $this->diffPath['optional'] = t3lib_extMgm::extPath('tinymce_rte') . 'patcher/diffs2/';
        $this->filePath = t3lib_extMgm::extPath('tinymce_rte');
        if (t3lib_div::_GP('update') && ($descKey = t3lib_div::_GP('desckey'))) {
            $content = '<h2 class="typo3-tstemplate-ceditor-subcat">' . $this->desc[$descKey]['title'] . '</h2>';
            $patches = t3lib_div::_GP($descKey . 'patch');
            $updated = false;
            foreach ($patches as $patchName => $value) {
                if ($value = intval($value)) {
                    $content .= $this->appplyPatch($patchName, $this->diffPath[$descKey], $value - 1);
                    $updated = true;
                }
            }
            $content .= '<div style="padding-top: 10px;"></div>';
            $content .= $updated ? 'Patching done..' : 'Nothing selected to patch..';
            $content .= '<div style="padding-top: 25px;"></div><a href="' . htmlspecialchars(t3lib_div::linkThisScript()) . '" class="typo3-goBack"><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/goback.gif', 'width="14" height="14"') . ' alt="" />Go back</a>';
            // Remove cache files
            $this->removeCachedFiles();
        } elseif (t3lib_div::_GP('clear')) {
            $content = '<h2 class="typo3-tstemplate-ceditor-subcat">Clearing gzip and TYPO3 cache.</h2>';
            $content .= 'Gzip and TYPO3 cache cleared..';
            $content .= '<div style="padding-top: 25px;"></div><a href="' . htmlspecialchars(t3lib_div::linkThisScript()) . '" class="typo3-goBack"><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/goback.gif', 'width="14" height="14"') . ' alt="" />Go back</a>';
            // Remove cache files
            $this->removeCachedFiles();
        } else {
            $content .= '
				<script type="text/javascript">
					/* <![CDATA[ */
					function difftoggle(val,descKey) {
						els = document.getElementsByTagName("select");
						var matchregexp = new RegExp("^"+descKey+"patch");
						for (var i=0;i<els.length;i++) {
							if (els[i].name.match(matchregexp)) els[i].selectedIndex = val;
						}
						return false;
					}
				/* ]]> */
				</script>';
            // display form
            $content .= $this->displayDiffs($this->diffPath['required'], 'required');
            $content .= $this->displayDiffs($this->diffPath['optional'], 'optional');
            $content .= $this->displayRemoveCache();
        }
        return $content;
    }
开发者ID:sercagil,项目名称:TYPO3-tinymce_rte,代码行数:57,代码来源:class.ext_update.php

示例6: render

 public function render()
 {
     $this->addJavascriptToBackend();
     $this->addCssToBackend();
     $devLinks = array();
     $devLinks[] = '<a href="#" class="toolbar-item">&nbsp;<img' . t3lib_iconWorks::skinImg($this->backPath, t3lib_extMgm::extRelPath($this->EXTKEY) . 'bomb.png', 'width="16" height="16"') . ' title="Developer Links" alt="" /></a>';
     $devLinks[] = '<ul class="toolbar-item-menu" style="display: none;">';
     foreach ($this->docLinks as $linkConf) {
         $icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, $linkConf[2], 'width="16" height="16"') . ' title="' . $linkConf[0] . '" alt="" /> ';
         $devLinks[] = '<li><a href="' . $linkConf[1] . '" target="_blank">' . $icon . htmlspecialchars($linkConf[0]) . '</a></li>';
     }
     $devLinks[] = '</ul>';
     return implode("\n", $devLinks);
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:14,代码来源:class.tx_extdeveval_additionalBackendItems.php

示例7: render

 /**
  * renders the actual logo code
  *
  * @return	string	logo html code snippet to use in the backend
  */
 public function render()
 {
     $logoFile = 'gfx/alt_backend_logo.gif';
     // default
     if (is_string($this->logo)) {
         // overwrite
         $logoFile = $this->logo;
     }
     $imgInfo = getimagesize(PATH_site . TYPO3_mainDir . $logoFile);
     $logo = '<a href="http://www.typo3.com/" target="_blank">' . '<img' . t3lib_iconWorks::skinImg('', $logoFile, $imgInfo[3]) . ' title="TYPO3 Content Management System" alt="" />' . '</a>';
     // overwrite with custom logo
     if ($GLOBALS['TBE_STYLES']['logo']) {
         $imgInfo = @getimagesize(t3lib_div::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['logo'], 3));
         $logo = '<a href="http://www.typo3.com/" target="_blank">' . '<img src="' . $GLOBALS['TBE_STYLES']['logo'] . '" ' . $imgInfo[3] . ' title="TYPO3 Content Management System" alt="" />' . '</a>';
     }
     return $logo;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:22,代码来源:class.typo3logo.php

示例8: displaySeverity

 /**
  * This method returns the severity of the entry using TYPO3's icon and labels
  *
  * @param	array			$PA: information related to the field
  * @param	t3lib_tceforms	$fobj: reference to calling TCEforms object
  *
  * @return	string	The HTML for the form field
  */
 public function displaySeverity($PA, $fobj)
 {
     $html = '';
     $this->doc = t3lib_div::makeInstance('template');
     $severity = $PA['row']['severity'];
     // Gets the image
     if ($severity == 0) {
         $html .= '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/info.gif', 'width="18" height="16" alt="pictogram"') . ' alt="" />';
     } else {
         $html .= $this->doc->icons($severity);
     }
     // Change severity for the label
     if ($severity == -1) {
         $severity = 4;
     }
     $html .= ' <span style="font-weight: bold; margin-left: 5px">';
     $html .= $GLOBALS['LANG']->sL('LLL:EXT:devlog/locallang_db.xml:tx_devlog.severity.I.' . $severity);
     $html .= '</span>';
     return $html;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:28,代码来源:class.tx_devlog_tceforms.php

示例9: listMimeTypes

    /**
     * List media types, along with options to edit & delete
     *
     * @return	string		HTML table of all the mimetypes
     */
    function listMimeTypes()
    {
        global $LANG, $BACK_PATH, $BE_USER;
        // Load template
        $content = t3lib_parsehtml::getSubpart(t3lib_div::getURL($BACK_PATH . t3lib_extMgm::extRelPath('dam') . 'modfunc_tools_mimetypes/template.html'), '###MOD_TEMPLATE###');
        $rowTemplate[1] = t3lib_parsehtml::getSubpart($content, '###ROW_1###');
        $rowTemplate[2] = t3lib_parsehtml::getSubpart($content, '###ROW_2###');
        // Add some JS
        $this->pObj->doc->JScode .= $this->pObj->doc->wrapScriptTags('
				function deleteRecord(id)	{	//
					if (confirm(' . $LANG->JScharCode($LANG->getLL('deleteWarning')) . '))	{
						window.location.href = "' . $BACK_PATH . 'tce_db.php?cmd[tx_dam_media_types]["+id+"][delete]=1&redirect=' . rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')) . '&id=' . tx_dam_db::getPid() . '&vC=' . $BE_USER->veriCode() . '&prErr=1&uPT=1";
					}
					return false;
				}
		');
        // Get content
        $alternate = 1;
        $rows = '';
        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_dam_media_types', '', '', 'ext ASC');
        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
            $editURL = $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')) . '&id=' . tx_dam_db::getPid() . '&edit[tx_dam_media_types][' . $row['uid'] . ']=edit';
            //$deleteURL = $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode( t3lib_div::getIndpEnv('TYPO3_REQUEST_URL') ) . '&id=' . tx_dam_db::getPid() . '&edit[tx_dam_media_types][' . $row['uid'] . '][delete]=1';
            $rowMarkers['EDIT'] = '<a href="#" onclick="window.location.href=\'' . $editURL . '\'; return false;"><img' . t3lib_iconWorks::skinImg($this->pObj->doc->backPath, 'gfx/edit2.gif', 'width="11" height="12"') . ' title="Edit this type" alt="" height="16" width="16"></a>';
            $rowMarkers['DELETE'] = '<a href="#" onclick="deleteRecord(' . $row['uid'] . ')"><img' . t3lib_iconWorks::skinImg($this->pObj->doc->backPath, 'gfx/deletedok.gif', 'width="11" height="12"') . ' title="Delete this type" alt="" height="16" width="16"></a>';
            $rowMarkers['EXTENSION'] = $row['ext'];
            $rowMarkers['MIME'] = $row['mime'];
            $rowMarkers['ICON'] = '<img src="' . $BACK_PATH . tx_dam::icon_getFileType(array('file_type' => $row['ext'], 'media_type' => $row['type'])) . '" />';
            $rows .= t3lib_parsehtml::substituteMarkerArray($rowTemplate[$alternate], $rowMarkers, '###|###');
            // Cycle the alternating rows
            if ($alternate == 2) {
                $alternate = 1;
            } else {
                $alternate = 2;
            }
        }
        $content = t3lib_parsehtml::substituteSubpart($content, '###ROWS###', $rows);
        $GLOBALS['TYPO3_DB']->sql_free_result($res);
        return $content;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:45,代码来源:class.tx_dam_tools_mimetypes.php

示例10: expandPage

 /**
  * For RTE: This displays all content elements on a page and lets you create a link to the element.
  *
  * @return	string		HTML output. Returns content only if the ->expandPage value is set (pointing to a page uid to show tt_content records from ...)
  */
 function expandPage()
 {
     $out = '';
     $expPageId = $this->browseLinks->expandPage;
     // Set page id (if any) to expand
     // If there is an anchor value (content element reference) in the element reference, then force an ID to expand:
     if (!$this->browseLinks->expandPage && $this->browseLinks->curUrlInfo['cElement']) {
         $expPageId = $this->browseLinks->curUrlInfo['pageid'];
         // Set to the current link page id.
     }
     // Draw the record list IF there is a page id to expand:
     if ($expPageId && t3lib_utility_Math::canBeInterpretedAsInteger($expPageId) && $GLOBALS['BE_USER']->isInWebMount($expPageId)) {
         // Set header:
         $out .= $this->browseLinks->barheader($GLOBALS['LANG']->getLL('contentElements') . ':');
         // Create header for listing, showing the page title/icon:
         $titleLen = intval($GLOBALS['BE_USER']->uc['titleLen']);
         $mainPageRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL('pages', $expPageId);
         $picon = t3lib_iconWorks::getSpriteIconForRecord('pages', $mainPageRec);
         $picon .= \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $mainPageRec, TRUE);
         $out .= $picon . '<br />';
         // Look up tt_content elements from the expanded page:
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,header,hidden,starttime,endtime,fe_group,CType,colPos,bodytext,tx_jfmulticontent_view,tx_jfmulticontent_pages,tx_jfmulticontent_contents', 'tt_content', 'pid=' . intval($expPageId) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tt_content') . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('tt_content'), '', 'colPos,sorting');
         $cc = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
         // Traverse list of records:
         $c = 0;
         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
             $c++;
             $icon = t3lib_iconWorks::getSpriteIconForRecord('tt_content', $row);
             if ($this->browseLinks->curUrlInfo['act'] == 'page' && $this->browseLinks->curUrlInfo['cElement'] == $row['uid']) {
                 $arrCol = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"') . ' class="c-blinkArrowL" alt="" />';
             } else {
                 $arrCol = '';
             }
             // Putting list element HTML together:
             $out .= '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/ol/join' . ($c == $cc ? 'bottom' : '') . '.gif', 'width="18" height="16"') . ' alt="" />' . $arrCol . '<a href="#" onclick="return link_typo3Page(\'' . $expPageId . '\',\'#' . $row['uid'] . '\');">' . $icon . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('tt_content', $row, TRUE) . '</a><br />';
             $contents = array();
             // get all contents
             switch ($row['tx_jfmulticontent_view']) {
                 case "page":
                     $contents = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(",", $row['tx_jfmulticontent_pages']);
                     break;
                 case "content":
                     $contents = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(",", $row['tx_jfmulticontent_contents']);
                     break;
                 case "irre":
                     $resIrre = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'tx_jfmulticontent_irre_parentid=' . intval($row['uid']) . ' AND deleted = 0 AND hidden = 0', '', '');
                     while ($rowIrre = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resIrre)) {
                         $contents[] = $rowIrre['uid'];
                     }
                     break;
             }
             if (count($contents) > 0) {
                 $out .= '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/ol/blank.gif', 'width="18" height="16"') . ' alt="" />';
                 foreach ($contents as $key => $content) {
                     $out .= '<a href="#" onclick="return link_typo3Page(\'' . $expPageId . '\',\'#jfmulticontent_c' . $row['uid'] . '-' . ($key + 1) . '\');">' . '&nbsp;' . ($key + 1) . '&nbsp;' . '</a>';
                 }
                 $out .= '<br/>';
             }
         }
     }
     return $out;
 }
开发者ID:thegass,项目名称:jfmulticontent,代码行数:67,代码来源:class.tx_jfmulticontent_browselinkshooks.php

示例11: infoIcon

 /**
  * Returns an image-tag with an 18x16 icon of the following types:
  *
  * $type:
  * -1:	OK icon (Check-mark)
  * 1:	Notice (Speach-bubble)
  * 2:	Warning (Yellow triangle)
  * 3:	Fatal error (Red stop sign)
  *
  * @param	integer		See description
  * @return	string		HTML image tag (if applicable)
  */
 function infoIcon($type)
 {
     global $BACK_PATH;
     $title = '';
     switch ($type) {
         case '3':
             $icon = 'gfx/icon_fatalerror.gif';
             $title = 'File does not exist!';
             break;
         case '2':
             $icon = 'gfx/icon_warning.gif';
             $title = 'File changed';
             break;
         case '1':
             $icon = 'gfx/icon_note.gif';
             break;
         case '-1':
             $icon = 'gfx/icon_ok.gif';
             break;
         default:
             break;
     }
     if ($icon) {
         return '<img' . t3lib_iconWorks::skinImg($BACK_PATH, $icon, 'width="18" height="16"') . ' class="absmiddle" title="' . htmlspecialchars($title) . '" alt="" />';
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:38,代码来源:class.tx_dam_tools_indexupdate.php

示例12: editLoadedFunc

    /**
     * Creates lines for the editing form.
     *
     * @return	void
     */
    function editLoadedFunc()
    {
        global $BE_USER, $LANG;
        $this->editLoaded = 0;
        if (is_array($this->editSC_rec) && ($this->editSC_rec['sc_group'] >= 0 || $BE_USER->isAdmin())) {
            // sc_group numbers below 0 requires admin to edit those. sc_group numbers above zero must always be owned by the user himself.
            $this->editLoaded = 1;
            $opt = array();
            $opt[] = '<option value="0"></option>';
            foreach ($this->groupLabels as $k => $v) {
                if ($v && strcmp('1', $v)) {
                    $label = $v;
                } else {
                    $label = $LANG->getLL('shortcut_group_' . $k, 1);
                    if (!$label) {
                        $label = $LANG->getLL('shortcut_group', 1) . ' ' . $k;
                    }
                    // Fallback label
                }
                $opt[] = '<option value="' . $k . '"' . (!strcmp($this->editSC_rec['sc_group'], $k) ? ' selected="selected"' : '') . '>' . $label . '</option>';
            }
            if ($BE_USER->isAdmin()) {
                foreach ($this->groupLabels as $k => $v) {
                    if ($v && strcmp('1', $v)) {
                        $label = $v;
                    } else {
                        $label = $LANG->getLL('shortcut_group_' . $k, 1);
                        if (!$label) {
                            $label = $LANG->getLL('shortcut_group', 1) . ' ' . $k;
                        }
                        // Fallback label
                    }
                    $label = $LANG->getLL('shortcut_global', 1) . ': ' . $label;
                    // Add a prefix for global groups
                    $opt[] = '<option value="-' . $k . '"' . (!strcmp($this->editSC_rec['sc_group'], '-' . $k) ? ' selected="selected"' : '') . '>' . $label . '</option>';
                }
                $opt[] = '<option value="-100"' . (!strcmp($this->editSC_rec['sc_group'], '-100') ? ' selected="selected"' : '') . '>' . $LANG->getLL('shortcut_global', 1) . ': ' . $LANG->getLL('shortcut_all', 1) . '</option>';
            }
            // border="0" hspace="2" width="21" height="16" - not XHTML compliant in <input type="image" ...>
            $manageForm = '

				<!--
					Shortcut Editing Form:
				-->
				<table border="0" cellpadding="0" cellspacing="0" id="typo3-shortcuts-editing">
					<tr>
						<td>&nbsp;&nbsp;</td>
						<td><input type="image" class="c-inputButton" name="_savedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/savedok.gif', '') . ' title="' . $LANG->getLL('shortcut_save', 1) . '" /></td>
						<td><input type="image" class="c-inputButton" name="_saveclosedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/saveandclosedok.gif', '') . ' title="' . $LANG->getLL('shortcut_saveClose', 1) . '" /></td>
						<td><input type="image" class="c-inputButton" name="_closedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/closedok.gif', '') . ' title="' . $LANG->getLL('shortcut_close', 1) . '" /></td>
						<td><input type="image" class="c-inputButton" name="_deletedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/deletedok.gif', '') . ' title="' . $LANG->getLL('shortcut_delete', 1) . '" /></td>
						<td><input name="editName" type="text" value="' . htmlspecialchars($this->editSC_rec['description']) . '"' . $this->doc->formWidth(15) . ' /></td>
						<td><select name="editGroup">' . implode('', $opt) . '</select></td>
					</tr>
				</table>
				<input type="hidden" name="whichItem" value="' . $this->editSC_rec['uid'] . '" />

				';
        } else {
            $manageForm = '';
        }
        if (!$this->editLoaded && count($this->selOpt) > 1) {
            $this->lines[] = '<td>&nbsp;</td>';
            $this->lines[] = '<td><select name="_selSC" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">' . implode('', $this->selOpt) . '</select></td>';
        }
        // $this->linesPre contains elements with sc_group>=0
        $this->lines = array_merge($this->linesPre, $this->lines);
        if (count($this->lines)) {
            if (!$BE_USER->getTSConfigVal('options.mayNotCreateEditShortcuts')) {
                $this->lines = array_merge(array('<td><input type="checkbox" id="editShortcut_check" name="editShortcut_check" value="1"' . ($this->editSC ? ' checked="checked"' : '') . ' /> <label for="editShortcut_check">' . $LANG->getLL('shortcut_edit', 1) . '</label>&nbsp;</td>'), $this->lines);
                $this->lines[] = '<td>' . $manageForm . '</td>';
            }
            $this->lines[] = '<td><img src="clear.gif" width="10" height="1" alt="" /></td>';
        }
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:80,代码来源:alt_shortcut.php

示例13: renderFormMulti

    /**
     * Rendering the copy file form for a multiple items
     *
     * @return	string		HTML content
     */
    function renderFormMulti($items, $targetFolder)
    {
        global $BACK_PATH, $LANG, $TCA;
        $content = '';
        $references = 0;
        // FOLDER_INFO is missing due to missing param in current function - so we set it to nothing
        $this->pObj->markers['FOLDER_INFO'] = '';
        $titleNotExists = 'title="' . $GLOBALS['LANG']->getLL('fileNotExists', true) . '"';
        $iconNotExists = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], PATH_txdam_rel . 'i/error_h.gif', 'width="10" height="10"') . ' ' . $titleNotExists . ' valign="top" alt="" />';
        $referencedIcon = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], PATH_txdam_rel . 'i/is_referenced.gif', 'width="15" height="12"') . ' title="' . $LANG->getLL($this->langPrefix . 'messageReferencesUsed', 1) . '" alt="" />';
        // init table layout
        $tableLayout = array('table' => array('<table cellpadding="2" cellspacing="1" border="0" width="100%">', '</table>'), '0' => array('defCol' => array('<th nowrap="nowrap" class="bgColor5">', '</th>'), '0' => array('<th width="1%" class="bgColor5">', '</th>'), '1' => array('<th width="1%" class="bgColor5">', '</th>'), '3' => array('<th width="1%" class="bgColor5">', '</th>'), '4' => array('<th width="1%" class="bgColor5">', '</th>'), '5' => array('<th width="1%" class="bgColor5">', '</th>')), 'defRow' => array('defCol' => array('<td nowrap="nowrap" class="bgColor4">', '</td>'), '2' => array('<td class="bgColor4">', '</td>'), '3' => array('<td style="text-align:center" class="bgColor4">', '</td>'), '4' => array('<td style="padding:0 5px 0 5px" class="bgColor4">', '</td>'), '5' => array('<td style="text-align:center" class="bgColor4">', '</td>')));
        $cTable = array();
        $tr = 0;
        $td = 0;
        $cTable[$tr][$td++] = '&nbsp;';
        $cTable[$tr][$td++] = '&nbsp;';
        $cTable[$tr][$td++] = $LANG->sL($TCA['tx_dam']['columns']['title']['label'], 1);
        $cTable[$tr][$td++] = '&nbsp;';
        $cTable[$tr][$td++] = '&nbsp;';
        $cTable[$tr][$td++] = $LANG->sL($TCA['tx_dam']['columns']['file_path']['label'], 1);
        $tr++;
        foreach ($items as $id => $meta) {
            $filepath = tx_dam::file_absolutePath($meta);
            if ($meta['file_accessable']) {
                $checkbox = '<input type="checkbox" name="data[' . $this->copyOrMove . '][' . $id . '][data]" value="' . htmlspecialchars($filepath) . '"  checked="checked" />';
            } else {
                $checkbox = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], PATH_txdam_rel . 'i/error_h.gif', 'width="10" height="10"') . ' title="' . $LANG->getLL('accessDenied', true) . '" alt="" />';
            }
            $title = $meta['title'] ? $meta['title'] : $meta['file_name'];
            $title = t3lib_div::fixed_lgd_cs($title, 50);
            $icon = tx_dam_guiFunc::icon_getFileTypeImgTag($meta, 'class="c-recicon"', false);
            if (!@file_exists($filepath)) {
                $icon .= $iconNotExists;
                $info = '';
            } else {
                $info = $GLOBALS['SOBE']->btn_infoFile($meta);
            }
            // Add row to table
            $td = 0;
            $cTable[$tr][$td++] = $checkbox;
            $cTable[$tr][$td++] = $icon;
            $cTable[$tr][$td++] = htmlspecialchars($title);
            $cTable[$tr][$td++] = htmlspecialchars(strtoupper($meta['file_type']));
            $cTable[$tr][$td++] = $info;
            $cTable[$tr][$td++] = htmlspecialchars(t3lib_div::fixed_lgd_cs($meta['file_path'], -15));
            $tr++;
        }
        $itemTable = $this->pObj->doc->table($cTable, $tableLayout);
        $targetFolderRel = tx_dam::path_makeRelative($targetFolder);
        $msg = array();
        $msg[] = '&nbsp;';
        $msg[] = $LANG->getLL('labelTargetFolder', 1) . ' <strong>' . htmlspecialchars($targetFolderRel) . '</strong>';
        $msg[] = '&nbsp;';
        $msg[] = htmlspecialchars(sprintf($LANG->getLL($this->langPrefix . 'message'), $targetFolderRel));
        $msg[] = '&nbsp;';
        $msg[] = $itemTable;
        $buttons = '
			<input type="hidden" name="data[' . $this->copyOrMove . '][' . $id . '][data]" value="' . htmlspecialchars($filepath) . '" />
			<input type="hidden" name="data[' . $this->copyOrMove . '][' . $id . '][target]" value="' . htmlspecialchars($targetFolder) . '" />';
        if (tx_dam::config_checkValueEnabled('mod.txdamM1_SHARED.displayExtraButtons', 1)) {
            if ($this->copyOrMove == 'copy') {
                $buttons .= '
					<input type="submit" value="' . $LANG->getLL('tx_dam_cmd_filecopy.submit', 1) . '" />
					<input type="submit" value="' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.cancel', 1) . '" onclick="jumpBack(); return false;" />';
            } else {
                $buttons .= '
					<input type="submit" value="' . $LANG->getLL('tx_dam_cmd_filemove.submit', 1) . '" />
					<input type="submit" value="' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.cancel', 1) . '" onclick="jumpBack(); return false;" />';
            }
        }
        $this->pObj->docHeaderButtons['SAVE'] = '<input class="c-inputButton" name="_savedok"' . t3lib_iconWorks::skinImg($this->pObj->doc->backPath, 'gfx/clip_copy.gif') . ' title="' . $LANG->getLL($this->langPrefix . 'submit', 1) . '" height="16" type="image" width="16">';
        $this->pObj->docHeaderButtons['CLOSE'] = '<a href="#" onclick="jumpBack(); return false;"><img' . t3lib_iconWorks::skinImg($this->pObj->doc->backPath, 'gfx/closedok.gif') . ' class="c-inputButton" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.cancel', 1) . '" alt="" height="16" width="16"></a>';
        $content .= $GLOBALS['SOBE']->getMessageBox($GLOBALS['SOBE']->pageTitle, $msg, $buttons, 1);
        return $content;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:81,代码来源:class.tx_dam_cmd_filecopymove.php

示例14: makeControl

    /**
     * Creates the control panel for a single record in the listing.
     *
     * @param	string		The table
     * @param	array		The record for which to make the control panel.
     * @return	string		HTML table with the control panel (unless disabled)
     */
    function makeControl($table, $row)
    {
        global $TCA, $LANG, $BACK_PATH;
        // Return blank, if disabled:
        #		if ($this->dontShowClipControlPanels)	return '';
        // Initialize:
        t3lib_div::loadTCA($table);
        $cells = array();
        $shEl = $this->showElements;
        // If the listed table is 'pages' we have to request the permission settings for each page:
        if ($table == 'pages') {
            $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages', $row['uid']));
        }
        // This expresses the edit permissions for this particular element:
        $permsEdit = $table == 'pages' && $localCalcPerms & 2 || $table != 'pages' && $this->calcPerms & 16;
        // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
        if ($permsEdit && in_array('editRec', $shEl)) {
            $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
            $icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2' . (!$TCA[$table]['ctrl']['readOnly'] ? '' : '_d') . '.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('edit', 1) . '" alt="" />';
            $cells[] = $this->wrapEditLink($icon, $params);
        }
        // If the extended control panel is enabled OR if we are seeing a single table:
        if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table) {
            // "Info": (All records)
            if (in_array('infoRec', $shEl)) {
                $cells[] = '<a href="#" onclick="' . htmlspecialchars('top.launchView(\'' . $table . '\', \'' . $row['uid'] . '\'); return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/zoom2.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('showInfo', 1) . '" alt="" />' . '</a>';
            }
            // If the table is NOT a read-only table, then show these links:
            if (!$TCA[$table]['ctrl']['readOnly']) {
                // "Revert" link (history/undo)
                if (in_array('revertRec', $shEl)) {
                    $cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'show_rechis.php?element=' . rawurlencode($table . ':' . $row['uid']) . '\',\'#latest\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/history2.gif', 'width="13" height="12"') . ' title="' . $LANG->getLL('history', 1) . '" alt="" />' . '</a>';
                }
                // Versioning:
                if (t3lib_extMgm::isLoaded('version')) {
                    $vers = t3lib_BEfunc::selectVersionsOfRecord($table, $row['uid'], $fields = 'uid');
                    if (is_array($vers)) {
                        // If table can be versionized.
                        if (count($vers) > 1) {
                            $st = 'background-color: #FFFF00; font-weight: bold;';
                            $lab = count($vers) - 1;
                        } else {
                            $st = 'background-color: #9999cc; font-weight: bold;';
                            $lab = 'V';
                        }
                        $cells[] = '<a href="' . htmlspecialchars($this->backPath . t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . rawurlencode($row['uid']) . '" class="typo3-ctrl-versioning" style="' . htmlspecialchars($st) . '">' . $lab . '</a>';
                    }
                }
                // "Edit Perms" link:
                if ($table == 'pages' && in_array('permsRec', $shEl) && $GLOBALS['BE_USER']->check('modules', 'web_perm')) {
                    $cells[] = '<a href="' . htmlspecialchars($this->backPath . 'mod/web/perm/index.php?id=' . $row['uid'] . '&return_id=' . $row['uid'] . '&edit=1') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/perm.gif', 'width="7" height="12"') . ' title="' . $LANG->getLL('permissions', 1) . '" alt="" />' . '</a>';
                }
                // "Up/Down" links
                if ($permsEdit && $TCA[$table]['ctrl']['sortby'] && !$this->sortField && in_array('sortRec', $shEl)) {
                    //
                    if (isset($this->currentTable['prev'][$row['uid']])) {
                        // Up
                        $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['prev'][$row['uid']];
                        $cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_up.gif', 'width="11" height="10"') . ' title="' . $LANG->getLL('moveUp', 1) . '" alt="" />' . '</a>';
                    } else {
                        $cells[] = '<img src="clear.gif" ' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_up.gif', 'width="11" height="10"', 2) . ' alt="" />';
                    }
                    if ($this->currentTable['next'][$row['uid']]) {
                        // Down
                        $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['next'][$row['uid']];
                        $cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_down.gif', 'width="11" height="10"') . ' title="' . $LANG->getLL('moveDown', 1) . '" alt="" />' . '</a>';
                    } else {
                        $cells[] = '<img src="clear.gif" ' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_down.gif', 'width="11" height="10"', 2) . ' alt="" />';
                    }
                }
                // "Hide/Unhide" links:
                $hiddenField = $TCA[$table]['ctrl']['enablecolumns']['disabled'];
                if ($permsEdit && $hiddenField && $TCA[$table]['columns'][$hiddenField] && in_array('unHideRec', $shEl) && (!$TCA[$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $table . ':' . $hiddenField))) {
                    if ($row[$hiddenField]) {
                        $params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=0';
                        $cells[] = '<a title="' . $LANG->getLL('unHide' . ($table == 'pages' ? 'Page' : ''), 1) . '" href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-unhide') . '</a>';
                    } else {
                        $params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=1';
                        $cells[] = '<a title="' . $LANG->getLL('hide' . ($table == 'pages' ? 'Page' : ''), 1) . '" href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-hide') . '</a>';
                    }
                }
                // "Delete" link:
                //				if ( ($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16)) && in_array('delRec',$shEl) )	{
                //					$params='&cmd['.$table.']['.$row['uid'].'][delete]=1';
                //					$title = $row['title'].' ('.$row['file_name'].')';
                //
                //					$cells[]='<a href="#" onclick="if (confirm('.$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.delete'),$title)).')) {jumpToUrl(\''.$GLOBALS['SOBE']->doc->issueCommand($params,-1).'\');} return false;"><img src="'.$this->backPath.'gfx/delete_record.gif" width="12" height="12" border="0" align="top" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.delete',1).'" /></a>';
                //				}
                // ToDo: weird: quickDelete = true means that there is a confirmation message
                // Todo: quickDelete=true is hardcoded
                $quickDelete = true;
                // "Delete" with confirmation (default)
                if ($quickDelete and $table == 'pages' && $localCalcPerms & 4 || $table != 'pages' && $this->calcPerms & 16 && in_array('delRec', $shEl)) {
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_dam_db_list2.php

示例15: init

    /**
     * Constructor function for class
     *
     * @return	void
     */
    function init()
    {
        //TODO remove global
        global $LANG, $BACK_PATH, $TYPO3_CONF_VARS;
        // Initialize GPvars:
        $this->target = t3lib_div::_GP('target');
        $this->returnUrl = t3lib_div::_GP('returnUrl');
        // Init basic-file-functions object:
        $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
        $this->basicff->init($GLOBALS['FILEMOUNTS'], $TYPO3_CONF_VARS['BE']['fileExtensions']);
        // Cleaning and checking target
        if (file_exists($this->target)) {
            $this->target = $this->basicff->cleanDirectoryName($this->target);
            // Cleaning and checking target (file or dir)
        } else {
            $this->target = '';
        }
        $key = $this->basicff->checkPathAgainstMounts($this->target . '/');
        if (!$this->target || !$key) {
            t3lib_BEfunc::typo3PrintError($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), '');
            exit;
        }
        // Finding the icon
        switch ($GLOBALS['FILEMOUNTS'][$key]['type']) {
            case 'user':
                $this->icon = 'gfx/i/_icon_ftp_user.gif';
                break;
            case 'group':
                $this->icon = 'gfx/i/_icon_ftp_group.gif';
                break;
            default:
                $this->icon = 'gfx/i/_icon_ftp.gif';
                break;
        }
        $this->icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, $this->icon, 'width="18" height="16"') . ' title="" alt="" />';
        // Relative path to filemount, $key:
        $this->shortPath = substr($this->target, strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
        // Setting title:
        $this->title = $this->icon . htmlspecialchars($GLOBALS['FILEMOUNTS'][$key]['name']) . ': ' . $this->shortPath;
        // Setting template object
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->setModuleTemplate('templates/file_rename.html');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->JScode = $this->doc->wrapScriptTags('
			function backToList()	{	//
				top.goToModule("file_list");
			}
		');
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:54,代码来源:file_rename.php


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