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


PHP SearchEngine::getMainCategories方法代码示例

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


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

示例1: buildSearchEngineLinks

echo "</script>\n";
echo "&nbsp;&nbsp;<a href=\"#\" onclick=\"javascript:getLatest()\");\"><img src=\"images/properties.png\" width=18 height=13 title=\"Show Latest Torrents\" align=\"absmiddle\" border=0>Show Latest Torrents</a>";
echo "</form>";
echo "* Click on Torrent Links to add them to the Torrent Download List";
echo "</td>";
echo "</td><td bgcolor=\"" . $cfg["table_header_bg"] . "\" align=right valign=top>Visit: &nbsp; &nbsp;" . buildSearchEngineLinks($searchEngine) . "</td></tr>";
if (is_file('searchEngines/' . $searchEngine . 'Engine.php')) {
    include_once 'searchEngines/' . $searchEngine . 'Engine.php';
    $sEngine = new SearchEngine(serialize($cfg));
    if ($sEngine->initialized) {
        echo "<div align=center valign=top>";
        $mainStart = true;
        $catLinks = '';
        $tmpCatLinks = '';
        $tmpLen = 0;
        foreach ($sEngine->getMainCategories() as $mainId => $mainName) {
            if (strlen($tmpCatLinks) >= 500 && $mainStart == false) {
                $catLinks .= $tmpCatLinks . "<br>";
                $tmpCatLinks = '';
                $mainStart = true;
            }
            if ($mainStart == false) {
                $tmpCatLinks .= " | ";
            }
            $tmpCatLinks .= "<a href=\"torrentSearch.php?searchEngine=" . $searchEngine . "&mainGenre=" . $mainId . "\">" . $mainName . "</a>";
            $mainStart = false;
        }
        echo $catLinks . $tmpCatLinks;
        if ($mainStart == false) {
            echo "<br><br>";
        }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:torrentSearch.php

示例2: searchSettings


//.........这里部分代码省略.........
    }
    echo buildSearchEngineDDL($searchEngine, true);
    ?>
			</td>
		</tr>
		</form>
		</table>

		<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tr><td>
<?php 
    if (is_file('searchEngines/' . $searchEngine . 'Engine.php')) {
        include_once 'searchEngines/' . $searchEngine . 'Engine.php';
        $sEngine = new SearchEngine(serialize($cfg));
        if ($sEngine->initialized) {
            echo "<table width=\"100%\" border=1 bordercolor=\"" . $cfg["table_admin_border"] . "\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"" . $cfg["table_data_bg"] . "\"><tr>";
            echo "<td bgcolor=\"" . $cfg["table_header_bg"] . "\" background=\"themes/" . $cfg["theme"] . "/images/bar.gif\"><img src=\"images/properties.png\" width=18 height=13 border=0>&nbsp;&nbsp;<font class=\"title\">" . $sEngine->mainTitle . " Search Settings</font></td>";
            echo "</tr></table></td>";
            echo "<form name=\"theSearchEngineSettings\" action=\"admin.php?op=updateSearchSettings\" method=\"post\">\n";
            echo "<input type=\"hidden\" name=\"searchEngine\" value=\"" . $searchEngine . "\">";
            ?>
			</td>
		</tr>
		<tr>
			<td>

		<table cellpadding="5" cellspacing="0" border="0" width="100%">
		<tr>
			<td align="left" width="350" valign="top"><strong>Search Engine URL:</strong></td>
			<td valign="top">
				<?php 
            echo "<a href=\"http://" . $sEngine->mainURL . "\" target=\"_blank\">" . $sEngine->mainTitle . "</a>";
            ?>
			</td>
		</tr>
		<tr>
			<td align="left" width="350" valign="top"><strong>Search Module Author:</strong></td>
			<td valign="top">
				<?php 
            echo $sEngine->author;
            ?>
			</td>
		</tr>
		<tr>
			<td align="left" width="350" valign="top"><strong>Version:</strong></td>
			<td valign="top">
				<?php 
            echo $sEngine->version;
            ?>
			</td>
		</tr>
<?php 
            if (strlen($sEngine->updateURL) > 0) {
                ?>
		<tr>
			<td align="left" width="350" valign="top"><strong>Update Location:</strong></td>
			<td valign="top">
				<?php 
                echo "<a href=\"" . $sEngine->updateURL . "\" target=\"_blank\">Check for Update</a>";
                ?>
			</td>
		</tr>
<?php 
            }
            if (!$sEngine->catFilterName == '') {
                ?>
		<tr>
			<td align="left" width="350" valign="top"><strong>Search Filter:</strong><br>
			Select the items that you DO NOT want to show in the torrent search:
			</td>
			<td valign="top">
<?php 
                echo "<select multiple name=\"" . $sEngine->catFilterName . "[]\" size=\"8\" STYLE=\"width: 125px\">";
                echo "<option value=\"\">[NO FILTER]</option>";
                foreach ($sEngine->getMainCategories(false) as $mainId => $mainName) {
                    echo "<option value=\"" . $mainId . "\" ";
                    if (@in_array($mainId, $sEngine->catFilter)) {
                        echo " selected";
                    }
                    echo ">" . $mainName . "</option>";
                }
                echo "</select>";
                echo "\t\t\t  </td>\n";
                echo "\t\t  </tr>\n";
            }
        }
    }
    ?>
	</table>
		</td></tr></table>
			<br
			<input type="Submit" value="Update Settings">
			</form>
			</div>
			<br>
		</td></tr>
	</table></div>
<?php 
    DisplayFoot(true, true);
}
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:101,代码来源:admin.php


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