예제 #1
0
function BuildEventKeywordList($categoryID, $eventName, $eventTypeID, $eventID)
{
    switch ($eventTypeID) {
        case 3:
            if ($eventID == 162) {
                $keywords = "chicagocubs, chicagocubs.com, chicagocubs com, chicago cubs com, chicagocub, cubs.com, cubs com";
            } else {
                $keywords = BuildSportsKeywordList($categoryID, $eventName);
            }
            break;
        case 4:
            $keywords = BuildTheaterKeywordList($categoryID, $eventName, $eventID);
            break;
        case 2:
            $keywords = BuildConcertKeywordList($categoryID, $eventName, $eventID);
            break;
        default:
            #		$keywords = BuildDefaultKeywordList($categoryInfo['id'], $categoryName);
    }
    return $keywords;
}
$query3_result = mysql_query('SELECT CategoryID,CategoryName FROM AdjacencyListCategories_temp') or die('CreateCategoryKeywordsTables: ' . mysql_error());
$categoryList = array();
while ($row = mysql_fetch_row($query3_result)) {
    // recursive execution of this function for each
    // child of this node
    // $right is the current right value, which is
    // incremented by the rebuild_tree function
    $categoryList[] = array("id" => $row[0], "name" => $row[1]);
}
mysql_free_result($query3_result);
$limit = 5;
foreach ($categoryList as $key => $categoryInfo) {
    $categoryName = strtolower($categoryInfo['name']);
    switch ($categoryInfo['id']) {
        case 3:
            $keywords = BuildSportsKeywordList();
            break;
        case 4:
            $keywords = BuildTheaterKeywordList($categoryInfo['id'], $categoryName);
            break;
        case 10:
            $keywords = BuildNascarKeywordList($categoryInfo['id'], $categoryName);
            break;
        case 13:
        case 14:
            $keywords = BuildNCAAKeywordList($categoryInfo['id'], $categoryName);
            break;
        case 82:
        case 91:
        case 24:
        case 1999: