Seditio ve Ldu hakkında sınırsız arama yapın
 
 
> 1 <

Etiketler: arama eklentisi login

Author Message

Sender

Members


Online status

334 posts

Location: Turkey
Occupation:
Age:

#5512   2007-08-04 09:06 GMT      

Arama eklentisini türçeleştirdim fakat arama yaptıktan sonra Arama yap diyorum 404 hatası veriyor,


Code:
<?PHP

/* ====================
Land Down Under - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_LDU]
File=plugins/extended/arama/arama.php
Version=801
Updated=2005-oct-10
Type=Plugin
Author=Neocrome
Description=
[END_LDU]

[BEGIN_LDU_EXTPLUGIN]
Code=arama
Part=main
File=arama
Hooks=standalone
Tags=
Minlevel=0
Order=10
[END_LDU_EXTPLUGIN]

==================== */

if (!defined('LDU_CODE') || !defined('LDU_PLUG')) { die('Wrong URL.'); }

$cfg_maxwords = 4;
$cfg_maxitems = 100;
$cfg_maxlen = 40;

$sq = cv('sq','P','STX');
$pre = cv('pre','G','STX');
$a = cv('a','G','STX');

$frm = cv('frm','G','BOL');
$use = cv('use','G','BOL');
$pag = cv('pag','G','BOL');
$lnk = cv('lnk','G','BOL');
$evn = cv('evn','G','BOL');
$nws = cv('nws','G','BOL');

$searchin_frm = cv('searchin_frm','P','BOL');
$searchin_use = cv('searchin_use','P','BOL');
$searchin_pag = cv('searchin_pag','P','BOL');
$searchin_lnk = cv('searchin_lnk','P','BOL');
$searchin_evn = cv('searchin_evn','P','BOL');
$searchin_nws = cv('searchin_nws','P','BOL');

If ($frm+$use+$pag+$lnk+$evn+$searchin_frm+$searchin_use+$searchin_pag+$searchin_lnk+$searchin_evn+$searchin_nws==0)
{
$frm = 1;
$use = 1;
$pag = 1;
$lnk = 1;
$evn = 1;
$nws = 1;
}

$prechecked_frm = ($frm || $searchin_frm) ? "checked=\"checked\"": '';
$prechecked_use = ($use || $searchin_use) ? "checked=\"checked\"": '';
$prechecked_pag = ($pag || $searchin_pag) ? "checked=\"checked\"": '';
$prechecked_lnk = ($lnk || $searchin_lnk) ? "checked=\"checked\"": '';
$prechecked_evn = ($evn || $searchin_evn) ? "checked=\"checked\"": '';
$prechecked_nws = ($nws || $searchin_nws) ? "checked=\"checked\"": '';
$sq = (!empty($pre)) ? $pre : $sq;

$plugin_title = $L['Search'];

if ($a=='arama')
{
if (strlen($sq)<3)
{
$plugin_body .= "<p>".$L['plu_querytooshort']."</p>";
unset ($searchin_frm, $prechecked_use, $prechecked_pag, $prechecked_lnk, $prechecked_evn, $a);
}

$sq = ldu_addslashes($sq);

$words = explode(" ", $sq);
$words_count = count($words);

if ($words_count > $cfg_maxwords)
{
$plugin_body .= "<p>".$L['plu_toomanywords']." ".$cfg_maxwords."</p>";
$a = '';
}

$sqlsearch = implode("%", $words);
$sqlsearch = "%".$sqlsearch."%";

if ($searchin_frm && !$cfg['disableforums'])
{
$frm_sub = cv('frm_sub','P','ARR');

if ($frm_sub[0]==9999)
{ $sqlsections = ''; }
       else
        {
foreach($frm_sub as $i => $k)
    { $sections1[] = "s.fs_id='".$k."'"; }
$sqlsections = "AND (".implode(' OR ', $sections1).")";
}

$sql = ldu_mysql_query("SELECT p.fp_id, t.ft_title, t.ft_id, s.fs_id, s.fs_title
FROM $db_forum_posts p, $db_forum_topics t, $db_forum_sections s
WHERE s.fs_minlevel<='".$usr['level']."'
AND (p.fp_text LIKE '$sqlsearch' OR t.ft_title LIKE '$sqlsearch')
AND p.fp_topicid=t.ft_id
AND p.fp_sectionid=s.fs_id $sqlsections
GROUP BY t.ft_id ORDER BY fp_id DESC
LIMIT $cfg_maxitems");

$items = mysql_num_rows($sql);
$plugin_body .= "<h4>".$L['Forums']." : ".$L['plu_found']." ".$items." ".$L['plu_match']."</h4>";

while ($row = mysql_fetch_array($sql))
{
$plugin_body .= "<a href=\"forums.php?m=topics&amp;s=".$row['fs_id']."\">".stripslashes($row['fs_title'])."</a> ".$cfg['separator']." <a href=\"forums.php?m=posts&amp;p=".$row['fp_id']."#".$row['fp_id']."\">".stripslashes($row['ft_title'])."</a><br />";
}
$sections++;
}

if ($searchin_use)
{
$use_sub = cv('use_sub','P','INT');
$sqlrows = "user_id, user_name";
$sqltarget = "user_name";

$sql = ldu_mysql_query("SELECT $sqlrows FROM $db_users WHERE $sqltarget LIKE '$sqlsearch' AND user_level<60 ORDER BY user_name ASC LIMIT $cfg_maxitems");

$items = mysql_num_rows($sql);
$plugin_body .= "<h4>".$L['Users']." : ".$L['plu_found']." ".$items." ".$L['plu_match']."</h4>";

while ($row = mysql_fetch_array($sql))
{
$plugin_body .= ldu_build_user($row['user_id'],$row['user_name']);

switch($use_sub)
{
case '1':
$plugin_body .= " (".ldu_build_website($row['user_website']).")";
break;

case '2':
$plugin_body .= " (".ldu_cc(stripslashes($row['user_location'])).")";
break;

case '3':
$plugin_body .= " (".ldu_cc(stripslashes($row['user_occupation'])).")";
break;

default:
//
break;
}

$plugin_body .= "<br />";
}
$sections++;
}

if ($searchin_nws && !$cfg['disablenews'])
{
$nws_sub = cv('nws_sub','P','ARR');

if ($nws_sub[0]=='all')
{ $sqlsections = ''; }
       else
        {
        $sub = array();
foreach($nws_sub as $i => $k)
    { $sub[] = "news_cat='".$k."'"; }
$sqlsections = "AND (".implode(' OR ', $sub).")";
}

        $sql  = ldu_mysql_query("SELECT news_id, news_title, news_cat from $db_news n, $db_structure s
    WHERE (n.news_text LIKE '$sqlsearch' OR n.news_title LIKE '$sqlsearch')
        AND n.news_state='0'
        AND n.news_cat=s.structure_code
        AND n.news_cat NOT LIKE 'system'
        AND s.structure_minlevel<='".$usr['level']."' $sqlsections
        ORDER by news_cat ASC, news_title ASC
        LIMIT $cfg_maxitems");

$items = mysql_num_rows($sql);
$plugin_body .= "<h4>".$L['News']." : ".$L['plu_found']." ".$items." ".$L['plu_match']."</h4>";

while ($row = mysql_fetch_array($sql))
{
$plugin_body .= "<a href=\"index.php?c=".$row['news_cat']."\">".$ldu_cat[$row['news_cat']]['tpath']."</a>";
$plugin_body .= " ".$cfg['separator']." "."<a href=\"index.php?m=haber&amp;id=".$row['news_id']."\">";
$plugin_body .= ldu_cc(ldu_cutstring(stripslashes($row['news_title']),$cfg_maxlen))."</a><br />";
}
$sections++;
}


if ($searchin_pag && !$cfg['disablepages'])
{
$pag_sub = cv('pag_sub','P','ARR');

if ($pag_sub[0]=='all')
{ $sqlsections = ''; }
       else
        {
        $sub = array();
foreach($pag_sub as $i => $k)
    { $sub[] = "page_cat='".$k."'"; }
$sqlsections = "AND (".implode(' OR ', $sub).")";
}

        $sql  = ldu_mysql_query("SELECT page_id, page_title, page_cat from $db_pages p, $db_structure s
    WHERE (p.page_text LIKE '$sqlsearch' OR p.page_title LIKE '$sqlsearch'
        OR p.page_desc LIKE '$sqlsearch')
        AND p.page_state='0'
        AND p.page_cat=s.structure_code
        AND p.page_cat NOT LIKE 'system'
        AND s.structure_minlevel<='".$usr['level']."' $sqlsections
        ORDER by page_cat ASC, page_title ASC
        LIMIT $cfg_maxitems");

$items = mysql_num_rows($sql);
$plugin_body .= "<h4>".$L['Pages']." : ".$L['plu_found']." ".$items." ".$L['plu_match']."</h4>";

while ($row = mysql_fetch_array($sql))
{
$plugin_body .= "<a href=\"list.php?c=".$row['page_cat']."\">".$ldu_cat[$row['page_cat']]['tpath']."</a>";
$plugin_body .= " ".$cfg['separator']." "."<a href=\"page.php?id=".$row['page_id']."\">";
$plugin_body .= ldu_cc(ldu_cutstring(stripslashes($row['page_title']),$cfg_maxlen))."</a><br />";
}
$sections++;
}

if ($searchin_lnk && !$cfg['disablelinks'])
{
$lnk_sub = cv('lnk_sub','P','ARR');

if ($lnk_sub[0]=='all')
{ $sqlsections = ''; }
       else
        {
        $sub = array();
foreach($lnk_sub as $i => $k)
    { $sub[] = "link_cat='".$k."'"; }
$sqlsections = "AND (".implode(' OR ', $sub).")";
}

        $sql  = ldu_mysql_query("SELECT link_id, link_title, link_desc, link_cat from $db_links l, $db_structure s
    WHERE (l.link_title LIKE '$sqlsearch' OR l.link_desc LIKE '$sqlsearch')
        AND l.link_state='0'
        AND l.link_cat=s.structure_code
        AND l.link_cat NOT LIKE 'system'
        AND s.structure_minlevel<='".$usr['level']."' $sqlsections
        ORDER by link_cat
        LIMIT $cfg_maxitems");

$items = mysql_num_rows($sql);
$plugin_body .= "<h4>".$L['Links']." : ".$L['plu_found']." ".$items." ".$L['plu_match']."</h4>";

while ($row = mysql_fetch_array($sql))
{
$plugin_body .= "<a href=\"links.php?c=".$row['link_cat']."\">".$ldu_cat[$row['link_cat']]['tpath']."</a>";
$plugin_body .= " ".$cfg['separator']." "."<a href=\"links.php?a=jump&id=".$row['link_id']."\">";
$plugin_body .= ldu_cc(ldu_cutstring(stripslashes($row['link_title']),$cfg_maxlen))."</a> (";
$plugin_body .= ldu_cc(ldu_cutstring(stripslashes($row['link_desc']),$cfg_maxlen)).")<br />";
}
$sections++;
}

if ($searchin_evn && !$cfg['disableevents'])
{
$evn_sub = cv('evn_sub','P','ARR');

if ($evn_sub[0]=='all')
{ $sqlsections = ''; }
       else
        {
        $sub = array();
foreach($evn_sub as $i => $k)
    { $sub[] = "event_cat='".$k."'"; }
$sqlsections = "AND (".implode(' OR ', $sub).")";
}

        $sql  = ldu_mysql_query("SELECT event_id, event_title, event_cat from $db_events e, $db_structure s
    WHERE (e.event_title LIKE '$sqlsearch' OR e.event_text LIKE '$sqlsearch')
        AND e.event_state='0'
        AND e.event_cat=s.structure_code
        AND e.event_cat NOT LIKE 'system'
        AND s.structure_minlevel<='".$usr['level']."' $sqlsections
        ORDER by event_cat
        LIMIT $cfg_maxitems");

$items = mysql_num_rows($sql);
$plugin_body .= "<h4>".$L['Events']." : ".$L['plu_found']." ".$items." ".$L['plu_match']."</h4>";

while ($row = mysql_fetch_array($sql))
{
$plugin_body .= "<a href=\"events.php?c=".$row["event_cat"]."\">".$ldu_cat[$row['event_cat']]['tpath']."</a>";
$plugin_body .= " ".$cfg['separator']." "."<a href=\"events.php?m=details&amp;id=".$row['event_id']."\">";
$plugin_body .= ldu_cc(ldu_cutstring(stripslashes($row['event_title']),$cfg_maxlen))."</a><br />";
}
$sections++;
}
}

$plugin_body .= "<form id=\"search\" action=\"gonder.php?e=arama&a=arama\" method=\"post\"><p>".$L['plu_searchin1'];
$plugin_body .= "<input type=\"text\" class=\"text\" name=\"sq\" value=\"".stripslashes($sq)."\" size=\"16\" maxlength=\"32\" />";
$plugin_body .= $L['plu_searchin2']." &nbsp; <a href=\"gonder.php?e=arama\">".$L['Refresh']."</a></p>";
$plugin_body .= "<table class=\"cells\">";

if (!$cfg['disableforums'])
{
$plugin_body .= "<tr><td>".$L['plu_sections']."</td>";
$plugin_body .= "<td>".$L['plu_options']."</td></tr>";

$sql1 = ldu_mysql_query("SELECT fs_id,fs_title,fs_category FROM $db_forum_sections WHERE fs_minlevel<='".$usr['level']."' ORDER by fs_order,fs_title");

$plugin_body .= "<tr><td><input type=\"checkbox\" class=\"checkbox\" name=\"searchin_frm\" $prechecked_frm value=\"1\" /> ";
$plugin_body .= $L['Forums']."</td><td><select multiple name=\"frm_sub[]\" size=\"5\">";
$plugin_body .= "<option value=\"9999\" selected=\"selected\">".$L['plu_allsections']."</option>";

while ($row1 = mysql_fetch_array($sql1))
{
$fs_category = ldu_cutstring(stripslashes($row1['fs_category']), $cfg_maxlen);
$fs_title = ldu_cutstring(stripslashes($row1['fs_title']), $cfg_maxlen);
$plugin_body .= "<option value=\"".$row1["fs_id"]."\">".$fs_category." > ".$fs_title."</option>";
}

$plugin_body .= "</select></td></tr>";
}

if (!$cfg['disablenews'])
{
reset($ldu_cat);

$plugin_body .= "<tr><td><input type=\"checkbox\" class=\"checkbox\" name=\"searchin_nws\" $prechecked_nws value=\"1\" /> ";
$plugin_body .= $L['News']."</td><td><select multiple name=\"nws_sub[]\" size=\"5\">";
$plugin_body .= "<option value=\"all\" selected=\"selected\">".$L['plu_allcategories']."</option>";

while (list($i,$x) = each($ldu_cat))
{
if ($i!='all' && $i!='system' && $x['news'])
{
$selected = ($i == $check) ? "selected=\"selected\"" : '';
$plugin_body .= "<option value=\"".$i."\" $selected> ".$x['tpath']."</option>";
}
}

$plugin_body .= "</select></td></tr>";
}

if (!$cfg['disablepages'])
{
reset($ldu_cat);

$plugin_body .= "<tr><td><input type=\"checkbox\" class=\"checkbox\" name=\"searchin_pag\" $prechecked_pag value=\"1\" /> ";
$plugin_body .= $L['Pages']."</td><td><select multiple name=\"pag_sub[]\" size=\"5\">";
$plugin_body .= "<option value=\"all\" selected=\"selected\">".$L['plu_allcategories']."</option>";

while (list($i,$x) = each($ldu_cat))
{
if ($i!='all' && $i!='system' && $x['pages'])
{
$selected = ($i == $check) ? "selected=\"selected\"" : '';
$plugin_body .= "<option value=\"".$i."\" $selected> ".$x['tpath']."</option>";
}
}

$plugin_body .= "</select></td></tr>";
}

if (!$cfg['disablelinks'])
{
reset($ldu_cat);

$plugin_body .= "<tr><td><input type=\"checkbox\" class=\"checkbox\" name=\"searchin_lnk\" $prechecked_lnk value=\"1\" /> ";
$plugin_body .= $L['Links']."</td><td><select multiple name=\"lnk_sub[]\" size=\"5\">";
$plugin_body .= "<option value=\"all\" selected=\"selected\">".$L['plu_allcategories']."</option>";

while (list($i,$x) = each($ldu_cat))
{
if ($i!='all' && $i!='system' && $x['links'])
{
$selected = ($i == $check) ? "selected=\"selected\"" : '';
$plugin_body .= "<option value=\"".$i."\" $selected> ".$x['tpath']."</option>";
}
}

$plugin_body .= "</select></td></tr>";
}

if (!$cfg['disableevents'])
{
reset($ldu_cat);

$plugin_body .= "<tr><td><input type=\"checkbox\" class=\"checkbox\" name=\"searchin_evn\" $prechecked_evn value=\"1\" /> ";
$plugin_body .= $L['Events']."</td><td><select multiple name=\"evn_sub[]\" size=\"5\">";
$plugin_body .= "<option value=\"all\" selected=\"selected\">".$L['plu_allcategories']."</option>";

while (list($i,$x) = each($ldu_cat))
{
if ($i!='all' && $i!='system' && $x['events'])
{
$selected = ($i == $check) ? "selected=\"selected\"" : '';
$plugin_body .= "<option value=\"".$i."\" $selected> ".$x['tpath']."</option>";
}
}

$plugin_body .= "</select></td></tr>";
}

$plugin_body .= "<tr><td><input type=\"checkbox\" class=\"checkbox\" name=\"searchin_use\" $prechecked_use value=\"1\" /> ";
$plugin_body .= $L['Users']."</td><td>&nbsp;</td></tr>";

$plugin_body .= "</table><br /></select><input type=\"submit\" class=\"submit\" value=\"".$L['Search']."\" /></form>";

?>


Birde login olurken kod sormasını istiorum acaba elinde olan paylaşabilir mi?

Dvdbil

Administrator


Online status

2,123 posts
http://www.seditio-tr.com
Pagerank: 3

Location: Turkey istanbul
Occupation: Web Tasarım & Yazılım
Age: 28

#5541   2007-08-04 17:28 GMT      
Bu konuya çözüm cevabı veremeyiz.. aklınca Türkçeleştirme yapıyorsun biz bilemeyiz nerede nerede hata yaptığını.
> 1 <

Benzer konular (Similar topics) #BETA

Keywords (beta):

Forum Arşiv (beta):

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203] [204] [205] [206] [207] [208] [209] [210] [211] [212] [213] [214] [215] [216] [217] [218] [219] [220] [221] [222] [223] [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235] [236] [237] [238] [239] [240] [241] [242] [243] [244] [245] [246] [247] [248] [249] [250] [251] [252] [253] [254] [255] [256] [257] [258] [259] [260] [261] [262] [263] [264] [265] [266] [267] [268] [269] [270] [271] [272] [273] [274] [275] [276] [277] [278] [279] [280] [281] [282] [283] [284] [285] [286] [287] [288] [289] [290] [291] [292] [293] [294] [295] [296] [297] [298] [299] [300] [301] [302] [303] [304] [305] [306] [307] [308] [309] [310] [311] [312] [313] [314] [315] [316] [317] [318] [319] [320] [321] [322] [323] [324] [325] [326] [327] [328] [329] [330] [331] [332] [333] [334] [335] [336] [337] [338] [339] [340] [341] [342] [343] [344] [345] [346] [347] [348] [349] [350] [351] [352] [353] [354]