Exemplo n.º 1
0
include LOCALE . LOCALESET . "search/news.php";
if ($_GET['stype'] == "news" || $_GET['stype'] == "all") {
    if ($_GET['sort'] == "datestamp") {
        $sortby = "news_datestamp";
    } else {
        if ($_GET['sort'] == "subject") {
            $sortby = "news_subject";
        } else {
            if ($_GET['sort'] == "author") {
                $sortby = "news_name";
            }
        }
    }
    $ssubject = search_querylike("news_subject");
    $smessage = search_querylike("news_news");
    $sextended = search_querylike("news_extended");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage, $sextended);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject, $smessage, $sextended);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $rows = dbcount("(news_id)", DB_NEWS, groupaccess('news_visibility') . " AND " . $fieldsvar . " AND (news_start='0'||news_start<=" . time() . ") AND (news_end='0'||news_end>=" . time() . ") " . ($_GET['datelimit'] != 0 ? " AND news_datestamp>=" . (time() - $_GET['datelimit']) : ""));
Exemplo n.º 2
0
}
include LOCALE . LOCALESET . "search/forums.php";
if ($_GET['stype'] == "forums" || $_GET['stype'] == "all") {
    if ($_GET['sort'] == "datestamp") {
        $sortby = "post_datestamp";
    } else {
        if ($_GET['sort'] == "subject") {
            $sortby = "thread_subject";
        } else {
            if ($_GET['sort'] == "author") {
                $sortby = "post_author";
            }
        }
    }
    $ssubject = search_querylike("thread_subject");
    $smessage = search_querylike("post_message");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject, $smessage);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tt.thread_subject,\r\n\t\t\ttf.forum_access FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tf.forum_id = tp.forum_id\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tt.thread_id = tp.thread_id\t\t\t\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : ""));
include LOCALE . LOCALESET . "search/articles.php";
if ($_GET['stype'] == "articles" || $_GET['stype'] == "all") {
    if ($_GET['sort'] == "datestamp") {
        $sortby = "article_datestamp";
    } else {
        if ($_GET['sort'] == "subject") {
            $sortby = "article_subject";
        } else {
            if ($_GET['sort'] == "author") {
                $sortby = "article_name";
            }
        }
    }
    $ssubject = search_querylike("article_subject");
    $smessage = search_querylike("article_article");
    $ssnippet = search_querylike("article_snippet");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage, $ssnippet);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject, $ssnippet, $smessage);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT ta.*,tac.* FROM " . DB_ARTICLES . " ta\r\n\t\t\tINNER JOIN " . DB_ARTICLE_CATS . " tac ON ta.article_cat=tac.article_cat_id\r\n\t\t\tWHERE " . groupaccess('article_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND article_datestamp>=" . (time() - $_GET['datelimit']) : ""));
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
include LOCALE . LOCALESET . "search/custompages.php";
if ($_GET['stype'] == "custompages" || $_GET['stype'] == "all") {
    $sortby = "page_title";
    $ssubject = search_querylike("page_title");
    $smessage = search_querylike("page_content");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject, $smessage);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT * FROM " . DB_CUSTOM_PAGES . " WHERE " . groupaccess('page_access') . " AND " . $fieldsvar);
Exemplo n.º 5
0
if ($_GET['stype'] == "photos" || $_GET['stype'] == "all") {
    if ($_GET['sort'] == "datestamp") {
        $sortby = "photo_datestamp";
    } else {
        if ($_GET['sort'] == "subject") {
            $sortby = "photo_title";
        } else {
            if ($_GET['sort'] == "author") {
                $sortby = "photo_user";
            }
        }
    }
    $ssubject1 = search_querylike("photo_title");
    $smessage1 = search_querylike("photo_description");
    $ssubject2 = search_querylike("album_title");
    $smessage2 = search_querylike("album_description");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject1, $ssubject2);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage1, $smessage2);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject1, $ssubject2, $smessage1, $smessage2);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT tp.*,ta.* FROM " . DB_PHOTOS . " tp\r\n\t\t\tINNER JOIN " . DB_PHOTO_ALBUMS . " ta ON tp.album_id=ta.album_id\r\n\t\t\tWHERE " . groupaccess('album_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND (photo_datestamp>=" . (time() - $_GET['datelimit']) . " OR album_datestamp>=" . (time() - $_GET['datelimit']) . ")" : ""));
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
include LOCALE . LOCALESET . "search/downloads.php";
if ($_GET['stype'] == "downloads" || $_GET['stype'] == "all") {
    if ($_GET['sort'] == "datestamp") {
        $sortby = "download_datestamp";
    } else {
        if ($_GET['sort'] == "subject") {
            $sortby = "download_title";
        } else {
            $sortby = "download_datestamp";
        }
    }
    $ssubject = search_querylike("download_title");
    $smessage = search_querylike("download_description");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject, $smessage);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT td.*,tdc.* FROM " . DB_DOWNLOADS . " td\r\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tdc ON td.download_cat=tdc.download_cat_id\r\n\t\t\tWHERE " . groupaccess('download_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND download_datestamp>=" . (time() - $_GET['datelimit']) : ""));
    die("Access Denied");
}
include LOCALE . LOCALESET . "search/weblinks.php";
if ($_GET['stype'] == "weblinks" || $_GET['stype'] == "all") {
    if ($_GET['sort'] == "datestamp") {
        $sortby = "weblink_datestamp";
    } else {
        if ($_GET['sort'] == "subject") {
            $sortby = "weblink_name";
        } else {
            $sortby = "weblink_datestamp";
        }
    }
    $ssubject = search_querylike("weblink_name");
    $smessage = search_querylike("weblink_description");
    $surllink = search_querylike("weblink_url");
    if ($_GET['fields'] == 0) {
        $fieldsvar = search_fieldsvar($ssubject, $surllink);
    } else {
        if ($_GET['fields'] == 1) {
            $fieldsvar = search_fieldsvar($smessage, $surllink);
        } else {
            if ($_GET['fields'] == 2) {
                $fieldsvar = search_fieldsvar($ssubject, $smessage, $surllink);
            } else {
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT tw.*,twc.* FROM " . DB_WEBLINKS . " tw\r\n\t\t\tINNER JOIN " . DB_WEBLINK_CATS . " twc ON tw.weblink_cat=twc.weblink_cat_id\r\n\t\t\tWHERE " . groupaccess('weblink_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND weblink_datestamp>=" . (time() - $_GET['datelimit']) : ""));
Exemplo n.º 8
0
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if (db_exists(DB_FAQS)) {
    include LOCALE . LOCALESET . "search/faqs.php";
    if ($_GET['stype'] == "faqs" || $_GET['stype'] == "all") {
        $sortby = "faq_id";
        $ssubject = search_querylike("faq_question");
        $smessage = search_querylike("faq_answer");
        if ($_POST['fields'] == 0) {
            $fieldsvar = search_fieldsvar($ssubject);
        } else {
            if ($_POST['fields'] == 1) {
                $fieldsvar = search_fieldsvar($smessage);
            } else {
                if ($_POST['fields'] == 2) {
                    $fieldsvar = search_fieldsvar($ssubject, $smessage);
                } else {
                    $fieldsvar = "";
                }
            }
        }
        if ($fieldsvar) {
            $result = dbquery("SELECT fq.*, fc.* FROM " . DB_FAQS . " fq\n\t\t\tLEFT JOIN " . DB_FAQ_CATS . " fc ON fq.faq_cat_id=fc.faq_cat_id\n\t\t\tWHERE " . $fieldsvar);
Exemplo n.º 9
0
 include LOCALE . LOCALESET . "search/blog.php";
 if ($_GET['stype'] == "blog" || $_GET['stype'] == "all") {
     if ($_POST['sort'] == "datestamp") {
         $sortby = "blog_datestamp";
     } else {
         if ($_POST['sort'] == "subject") {
             $sortby = "blog_subject";
         } else {
             if ($_POST['sort'] == "author") {
                 $sortby = "blog_name";
             }
         }
     }
     $ssubject = search_querylike("blog_subject");
     $smessage = search_querylike("blog_blog");
     $sextended = search_querylike("blog_extended");
     if ($_POST['fields'] == 0) {
         $fieldsvar = search_fieldsvar($ssubject);
     } else {
         if ($_POST['fields'] == 1) {
             $fieldsvar = search_fieldsvar($smessage, $sextended);
         } else {
             if ($_POST['fields'] == 2) {
                 $fieldsvar = search_fieldsvar($ssubject, $smessage, $sextended);
             } else {
                 $fieldsvar = "";
             }
         }
     }
     if ($fieldsvar) {
         $rows = dbcount("(blog_id)", DB_BLOG, groupaccess('blog_visibility') . " AND " . $fieldsvar . " AND (blog_start='0'||blog_start<=" . time() . ") AND (blog_end='0'||blog_end>=" . time() . ") " . ($_POST['datelimit'] != 0 ? " AND blog_datestamp>=" . (time() - $_POST['datelimit']) : ""));