function convert_tag_table($_prefix) { global $zbp; $list = array('tag_ID' => '`term_id`', 'tag_Name' => '`name`', 'tag_Order' => '0', 'tag_Count' => '0', 'tag_Alias' => '`slug`', 'tag_Intro' => '""', 'tag_Template' => '""', 'tag_Meta' => '""'); $ary1 = array(); $ary2 = array(); foreach ($list as $name => $value) { $ary1[] = $name; $ary2[] = $value . ' AS ' . $name; } $sql = build_sql('Tag', $_prefix . 'terms', $ary1, $ary2, ' WHERE `term_id` IN ( SELECT `term_id` FROM `' . $_prefix . 'term_taxonomy` WHERE `taxonomy`="post_tag")'); //die($sql); return $zbp->db->QueryMulit($sql); }
$SQL .= " (active=1 or id={$num})"; } if (empty($phorum_auth)) { $SQL .= " and security!=" . SEC_ALL; } $q->query($DB, $SQL); $row = $q->getrow(); } else { $row = array("id" => $num, "name" => $ForumName, "table_name" => $ForumTableName); } $totalFound = 0; $messagesCopied = 0; $messages = array(); while (is_array($row)) { $forums[$row["id"]] = $row["name"]; $SQL = build_sql($row["table_name"], $terms, $date, $fields, $match); $results[$row["id"]] = new query($DB, $SQL); $numrows = $results[$row["id"]]->numrows(); if ($numrows == 0) { unset($results[$row["id"]]); } else { $results[$row["id"]]->getrow(); $totalFound += $numrows; } if ($globalsearch) { $row = $q->getrow(); } else { $row = 0; } } if ($globalsearch) {
addnav($menu, $lMyProfile, "profile.{$ext}?f={$f}&id={$phorum_user['id']}{$GetVars}"); } else { addnav($menu, $lLogIn, "login.{$ext}{$GetVars}"); } } $TopLeftNav = getnav($menu); ////////////////////////// // END NAVIGATION // ////////////////////////// if ($search != "") { $terms = build_search_terms($search, $match); if (count($terms) > 0) { if (isset($x)) { list($action, $start_num) = explode(",", $x); } $SQL = build_sql($ForumTableName, $terms, $date, $fields, $match); // echo "\n<!-- $SQL -->\n"; $q->query($DB, $SQL); if ($err = $q->error()) { echo $err; } else { $totalFound = $q->numrows(); $q->seek($start_num); $message = $q->getrow(); $rowcount = 0; while (is_array($message) && $rowcount < $ForumDisplay) { $rowcount++; $messages[] = $message; $message = $q->getrow(); } $q->free();