½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > °ñµåÆÁ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
ASP
CSS
HTML
MYSQL
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ °ñµåÆÁ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 699 | Á¶È¸¼ö 22,755 | µî·ÏÀÏ 2017-08-11 15:05:14

´Ð³×ÀÓ

Melbourners Au

Á¦¸ñ

ÇØÇǼַç¼Ç ÅëÇÕ°Ë»ö ºÎºÐ °³¼±ÄÚµå
³»¿ë
Áö±Ý²¯ È¥ÀÚ »ðÁúÇÑ°Ô ¾Æ±î¿ö¼­ ¿©±â¿¡¶óµµ °ø°³ÇÕ´Ï´Ù.

CGI¸ô¿¡¼­ ¼Ö·ç¼Ç ±¸¸ÅÇÏ½Ã°í ³ª¼­ °Ô½ÃÆÇ Ãß°¡ ¼öÁ¤ »èÁ¦ÇÒ ¶§ ÅëÇÕ°Ë»ö ºÎºÐÀ» Á÷Á¢ °íÄ¡¼Å¾ß Çϴµ¥¿ä
(Âü°í: http://www.cgimall.co.kr/happy_faq/board_detail.cgi?db=board_faq&thread=155)
À̺κÐÀ» Á»´õ ü°èÀûÀ¸·Î °íÄ£ ÄÚµåÀÔ´Ï´Ù.

(¾Æ¸¶µµ) lib/function.php ÀÇ ÇØ´çºÎºÐÀ» ¾Æ·¡ ÄÚµå·Î µ¤¾î¾²½Ã°í ÀûÀýÈ÷ ¼öÁ¤ÇØ ¾²½Ã¸é µÇ°Ú½À´Ï´Ù.

todo: ¹è¿­¿ø¼Ò¸¦ ³ÖÀ» ÇÊ¿ä ¾øÀÌ ¾Æ¿¹ °Ô½ÃÆÇ Àüü¸¦ Àоî¿Ã °ÍÀÎÁö ¾î¶²Áö¸¦ °ü¸®ÀÚ¸ðµå¿¡¼­ º¯°æ °¡´ÉÇÏ°Ô

------------


$search_result_type = "1"; #°Ë»öµÈ °á°ú°¡ ¾øÀ»°æ¿ì¿¡µµ ÇØ´ç ÆÄÆ® Ãâ·ÂÇÏ°íÀÚ ÇÒ°æ¿ì 1 ¾Æ´Ò°æ¿ì ºó°ª
$search_keyword = "search_word"; #¼öÁ¤ÇÏÁö¸¶¼¼¿ä. °Ë»ö½Ã ³Ñ¾î¿À´Â °ª ex) search.php?keyword=kkk -> $search_keyword = "keyword";

$the_tables = array(

/**
 * °¢ ¹è¿­Àº °Ë»ö °¡´ÉÇÑ Å×À̺íµéÀÔ´Ï´Ù.
 *
 * 1Ç׿¡´Â À¯ÇüÀ» Àû½À´Ï´Ù. "¾÷¼Ò·Ï", "Ä«Å×°í¸®", "°Ô½ÃÆÇ" 3Á¾ÀÔ´Ï´Ù. ¼Â ´Ù ¾Æ´Ñ ¹º°¡¸¦ ¾²¸é ¾Æ·¡ switch¹®ÀÇ default°¡ ÀÛµ¿ÇÕ´Ï´Ù.
 * 2Ç׿¡´Â "ÅÛÇø´Å±×"¿¡ »ç¿ëµÇ´Â "ÃßÃâű׸í"À» ¾¹´Ï´Ù.
 * 3Ç׿¡´Â À¯Çü¿¡ µû¶ó ²À ÇÊ¿äÇÑ Å×À̺í¸íÀ» Àû¾îÁÝ´Ï´Ù.
 *
 * »õ·Î¿î °Ô½ÃÆÇÀ» ¸¸µé¾ú´Ù¸é? Àû´çÇÑ À§Ä¡¿¡ º¹ºÙÇؼ­ ¹è¿­À» Ãß°¡ÇÕ´Ï´Ù.
 * °Ô½ÃÆÇÀ» ¾ø¾Ö¾ß ÇÑ´Ù¸é? ÇØ´ç ¹è¿­¿ø¼Ò¸¦ ¾ø¾ÖÁÝ´Ï´Ù.
 */

array("¾÷¼Ò·Ï", "¾÷ü"),

array("°Ô½ÃÆÇ", "¸ÀÁý", "eatery"),
array("°Ô½ÃÆÇ", "´ë³ª¹«½£", "noname"),
array("°Ô½ÃÆÇ", "µ¿¿µ»ó", "youtube"),
array("°Ô½ÃÆÇ", "»çÁø°ü", "board_gallery_photo"),
array("°Ô½ÃÆÇ", "´ÜÅåÈ«º¸", "kakaotalks"),
array("°Ô½ÃÆÇ", "°³Àα¤°í", "flyers"),
array("°Ô½ÃÆÇ", "À̺¥Æ®", "events"),
array("°Ô½ÃÆÇ", "ÇȾ÷", "ride"),

array("°Ô½ÃÆÇ", "±¸ÀÎ", "job_openings"),
array("°Ô½ÃÆÇ", "±¸Á÷", "job_seekers"),

array("°Ô½ÃÆÇ", "ÆмÇ", "outfit"),
array("°Ô½ÃÆÇ", "»ç°íÆÈ°í", "deal"),

array("°Ô½ÃÆÇ", "½¦¾î", "bd_share"),
array("°Ô½ÃÆÇ", "·»Æ®", "bd_rent"),
array("°Ô½ÃÆÇ", "°³ÀθŸÅ", "bd_personal"),
array("°Ô½ÃÆÇ", "ºñÁî´Ï½º", "bd_business"),

array("°Ô½ÃÆÇ", "À¯ÇÐ", "inter_school"),
array("°Ô½ÃÆÇ", "À̹Î", "immigration"),
array("°Ô½ÃÆÇ", "¹ý·ü", "legal"),
array("°Ô½ÃÆÇ", "¼¼¹«", "tax"),
array("°Ô½ÃÆÇ", "½É¸®»ó´ã", "counsel"),
array("°Ô½ÃÆÇ", "Åõ¾î", "tour"),
array("°Ô½ÃÆÇ", "Çб³", "school"),
array("°Ô½ÃÆÇ", "¸á¹ø¸¾", "housework"),

array("°Ô½ÃÆÇ", "Çѱ¹´º½º", "news_korean"),
array("°Ô½ÃÆÇ", "È£ÁÖ´º½º", "news_australian"),

array("Ä«Å×°í¸®", "Ä«Å×°í¸®"),
);

// ÇÊ¿äÇÑ ¹è¿­µéÀ» °ø°¥·Î Çϳª¾¿ ¸¸µì´Ï´Ù.
$check_part = $search_table = $search_field = $search_orderby = $search_title_field = $search_date_field = $search_where = $search_view_all_link = array();

// iterator¸¦ ¾²±â À§ÇØ foreach ¾Æ´Ñ for ¹®À» ¾¹´Ï´Ù.
for ($i = 0; $i < count($the_tables); $i++) {

// ¿ì¼± ¸ðµç ¹è¿­ °¢°¢¿¡ ´ëÇÑ °øÅëÀÛ¾÷À» ÇսôÙ.
$key = $the_tables[$i][1];
$check_part[$key] = $i;

// ±×¸®°í ³ª¼­ °¢ ¹è¿­ 1Ç׿¡ ¹¹¶ó°í ½áÀÖ´ÂÁö¿¡ µû¸¥ °¢°³ÀÛ¾÷À» ÇսôÙ.
switch ($the_tables[$i][0]) {

// ¾÷¼Ò·ÏÀÏ ¶§
case "¾÷¼Ò·Ï":
$search_table[$i] = $links;
$search_field[$i] = "title+address+phone+homepage+short_comment+review+build_date+keyword";
$search_orderby[$i] = "number";
$search_title_field[$i] = "title";
$search_date_field[$i] = "links_date";
$search_where[$i] = " AND wait="0" ";
$search_view_all_link[$i] = "price_search.php?action=search&search_word=";
break;

case "°Ô½ÃÆÇ":
// °Ô½ÃÆÇ ¹è¿­ÀÇ ¼Â°Ç×À» ÀÌ¿ëÇؼ­ ÀÏ°ý ÀÛ¼ºÇÕ´Ï´Ù.
$tbname = $the_tables[$i][2];

$search_table[$i] = $DB_Prefix.$tbname;
$search_field[$i] = $search_query_string = "bbs_title+bbs_review";
$search_orderby[$i] = "number";
$search_title_field[$i] = "bbs_title";
$search_date_field[$i] = "bbs_date";
$search_where[$i] = "";
$search_view_all_link[$i] = "bbs_list.php?action=search&search=".$search_query_string."&tb=".$tbname."&keyword=";
break;

case "Ä«Å×°í¸®":
$search_table[$i] = $category_tb;
$search_field[$i] = "category_name";
$search_orderby[$i] = "category_sort";
$search_title_field[$i] = "category_name";
$search_date_field[$i] = "display";
$search_where[$i] = " AND category_name LIKE "%¾÷¼Ò·Ï%" AND display="Y" ";
$search_view_all_link[$i] = "´õº¸±â¸µÅ©¾øÀ½";
break;

default:
// ÇØ´ç ¹è¿­¿ø¼ÒÀÇ 2¹ø° Ç׺ÎÅÍ raw data¸¦ ÀÔ·ÂÇØ ¾²½Ç ¼ö ÀÖ½À´Ï´Ù.
$search_table[$i] = $the_tables[$i][2]; // Äõ¸®µ¹¸± DBÅ×À̺í
$search_field[$i] = $the_tables[$i][3]; // Äõ¸®µ¹¸± Ä÷³µé
$search_orderby[$i] = $the_tables[$i][4]; // Äõ¸® Á¤·ÄÇÒ Ä÷³
$search_title_field[$i] = $the_tables[$i][5]; // Äõ¸®°á°úÀÇ Å¸ÀÌƲÄ÷³
$search_date_field[$i] = $the_tables[$i][6]; // Äõ¸®°á°úÀÇ ³¯Â¥Ä÷³
$search_where[$i] = $the_tables[$i][7]; // ±âŸ Äõ¸®µ¹¸±¶§ ÇÊ¿äÇÑ where¹®
$search_view_all_link[$i] = $the_tables[$i][8]; // ÃßÃâű׿¡¼­ »ç¿ëÇÒ ´õº¸±â ¸µÅ©
break;
}
}
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û ¸ð¹ÙÀÏ ¹× ¸®½ºÆ®Çü ÅÛÇø´ ÆÄÀÏ¿¡ Àû¿ëÇϸé À¯¿ëÇÑ ellipsis ¼Ò½º 2013-08-14 16:40:34
´ÙÀ½°Ô½Ã±Û ±×·ì³» ¹è³ÊµéÀ» ¸î °³ ¸ðµëÀ¸·Î ³ª´©¾î °ñ°í·ç Ãâ·ÂÇϱâ 2017-08-18 14:33:15