select($jaktable, ["id", "subject", "content", "initiated", "updated", "ended"], ["AND" => ["OR" => ["subject[~]" => $searchmsg, "content[~]" => $searchmsg]], "opid" => $opcacheid, "private" => 0, "clientid[!]" => JAK_CLIENTID, "ORDER" => ["updated" => "DESC"], "LIMIT" => 10]); $searchfaq = $jakdb->select($jaktable1, ["id", "title", "content", "lang"], ["AND" => ["OR" => ["title[~]" => $searchmsg, "content[~]" => $searchmsg]], "opid" => $opcacheid, "active" => 1, "ORDER" => ["dorder" => "DESC"], "LIMIT" => 10]); } else { $searchtickets = $jakdb->select($jaktable, ["id", "subject", "content", "initiated", "updated", "ended"], ["AND" => ["OR" => ["subject[~]" => $searchmsg, "content[~]" => $searchmsg]], "opid" => $opcacheid, "private" => 0, "ORDER" => ["updated" => "DESC"], "LIMIT" => 10]); $searchfaq = $jakdb->select($jaktable1, ["[>]faq_categories" => ["catid" => "id"]], ["id", "title", "content", "lang"], ["AND" => ["OR" => ["title[~]" => $searchmsg, "content[~]" => $searchmsg]], "opid" => $opcacheid, "active" => 1, "guesta" => 1, "ORDER" => ["dorder" => "DESC"], "LIMIT" => 10]); } if (isset($searchtickets) && !empty($searchtickets) || isset($searchfaq) && !empty($searchfaq)) { $similar_articles .= '
'.jak_cut_text($t["content"], 100, "...").'
'; } if (!empty($searchfaq)) foreach ($searchfaq as $f) { # code... $similar_articles .= ''.jak_cut_text($f["content"], 100, "...").'
'; } $similar_articles .= '