Changeset 1666 in ExiteCMS


Ignore:
Timestamp:
08/21/08 21:06:15 (3 years ago)
Author:
hverton
Message:

Merged trunk revisions 1588:1665 into the PLi-Fusion branch

Location:
branches/PLi-Fusion
Files:
2 deleted
59 edited
440 copied

Legend:

Unmodified
Added
Removed
  • branches/PLi-Fusion/administration/frontpage.php

    r1656 r1666  
    5050        $fwhere = ""; 
    5151        $nwhere = ""; 
     52        if (!isset($news_locale)) $news_locale = $settings['locale_code']; 
    5253        break; 
    5354    case "single": 
    5455        $fwhere = ""; 
    5556        $nwhere = ""; 
     57        if (!isset($news_locale)) $news_locale = $settings['locale_code']; 
    5658        break; 
    5759    case "multiple": 
  • branches/PLi-Fusion/administration/members.php

    r1227 r1666  
    3030// parameter validation 
    3131if (isset($user_id) && !isNum($user_id)) fallback("index.php"); 
     32if (!isset($step)) $step = ""; 
     33if (!isset($user_id)) $user_id= 0; 
    3234if (!isset($country) || strlen($country) != 2) $country = ""; 
    3335if (!isset($sortby) || strlen($sortby) != 1) $sortby = "all"; 
    34 if (!isset($step)) $step = ""; 
    35 if (!isset($user_id)) $user_id= 0; 
    36  
    37 if (isset($_POST['cancel_delete'])) fallback(FUSION_SELF.$aidlink."&sortby=$sortby&rowstart=$rowstart"); 
     36if (!isset($order)) $order = "username"; 
     37if (!isset($field)) $field = "username"; 
     38 
     39if (isset($_POST['cancel_delete'])) fallback(FUSION_SELF.$aidlink."&order=$order&sortby=$sortby&field=$field&rowstart=$rowstart"); 
    3840 
    3941if ($step == "add") { 
     
    144146$rows = 0; 
    145147if (iMEMBER) { 
    146     // create the where clause 
    147     if ($sortby == "all") { 
    148         if ($country == "") { 
    149             $orderby = ""; 
    150         } else { 
    151             $orderby = " user_cc_code = '".$country."'"; 
    152         } 
    153     } else { 
    154         if ($country == "") { 
    155             $orderby = " user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'"; 
    156         } else { 
    157             $orderby = " user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
    158         } 
    159     } 
     148    // create the letter filter SQL clause and the selection sort SQL clause 
     149    switch($order) { 
     150        case "country": 
     151            $sortfield = "user_cc_code ASC, user_level DESC, user_name ASC"; 
     152            break; 
     153        case "email": 
     154            $sortfield = "user_email ASC, user_level DESC"; 
     155            break; 
     156        case "username": 
     157        default: 
     158            $sortfield = "user_level DESC, user_name ASC"; 
     159            break; 
     160    } 
     161    // create the query filter SQL clause 
     162    $where = ""; 
     163    switch($field) { 
     164        case "country": 
     165            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_cc_code,1,1)))"; 
     166            break; 
     167        case "email": 
     168            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_email,1,1)))"; 
     169            if ($sortby != "all") { 
     170                $where = "(user_email LIKE '".stripinput($sortby)."%' OR user_email LIKE '".strtolower(stripinput($sortby))."%')"; 
     171            } 
     172            break; 
     173        case "username": 
     174        default: 
     175            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_name,1,1)))"; 
     176            if ($sortby != "all") { 
     177                $where = "(user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
     178            } 
     179            break; 
     180    } 
     181    // add the country filter if requested 
     182    $where .= $country == "" ? "" : (($where == "" ? "" : " AND ").("user_cc_code = '$country'")); 
     183 
     184 
    160185    // get the list of members 
    161186    $variables['members'] = array(); 
    162187    if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 
    163     $result = dbquery("SELECT * FROM ".$db_prefix."users".($orderby==""?"":" WHERE").$orderby." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".$settings['numofthreads']); 
     188    $result = dbquery("SELECT * FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY ".$sortfield." LIMIT ".$rowstart.", ".$settings['numofthreads']); 
    164189    $rows = dbrows($result); 
    165190    $variables['members'] = array(); 
     
    197222    // starting characters to filter on. Make sure there are an even number! 
    198223    $variables['search'] = array(); 
    199     $result = dbquery("SELECT DISTINCT(UPPER(SUBSTRING(user_name,1,1))) AS letter FROM ".$db_prefix."users ORDER BY letter"); 
     224    $result = dbquery("SELECT ".$letterfilter." AS letter FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY letter"); 
    200225    while ($data = dbarray($result)) { 
    201226        // get rid of unwanted characters. Need to find a beter solution for this 
    202227        $variables['search'][] = str_replace(array('&', '?'), array('',''), $data['letter']); 
    203228    } 
    204     if (count($variables['search'])%2) $variables['search'][] = ""; 
     229    if (count($variables['search']) > 1 && count($variables['search'])%2) $variables['search'][] = ""; 
    205230    $variables['sortby'] = $sortby; 
    206     $variables['rows'] = dbcount("(*)", "users", $orderby); 
     231    $variables['rows'] = dbcount("(*)", "users", $where); 
    207232    $variables['rowstart'] = $rowstart; 
    208233    $variables['items_per_page'] = $settings['numofthreads']; 
    209     $variables['pagenav_url'] = FUSION_SELF.$aidlink."&sortby=$sortby&".($country==""?"":"country=$country&"); 
     234    $variables['pagenav_url'] = FUSION_SELF.$aidlink."&sortby=$sortby&field=$field&order=$order&".($country==""?"":"country=$country&"); 
    210235} 
    211236 
    212237$variables['step'] = $step; 
    213238$variables['user_id'] = $user_id; 
     239$variables['field'] = $field; 
     240$variables['order'] = $order; 
    214241$template_panels[] = array('type' => 'body', 'name' => 'admin.members', 'template' => 'admin.members.tpl', 'locale' => array("admin.members", "main.user_fields")); 
    215242$template_variables['admin.members'] = $variables; 
  • branches/PLi-Fusion/administration/modules.php

    r1509 r1666  
    208208                    // verify the other fields 
    209209                    $mod_search['visibility'] = (isset($mod_search['visibility']) && isNum($mod_search['visibility']) ? $mod_search['visibility'] : 103); 
     210                    $mod_search['fulltext'] = (isset($mod_search['fulltext']) && isNum($mod_search['fulltext']) ? $mod_search['fulltext'] : 0); 
    210211                    $mod_search['title'] = isset($mod_search['title']) ? $mod_search['title'] : ("Search: ".$mod_search['name']); 
    211212                    $mod_search['version'] = isset($mod_search['version']) ? $mod_search['version'] : $mod_version; 
    212213                    // add it to the search table 
    213                     $result = dbquery("INSERT INTO ".$db_prefix."searches (search_mod_id, search_name, search_title, search_version, search_visibility)  
    214                         VALUES ('".$mod_id."', '".$mod_search['name']."', '".$mod_search['title']."', '".$mod_search['version']."', '".$mod_search['visibility']."')"); 
     214                    $result = dbquery("INSERT INTO ".$db_prefix."search (search_mod_id, search_name, search_title, search_version, search_fulltext, search_visibility)  
     215                        VALUES ('".$id."', '".$mod_search['name']."', '".$mod_search['title']."', '".$mod_search['version']."',  '".$mod_search['fulltext']."', '".$mod_search['visibility']."')"); 
    215216                } 
    216217            } 
     
    354355 
    355356    // remove any searches associated with this module 
    356     $result = dbquery("DELETE FROM ".$db_prefix."searches WHERE search_mod_id='$id'"); 
     357    $result = dbquery("DELETE FROM ".$db_prefix."search WHERE search_mod_id='$id'"); 
    357358} 
    358359 
     
    525526 
    526527    // remove any searches associated with this module 
    527     $result = dbquery("DELETE FROM ".$db_prefix."searches WHERE search_mod_id='$id'"); 
     528    $result = dbquery("DELETE FROM ".$db_prefix."search WHERE search_mod_id='$id'"); 
    528529 
    529530    // if a module is installed, and if searches are defined, install the search links for this module 
     
    539540                    // verify the other fields 
    540541                    $mod_search['visibility'] = (isset($mod_search['visibility']) && isNum($mod_search['visibility']) ? $mod_search['visibility'] : 103); 
     542                    $mod_search['fulltext'] = (isset($mod_search['fulltext']) && isNum($mod_search['fulltext']) ? $mod_search['fulltext'] : 0); 
    541543                    $mod_search['title'] = isset($mod_search['title']) ? $mod_search['title'] : ("Search: ".$mod_search['name']); 
    542544                    $mod_search['version'] = isset($mod_search['version']) ? $mod_search['version'] : $mod_version; 
    543545                    // add it to the search table 
    544                     $result = dbquery("INSERT INTO ".$db_prefix."searches (search_mod_id, search_name, search_title, search_version, search_visibility)  
    545                         VALUES ('".$id."', '".$mod_search['name']."', '".$mod_search['title']."', '".$mod_search['version']."', '".$mod_search['visibility']."')"); 
     546                    $result = dbquery("INSERT INTO ".$db_prefix."search (search_mod_id, search_name, search_title, search_version, search_fulltext, search_visibility)  
     547                        VALUES ('".$id."', '".$mod_search['name']."', '".$mod_search['title']."', '".$mod_search['version']."',  '".$mod_search['fulltext']."', '".$mod_search['visibility']."')"); 
    546548                } 
    547549            } 
  • branches/PLi-Fusion/administration/news.php

    r1227 r1666  
    5151} 
    5252 
    53 // save the selection for the lastest news homepage panel 
    54 if (isset($_POST['save_latest'])) { 
    55  
    56     // validate the input 
    57     if (!is_array($_POST['headlines'])) fallback(BASEDIR."index.php"); 
    58     $headlines = $_POST['headlines']; 
    59     if (count($headlines) != $settings['news_headline']) fallback(BASEDIR."index.php"); 
    60      
    61     if (!is_array($_POST['newsitems'])) fallback(BASEDIR."index.php"); 
    62     $newsitems = $_POST['newsitems']; 
    63  
    64     // reset all headline news items before setting new ones 
    65     $result = dbquery("UPDATE ".$db_prefix."news SET news_headline = '0'"); 
    66     // save the new headlines 
    67     foreach($headlines as $key => $item) { 
    68         if ($item != 0) $result = dbquery("UPDATE ".$db_prefix."news SET news_headline = '".($settings['news_headline'] + 1 - $key)."' WHERE news_id = '".$item."'"); 
    69     } 
    70      
    71     // reset all lastest news items before setting new ones 
    72     $result = dbquery("UPDATE ".$db_prefix."news SET news_latest_news = '0'"); 
    73     // save the new latest news items 
    74     foreach($newsitems as $key => $item) { 
    75         if ($item != 0) $result = dbquery("UPDATE ".$db_prefix."news SET news_latest_news = '".($settings['news_items'] + 1 - $key)."' WHERE news_id = '".$item."'"); 
    76     } 
    77      
    78     // update the news_latest configuration flag 
    79     $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isset($_POST['news_latest']) ? "1" : "0")."' WHERE cfg_name = 'news_latest'"); 
    80      
     53// compose the query where clause based on the localisation method choosen 
     54switch ($settings['news_localisation']) { 
     55    case "none": 
     56        $where = ""; 
     57        $news_locale = ""; 
     58        break; 
     59    case "single": 
     60        $where = ""; 
     61        $news_locale = ""; 
     62        break; 
     63    case "multiple": 
     64        if (isset($_POST['news_locale'])) $news_locale = stripinput($_POST['news_locale']); 
     65        if (isset($news_locale)) { 
     66            $result = dbquery("SELECT * FROM ".$db_prefix."locale WHERE locale_code = '".stripinput($news_locale)."' AND locale_active = '1' LIMIT 1"); 
     67            if (!dbrows($result)) unset($news_locale); 
     68        } 
     69        if (!isset($news_locale)) $news_locale = $settings['locale_code']; 
     70        $variables['news_locale'] = $news_locale; 
     71        $where = "news_locale = '".$news_locale."' "; 
     72        break; 
    8173} 
    8274 
    8375// fill the newsitems array for the newsitem selection dropdown 
    84 $result = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC"); 
     76$result = dbquery("SELECT * FROM ".$db_prefix."news ".($where==""?"":("WHERE ".$where))." ORDER BY news_datestamp DESC"); 
    8577$variables['newsitems'] = array(); 
    8678while ($data = dbarray($result)) { 
     
    8981} 
    9082 
    91 // controle variable to indicate which panel to show 
    92 $variables['latest_news_selection'] = isset($_POST['latest']) || isset($_POST['save_latest']); 
    93  
    94 if ($variables['latest_news_selection']) { 
    95  
    96     // build the list of available news cards 
    97     $newslist = array(); 
    98     // and an empty first entry 
    99     $newslist[] = array('news_id' => 0, 'news_subject' => "", 'news_cat_name' => "", 'news_new_cat' => 1, 'selected' => 0); 
    100     $result = dbquery("SELECT n.news_id, n.news_subject, c.news_cat_name FROM ".$db_prefix."news n, ".$db_prefix."news_cats c WHERE n.news_cat = c.news_cat_id ORDER BY c.news_cat_name, n.news_datestamp DESC"); 
    101     $current_cat = ""; 
    102     while ($data = dbarray($result)) { 
    103         if ($data['news_cat_name'] != $current_cat) { 
    104             $data['news_new_cat'] = 1; 
    105             $current_cat = $data['news_cat_name']; 
    106         } else { 
    107             $data['news_new_cat'] = 0; 
    108         } 
    109         $data['selected'] = 0; 
    110         $newslist[] = $data; 
    111     } 
    112  
    113     // define the headlines array 
    114     $headlines = array(); 
    115     for ($i = 1; $i <= $settings['news_headline']; $i++) { 
    116         $result = dbquery("SELECT news_id FROM ".$db_prefix."news WHERE news_headline='".($settings['news_headline'] + 1 - $i)."'"); 
    117         if ($data = dbarray($result)) { 
    118             $news_id = $data['news_id']; 
    119         } else { 
    120             $news_id = 0; 
    121         } 
    122         $headlines[$i] = array(); 
    123         foreach($newslist as $item) { 
    124             if ($item['news_id'] == $news_id) $item['selected'] = 1; 
    125             $headlines[$i][] = $item; 
    126         } 
    127     } 
    128     $variables['headlines'] = $headlines; 
    129  
    130     // define the latest news items array 
    131     $newsitems = array(); 
    132     for ($i = 1; $i <= $settings['news_items']; $i++) { 
    133         $result = dbquery("SELECT news_id FROM ".$db_prefix."news WHERE news_latest_news='".($settings['news_items'] + 1 - $i)."'"); 
    134         if ($data = dbarray($result)) { 
    135             $news_id = $data['news_id']; 
    136         } else { 
    137             $news_id = 0; 
    138         } 
    139         $newsitems[$i] = array(); 
    140         foreach($newslist as $item) { 
    141             if ($item['news_id'] == $news_id) $item['selected'] = 1; 
    142             $newsitems[$i][] = $item; 
    143         } 
    144     } 
    145     $variables['newsitems'] = $newsitems; 
    146  
    147     // get the latest_news_only setting 
    148     $variables['news_latest'] = $settings['news_latest']; 
    149  
    150     // set the panel title 
    151     $title = $locale['540']; 
    152      
    153 } else if (isset($_POST['save'])) { 
     83if (isset($_POST['save'])) { 
    15484 
    15585    // save the news item 
     
    183113        redirect(FUSION_SELF.$aidlink."&status=su"); 
    184114    } else { 
    185         $result = dbquery("INSERT INTO ".$db_prefix."news (news_subject, news_cat, news_news, news_extended, news_breaks, news_name, news_datestamp, news_start, news_end, news_visibility, news_reads, news_allow_comments, news_allow_ratings) VALUES ('$news_subject', '$news_cat', '$body', '$body2', '$news_breaks', '".$userdata['user_id']."', '$news_post_date', '$news_start_date', '$news_end_date', '$news_visibility', '0', '$news_comments', '$news_ratings')"); 
     115        $result = dbquery("INSERT INTO ".$db_prefix."news (news_subject, news_cat, news_news, news_extended, news_breaks, news_name, news_locale, news_datestamp, news_start, news_end, news_visibility, news_reads, news_allow_comments, news_allow_ratings) VALUES ('$news_subject', '$news_cat', '$body', '$body2', '$news_breaks', '".$userdata['user_id']."', '$news_locale', '$news_post_date', '$news_start_date', '$news_end_date', '$news_visibility', '0', '$news_comments', '$news_ratings')"); 
    186116        redirect(FUSION_SELF.$aidlink."&status=sn"); 
    187117    } 
     
    227157            "minutes" => isNum($_POST['news_end']['minutes']) ? $_POST['news_end']['minutes'] : "0", 
    228158        ); 
    229         $news_date = array( 
    230             "mday" => isNum($_POST['news_date']['mday']) ? $_POST['news_date']['mday'] : "--", 
    231             "mon" => isNum($_POST['news_date']['mon']) ? $_POST['news_date']['mon'] : "--", 
    232             "year" => isNum($_POST['news_date']['year']) ? $_POST['news_date']['year'] : "----", 
    233             "hours" => isNum($_POST['news_date']['hours']) ? $_POST['news_date']['hours'] : "0", 
    234             "minutes" => isNum($_POST['news_date']['minutes']) ? $_POST['news_date']['minutes'] : "0", 
    235         ); 
     159        if (isset($_POST['news_date'])) { 
     160            $news_date = array( 
     161                "mday" => isNum($_POST['news_date']['mday']) ? $_POST['news_date']['mday'] : "--", 
     162                "mon" => isNum($_POST['news_date']['mon']) ? $_POST['news_date']['mon'] : "--", 
     163                "year" => isNum($_POST['news_date']['year']) ? $_POST['news_date']['year'] : "----", 
     164                "hours" => isNum($_POST['news_date']['hours']) ? $_POST['news_date']['hours'] : "0", 
     165                "minutes" => isNum($_POST['news_date']['minutes']) ? $_POST['news_date']['minutes'] : "0", 
     166            ); 
     167        } 
    236168        $news_comments = isset($_POST['news_comments']) ? 1 : 0; 
    237169        $news_ratings = isset($_POST['news_ratings']) ? 1 : 0; 
     
    271203    } else { 
    272204        if (isset($_POST['preview'])) { 
    273             $action = FUSION_SELF.$aidlink."&amp;news_id=$news_id"; 
     205            if (isset($news_id) && $news_id) { 
     206                $action = FUSION_SELF.$aidlink."&amp;news_id=$news_id"; 
     207                $title = $locale['400']; 
     208            } else { 
     209                $action = FUSION_SELF.$aidlink; 
     210                $title = $locale['404']; 
     211            } 
    274212        } else { 
    275213            $news_subject = ""; 
     
    282220            $news_visibility = 0; 
    283221            $action = FUSION_SELF.$aidlink; 
    284         } 
    285         $title = $locale['404']; 
     222            $title = $locale['404']; 
     223        } 
    286224    } 
    287225     
     
    319257} 
    320258 
     259// get the installed locales 
     260$variables['locales'] = array(); 
     261$result = dbquery("SELECT * FROM ".$db_prefix."locale WHERE locale_active = '1'"); 
     262while ($data = dbarray($result)) { 
     263    $variables['locales'][$data['locale_code']] = $data['locale_name']; 
     264} 
     265 
     266 
    321267// store the info to generate the panel 
    322268$template_panels[] = array('type' => 'body', 'name' => 'admin.news', 'title' => $title, 'template' => 'admin.news.tpl', 'locale' => "admin.news-articles"); 
  • branches/PLi-Fusion/administration/reports.php

    r1511 r1666  
    55| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
    66| for support, please visit http://exitecms.exite.eu | 
    7 +----------------------------------------------------+ 
    8 | Some portions copyright 2002 - 2006 Nick Jones     | 
    9 | http://www.php-fusion.co.uk/                       | 
    107+----------------------------------------------------+ 
    118| Released under the terms & conditions of v2 of the | 
     
    3027// check if the report_id variable is defined, if not, assign a default 
    3128if (!isset($report_id) || !isNum($report_id)) $report_id = 0; 
     29$variables['report_id'] = $report_id; 
    3230 
    33 // process the action requested 
    34 switch ($action) { 
     31// save requested? 
     32if (isset($_POST['save'])) { 
     33    $visibility = isset($_POST['report_visibility']) && isNum($_POST['report_visibility']) ? $_POST['report_visibility'] : 103; 
     34    switch ($_POST['action']) { 
     35        case "add": 
     36            // not implemented yet 
     37            break; 
     38        case "edit": 
     39            $result = dbquery("UPDATE ".$db_prefix."reports SET report_visibility='$visibility' WHERE report_id = '$report_id'"); 
     40            $action = ""; 
     41            break; 
     42        default: 
     43            die('invalid action passed!'); 
     44    }        
     45} 
    3546 
    36     case "add": 
    37         $variables['report'] = array( 
    38             'report_id' => 0, 
    39             'report_mod_id' => 0, 
    40             'report_name' => "", 
    41             'report_title' => "", 
    42             'report_version' => "", 
    43             'report_active' => 0, 
    44             'report_visibility' => 103 
    45         ); 
    46         break; 
     47// add a new report definition 
     48if ($action == "add" && !isset($variables['report'])) { 
     49    $variables['report'] = array( 
     50        'report_id' => 0, 
     51        'report_mod_id' => 0, 
     52        'report_mod_core' => 0, 
     53        'report_name' => "", 
     54        'report_title' => "", 
     55        'report_version' => "", 
     56        'report_active' => 0, 
     57        'report_visibility' => 103 
     58    ); 
     59} 
    4760 
    48     case "edit": 
    49         $result = dbquery("SELECT * FROM ".$db_prefix."reports WHERE report_id = '".$report_id."'"); 
    50         if ($variables['report'] = dbarray($result)) { 
    51             _debug($variables, true); 
    52             // found the record 
     61// edit an existing report definition 
     62if ($action == "edit" && !isset($variables['report'])) { 
     63    $result = dbquery("SELECT r.*, m.mod_folder FROM ".$db_prefix."reports r LEFT JOIN ".$db_prefix."modules m ON r.report_mod_id = m.mod_id"); 
     64    if ($data = dbarray($result)) { 
     65        // get the title for this report 
     66        if ($data['report_mod_id']) { 
     67            $data['custom'] = false; 
     68            locale_load("modules.".$data['mod_folder']); 
     69            $data['report_title'] = $locale[$data['report_title']]; 
     70            $locales[] = "modules.".$data['mod_folder']; 
    5371        } else { 
    54             // return to the overview screen 
    55             $action = ""; 
     72            if ($data['report_mod_core']) { 
     73                $data['mod_folder'] = "ExiteCMS"; 
     74                $data['custom'] = false; 
     75            } else { 
     76                $data['mod_folder'] = "-"; 
     77                $data['custom'] = true; 
     78            } 
     79            // it's a core report, get the title for the module locales 
     80            locale_load("main.reports"); 
     81            if (isset($locale[$data['report_title']])) { 
     82                $data['report_title'] = $locale[$data['report_title']]; 
     83            } else { 
     84                // not found, assume it's a static title 
     85            } 
    5686        } 
    57         break; 
    58  
    59     case "setstatus": 
    60         // if a status is passed, validate it 
    61         if (isset($status) && isNum($status) && $status >= 0 && $status <= 1) { 
    62             $result = dbquery("UPDATE ".$db_prefix."reports SET report_active = '".$status."' WHERE report_id = '".$report_id."'"); 
    63         } 
     87        $variables['report'] = $data; 
     88    } else { 
    6489        // return to the overview screen 
    6590        $action = ""; 
    66         break; 
     91    } 
     92} 
     93//_debug($variables, true); 
     94// add a new or edit an existing report definition 
     95if ($action == "add" || $action == "edit") { 
     96    // get the list of defined user groups 
     97    $variables['usergroups'] = getusergroups(true); 
     98} 
     99 
     100// toggle the report status 
     101if ($action == "setstatus") { 
     102    // if a status is passed, validate it 
     103    if (isset($status) && isNum($status) && $status >= 0 && $status <= 1) { 
     104        $result = dbquery("UPDATE ".$db_prefix."reports SET report_active = '".$status."' WHERE report_id = '".$report_id."'"); 
     105    } 
     106    // return to the overview screen 
     107    $action = ""; 
    67108} 
    68109 
     
    79120            $data['report_title'] = $locale[$data['report_title']]; 
    80121        } else { 
    81             // make sure this field is not NULL 
    82             $data['mod_folder'] = ""; 
     122            // make sure this field is not NULL, we need it later 
     123            $variables['mod_folder'] = ""; 
     124            // it's a core report, get the title for the module locales 
     125            locale_load("main.reports"); 
     126            if (isset($locale[$data['report_title']])) { 
     127                $data['report_title'] = $locale[$data['report_title']]; 
     128            } else { 
     129                // not found, assume it's a static title 
     130            } 
    83131        } 
    84132        $data['groupname'] = getgroupname($data['report_visibility']); 
     
    97145} 
    98146 
    99 //_debug($variables, true); 
     147// store the action variable 
     148$variables['action'] = $action; 
    100149 
    101150// define the admin body panel 
  • branches/PLi-Fusion/administration/settings_forum.php

    r1509 r1666  
    3939    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['unread_threshold']) ? $_POST['unread_threshold'] : "0")."' WHERE cfg_name = 'unread_threshold'"); 
    4040    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['forum_edit_timeout']) ? $_POST['forum_edit_timeout'] : "0")."' WHERE cfg_name = 'forum_edit_timeout'"); 
     41    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['forum_guest_limit']) ? $_POST['forum_guest_limit'] : "0")."' WHERE cfg_name = 'forum_guest_limit'"); 
    4142} 
    4243 
  • branches/PLi-Fusion/administration/settings_languages.php

    r1538 r1666  
    2828if (!checkrights("S8") || !defined("iAUTH") || $aid != iAUTH) fallback(BASEDIR."index.php"); 
    2929 
     30/*---------------------------------------------------+ 
     31| Local functions                                    | 
     32+----------------------------------------------------*/ 
     33function migrate($tablename, $fieldname, $from_setting, $to_setting) { 
     34    global $db_prefix, $settings; 
     35 
     36    if ($from_setting == "none" && $to_setting == "single") { 
     37        // not implemented yet 
     38    } elseif ($from_setting == "none" && $to_setting == "multiple") { 
     39        // set everything to the current locale 
     40        $result = dbquery("UPDATE ".$db_prefix.$tablename. " SET ".$fieldname." = '".$settings['locale_code']."'"); 
     41        // and copy it to all other active locales 
     42        $result = dbquery("SELECT * FROM ".$db_prefix."locale WHERE locale_code <> '".$settings['locale_code']."' AND locale_active = 1"); 
     43        while ($data = dbarray($result)) { 
     44            $result2 = dbquery("SELECT * FROM ".$db_prefix.$tablename); 
     45            while ($data2 = dbarray($result2)) { 
     46                $key = 0; 
     47                $fields = ""; 
     48                $values = ""; 
     49                foreach($data2 as $name => $value) { 
     50                    // skip the primary key 
     51                    if ($key++ == 0) continue; 
     52                    $fields .= ($fields == "" ? "" : ", ") . $name; 
     53                    if ($name == $fieldname) { 
     54                        $values .= ($values == "" ? "" : ", ") . "'".$data['locale_code']."'"; 
     55                    } else { 
     56                        $values .= ($values == "" ? "" : ", ") . "'".mysql_escape_string($value)."'"; 
     57                    } 
     58                } 
     59                // insert the duplicated record with the new locale code 
     60                $result3 = dbquery("INSERT INTO ".$db_prefix.$tablename." (".$fields.") VALUES (".$values.")"); 
     61            } 
     62        }    
     63    } elseif ($from_setting == "single" && $to_setting == "none") { 
     64        // not implemented yet 
     65    } elseif ($from_setting == "single" && $to_setting == "multiple") { 
     66        // not implemented yet 
     67    } elseif ($from_setting == "multiple" && $to_setting == "none") { 
     68        $result = dbquery("UPDATE ".$db_prefix.$tablename. " SET ".$fieldname." = ''"); 
     69    } elseif ($from_setting == "multiple" && $to_setting == "single") { 
     70        // not implemented yet 
     71    } else { 
     72        terminate("invalid migration strategy detected when migrating ".$tablename."!"); 
     73    } 
     74 
     75} 
     76 
     77/*---------------------------------------------------+ 
     78| Main code                                          | 
     79+----------------------------------------------------*/ 
     80 
    3081if (isset($_POST['savesettings'])) { 
    3182    // use browser language 
     
    4697    $panels_localisation = stripinput($_POST['panels_localisation']); 
    4798    if ($panels_localisation != $settings['panels_localisation']) { 
    48         // migration required 
     99        migrate('panels', 'panel_locale', $settings['panels_localisation'], $panels_localisation); 
    49100    } 
    50101    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$panels_localisation."' WHERE cfg_name = 'panels_localisation'"); 
     
    53104    $sitelinks_localisation = stripinput($_POST['sitelinks_localisation']); 
    54105    if ($sitelinks_localisation != $settings['sitelinks_localisation']) { 
    55         // migration required 
     106        migrate('site_links', 'link_locale', $settings['sitelinks_localisation'], $sitelinks_localisation); 
    56107    } 
    57108    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$sitelinks_localisation."' WHERE cfg_name = 'sitelinks_localisation'"); 
     
    60111    $news_localisation = stripinput($_POST['news_localisation']); 
    61112    if ($news_localisation != $settings['news_localisation']) { 
    62         // migration required 
     113        migrate('news', 'news_locale', $settings['news_localisation'], $news_localisation); 
     114        migrate('news_frontpage', 'frontpage_locale', $settings['news_localisation'], $news_localisation); 
    63115    } 
    64116    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$news_localisation."' WHERE cfg_name = 'news_localisation'"); 
     
    67119    $download_localisation = stripinput($_POST['download_localisation']); 
    68120    if ($download_localisation != $settings['download_localisation']) { 
    69         // migration required 
     121        migrate('download_cats', 'download_cat_locale', $settings['download_localisation'], $download_localisation); 
    70122    } 
    71123    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$download_localisation."' WHERE cfg_name = 'download_localisation'"); 
     
    74126    $article_localisation = stripinput($_POST['article_localisation']); 
    75127    if ($article_localisation != $settings['article_localisation']) { 
    76         // migration required 
     128        migrate('article', 'article_locale', $settings['article_localisation'], $download_localisation); 
    77129    } 
    78130    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$article_localisation."' WHERE cfg_name = 'article_localisation'"); 
  • branches/PLi-Fusion/administration/settings_misc.php

    r1509 r1666  
    3030if (isset($_POST['savesettings'])) { 
    3131    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['tinymce_enabled']) ? $_POST['tinymce_enabled'] : "0")."' WHERE cfg_name = 'tinymce_enabled'"); 
     32    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['hoteditor_enabled']) ? $_POST['hoteditor_enabled'] : "0")."' WHERE cfg_name = 'hoteditor_enabled'"); 
    3233    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".stripinput($_POST['smtp_host'])."' WHERE cfg_name = 'smtp_host'"); 
    3334    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".stripinput($_POST['smtp_username'])."' WHERE cfg_name = 'smtp_username'"); 
     
    4546    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".stripinput($_POST['debug_querylog'])."' WHERE cfg_name = 'debug_querylog'"); 
    4647    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['debug_sql_explain']) ? $_POST['debug_sql_explain'] : "0")."' WHERE cfg_name = 'debug_sql_explain'"); 
     48    $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['debug_php_errors']) ? $_POST['debug_php_errors'] : "0")."' WHERE cfg_name = 'debug_php_errors'"); 
    4749} 
    4850 
  • branches/PLi-Fusion/administration/settings_security.php

    r1579 r1666  
    131131 
    132132// check if a local fallback is defined 
    133 $variables['auth_method'] .= $auth_method . ($auth_local ? "+" : " "); 
     133$variables['auth_method'] = $auth_method . ($auth_local ? "+" : " "); 
    134134 
    135135// define the admin body panel 
  • branches/PLi-Fusion/administration/tools/language_pack_English.php

    r1579 r1666  
    495495        $localestrings['237'] = "Webmaster Toolbox for"; 
    496496        $localestrings['238'] = "Forum Ranking"; 
     497        $localestrings['239'] = "Frontpage News"; 
    497498        $localestrings['250'] = "Website Statistics"; 
    498499        $localestrings['251'] = "Registered Members:"; 
     
    524525        $localestrings['402'] = "User Type"; 
    525526        $localestrings['403'] = "Add a new user"; 
    526         $localestrings['404'] = "Show All"; 
     527        $localestrings['404'] = "Filter on %s"; 
    527528        $localestrings['405'] = "Options"; 
    528529        $localestrings['406'] = "Country"; 
     
    534535        $localestrings['412'] = "%u members"; 
    535536        $localestrings['413'] = "Undelete this user"; 
     537        $localestrings['414'] = "Reset filter"; 
    536538        $localestrings['415'] = "Edit this user's profile"; 
    537539        $localestrings['416'] = "Activate this account"; 
     
    700702        $localestrings['520'] = "Click here"; 
    701703        $localestrings['521'] = " to go to Article Categories"; 
    702         $localestrings['540'] = "Latest News selection"; 
    703         $localestrings['541'] = "Latest News Headlines:"; 
    704         $localestrings['542'] = "Latest News Items:"; 
     704        $localestrings['540'] = "Frontpage News selection"; 
     705        $localestrings['541'] = "Frontpage Headlines:"; 
     706        $localestrings['542'] = "Frontpage News Items:"; 
    705707        $localestrings['543'] = "News Item"; 
    706708        $localestrings['544'] = "Update"; 
    707         $localestrings['545'] = "On this page you define the sequence in which the news articles are displayed on the news homepage. \n                 First, all headlines you selected are displayed. After that, the latest news items. Both in the order\n                 in which they are selected.<br />If the checkbox below is not checked, all other news items that are not\nexpired will be shown next."; 
    708         $localestrings['546'] = "Hide all non-selected news items from the Latest News page"; 
     709        $localestrings['545'] = "On this page you define the sequence in which the news items are displayed on the news frontpage. \n                   First, all headlines you selected are displayed. After that, the latest news items. Both in the order\n                 in which they are selected.<br />If the checkbox below is not checked, all other news items that are not\nexpired will be shown next."; 
     710        $localestrings['546'] = "Hide all non-selected news items from the Frontpage"; 
    709711        $localestrings['550'] = "Please specify a subject"; 
    710712        $localestrings['551'] = "Delete this News?"; 
     
    911913        $localestrings['410'] = "from"; 
    912914        $localestrings['411'] = "View this report"; 
     915        $localestrings['420'] = "Report name:"; 
     916        $localestrings['421'] = "Module name:"; 
     917        $localestrings['422'] = "Report title:"; 
     918        $localestrings['423'] = "Report accessable for:"; 
     919        $localestrings['424'] = "Save"; 
    913920        load_localestrings($localestrings, LP_LOCALE, "admin.reports", $step); 
     921 
     922        $localestrings = array(); 
     923        $localestrings['400'] = "Searches"; 
     924        $localestrings['401'] = "Search Title"; 
     925        $localestrings['402'] = "Visibility"; 
     926        $localestrings['403'] = "Options"; 
     927        $localestrings['404'] = "Deactivate"; 
     928        $localestrings['405'] = "Activate"; 
     929        $localestrings['406'] = "Modify this search"; 
     930        $localestrings['407'] = "Delete this search"; 
     931        $localestrings['408'] = "Currently there are no searches defined"; 
     932        $localestrings['409'] = "Add a Search"; 
     933        $localestrings['410'] = "from"; 
     934        $localestrings['411'] = "Try this search"; 
     935        $localestrings['420'] = "Search name:"; 
     936        $localestrings['421'] = "Module name:"; 
     937        $localestrings['422'] = "Search title:"; 
     938        $localestrings['423'] = "Search accessable for:"; 
     939        $localestrings['424'] = "Save"; 
     940        load_localestrings($localestrings, LP_LOCALE, "admin.search", $step); 
     941 
     942        $localestrings = array(); 
     943        $localestrings['400'] = "Searches"; 
     944        $localestrings['401'] = "Search Title"; 
     945        $localestrings['402'] = "Visibility"; 
     946        $localestrings['403'] = "Options"; 
     947        $localestrings['404'] = "Deactivate"; 
     948        $localestrings['405'] = "Activate"; 
     949        $localestrings['406'] = "Modify this search"; 
     950        $localestrings['407'] = "Delete this search"; 
     951        $localestrings['408'] = "Currently there are no searches defined"; 
     952        $localestrings['409'] = "Add a Search"; 
     953        $localestrings['410'] = "from"; 
     954        $localestrings['411'] = "Try this search"; 
     955        $localestrings['420'] = "Search name:"; 
     956        $localestrings['421'] = "Module name:"; 
     957        $localestrings['422'] = "Search title:"; 
     958        $localestrings['423'] = "Search accessable for:"; 
     959        $localestrings['424'] = "Save"; 
     960        load_localestrings($localestrings, LP_LOCALE, "admin.searches", $step); 
    914961 
    915962        $localestrings = array(); 
     
    922969        $localestrings['406'] = "Your name or nickname:"; 
    923970        $localestrings['407'] = "Site introduction:"; 
    924         $localestrings['408'] = "Leave empty if not required"; 
     971        $localestrings['408'] = "Used by some themes. Leave empty if not required"; 
    925972        $localestrings['409'] = "Site description:"; 
    926973        $localestrings['410'] = "Site keywords:"; 
     
    9941041        $localestrings['541'] = ", then "; 
    9951042        $localestrings['542'] = ", with OpenID"; 
     1043        $localestrings['543'] = "Limit forum posts for guests to:"; 
     1044        $localestrings['544'] = "No Limit"; 
    9961045        $localestrings['550'] = "Security"; 
    9971046        $localestrings['551'] = "Enable registration system?"; 
     
    10091058        $localestrings['563'] = "From:"; 
    10101059        $localestrings['564'] = "To:"; 
    1011         $localestrings['569a'] = "The current text for the selected item will be copied for all active locales."; 
    1012         $localestrings['569b'] = "The current text for the selected item will be duplicated for all active locales."; 
    1013         $localestrings['569c'] = "Only the translation for the system locale will be kept, all others will be deleted."; 
    1014         $localestrings['569d'] = "Current translations will be linked to individual locales, and can be deleted or modified as a single entity."; 
    1015         $localestrings['569e'] = "Only the translation for the system locale will be kept, all others will be deleted."; 
    1016         $localestrings['569f'] = "Current translations will be merged into a single entity. Items that don't exist for every locale will be merged as well. This may lead to duplicates."; 
     1060        $localestrings['569a'] = "?"; 
     1061        $localestrings['569b'] = "The current text for the selected item will be copied to all active locales."; 
     1062        $localestrings['569c'] = "?"; 
     1063        $localestrings['569d'] = "?"; 
     1064        $localestrings['569e'] = "All locale information will be erased and all information will be merged. This may lead to duplicates."; 
     1065        $localestrings['569f'] = "?"; 
    10171066        $localestrings['570'] = "Panels:"; 
    10181067        $localestrings['571'] = "Menu sytem:"; 
     
    10511100        $localestrings['668'] = "Show results of the Query Optimizer as well:"; 
    10521101        $localestrings['669'] = "Maintenance mode background color:"; 
     1102        $localestrings['670'] = "Activate PHP error reporting:"; 
    10531103        $localestrings['671'] = "Activate SQL query debugging for:"; 
    10541104        $localestrings['672'] = "disabled"; 
     1105        $localestrings['673'] = "Use HotEditor BBcode editor?"; 
    10551106        $localestrings['700'] = "Private Messages"; 
    10561107        $localestrings['701'] = "Inbox message limit:"; 
     
    14971548        $localestrings['albania'] = "al"; 
    14981549        $localestrings['algeria'] = "dz"; 
     1550        $localestrings['america'] = "us"; 
    14991551        $localestrings['american samoa'] = "as"; 
    15001552        $localestrings['andorra'] = "ad"; 
     
    15251577        $localestrings['bouvet island'] = "bv"; 
    15261578        $localestrings['brazil'] = "br"; 
    1527         $localestrings['british indian ocean territories'] = "io"; 
     1579        $localestrings['british indian ocean terr'] = "io"; 
    15281580        $localestrings['british virgin islands'] = "vg"; 
    15291581        $localestrings['brunei'] = "bn"; 
     
    15421594        $localestrings['china'] = "cn"; 
    15431595        $localestrings['christmas island'] = "cx"; 
     1596        $localestrings['cocos (keeling) islands'] = "cc"; 
    15441597        $localestrings['cocos islands'] = "cc"; 
    1545         $localestrings['keeling islands'] = "cc"; 
    1546         $localestrings['cocos (keeling) islands'] = "cc"; 
    15471598        $localestrings['colombia'] = "co"; 
    15481599        $localestrings['comoros'] = "km"; 
    1549         $localestrings['congo'] = "cg"; 
     1600        $localestrings['congo'] = "cd"; 
    15501601        $localestrings['cook islands'] = "ck"; 
    15511602        $localestrings['costa rica'] = "cr"; 
    15521603        $localestrings['cote d\'ivoire'] = "ci"; 
    1553         $localestrings['ivory coast'] = "ci"; 
    15541604        $localestrings['country unknown'] = "--"; 
    1555         $localestrings['unknown'] = "--"; 
    15561605        $localestrings['croatia'] = "hr"; 
    15571606        $localestrings['cuba'] = "cu"; 
    15581607        $localestrings['cyprus'] = "cy"; 
    15591608        $localestrings['czech republic'] = "cz"; 
    1560         $localestrings['democratic people\'s republic of korea'] = "kp"; 
     1609        $localestrings['democratic people\'s repub'] = "kp"; 
    15611610        $localestrings['denmark'] = "dk"; 
    15621611        $localestrings['djibouti'] = "dj"; 
     
    15741623        $localestrings['ethiopia'] = "et"; 
    15751624        $localestrings['falkland islands'] = "fk"; 
    1576         $localestrings['malvinas'] = "fk"; 
    15771625        $localestrings['faroe islands'] = "fo"; 
    1578         $localestrings['federated states of micronesia'] = "fm"; 
     1626        $localestrings['federated states of micro'] = "fm"; 
    15791627        $localestrings['fiji'] = "fj"; 
    15801628        $localestrings['finland'] = "fi"; 
     
    15821630        $localestrings['french guiana'] = "gf"; 
    15831631        $localestrings['french Polynesia'] = "pf"; 
    1584         $localestrings['french southern territories'] = "tf"; 
     1632        $localestrings['french southern territori'] = "tf"; 
    15851633        $localestrings['gabon'] = "ga"; 
    15861634        $localestrings['gambia'] = "gm"; 
     
    15891637        $localestrings['ghana'] = "gh"; 
    15901638        $localestrings['gibraltar'] = "gi"; 
     1639        $localestrings['great britain'] = "gb"; 
    15911640        $localestrings['greece'] = "gr"; 
    15921641        $localestrings['greenland'] = "gl"; 
     
    16001649        $localestrings['guyana'] = "gy"; 
    16011650        $localestrings['haiti'] = "ht"; 
    1602         $localestrings['heard island and mcdonald islands'] = "hm"; 
     1651        $localestrings['heard island and mcdonald'] = "hm"; 
     1652        $localestrings['holland'] = "nl"; 
    16031653        $localestrings['holy see'] = "va"; 
    1604         $localestrings['vatican'] = "va"; 
    1605         $localestrings['vatican city'] = "va"; 
    16061654        $localestrings['honduras'] = "hn"; 
    16071655        $localestrings['hong kong'] = "hk"; 
     
    16171665        $localestrings['israel'] = "il"; 
    16181666        $localestrings['italy'] = "it"; 
     1667        $localestrings['ivory coast'] = "ci"; 
    16191668        $localestrings['jamaica'] = "jm"; 
    16201669        $localestrings['japan'] = "jp"; 
     
    16231672        $localestrings['jordania'] = "jo"; 
    16241673        $localestrings['kazakhstan'] = "kz"; 
     1674        $localestrings['keeling islands'] = "cc"; 
    16251675        $localestrings['kenya'] = "ke"; 
    16261676        $localestrings['kiribati'] = "ki"; 
     
    16441694        $localestrings['mali'] = "ml"; 
    16451695        $localestrings['malta'] = "mt"; 
     1696        $localestrings['malvinas'] = "fk"; 
    16461697        $localestrings['marshall islands'] = "mh"; 
    16471698        $localestrings['martinique'] = "mq"; 
     
    16611712        $localestrings['nauru'] = "nr"; 
    16621713        $localestrings['nepal'] = "np"; 
     1714        $localestrings['netherlands'] = "nl"; 
    16631715        $localestrings['netherlands antilles'] = "an"; 
    16641716        $localestrings['new caledonia'] = "nc"; 
     
    16741726        $localestrings['pakistan'] = "pk"; 
    16751727        $localestrings['palau'] = "pw"; 
     1728        $localestrings['palestinian Territories'] = "ps"; 
    16761729        $localestrings['panama'] = "pa"; 
    16771730        $localestrings['papua new guinea'] = "pg"; 
     
    16821735        $localestrings['portugal'] = "pt"; 
    16831736        $localestrings['puerto Rico'] = "pr"; 
    1684         $localestrings['palestinian Territories'] = "ps"; 
    16851737        $localestrings['qatar'] = "qa"; 
    16861738        $localestrings['republic Of korea'] = "kr"; 
     
    16941746        $localestrings['saint lucia'] = "lc"; 
    16951747        $localestrings['saint pierre and miquelon'] = "pm"; 
    1696         $localestrings['saint vincent and the grenadines'] = "vc"; 
     1748        $localestrings['saint vincent and the gre'] = "vc"; 
    16971749        $localestrings['samoa'] = "ws"; 
    16981750        $localestrings['san marino'] = "sm"; 
     
    17251777        $localestrings['tajikistan'] = "tj"; 
    17261778        $localestrings['thailand'] = "th"; 
    1727         $localestrings['the democratic republic of the congo'] = "cd"; 
    1728         $localestrings['congo'] = "cd"; 
     1779        $localestrings['the democratic republic o'] = "cd"; 
    17291780        $localestrings['the netherlands'] = "nl"; 
    1730         $localestrings['netherlands'] = "nl"; 
    1731         $localestrings['holland'] = "nl"; 
    17321781        $localestrings['timor-leste'] = "tl"; 
    17331782        $localestrings['togo'] = "tg"; 
     
    17421791        $localestrings['u.s. virgin islands'] = "vi"; 
    17431792        $localestrings['u.s.a.'] = "us"; 
    1744         $localestrings['united states'] = "us"; 
    1745         $localestrings['america'] = "us"; 
    17461793        $localestrings['uganda'] = "ug"; 
    17471794        $localestrings['ukraine'] = "ua"; 
     
    17491796        $localestrings['united arab emirates'] = "ae"; 
    17501797        $localestrings['united kingdom'] = "gb"; 
    1751         $localestrings['great britain'] = "gb"; 
    1752         $localestrings['united states minor outlying islands'] = "um"; 
     1798        $localestrings['united states'] = "us"; 
     1799        $localestrings['united states minor outly'] = "um"; 
     1800        $localestrings['unknown'] = "--"; 
    17531801        $localestrings['unlisted country'] = "--"; 
    17541802        $localestrings['uruguay'] = "uy"; 
    17551803        $localestrings['uzbekistan'] = "uz"; 
    17561804        $localestrings['vanuatu'] = "vu"; 
     1805        $localestrings['vatican'] = "va"; 
     1806        $localestrings['vatican city'] = "va"; 
    17571807        $localestrings['venezuela'] = "ve"; 
    17581808        $localestrings['viet nam'] = "vn"; 
     
    22662316        $localestrings['460'] = "Sticky Thread."; 
    22672317        $localestrings['461'] = "You are not authorised to view this Forum."; 
     2318        $localestrings['462'] = "For guest users, only the active threads of the last %s are visible. Please consider becoming a member"; 
    22682319        $localestrings['500'] = "View Thread"; 
    22692320        $localestrings['501'] = "Author"; 
     
    23242375        $localestrings['581'] = "Top"; 
    23252376        $localestrings['582'] = "Toggle full code view"; 
    2326         $localestrings['583'] = "download this %s code"; 
     2377        $localestrings['583'] = "download this %scode"; 
    23272378        $localestrings['584'] = "download"; 
    23282379        $localestrings['585'] = "Code:"; 
     
    26282679        $localestrings['027a'] = "All Posts"; 
    26292680        $localestrings['028'] = "New Posts"; 
    2630         $localestrings['029'] = "Latest News"; 
     2681        $localestrings['029'] = "Frontpage News"; 
    26312682        $localestrings['030'] = "Forum"; 
    26322683        $localestrings['031'] = "Thread"; 
     
    26482699        $localestrings['045'] = "Print"; 
    26492700        $localestrings['046'] = "News"; 
    2650         $localestrings['047'] = "No News has been posted yet"; 
     2701        $localestrings['047'] = "There is no frontpage news available"; 
    26512702        $localestrings['048'] = "Edit"; 
    26522703        $localestrings['049'] = "Posted by <b>%s</b> (and visible to you)"; 
     
    27682819        $localestrings['402'] = "User Type"; 
    27692820        $localestrings['403'] = "There are no user names found"; 
    2770         $localestrings['404'] = "Show All"; 
     2821        $localestrings['404'] = "Filter on %s"; 
    27712822        $localestrings['405'] = "Last visit"; 
    27722823        $localestrings['406'] = "Country"; 
     
    27772828        $localestrings['411'] = "%u member"; 
    27782829        $localestrings['412'] = "%u members"; 
     2830        $localestrings['414'] = "Reset filter"; 
    27792831        $localestrings['420'] = "Member Profile"; 
    27802832        $localestrings['422'] = "Statistics"; 
     
    30423094 
    30433095        $localestrings = array(); 
    3044         $localestrings['400'] = "Search"; 
    3045         $localestrings['401'] = "Search for:"; 
    3046         $localestrings['402'] = "Articles"; 
    3047         $localestrings['403'] = "News"; 
    3048         $localestrings['404'] = "Forum Posts"; 
    3049         $localestrings['405'] = "Downloads"; 
    3050         $localestrings['406'] = "Web Links"; 
    3051         $localestrings['407'] = "Members"; 
    3052         $localestrings['408'] = "Search"; 
    3053         $localestrings['409'] = "Search Results"; 
    3054         $localestrings['410'] = "Article"; 
    3055         $localestrings['411'] = "Articles"; 
    3056         $localestrings['412'] = "News item"; 
    3057         $localestrings['413'] = "News items"; 
    3058         $localestrings['414'] = "Forum Post"; 
    3059         $localestrings['415'] = "Forum Posts"; 
    3060         $localestrings['416'] = "Download"; 
    3061         $localestrings['417'] = "Downloads"; 
    3062         $localestrings['418'] = "Web Link"; 
    3063         $localestrings['419'] = "Web Links"; 
    3064         $localestrings['420'] = "Member"; 
    3065         $localestrings['421'] = "Members"; 
    3066         $localestrings['422'] = " items found in"; 
    3067         $localestrings['423'] = " matching your search criteria"; 
    3068         $localestrings['430'] = "Match"; 
    3069         $localestrings['431'] = "Matches"; 
    3070         $localestrings['432'] = " found in "; 
    3071         $localestrings['433'] = "article subject"; 
    3072         $localestrings['434'] = "article text"; 
    3073         $localestrings['435'] = "news subject"; 
    3074         $localestrings['436'] = "news text"; 
    3075         $localestrings['437'] = "extended news text"; 
    3076         $localestrings['438'] = "post subject"; 
    3077         $localestrings['439'] = "post message"; 
    3078         $localestrings['440'] = "article snippet"; 
    3079         $localestrings['450'] = "[NEW]"; 
    3080         $localestrings['451'] = "License:"; 
    3081         $localestrings['452'] = "O/S:"; 
    3082         $localestrings['453'] = "Version:"; 
    3083         $localestrings['454'] = "Date Added:"; 
    3084         $localestrings['455'] = "Downloads:"; 
    3085         $localestrings['456'] = "Visits:"; 
    3086         $localestrings['470'] = "No matches found."; 
    3087         $localestrings['471'] = "Search text must be at least 3 characters long."; 
    3088         $localestrings['472'] = "There is no content available for you to search."; 
    3089         $localestrings['480'] = array(); 
    3090         $localestrings['480']['0'] = array(); 
    3091         $localestrings['480']['0']['0'] = ""; 
    3092         $localestrings['480']['0']['1'] = "This search engine supports complex and boolean searches. You can use:"; 
    3093         $localestrings['480']['1'] = array(); 
    3094         $localestrings['480']['1']['0'] = "+"; 
    3095         $localestrings['480']['1']['1'] = "A leading plus sign indicates that this word must be present in every row returned."; 
    3096         $localestrings['480']['2'] = array(); 
    3097         $localestrings['480']['2']['0'] = "-"; 
    3098         $localestrings['480']['2']['1'] = "A leading minus sign indicates that this word must not be present in any row returned."; 
    3099         $localestrings['480']['3'] = array(); 
    3100         $localestrings['480']['3']['0'] = "&lt; &gt;"; 
    3101         $localestrings['480']['3']['1'] = "These two operators are used to change a word's contribution to the relevance value that is assigned to a row. The &lt; operator decreases the contribution and the &gt; operator increases it."; 
    3102         $localestrings['480']['4'] = array(); 
    3103         $localestrings['480']['4']['0'] = "( )"; 
    3104         $localestrings['480']['4']['1'] = "Parentheses are put round sub-expressions to give them higher precedence in the search."; 
    3105         $localestrings['480']['5'] = array(); 
    3106         $localestrings['480']['5']['0'] = "~"; 
    3107         $localestrings['480']['5']['1'] = "A leading tilde acts as a negation operator, causing the word's contribution to the row relevance to be negative. It's useful for marking noise words. A row that contains such a word will be rated lower than others, but will not be excluded altogether, as it would be with the minus operator."; 
    3108         $localestrings['480']['6'] = array(); 
    3109         $localestrings['480']['6']['0'] = "*"; 
    3110         $localestrings['480']['6']['1'] = "An asterisk is the truncation operator. Unlike the other operators, it is appended to the word, or fragment, not prepended."; 
    3111         $localestrings['480']['7'] = array(); 
    3112         $localestrings['480']['7']['0'] = "\" \""; 
    3113         $localestrings['480']['7']['1'] = "Double quotes at the beginning and end of a phrase, matches only rows that contain the complete phrase, as it was typed."; 
     3096        $localestrings['src400'] = "Search"; 
     3097        $localestrings['src401'] = "Search for:"; 
     3098        $localestrings['src402'] = "Search"; 
     3099        $localestrings['src403'] = "Location:"; 
     3100        $localestrings['src404'] = "Sorting:"; 
     3101        $localestrings['src405'] = array(); 
     3102        $localestrings['src405']['0'] = array(); 
     3103        $localestrings['src405']['0']['0'] = ""; 
     3104        $localestrings['src405']['0']['1'] = "For locations marked <span style='color:red;'>*</span>, this search engine supports complex and boolean searches. You can use:"; 
     3105        $localestrings['src405']['1'] = array(); 
     3106        $localestrings['src405']['1']['0'] = "+"; 
     3107        $localestrings['src405']['1']['1'] = "A leading plus sign indicates that this word must be present in every row returned."; 
     3108        $localestrings['src405']['2'] = array(); 
     3109        $localestrings['src405']['2']['0'] = "-"; 
     3110        $localestrings['src405']['2']['1'] = "A leading minus sign indicates that this word must not be present in any row returned."; 
     3111        $localestrings['src405']['3'] = array(); 
     3112        $localestrings['src405']['3']['0'] = "&lt; &gt;"; 
     3113        $localestrings['src405']['3']['1'] = "These two operators are used to change a word's contribution to the relevance value that is assigned to a row. The &lt; operator decreases the contribution and the &gt; operator increases it."; 
     3114        $localestrings['src405']['4'] = array(); 
     3115        $localestrings['src405']['4']['0'] = "( )"; 
     3116        $localestrings['src405']['4']['1'] = "Parentheses are put round sub-expressions to give them higher precedence in the search."; 
     3117        $localestrings['src405']['5'] = array(); 
     3118        $localestrings['src405']['5']['0'] = "~"; 
     3119        $localestrings['src405']['5']['1'] = "A leading tilde acts as a negation operator, causing the word's contribution to the row relevance to be negative. It's useful for marking noise words. A row that contains such a word will be rated lower than others, but will not be excluded altogether, as it would be with the minus operator."; 
     3120        $localestrings['src405']['6'] = array(); 
     3121        $localestrings['src405']['6']['0'] = "*"; 
     3122        $localestrings['src405']['6']['1'] = "An asterisk is the truncation operator. Unlike the other operators, it is appended to the word, or fragment, not prepended. In other words, can not search for words ending on a fragment."; 
     3123        $localestrings['src405']['7'] = array(); 
     3124        $localestrings['src405']['7']['0'] = "\" \""; 
     3125        $localestrings['src405']['7']['1'] = "Double quotes at the beginning and end of a phrase, matches only rows that contain the complete phrase, as it was typed."; 
     3126        $localestrings['src406'] = "Search Results"; 
     3127        $localestrings['src407'] = "match any"; 
     3128        $localestrings['src408'] = "match all"; 
     3129        $localestrings['src409'] = "There are no locations available for you to search"; 
     3130        $localestrings['src410'] = "all"; 
     3131        $localestrings['src411'] = "last day"; 
     3132        $localestrings['src412'] = "last week"; 
     3133        $localestrings['src413'] = "last two weeks"; 
     3134        $localestrings['src414'] = "last month"; 
     3135        $localestrings['src415'] = "last three months"; 
     3136        $localestrings['src416'] = "last six months"; 
     3137        $localestrings['src417'] = "Search"; 
     3138        $localestrings['src418'] = "Result filters:"; 
     3139        $localestrings['src419'] = "score"; 
     3140        $localestrings['src420'] = "posting date"; 
     3141        $localestrings['src421'] = "subject or title"; 
     3142        $localestrings['src422'] = "author"; 
     3143        $localestrings['src423'] = "descending"; 
     3144        $localestrings['src424'] = "ascending"; 
     3145        $localestrings['src425'] = "Limit to"; 
     3146        $localestrings['src426'] = "rows in the result"; 
     3147        $localestrings['src427'] = "Will be ignored in case of a boolean search"; 
     3148        $localestrings['src428'] = "Boolean search operators"; 
     3149        $localestrings['src429'] = "Your search for"; 
     3150        $localestrings['src430'] = "in"; 
     3151        $localestrings['src431'] = "New Search"; 
     3152        $localestrings['src432'] = "Your search did not return any results."; 
     3153        $localestrings['src433'] = "License:"; 
     3154        $localestrings['src434'] = "OS:"; 
     3155        $localestrings['src435'] = "Version:"; 
     3156        $localestrings['src436'] = "Date:"; 
     3157        $localestrings['src437'] = "Downloads:"; 
     3158        $localestrings['src438'] = "Date Joined:"; 
     3159        $localestrings['src439'] = "Last Login:"; 
     3160        $localestrings['src440'] = "never"; 
     3161        $localestrings['src441'] = "Attachment:"; 
     3162        $localestrings['src442'] = "produced <b>%s</b> results:"; 
     3163        $localestrings['src443'] = "count"; 
     3164        $localestrings['src444'] = "Sort by"; 
     3165        $localestrings['src445'] = "Note that depending on the selected location, not all sort options and result filters are relevant!"; 
     3166        $localestrings['src446'] = "Filter on"; 
     3167        $localestrings['src447'] = "Disable boolean search"; 
     3168        $localestrings['src448'] = "Time limit"; 
     3169        $localestrings['src510'] = "Articles"; 
     3170        $localestrings['src511'] = "News"; 
     3171        $localestrings['src512'] = "Forum posts"; 
     3172        $localestrings['src513'] = "Forum attachments"; 
     3173        $localestrings['src514'] = "Downloads"; 
     3174        $localestrings['src515'] = "Members"; 
    31143175        load_localestrings($localestrings, LP_LOCALE, "main.search", $step); 
    31153176 
    31163177        $localestrings = array(); 
     3178        $localestrings['src400'] = "Search this site"; 
     3179        $localestrings['src401'] = "Search"; 
     3180        $localestrings['src402'] = "Result for your search"; 
     3181        $localestrings['src403'] = "Currently there are no searches defined"; 
     3182        $localestrings['src410'] = "Articles"; 
     3183        $localestrings['src411'] = "News"; 
     3184        $localestrings['src412'] = "Forum posts"; 
     3185        $localestrings['src413'] = "Forum attachments"; 
     3186        $localestrings['src414'] = "Downloads"; 
     3187        $localestrings['src415'] = "Members"; 
     3188        load_localestrings($localestrings, LP_LOCALE, "main.searches", $step); 
     3189 
     3190        $localestrings = array(); 
    31173191        $localestrings['400'] = "Select your default locale"; 
    3118         $localestrings['401'] = "Unable to establish database connection.<br><br>\nPlease ensure you have entered the correct details."; 
    3119         $localestrings['402'] = "Unable to select the database table.<br><br>\nPlease ensure you have entered the correct details."; 
     3192        $localestrings['401'] = "Unable to establish database connection."; 
     3193        $localestrings['402'] = "Unable to select the database table."; 
     3194        $localestrings['403'] = "Unable to run the ExiteCMS Setup"; 
     3195        $localestrings['404'] = "Please consult the setup instructions on our <a href='%s'>support website</a>"; 
     3196        $localestrings['405'] = "The cache directory is not writeable."; 
     3197        $localestrings['406'] = "on how to define the proper file rights."; 
     3198        $localestrings['407'] = "The template cache directory is not writeable"; 
     3199        $localestrings['408'] = "The setup procedure has already run. You can't run the setup twice."; 
     3200        $localestrings['409'] = "on how to reset your installation."; 
    31203201        $localestrings['410'] = "Welcome to ExiteCMS Setup"; 
    31213202        $localestrings['411'] = "Write permissions check passed"; 
     
    31233204        $localestrings['413'] = "Please ensure that your webserver has write<br />access (chmod) on these folders."; 
    31243205        $localestrings['414'] = "Please complete the following form and click 'Next Step'."; 
     3206        $localestrings['415'] = "No rights to create the configuration file."; 
     3207        $localestrings['416'] = "The locales cache directory is not writeable"; 
     3208        $localestrings['417'] = "Database Hostname invalid. Please enter a host name, IP address, or 'localhost'"; 
     3209        $localestrings['418'] = "Database Username invalid. Please enter a valid username"; 
     3210        $localestrings['419'] = "Database Password invalid. Please enter a valid password"; 
    31253211        $localestrings['420'] = "MySQL Database access settings"; 
    31263212        $localestrings['421'] = "Database Hostname:"; 
     
    31303216        $localestrings['425'] = "Table Prefix:"; 
    31313217        $localestrings['426'] = "Next Step >>"; 
     3218        $localestrings['427'] = "Database Name invalid. Please enter a valid name"; 
     3219        $localestrings['428'] = "Table prefix invalid. Please enter a valid prefix"; 
     3220        $localestrings['429'] = "Please check your database hostname, username and password"; 
    31323221        $localestrings['430'] = "Unable to write to config<br>\nPlease check write permissions and restart setup."; 
    31333222        $localestrings['431'] = "Setup was unable to create one or more database tables:<br>%s<br><br>\nPlease restart setup and try again.<br><br>\nIf you are unable to resolve this problem please visit our<br>\nlocal support site at <a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
    31343223&nb