當前位置: 首頁>>代碼示例>>PHP>>正文


PHP search_fieldsvar函數代碼示例

本文整理匯總了PHP中search_fieldsvar函數的典型用法代碼示例。如果您正苦於以下問題:PHP search_fieldsvar函數的具體用法?PHP search_fieldsvar怎麽用?PHP search_fieldsvar使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了search_fieldsvar函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: search_querylike

     } 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']) : ""));
     $rows = dbrows($result);
 } else {
     $rows = 0;
 }
 if ($rows) {
     $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=forums&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['f402'] : $locale['f403']) . " " . $locale['522'] . "</a><br  />\n";
     $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tp.post_datestamp, tt.thread_subject,\r\n\t\t\ttt.thread_sticky, tf.forum_access, tu.user_id, tu.user_name, tu.user_status FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author=tu.user_id\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']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
     while ($data = dbarray($result)) {
開發者ID:WuChEn,項目名稱:PHP-Fusion,代碼行數:31,代碼來源:search_forums_include.php

示例2: search_querylike

             $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']) . ")" : ""));
     $rows = dbrows($result);
 } else {
     $rows = 0;
 }
 if ($rows != 0) {
     $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=photos&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['p401'] : $locale['p402']) . " " . $locale['522'] . "</a><br />\n";
     $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']) . ")" : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
     while ($data = dbarray($result)) {
開發者ID:WuChEn,項目名稱:PHP-Fusion,代碼行數:31,代碼來源:search_photos_include.php

示例3: search_querylike

         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']) : ""));
 } else {
     $rows = 0;
 }
 if ($rows != 0) {
     $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=news&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['n401'] : $locale['n402']) . " " . $locale['522'] . "</a><br />\n";
     $result = dbquery("SELECT tn.*, tu.user_id, tu.user_name, tu.user_status FROM " . DB_NEWS . " tn\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tn.news_name=tu.user_id\r\n\t\t\tWHERE " . groupaccess('news_visibility') . " AND (news_start='0'||news_start<=" . time() . ")\r\n\t\t\tAND (news_end='0'||news_end>=" . time() . ") AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND news_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
     while ($data = dbarray($result)) {
         $search_result = "";
開發者ID:WuChEn,項目名稱:PHP-Fusion,代碼行數:31,代碼來源:search_news_include.php

示例4: search_querylike

         $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']) : ""));
     $rows = dbrows($result);
 } else {
     $rows = 0;
 }
 if ($rows != 0) {
     $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=weblinks&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['w401'] : $locale['w402']) . " " . $locale['522'] . "</a><br />\n";
     $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']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
     while ($data = dbarray($result)) {
開發者ID:MichaelFichtner,項目名稱:RadioLaFamilia,代碼行數:31,代碼來源:search_weblinks_include.php


注:本文中的search_fieldsvar函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。