Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- === modified file 'administrator/components/com_cb_search/admin.cb_search.html.php'
- --- administrator/components/com_cb_search/admin.cb_search.html.php 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/admin.cb_search.html.php 2009-03-11 20:50:16 +0000
- @@ -27,7 +27,7 @@
- $update_msg = "";
- } else {
- $update_msg = _CB_AS_MENU_MESSAGE;
- - }
- + }
- $tmpl = & cb_as :: createTemplate();
- $tmpl->setAttribute('body', 'src', 'cb_search.showmenu.tmpl.html');
- @@ -40,37 +40,15 @@
- $tmpl->addVar('body', 'cb_as_sql2', _CB_AS_SQL2 );
- $tmpl->addVar('body', 'cb_as_fields', _CB_AS_FIELDS );
- $tmpl->addVar('body', 'cb_as_update', _CB_AS_UPDATE );
- - $tmpl->addVar('body', 'cb_as_adv_user', _CB_AS_ADV_USER );
- -
- + $tmpl->addVar('body', 'cb_as_adv_user', _CB_AS_ADV_USER );
- +
- $tmpl->addVar('body', 'mosConfig_live_site', $mosConfig_live_site);
- -
- - $trunkpath = "http://www.emptorum.com/update/cbas_version.xml";
- - $localpath = $mosConfig_absolute_path."/administrator/components/com_cb_search/cbas_version.xml";
- -
- - $trunkversion = cb_as :: getXMLElementData("version", $trunkpath);
- - $trunkinfo = cb_as :: getXMLElementData("information", $trunkpath);
- - $trunkdate = cb_as :: getXMLElementData("date", $trunkpath);
- - $localversion = cb_as :: getXMLElementData("version", $localpath);
- -
- - $tmpl->addVar('body', 'localversion', $localversion );
- - $tmpl->addVar('body', 'trunkversion', $trunkversion );
- -
- - if ($trunkversion <> $localversion){
- - $tmpl->addVar('body', 'trunkinfo', $trunkinfo );
- - $tmpl->addVar('body', 'trunkdate', $trunkdate." - " );
- - $updatelink = "<br><a href=\"http://www.emptorum.com/index.php?option=com_docman&task=cat_view&gid=17&Itemid=28\">"._CB_AS_NEWVERSION."</a>";
- - $tmpl->addVar('body', 'update', $updatelink );
- - } else {
- - $tmpl->addVar('body', 'trunkinfo', '' );
- - $tmpl->addVar('body', 'trunkdate', '' );
- - $tmpl->addVar('body', 'update', '' );
- - }
- -
- +
- $tmpl->displayParsedTemplate('form');
- }
- function showconfig($option){
- - global $mosConfig_absolute_path, $mosConfig_live_site, $acl, $database;
- + global $mosConfig_absolute_path, $mosConfig_live_site;
- require ($mosConfig_absolute_path."/administrator/components/com_cb_search/cb_search.config.php");
- //Generate the List for cbsa_hack
- @@ -89,9 +67,15 @@
- $cbsa_list12 = mosHTML :: yesnoRadioList('cbsa_show_title', $cbsa_class, $cbsa_show_title );
- $cbsa_list14 = mosHTML :: yesnoRadioList('cbsa_show_sql_error', $cbsa_class, $cbsa_show_sql_error );
- $cbsa_list15 = mosHTML :: yesnoRadioList('cbsa_deactivate_allowaccess', $cbsa_class, $cbsa_deactivate_allowaccess );
- - $cbsa_list17 = mosHTML :: yesnoRadioList('cbsa_userlist', $cbsa_class, $cbsa_userlist );
- - $cbsa_list19 = mosHTML :: yesnoRadioList('cbsa_ajax_on', $cbsa_class, $cbsa_ajax_on );
- -
- + //Age search -- BEGIN
- + $cbsa_list16 = mosHTML::yesnoRadioList('cbsa_enable_age_search',$cbsa_class,$cbsa_enable_age_search);
- + $cbsa_list17 = mosGetParam($_REQUEST,'cbsa_birthday_fieldname',$cbsa_birthday_fieldname);
- + $cbsa_list18 = mosGetParam($_REQUEST,'cbsa_lower_age_limit',$cbsa_lower_age_limit);
- + $cbsa_list19 = mosGetParam($_REQUEST,'cbsa_upper_age_limit',$cbsa_upper_age_limit);
- + //Age search -- END
- + //Photo only -- BEGIN
- + $cbsa_list20 = mosHTML::yesnoRadioList('cbsa_enable_photo_only_search',$cbsa_class,$cbsa_enable_photo_only_search);
- +
- $searchoperator = mosGetParam( $_REQUEST, 'cbsa_page_nav', $cbsa_page_nav );
- $searchoperators = array();
- @@ -139,75 +123,22 @@
- $log_result = mosGetParam( $_REQUEST, 'cbsa_show_result', $cbsa_show_result );
- $logesult = array();
- -
- +
- $logesult = new stdClass();
- $logesult->value = '0';
- $logesult->text = _CB_AS_SHOW_RESULT_ALL;
- $logesults[] = $logesult;
- -
- +
- $logesult = new stdClass();
- $logesult->value = '1';
- $logesult->text = _CB_AS_SHOW_RESULT_NONE;
- $logesults[] = $logesult;
- - $cbsa_list13= mosHTML::radioList( $logesults, 'cbsa_show_result', '', $cbsa_show_result );
- -
- - $searchphrases = array();
- -
- - $phrase = new stdClass();
- - $phrase->value = 'any';
- - $phrase->text = _SEARCH_ANYWORDS;
- - $searchphrases[] = $phrase;
- -
- - $phrase = new stdClass();
- - $phrase->value = 'all';
- - $phrase->text = _SEARCH_ALLWORDS;
- - $searchphrases[] = $phrase;
- -
- - $phrase = new stdClass();
- - $phrase->value = 'exact';
- - $phrase->text = _SEARCH_PHRASE;
- - $searchphrases[] = $phrase;
- -
- - $cbsa_list18= mosHTML::radioList( $searchphrases, 'cbsa_simple_default', '', $cbsa_simple_default );
- -
- - $ajaximages = array();
- -
- - $ajaximage = new stdClass();
- - $ajaximage->value = 'spinner';
- - $ajaximage->text = _CB_AS_AJAX_IMAGE_SPINNER;
- - $ajaximages[] = $ajaximage;
- -
- - $ajaximage = new stdClass();
- - $ajaximage->value = 'toolbar';
- - $ajaximage->text = _CB_AS_AJAX_IMAGE_Toolbar;
- - $ajaximages[] = $ajaximage;
- -
- - $cbsa_list20= mosHTML::radioList( $ajaximages, 'cbsa_ajax_image', '', $cbsa_ajax_image );
- -
- + $cbsa_list13= mosHTML::radioList( $logesults, 'cbsa_show_result', '', $cbsa_show_result );
- +
- $cbsa_path = $mosConfig_absolute_path."/administrator/components/com_cb_search/cb_search.config.php";
- $cbsa_file_writeable_text = cb_as::green(cb_as::filedir_writeable($cbsa_path)) ? _CB_AS_WRITEABLE : _CB_AS_NOTWRITEABLE;
- -
- - //User types
- - $query = "SELECT group_id AS value, name AS text FROM #__core_acl_aro_groups WHERE name <> 'ROOT' AND name <> 'USERS'";
- - $database->setQuery($query);
- - $usertype = $database->loadObjectList();
- -
- - //Generate the List for cbsa_list16
- - $lookup = preg_split('/,/', $cbsa_usergid);
- - $cbsa_list16 = "<select class=\"inputbox\" size=\"5\" name=\"cbsa_usergid[]\" multiple=\"multiple\">\n";
- - foreach ($usertype as $value) {
- - $menutype = $value->value;
- - $selected = "";
- - foreach ($lookup as $value2) {
- - if ($menutype == $value2) {
- - $selected = "selected";
- - }
- - }
- - $cbsa_list16 .= " <option $selected value=\"".$menutype."\">".$value->text."</option>\n";
- - }
- - $cbsa_list16 .= " </select>\n";
- -
- +
- //we build the template mow
- $tmpl = & cb_as :: createTemplate();
- $tmpl->readTemplatesFromInput('cb_search.config.tmpl.html');
- @@ -221,13 +152,10 @@
- $tmpl->addVar('main', 'cb_as_comparision_help', _CB_AS_COMPARISION_HELP );
- $tmpl->addVar('main', 'cb_as_allow', _CB_AS_ALLOW );
- $tmpl->addVar('main', 'cb_as_allow_help', _CB_AS_ALLOW_HELP );
- - $tmpl->addVar('main', 'cb_as_allow_menu_1', _CB_AS_ALLOW_MENU_1 );
- + $tmpl->addVar('main', 'cb_as_allow_menu_1', _CB_AS_ALLOW_MENU_1 );
- $tmpl->addVar('main', 'cb_as_allow_menu_1_help', _CB_AS_ALLOW_MENU_1_HELP );
- $tmpl->addVar('main', 'cbsa_list4', $cbsa_list4 );
- - $tmpl->addVar('main', 'cb_as_simple_default', _CB_AS_SIMPLE_DEFAULT );
- - $tmpl->addVar('main', 'cb_as_simple_default_help', _CB_AS_SIMPLE_DEFAULT_HELP );
- - $tmpl->addVar('main', 'cbsa_list18', $cbsa_list18 );
- - $tmpl->addVar('main', 'cb_as_allow_menu_2', _CB_AS_ALLOW_MENU_2 );
- + $tmpl->addVar('main', 'cb_as_allow_menu_2', _CB_AS_ALLOW_MENU_2 );
- $tmpl->addVar('main', 'cb_as_allow_menu_2_help', _CB_AS_ALLOW_MENU_2_HELP );
- $tmpl->addVar('main', 'cbsa_list5', $cbsa_list5 );
- $tmpl->addVar('main', 'cb_as_allow_pagnav', _CB_AS_ALLOW_PAGNAV );
- @@ -260,18 +188,26 @@
- $tmpl->addVar('main', 'cb_as_deactivate_allowaccess', _CB_AS_DEACTIVATE_ALLOWACCESS );
- $tmpl->addVar('main', 'cb_as_deactivate_allowaccess_help', _CB_AS_DEACTIVATE_ALLOWACCESS_HELP );
- $tmpl->addVar('main', 'cbsa_list15', $cbsa_list15 );
- - $tmpl->addVar('main', 'cb_as_usertype', _CB_AS_USERTYPE );
- - $tmpl->addVar('main', 'cb_as_usertype_help', _CB_AS_USERTYPE_HELP );
- + //Age Search -- BEGIN
- $tmpl->addVar('main', 'cbsa_list16', $cbsa_list16 );
- - $tmpl->addVar('main', 'cb_as_showlist', _CB_AS_SHOWLIST );
- - $tmpl->addVar('main', 'cb_as_showlist_help', _CB_AS_SHOWLIST_HELP );
- + $tmpl->addVar('main', 'cb_as_enable_age_search',_CB_AS_ENABLE_AGE_SEARCH);
- + $tmpl->addVar('main', 'cb_as_enable_age_search_help',_CB_AS_ENABLE_AGE_SEARCH_HELP);
- $tmpl->addVar('main', 'cbsa_list17', $cbsa_list17 );
- - $tmpl->addVar('main', 'cb_as_ajax_on', _CB_AS_AJAX_ON );
- - $tmpl->addVar('main', 'cb_as_ajax_on_help', _CB_AS_AJAX_ON_HELP );
- + $tmpl->addVar('main', 'cb_as_birthday_fieldname',_CB_AS_BIRTHDAY_FIELDNAME);
- + $tmpl->addVar('main', 'cb_as_birthday_fieldname_help',_CB_AS_BIRTHDAY_FIELDNAME_HELP);
- + $tmpl->addVar('main', 'cbsa_list18', $cbsa_list18 );
- + $tmpl->addVar('main', 'cb_as_lower_age_limit',_CB_AS_LOWER_AGE_LIMIT);
- + $tmpl->addVar('main', 'cb_as_lower_age_limit_help',_CB_AS_LOWER_AGE_LIMIT_HELP);
- $tmpl->addVar('main', 'cbsa_list19', $cbsa_list19 );
- - $tmpl->addVar('main', 'cb_as_ajax_image', _CB_AS_AJAX_IMAGE );
- - $tmpl->addVar('main', 'cb_as_ajax_image_help', _CB_AS_AJAX_IMAGE_HELP );
- + $tmpl->addVar('main', 'cb_as_upper_age_limit',_CB_AS_UPPER_AGE_LIMIT);
- + $tmpl->addVar('main', 'cb_as_upper_age_limit_help',_CB_AS_UPPER_AGE_LIMIT_HELP);
- + //Age Search -- END
- + //Photo only -- BEGIN
- $tmpl->addVar('main', 'cbsa_list20', $cbsa_list20 );
- + $tmpl->addVar('main', 'cb_as_enable_photo_only_search',_CB_AS_ENABLE_PHOTO_ONLY_SEARCH);
- + $tmpl->addVar('main', 'cb_as_enable_photo_only_search_help',_CB_AS_ENABLE_PHOTO_ONLY_SEARCH_HELP);
- + //Photo only -- END
- +
- $tmpl->addVar('main', 'cbsa_list3', $cbsa_list3 );
- $tmpl->addVar('main', 'cb_as_writeable', $cbsa_file_writeable_text );
- === modified file 'administrator/components/com_cb_search/admin.cb_search.php'
- --- administrator/components/com_cb_search/admin.cb_search.php 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/admin.cb_search.php 2009-03-11 20:50:16 +0000
- @@ -18,7 +18,7 @@
- $cid = mosGetParam( $_POST, 'cid', array(0) );
- if (!is_array( $cid )) {
- - $cid = array(0);
- + $cid = array(0);
- }
- require_once ($mainframe->getPath('admin_html'));
- @@ -26,9 +26,9 @@
- // Get the right language if it exists
- if (file_exists($mosConfig_absolute_path.'/administrator/components/com_cb_search/languages/'.$mosConfig_lang.'.php')) {
- - include ($mosConfig_absolute_path.'/administrator/components/com_cb_search/languages/'.$mosConfig_lang.'.php');
- + include ($mosConfig_absolute_path.'/administrator/components/com_cb_search/languages/'.$mosConfig_lang.'.php');
- } else {
- - include ($mosConfig_absolute_path.'/administrator/components/com_cb_search/languages/english.php');
- + include ($mosConfig_absolute_path.'/administrator/components/com_cb_search/languages/english.php');
- }
- //Get the CB language file
- @@ -40,95 +40,95 @@
- switch ($task) {
- - case "config" :
- - showconfig($option);
- - break;
- -
- - case "saveconfig" :
- - saveconfig($option, 1);
- - break;
- -
- - case "update" :
- - update($option);
- - break;
- -
- - case "sql" :
- - sql_list($option, 1);
- - break;
- -
- - case "sql2" :
- - sql_list($option, 2);
- - break;
- -
- - case "published" :
- - published($cid, 1, $option);
- - break;
- - case "unpublished" :
- - published($cid, 0, $option);
- - break;
- -
- - case "fields":
- - fields($option);
- - break;
- -
- - case "save":
- - save($option, $category);
- - break;
- -
- - case "sql_default":
- - sql_default($cid, 1, $option, $category);
- -
- - case "sql_edit1" :
- - edit($id, $option, 1);
- - break;
- -
- - case "sql_edit2" :
- - edit($id, $option, 2);
- - break;
- -
- - case "sql_del" :
- - remove( $cid, $option, $category);
- - break;
- -
- - case "sql_new":
- - edit('0', $option, 1);
- - break;
- -
- - case "sql_new2":
- - edit('0', $option, 2);
- - break;
- -
- - case "sql_cancel":
- - sql_cancel($option, $category);
- - break;
- -
- - case "sql_cancel2":
- - sql_cancel2($option, $category);
- - break;
- -
- - case "searchable":
- - searchable($cid, 1, $option);
- - break;
- -
- - case "unsearchable":
- - searchable($cid, 0, $option);
- - break;
- -
- - case "orderup":
- - order($cid[0],-1,$option);
- - break;
- -
- - case "orderdown":
- - order($cid[0],1,$option);
- - break;
- -
- - case 'saveorder':
- - saveOrder( $cid, $option );
- - break;
- -
- - default :
- - showmenu($option);
- - break;
- + case "config" :
- + showconfig($option);
- + break;
- +
- + case "saveconfig" :
- + saveconfig($option, 1);
- + break;
- +
- + case "update" :
- + update($option);
- + break;
- +
- + case "sql" :
- + sql_list($option, 1);
- + break;
- +
- + case "sql2" :
- + sql_list($option, 2);
- + break;
- +
- + case "published" :
- + published($cid, 1, $option);
- + break;
- + case "unpublished" :
- + published($cid, 0, $option);
- + break;
- +
- + case "fields":
- + fields($option);
- + break;
- +
- + case "save":
- + save($option, $category);
- + break;
- +
- + case "sql_default":
- + sql_default($cid, 1, $option, $category);
- +
- + case "sql_edit1" :
- + edit($id, $option, 1);
- + break;
- +
- + case "sql_edit2" :
- + edit($id, $option, 2);
- + break;
- +
- + case "sql_del" :
- + remove( $cid, $option, $category);
- + break;
- +
- + case "sql_new":
- + edit('0', $option, 1);
- + break;
- +
- + case "sql_new2":
- + edit('0', $option, 2);
- + break;
- +
- + case "sql_cancel":
- + sql_cancel($option, $category);
- + break;
- +
- + case "sql_cancel2":
- + sql_cancel2($option, $category);
- + break;
- +
- + case "searchable":
- + searchable($cid, 1, $option);
- + break;
- +
- + case "unsearchable":
- + searchable($cid, 0, $option);
- + break;
- +
- + case "orderup":
- + order($cid[0],-1,$option);
- + break;
- +
- + case "orderdown":
- + order($cid[0],1,$option);
- + break;
- +
- + case 'saveorder':
- + saveOrder( $cid, $option );
- + break;
- +
- + default :
- + showmenu($option);
- + break;
- }
- /**
- @@ -136,154 +136,164 @@
- *
- */
- function showmenu($option) {
- - HTML_cbas :: showmenu($option);
- + HTML_cbas :: showmenu($option);
- }
- function showconfig($option){
- - HTML_cbas :: showconfig($option);
- + HTML_cbas :: showconfig($option);
- }
- function saveconfig($option, $saveexit) {
- - global $database, $mosConfig_absolute_path;
- -
- - //We check if the default section has been correctly set
- - $check_default = intval(mosGetParam( $_POST, 'cbsa_logical_default', 0));
- - $check_equal = intval(mosGetParam( $_POST, 'cbsa_logical_equal', 0));
- - $check_and = intval(mosGetParam( $_POST, 'cbsa_logical_and', 0));
- - $check_or = intval(mosGetParam( $_POST, 'cbsa_logical_or', 0));
- - $check_not = intval(mosGetParam( $_POST, 'cbsa_logical_not', 0));
- -
- - if ( $check_equal + $check_and + $check_or + $check_not > 0){
- - switch ($check_default){
- - case "0":
- - if ($check_equal==0){
- - $default_error = 1;
- - $default_msg = _CB_AS_DEFAULT_ERROR;
- - }
- - break;
- - case "1":
- - if ($check_and==0){
- - $default_error = 1;
- - $default_msg = _CB_AS_DEFAULT_ERROR;
- - }
- - break;
- - case "2":
- - if ($check_or==0){
- - $default_error = 1;
- - $default_msg = _CB_AS_DEFAULT_ERROR;
- - }
- - break;
- - case "3":
- - if ($check_not==0){
- - $default_error = 1;
- - $default_msg = _CB_AS_DEFAULT_ERROR;
- - }
- - break;
- - }
- -
- - //We check the query worked
- - if ($default_error==1) {
- - echo "<script>alert('".$default_msg."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- - }
- -
- - $row = new cbsaConfig();
- -
- - if (!$row->bind($_POST)) {
- - mosRedirect('index2.php', $row->getError());
- - }
- -
- - $row->cbsa_usergid = implode(',', $row->cbsa_usergid);
- -
- - $config = "<?php \n";
- - $config .= $row->getVarText();
- - $config .= '?>';
- -
- - $fname = $mosConfig_absolute_path.'/administrator/components/com_cb_search/cb_search.config.php';
- -
- - $enable_write = mosGetParam($_POST, 'enable_write', 0);
- - $oldperms = fileperms($fname);
- - if ($enable_write) {
- - @ chmod($fname, $oldperms | 0222);
- - }
- -
- - $msg = $gsg_msg;
- -
- - if (!$gsg_error){
- - if ($fp = fopen($fname, 'w')) {
- - fputs($fp, $config, strlen($config));
- - fclose($fp);
- - if ($enable_write) {
- - @ chmod($fname, $oldperms);
- - } else {
- - if (mosGetParam($_POST, 'disable_write', 0))
- - @ chmod($fname, $oldperms & 0777555);
- - } // if
- + global $database, $mosConfig_absolute_path;
- +
- + //We check if the default section has been correctly set
- + $check_default = intval(mosGetParam( $_POST, 'cbsa_logical_default', 0));
- + $check_equal = intval(mosGetParam( $_POST, 'cbsa_logical_equal', 0));
- + $check_and = intval(mosGetParam( $_POST, 'cbsa_logical_and', 0));
- + $check_or = intval(mosGetParam( $_POST, 'cbsa_logical_or', 0));
- + $check_not = intval(mosGetParam( $_POST, 'cbsa_logical_not', 0));
- + //Age Search -- BEGIN
- + $check_lower_age = intval(mosGetParam( $_POST, 'cbsa_lower_age_limit',0));
- + $check_upper_age = intval(mosGetParam( $_POST, 'cbsa_upper_age_limit',0));
- + //Age Search -- END
- +
- +
- + if ( $check_equal + $check_and + $check_or + $check_not > 0){
- + switch ($check_default){
- + case "0":
- + if ($check_equal==0){
- + $default_error = 1;
- + $default_msg = _CB_AS_DEFAULT_ERROR;
- + }
- + break;
- + case "1":
- + if ($check_and==0){
- + $default_error = 1;
- + $default_msg = _CB_AS_DEFAULT_ERROR;
- + }
- + break;
- + case "2":
- + if ($check_or==0){
- + $default_error = 1;
- + $default_msg = _CB_AS_DEFAULT_ERROR;
- + }
- + break;
- + case "3":
- + if ($check_not==0){
- + $default_error = 1;
- + $default_msg = _CB_AS_DEFAULT_ERROR;
- + }
- + break;
- + }
- +
- + //Age Search -- BEGIN
- + if($check_lower_age >= $check_upper_age) {
- + echo "<script>alert('"._CB_AS_ERR_BAD_INTERVAL."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- + //Age Search -- END
- +
- +
- + //We check the query worked
- + if ($default_error==1) {
- + echo "<script>alert('".$default_msg."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- + }
- +
- + $row = new cbsaConfig();
- + if (!$row->bind($_POST)) {
- + mosRedirect('index2.php', $row->getError());
- + }
- +
- + $config = "<?php \n";
- + $config .= $row->getVarText();
- + $config .= '?>';
- +
- + $fname = $mosConfig_absolute_path.'/administrator/components/com_cb_search/cb_search.config.php';
- +
- + $enable_write = mosGetParam($_POST, 'enable_write', 0);
- + $oldperms = fileperms($fname);
- + if ($enable_write) {
- + @ chmod($fname, $oldperms | 0222);
- + }
- +
- + $msg = $gsg_msg;
- +
- + if (!$gsg_error){
- + if ($fp = fopen($fname, 'w')) {
- + fputs($fp, $config, strlen($config));
- + fclose($fp);
- + if ($enable_write) {
- + @ chmod($fname, $oldperms);
- + } else {
- + if (mosGetParam($_POST, 'disable_write', 0))
- + @ chmod($fname, $oldperms & 0777555);
- + } // if
- - if($saveexit){
- - mosRedirect("index2.php?option=$option&task=config",_CB_AS_CONFIGSAVED);
- - } else {
- - mosRedirect("index2.php?option=$option");
- - }
- -
- - } else {
- - if ($enable_write) {
- - @ chmod($fname, $oldperms);
- - }
- - mosRedirect("index2.php?option=$option&task=config",_CB_AS_CONFIGSAVED);
- - }
- - } else {
- - mosRedirect("index2.php?option=$option&task=config");
- - }
- + if($saveexit){
- + mosRedirect("index2.php?option=$option&task=config",_CB_AS_CONFIGSAVED);
- + } else {
- + mosRedirect("index2.php?option=$option");
- + }
- +
- + } else {
- + if ($enable_write) {
- + @ chmod($fname, $oldperms);
- + }
- + mosRedirect("index2.php?option=$option&task=config",_CB_AS_CONFIGSAVED);
- + }
- + } else {
- + mosRedirect("index2.php?option=$option&task=config");
- + }
- }
- function sql_list($option, $cat){
- - global $database;
- - $query = "SELECT *"."\n FROM #__cb_search WHERE category=$cat";
- -
- - $database->setQuery($query);
- - $rows = $database->loadObjectList();
- -
- - HTML_cbas :: sql_list($option, $rows, $cat);
- + global $database;
- + $query = "SELECT *"."\n FROM #__cb_search WHERE category=$cat";
- +
- + $database->setQuery($query);
- + $rows = $database->loadObjectList();
- +
- + HTML_cbas :: sql_list($option, $rows, $cat);
- }
- function published($cid = null, $published = 1, $option) {
- - global $database, $mosConfig_absolute_path;
- -
- - if (count($cid) < 1) {
- - $action = $published ? _gsg_active_make : _gsg_active_notmake;
- - echo "<script>alert('"._gsg_active_select.$action."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- -
- - mosCache :: cleanCache('com_cb_search');
- -
- - $cids = implode(',', $cid);
- - $query = "UPDATE #__cb_search SET published=$published"."\n WHERE id IN ($cids)";
- -
- - $database->setQuery($query);
- - if (!$database->query()) {
- - echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- -
- - if (count($cid) == 1) {
- - $row = new cbs_table($database);
- - $row->checkin($cid[0]);
- - }
- -
- - mosRedirect('index2.php?task=sql&option='.$option);
- + global $database, $mosConfig_absolute_path;
- +
- + if (count($cid) < 1) {
- + $action = $published ? _gsg_active_make : _gsg_active_notmake;
- + echo "<script>alert('"._gsg_active_select.$action."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- +
- + mosCache :: cleanCache('com_cb_search');
- +
- + $cids = implode(',', $cid);
- + $query = "UPDATE #__cb_search SET published=$published"."\n WHERE id IN ($cids)";
- +
- + $database->setQuery($query);
- + if (!$database->query()) {
- + echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- +
- + if (count($cid) == 1) {
- + $row = new cbs_table($database);
- + $row->checkin($cid[0]);
- + }
- +
- + mosRedirect('index2.php?task=sql&option='.$option);
- }
- function edit($id, $option, $category){
- - global $database;
- - $row = new cbs_table($database);
- - $row->load($id);
- -
- - HTML_cbas :: edit($option, $row, $category);
- + global $database;
- + $row = new cbs_table($database);
- + $row->load($id);
- +
- + HTML_cbas :: edit($option, $row, $category);
- }
- function save($option){
- @@ -301,9 +311,9 @@
- if($default_save==1){
- //We set all entries to Zero
- - $query = "UPDATE #__cb_search as j SET j.default = 0;";
- - $database->setQuery( $query );
- - $database->query();
- + $query = "UPDATE #__cb_search as j SET j.default = 0;";
- + $database->setQuery( $query );
- + $database->query();
- }
- if(!$row->store()){
- @@ -312,9 +322,9 @@
- }
- if ($category==1){
- - $task = "sql";
- - } else {
- - $task = "sql2";
- + $task = "sql";
- + } else {
- + $task = "sql2";
- }
- mosRedirect("index2.php?option=$option&task=$task&category=$category", "Saved");
- @@ -323,113 +333,113 @@
- function fields($option){
- global $database, $mainframe, $mosConfig_list_limit;
- - $query = "SELECT jf.ordering AS ordering, j.fieldid AS jid, jf.id AS id, jf.search AS search, j.name AS name, j.published AS published, j.profile AS profile"
- - . "\n FROM #__comprofiler_fields AS j LEFT JOIN #__cb_search_fields AS jf"
- - . "\n ON j.fieldid = jf.fieldid"
- - . "\n WHERE ((( j.name)<>'NA') AND (( j.published)=1) AND (( j.profile)=1))"
- - . "\n ORDER BY jf.search DESC, jf.ordering;";
- + $query = "SELECT jf.ordering AS ordering, j.fieldid AS jid, jf.id AS id, jf.search AS search, j.name AS name, j.published AS published, j.profile AS profile"
- + . "\n FROM #__comprofiler_fields AS j LEFT JOIN #__cb_search_fields AS jf"
- + . "\n ON j.fieldid = jf.fieldid"
- + . "\n WHERE ((( j.name)<>'NA') AND (( j.published)=1) AND (( j.profile)=1))"
- + . "\n ORDER BY jf.ordering;";
- - $database->setQuery( $query );
- + $database->setQuery( $query );
- $rows = $database->loadObjectList();
- -
- - require_once( $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php' );
- -
- - $total = count($rows);
- - $limit = $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit );
- - $limitstart = $mainframe->getUserStateFromRequest( "viewlimitstart", 'limitstart', 0 );
- - $pageNav = new mosPageNav( $total, $limitstart, $limit );
- +
- + require_once( $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php' );
- +
- + $total = count($rows);
- + $limit = $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit );
- + $limitstart = $mainframe->getUserStateFromRequest( "viewlimitstart", 'limitstart', 0 );
- + $pageNav = new mosPageNav( $total, $limitstart, $limit );
- -
- - HTML_cbas :: fields($option, $rows, $pageNav);
- -
- +
- + HTML_cbas :: fields($option, $rows, $pageNav);
- +
- }
- function sql_cancel($option, $category){
- - mosRedirect('index2.php?task=sql&option='.$option.'&category=$category');
- + mosRedirect('index2.php?task=sql&option='.$option.'&category=$category');
- }
- function sql_cancel2($option, $category){
- - mosRedirect('index2.php?task=sql2&option='.$option.'&category=$category');
- + mosRedirect('index2.php?task=sql2&option='.$option.'&category=$category');
- }
- function sql_default($cid, $default=1, $option, $category){
- - global $database;
- -
- - //we clear all previous values
- - $query = "UPDATE #__cb_search as j SET j.default = 0 WHERE category=$category;";
- - $database->setQuery( $query );
- - $database->query();
- -
- - mosCache :: cleanCache('com_cb_search');
- -
- - $cids = implode(',', $cid);
- - $query = "UPDATE #__cb_search as j SET j.default=$default"."\n WHERE id IN ($cids)";
- -
- - $database->setQuery($query);
- - if (!$database->query()) {
- - echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- -
- - if (count($cid) == 1) {
- - $row = new cbs_table($database);
- - $row->checkin($cid[0]);
- - }
- -
- - mosRedirect('index2.php?task=sql&option='.$option);
- + global $database;
- +
- + //we clear all previous values
- + $query = "UPDATE #__cb_search as j SET j.default = 0 WHERE category=$category;";
- + $database->setQuery( $query );
- + $database->query();
- +
- + mosCache :: cleanCache('com_cb_search');
- +
- + $cids = implode(',', $cid);
- + $query = "UPDATE #__cb_search as j SET j.default=$default"."\n WHERE id IN ($cids)";
- +
- + $database->setQuery($query);
- + if (!$database->query()) {
- + echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- +
- + if (count($cid) == 1) {
- + $row = new cbs_table($database);
- + $row->checkin($cid[0]);
- + }
- +
- + mosRedirect('index2.php?task=sql&option='.$option);
- }
- function remove( $cid, $option, $category){
- - global $database;
- - $cids = implode(',', $cid);
- + global $database;
- + $cids = implode(',', $cid);
- - $query = "SELECT *"
- - . "\n FROM #__cb_search"
- - . "\n WHERE id IN ($cids)"
- - ;
- - $database->setQuery( $query );
- - $cur_defaults = $database->loadObjectList();
- -
- - for ($i = 0, $n = count($cur_defaults); $i < $n; $i ++) {
- - $cur_default = & $cur_defaults[$i];
- - if ($cur_default->default == 1) {
- - echo "<script>alert(\"You can not delete a default Search Criteria.\"); window.history.go(-1); </script>\n";
- - exit();
- - }
- - }
- -
- - $query = "DELETE FROM #__cb_search WHERE id IN ($cids)";
- - $database->setQuery( $query );
- - $database->query();
- -
- - mosRedirect('index2.php?task=sql&option='.$option.'category=$category');
- + $query = "SELECT *"
- + . "\n FROM #__cb_search"
- + . "\n WHERE id IN ($cids)"
- + ;
- + $database->setQuery( $query );
- + $cur_defaults = $database->loadObjectList();
- +
- + for ($i = 0, $n = count($cur_defaults); $i < $n; $i ++) {
- + $cur_default = & $cur_defaults[$i];
- + if ($cur_default->default == 1) {
- + echo "<script>alert(\"You can not delete a default Search Criteria.\"); window.history.go(-1); </script>\n";
- + exit();
- + }
- + }
- +
- + $query = "DELETE FROM #__cb_search WHERE id IN ($cids)";
- + $database->setQuery( $query );
- + $database->query();
- +
- + mosRedirect('index2.php?task=sql&option='.$option.'category=$category');
- }
- function searchable($cid, $searchable=1, $option){
- - global $database, $mosConfig_absolute_path;
- -
- - if (count($cid) < 1) {
- - $action = $published ? _gsg_active_make : _gsg_active_notmake;
- - echo "<script>alert('"._gsg_active_select.$action."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- -
- - mosCache :: cleanCache('com_cb_search');
- -
- - $cids = implode(',', $cid);
- - $query = "UPDATE #__cb_search_fields SET search=$searchable"
- - ."\n WHERE id IN ($cids)";
- + global $database, $mosConfig_absolute_path;
- +
- + if (count($cid) < 1) {
- + $action = $published ? _gsg_active_make : _gsg_active_notmake;
- + echo "<script>alert('"._gsg_active_select.$action."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- +
- + mosCache :: cleanCache('com_cb_search');
- +
- + $cids = implode(',', $cid);
- + $query = "UPDATE #__cb_search_fields SET search=$searchable"
- + ."\n WHERE id IN ($cids)";
- //echo $query;
- - $database->setQuery($query);
- - if (!$database->query()) {
- - echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- + $database->setQuery($query);
- + if (!$database->query()) {
- + echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- - if (count($cid) == 1) {
- - $row = new cbs_fields($database);
- - $row->checkin($cid[0]);
- - }
- + if (count($cid) == 1) {
- + $row = new cbs_fields($database);
- + $row->checkin($cid[0]);
- + }
- mosRedirect("index2.php?option=$option&task=fields", "Changed Searchable Property");
- }
- @@ -441,112 +451,112 @@
- // if fields does not exist in table #__cb_search it will be added - QUERY 1
- // fields exist in table #__cb_search but not any more in the #_comprofiler_fields we will delete the field in #_cb_search - QUERY 2
- - $query_search = "SELECT * FROM `#__comprofiler_fields`AS j"
- - . "\n WHERE ((( j.name)<>'NA') AND (( j.published)=1) AND (( j.profile)=1));";
- - $database->setQuery( $query_search );
- - $searchfields = $database->loadObjectList();
- - $query_search2 = "SELECT * FROM `#__cb_search_fields`";
- - $database->setQuery( $query_search2 );
- - $searchfields2 = $database->loadObjectList();
- - $fieldnameexist=0;
- -
- - //QUERY 1
- - for ($s=0, $n=count( $searchfields ); $s < $n; $s++) {
- - $searchfield =& $searchfields[$s];
- - $fieldnameexist=0;
- - for ($s2=0, $n2=count( $searchfields2 ); $s2 < $n2; $s2++) {
- - $searchfield2 =& $searchfields2[$s2];
- - if ( $searchfield->fieldid == $searchfield2->fieldid){
- - $fieldnameexist=1;
- - }
- - }
- - if ($fieldnameexist==0){
- - $query = "INSERT IGNORE INTO #__cb_search_fields VALUES ('',$searchfield->fieldid, 0,999)";
- - $database->setQuery($query);
- - $fieldnameexist=0;
- - if (!$database->query()) {
- - echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- - }
- - }
- + $query_search = "SELECT * FROM `#__comprofiler_fields`AS j"
- + . "\n WHERE ((( j.name)<>'NA') AND (( j.published)=1) AND (( j.profile)=1));";
- + $database->setQuery( $query_search );
- + $searchfields = $database->loadObjectList();
- + $query_search2 = "SELECT * FROM `#__cb_search_fields`";
- + $database->setQuery( $query_search2 );
- + $searchfields2 = $database->loadObjectList();
- + $fieldnameexist=0;
- +
- + //QUERY 1
- + for ($s=0, $n=count( $searchfields ); $s < $n; $s++) {
- + $searchfield =& $searchfields[$s];
- + $fieldnameexist=0;
- + for ($s2=0, $n2=count( $searchfields2 ); $s2 < $n2; $s2++) {
- + $searchfield2 =& $searchfields2[$s2];
- + if ( $searchfield->fieldid == $searchfield2->fieldid){
- + $fieldnameexist=1;
- + }
- + }
- + if ($fieldnameexist==0){
- + $query = "INSERT IGNORE INTO #__cb_search_fields VALUES ('',$searchfield->fieldid, 0,999)";
- + $database->setQuery($query);
- + $fieldnameexist=0;
- + if (!$database->query()) {
- + echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- + }
- + }
- - $fieldnameexist2=0;
- - //QUERY 2
- - for ($s=0, $n=count( $searchfields2 ); $s < $n; $s++) {
- - $searchfield2 =& $searchfield2s[$s];
- - for ($s2=0, $n2=count( $searchfields ); $s2 < $n2; $s2++) {
- - $searchfield =& $searchfields[$s2];
- - if ( $searchfield2->fieldid == $searchfield->fieldid){
- - $fieldnameexist2=1;
- - }
- - }
- - if ($fieldnameexist2==0){
- - $query = "DELETE FROM #__cb_search_fields WHERE id='$searchfields2->id'";
- - $database->setQuery($query);
- - $fieldnameexist2=0;
- - if (!$database->query()) {
- - echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- - exit;
- - }
- - }
- - }
- -
- - //We will now order the fields
- - $row = new cbs_fields( $database );
- - $row->updateOrder();
- -
- - mosRedirect('index2.php?task=fields&option='.$option,_CB_AS_UPDATELIST );
- + $fieldnameexist2=0;
- + //QUERY 2
- + for ($s=0, $n=count( $searchfields2 ); $s < $n; $s++) {
- + $searchfield2 =& $searchfield2s[$s];
- + for ($s2=0, $n2=count( $searchfields ); $s2 < $n2; $s2++) {
- + $searchfield =& $searchfields[$s2];
- + if ( $searchfield2->fieldid == $searchfield->fieldid){
- + $fieldnameexist2=1;
- + }
- + }
- + if ($fieldnameexist2==0){
- + $query = "DELETE FROM #__cb_search_fields WHERE id='$searchfields2->id'";
- + $database->setQuery($query);
- + $fieldnameexist2=0;
- + if (!$database->query()) {
- + echo "<script>alert('".$database->getErrorMsg()."'); window.history.go(-1);</script>\n";
- + exit;
- + }
- + }
- + }
- +
- + //We will now order the fields
- + $row = new cbs_fields( $database );
- + $row->updateOrder();
- +
- + mosRedirect('index2.php?task=fields&option='.$option,_CB_AS_UPDATELIST );
- }
- function order($uid, $inc, $option){
- - global $database;
- + global $database;
- - $row = new cbs_fields( $database );
- - $row->load($uid);
- -
- - if($inc>0){
- - $order_adj = $inc;
- - } else {
- - $order_adj = $inc * 2;
- - }
- -
- - $neworder = $row->ordering + $order_adj;
- -
- - $row->ordering = $neworder;
- - if (!$row->store()) {
- - echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
- - exit();
- - } // if
- - //$row->move($inc, "id=$row->id");
- - $row->updateOrder('search=1');
- - mosRedirect('index2.php?task=fields&option='.$option);
- + $row = new cbs_fields( $database );
- + $row->load($uid);
- +
- + if($inc>0){
- + $order_adj = $inc;
- + } else {
- + $order_adj = $inc * 2;
- + }
- +
- + $neworder = $row->ordering + $order_adj;
- +
- + $row->ordering = $neworder;
- + if (!$row->store()) {
- + echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
- + exit();
- + } // if
- + //$row->move($inc, "id=$row->id");
- + $row->updateOrder();
- + mosRedirect('index2.php?task=fields&option='.$option);
- }
- function saveOrder( &$cid, $option ) {
- - global $database;
- -
- - $total = count( $cid );
- - $order = mosGetParam( $_POST, 'order', array(0) );
- - $row = new cbs_fields( $database );
- -
- - // update ordering values
- - for( $i=0; $i < $total; $i++ ) {
- - $row->load( $cid[$i] );
- - if ($row->ordering != $order[$i]) {
- - echo $row->id."-".$row->fieldid."-".$row->ordering."-".$order[$i]."<br>";
- - $row->ordering = $order[$i];
- - if (!$row->store()) {
- - echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
- - exit();
- - } // if
- - } // if
- - } // for
- -
- - $row->updateOrder();
- -
- - $msg = 'New ordering saved';
- + global $database;
- +
- + $total = count( $cid );
- + $order = mosGetParam( $_POST, 'order', array(0) );
- + $row = new cbs_fields( $database );
- +
- + // update ordering values
- + for( $i=0; $i < $total; $i++ ) {
- + $row->load( $cid[$i] );
- + if ($row->ordering != $order[$i]) {
- + echo $row->id."-".$row->fieldid."-".$row->ordering."-".$order[$i]."<br>";
- + $row->ordering = $order[$i];
- + if (!$row->store()) {
- + echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
- + exit();
- + } // if
- + } // if
- + } // for
- +
- + $row->updateOrder();
- +
- + $msg = 'New ordering saved';
- - mosRedirect('index2.php?task=fields&option='.$option,$msg);
- -
- -} // saveOrder
- + mosRedirect('index2.php?task=fields&option='.$option,$msg);
- +
- +} // saveOrder
- \ No newline at end of file
- === modified file 'administrator/components/com_cb_search/cb_search.class.php'
- --- administrator/components/com_cb_search/cb_search.class.php 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/cb_search.class.php 2009-03-24 02:13:14 +0000
- @@ -49,19 +49,19 @@
- var $cbsa_show_sql_error = 0;
- /** @var int */
- var $cbsa_deactivate_allowaccess = 0;
- - /** @var varchar(100) */
- - var $cbsa_usergid = '';
- - /** @var int */
- - var $cbsa_userlist = 0;
- - /** @var varchar(100) */
- - var $cbsa_simple_default = 'any';
- - /** @var varchar(100) */
- - var $cbsa_ajax_image = 'spinner';
- - /** @var int */
- - var $cbsa_ajax_on = 0;
- -
- -
- -
- + //Age Search -- BEGIN
- + /** @var int*/
- + var $cbsa_enable_age_search = 0;
- + /** @var int*/
- + var $cbsa_lower_age_limit = 0;
- + /** @var int*/
- + var $cbsa_upper_age_limit = 0;
- + /** @var string*/
- + var $cbsa_birthday_fieldname = '';
- + //Age Search -- END
- + //Photo Only Search -- BEGIN
- + /** @var int*/
- + var $cbsa_enable_photo_only_search = 0;
- /**
- * @return array An array of the public vars in the class
- @@ -266,34 +266,33 @@
- return $oReturn;
- }
- - function getChildGIDS($gid) {
- - // TODO: The problem is that $gid = 0
- - // echo $gid;
- + function getChildGIDS($gid) {
- global $database;
- - $query="SELECT g1.group_id, g1.name"
- + $query="SELECT g1.id, g1.name"
- ."\n FROM #__core_acl_aro_groups g1"
- ."\n LEFT JOIN #__core_acl_aro_groups g2 ON g2.lft >= g1.lft"
- - ."\n WHERE g2.group_id =".$gid
- + ."\n WHERE g2.id =".$gid
- ."\n ORDER BY g1.name";
- $standardlist=array(-2,);
- if( $gid > 0) $standardlist[]=-1;
- $array=array();
- $database->setQuery( $query );
- $array=$database->loadResultArray();
- + if (count($array)==0) $array = array();
- $array=array_merge($array,$standardlist);
- return $array;
- }
- function getParentGIDS($gid) {
- global $database;
- - $query="SELECT g1.group_id, g1.name"
- + $query="SELECT g1.id, g1.name"
- ."\n FROM #__core_acl_aro_groups g1"
- ."\n LEFT JOIN #__core_acl_aro_groups g2 ON g2.lft <= g1.lft"
- - ."\n WHERE g2.group_id =".$gid
- + ."\n WHERE g2.id =".$gid
- ."\n ORDER BY g1.name";
- $array=array();
- $database->setQuery( $query );
- - $array=$database->loadResultArray();
- + $array=$database->loadResultArray();
- return $array;
- }
- @@ -457,7 +456,7 @@
- for ($s=0, $n=count( $customfield ); $s < $n; $s++) {
- $customfields = &$customfield[$s];
- $whattable2 = $customfields->table;
- - }
- + }
- if ( $whattable == "lastvisitDate" && $whattable2 == "#__comprofiler") {
- $whattable2 = "#__users";
- @@ -473,7 +472,7 @@
- case '#__user':
- $table_syn = "u.";
- break;
- - case '#__comprofiler':
- + case '#__comprofiler':
- $table_syn = "ue.";
- break;
- default:
- @@ -525,7 +524,7 @@
- return;
- }
- -
- +
- $col=$row[0]->col1fields;
- $col=explode('|*|',$col);
- $lfields="";
- @@ -750,48 +749,11 @@
- * @param mixed string/array : string: search parameter added as &$prefix.search=... if NOT NULL ; array: each added as $prefix.&key=$val
- * @param string prefix on the &limitstart and &search URL items
- */
- +
- function writePagesLinks($limitstart, $limit, $total,$ue_base_url,$search=null,$prefix="") {
- global $mosConfig_sef;
- $ret="";
- - $searchword = mosGetParam( $_REQUEST, 'searchword', '' );
- - $phrase = mosGetParam( $_REQUEST, 'searchphrase', '' );
- - $task = mosGetParam( $_REQUEST, 'task', '' );
- - $limitstart = mosGetParam( $_REQUEST, 'limitstart', '' );
- -
- - $pattern[0] = "+";
- - $pattern[1] = "%28";
- - $pattern[2] = "%27";
- - $pattern[3] = "%25";
- - $pattern[4] = "%29";
- - $pattern[5] = "%F6";
- - $pattern[6] = "%FC";
- - $pattern[7] = "%E4";
- - $pattern[8] = "%D6";
- - $pattern[9] = "%DC";
- - $pattern[10] = "%C4";
- - $pattern[11] = "%20";
- - $replacement[0] = " ";
- - $replacement[1] = "(";
- - $replacement[2] = "'";
- - $replacement[3] = "%";
- - $replacement[4] = ")";
- - $replacement[5] = "�";
- - $replacement[6] = "�";
- - $replacement[7] = "�";
- - $replacement[8] = "�";
- - $replacement[9] = "�";
- - $replacement[10] = "�";
- - $replacement[11] = " ";
- - $searchword = str_replace($pattern, $replacement, $searchword );
- -
- -/** echo "searcharray: " . $search . "<br>";
- - echo "searchstring: " . $searchword . "<br>";
- - echo "phrase: " . $phrase . "<br>";
- - echo "task: " . $task . "<br>";
- - echo "limitstart: " . $limitstart . "<br>";
- - */
- -
- if ($mosConfig_sef){
- $sefchar = ",";
- $sefchar2 = "";
- @@ -813,7 +775,8 @@
- $limstart_str = "".urlencode($prefix).$sefchar2."limitstart".$sefchar;
- $pages_in_list = 9; // set how many pages you want displayed in the menu (not including first&last, and ev. ... repl by single page number.
- - $displayed_pages = $pages_in_list;
- + $displayed_pages = $pages_in_list;
- + if ($limit =='') $limit = 10; // fix by Tim Black 2-9-2009
- $total_pages = ceil( $total / $limit );
- $this_page = ceil( ($limitstart+1) / $limit );
- // $start_loop = (floor(($this_page-1)/$displayed_pages))*$displayed_pages+1;
- @@ -824,17 +787,15 @@
- $stop_loop = $total_pages;
- }
- - $searchword = urlencode($searchword);
- -
- if ($this_page > 1) {
- $page = ($this_page - 2) * $limit;
- - $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=0&searchword=".$searchword."&searchphrase=".$phrase."&task=".$task)."\" title=\"" . _UE_FIRST_PAGE . "\"><< " . _UE_FIRST_PAGE . "</a>";
- - $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=".$page."&searchword=".$searchword."&searchphrase=".$phrase."&task=".$task)."\" title=\"" . _UE_PREV_PAGE . "\">< " . _UE_PREV_PAGE . "</a>";
- - if ($start_loop > 1) $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=0&searchword=".$searchword."&searchphrase=".$phrase."&task=".$task)."\" title=\"" . _UE_FIRST_PAGE . "\"><strong>1</strong></a>";
- + $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str."0".$search_str)."\" title=\"" . _UE_FIRST_PAGE . "\"><< " . _UE_FIRST_PAGE . "</a>";
- + $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str.$page.$search_str)."\" title=\"" . _UE_PREV_PAGE . "\">< " . _UE_PREV_PAGE . "</a>";
- + if ($start_loop > 1) $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str."0".$search_str)."\" title=\"" . _UE_FIRST_PAGE . "\"><strong>1</strong></a>";
- if ($start_loop > 2) $ret .= "\n<span class=\"pagenav\"> <strong>...</strong> </span>";
- } else {
- - $ret .= '<span class="pagenav"><< '. _UE_FIRST_PAGE .'</span> ';
- - $ret .= '<span class="pagenav">< '. _UE_PREV_PAGE .'</span> ';
- + $ret .= '<span class="pagenav"><< '. _UE_FIRST_PAGE .'</span> ';
- + $ret .= '<span class="pagenav">< '. _UE_PREV_PAGE .'</span> ';
- }
- for ($i=$start_loop; $i <= $stop_loop; $i++) {
- @@ -842,7 +803,7 @@
- if ($i == $this_page) {
- $ret .= "\n <span class=\"pagenav\">[".$i."]</span> ";
- } else {
- - $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=".$page."&searchword=".$searchword."&searchphrase=".$phrase."&task=".$task)."\"><strong>$i</strong></a>";
- + $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str.$page.$search_str)."\"><strong>$i</strong></a>";
- }
- }
- @@ -850,75 +811,38 @@
- $page = $this_page * $limit;
- $end_page = ($total_pages-1) * $limit;
- if ($stop_loop < $total_pages-1) $ret .= "\n<span class=\"pagenav\"> <strong>...</strong> </span>";
- - if ($stop_loop < $total_pages) $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=".$end_page."&searchphrase=".$phrase."&task=".$task)."\" title=\"" . _UE_END_PAGE . "\"><strong>".$total_pages."</strong></a>";
- - $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=".$page."&searchword=".$searchword."&searchphrase=".$phrase."&task=".$task)."\" title=\"" . _UE_NEXT_PAGE . "\">" . _UE_NEXT_PAGE . " ></a>";
- - $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs("index.php?option=com_cb_search&limitstart=".$end_page."&searchword=".$searchword."&searchphrase=".$phrase."&task=".$task)."\" title=\"" . _UE_END_PAGE . "\">" . _UE_END_PAGE . " >></a>";
- + if ($stop_loop < $total_pages) $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str.$end_page.$search_str)."\" title=\"" . _UE_END_PAGE . "\"><strong>".$total_pages."</strong></a>";
- + $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str.$page.$search_str)."\" title=\"" . _UE_NEXT_PAGE . "\">" . _UE_NEXT_PAGE . " ></a>";
- + $ret .= "\n<a class=\"pagenav\" href=\"".sefRelToAbs($ue_base_url.$limstart_str.$end_page.$search_str)."\" title=\"" . _UE_END_PAGE . "\">" . _UE_END_PAGE . " >></a>";
- } else {
- - $ret .= '<span class="pagenav">'. _UE_NEXT_PAGE .' ></span> ';
- - $ret .= '<span class="pagenav">'. _UE_END_PAGE .' >></span>';
- + $ret .= '<span class="pagenav">'. _UE_NEXT_PAGE .' ></span> ';
- + $ret .= '<span class="pagenav">'. _UE_END_PAGE .' >></span>';
- }
- return $ret;
- }
- -
- function correct_search($search_sql){
- $pattern[0] = "+";
- $pattern[1] = "%28";
- $pattern[2] = "%27";
- $pattern[3] = "%25";
- $pattern[4] = "%29";
- - $pattern[5] = "%20";
- + $pattern[5] = "%3C";
- + $pattern[6] = "%3D";
- + $pattern[7] = "%3E";
- +
- $replacement[0] = " ";
- $replacement[1] = "(";
- $replacement[2] = "'";
- $replacement[3] = "%";
- $replacement[4] = ")";
- - $replacement[5] = " ";
- + $replacement[5] = "<";
- + $replacement[6] = "=";
- + $replacement[7] = ">";
- $fieldvalue = str_replace($pattern, $replacement, $search_sql );
- return $fieldvalue;
- }
- -
- -function getfieldtype($name){
- - global $database;
- - $query = "SELECT type FROM #__comprofiler_fields WHERE name='".$name."'";
- - $database->setQuery($query);
- - $type = $database->loadResult();
- - return $type;
- -}
- -
- - /**
- - * Opens up a xml file and looks for the element
- - * @param $ElementName Define what element you want to retrieve from the xml file
- - * @param $Document Define the document, can be http as well!
- - * @return Element Value
- - */
- - function getXMLElementData($ElementName, $Document) {
- - global $mosConfig_absolute_path;
- - require_once ($mosConfig_absolute_path."/includes/domit/xml_domit_include.php");
- -
- - $gsgCollection = & new DOMIT_Document();
- - $gsgCollection->resolveErrors(true);
- - //$gsgCollection->useHTTPClient(true);
- - $success = $gsgCollection->loadXML($Document);
- -
- - if ($success) {
- - if ($gsgCollection->documentElement->hasChildNodes()) {
- - $myChildNodes = & $gsgCollection->documentElement->childNodes;
- - $numChildren = & $gsgCollection->documentElement->childCount;
- -
- - for ($i = 0; $i < $numChildren; $i ++) {
- - $currentNode = & $myChildNodes[$i]->firstChild;
- - $currentNodeName = & $myChildNodes[$i];
- - if ($currentNodeName->nodeName == $ElementName) {
- - return $currentNode->toString(false);
- - }
- -
- - }
- - }
- - }
- - }
- -
- //End of class
- }
- === modified file 'administrator/components/com_cb_search/cb_search.config.php'
- --- administrator/components/com_cb_search/cb_search.config.php 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/cb_search.config.php 2009-03-18 02:58:56 +0000
- @@ -1,22 +1,22 @@
- <?php
- -$cbsa_ajax_image = 'toolbar';
- -$cbsa_ajax_on = '1';
- $cbsa_allow_adv_search = '1';
- $cbsa_allow_search_1 = '1';
- $cbsa_allow_search_2 = '1';
- +$cbsa_birthday_fieldname = 'cb_birthday';
- $cbsa_comparision = '0';
- $cbsa_deactivate_allowaccess = '0';
- +$cbsa_enable_age_search = '1';
- +$cbsa_enable_photo_only_search = '1';
- $cbsa_logical = '0';
- $cbsa_logical_and = '1';
- $cbsa_logical_default = '1';
- $cbsa_logical_equal = '0';
- $cbsa_logical_not = '0';
- $cbsa_logical_or = '0';
- +$cbsa_lower_age_limit = '18';
- $cbsa_page_nav = '2';
- -$cbsa_show_result = '0';
- +$cbsa_show_result = '1';
- $cbsa_show_sql_error = '1';
- -$cbsa_show_title = '0';
- -$cbsa_simple_default = 'any';
- -$cbsa_usergid = '';
- -$cbsa_userlist = '0';
- -?>
- \ No newline at end of file
- +$cbsa_show_title = '1';
- +$cbsa_upper_age_limit = '100';
- +?>
- === modified file 'administrator/components/com_cb_search/cb_search.xml'
- --- administrator/components/com_cb_search/cb_search.xml 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/cb_search.xml 2009-03-11 20:50:16 +0000
- @@ -1,12 +1,12 @@
- <?xml version="1.0" ?>
- <mosinstall type="component">
- <name>cb_search</name>
- - <creationDate>04.10.2006</creationDate>
- + <creationDate>25.08.2006</creationDate>
- <author>Robert Grund</author>
- <copyright>This frontend component is released under the GNU/GPL License</copyright>
- <authorEmail>robertgrund@yahoo.com</authorEmail>
- <authorUrl>www.emptorum.com</authorUrl>
- - <version>2.0.5</version>
- + <version>2.0.4</version>
- <description>Community Builder Advanced Search Component</description>
- <files>
- <filename>index.html</filename>
- @@ -14,15 +14,15 @@
- <filename>cb_search.html.php</filename>
- <filename>images/form-find-animated.gif</filename>
- <filename>images/search.gif</filename>
- - <filename>images/spinner.gif</filename>
- - <filename>images/progressbar.gif</filename>
- - <filename>js/AjaxRequest.js</filename>
- <filename>js/sorttable.js</filename>
- </files>
- <install>
- <queries>
- <query>
- - CREATE TABLE IF NOT EXISTS `#__cb_search` (
- + DROP TABLE IF EXISTS `#__cb_search`;
- + </query>
- + <query>
- + CREATE TABLE `#__cb_search` (
- `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
- `name` VARCHAR( 255 ) NOT NULL ,
- `default` TINYINT( 1 ) NOT NULL ,
- @@ -33,8 +33,11 @@
- PRIMARY KEY ( `id` )
- );
- </query>
- + <query>
- + DROP TABLE IF EXISTS `#__cb_search_fields`;
- + </query>
- <query>
- - CREATE TABLE IF NOT EXISTS `#__cb_search_fields` (
- + CREATE TABLE `#__cb_search_fields` (
- `id` int(11) NOT NULL auto_increment,
- `fieldid` int(11) NOT NULL default '0',
- `search` tinyint(1) NOT NULL default '0',
- @@ -44,18 +47,23 @@
- </query>
- </queries>
- </install>
- + <uninstall>
- + <queries>
- + <query>DROP TABLE IF EXISTS `#__cb_search`;</query>
- + <query>DROP TABLE IF EXISTS `#__cb_search_fields`;</query>
- + </queries>
- + </uninstall>
- <installfile>install.cb_search.php</installfile>
- <uninstallfile>uninstall.cb_search.php</uninstallfile>
- <administration>
- <menu>Community Builder Advanced Search</menu>
- <files>
- <!-- base files -->
- + <filename>index.html</filename>
- <filename>admin.cb_search.php</filename>
- <filename>admin.cb_search.html.php</filename>
- <filename>cb_search.config.php</filename>
- <filename>cb_search.class.php</filename>
- - <filename>cbas_version.xml</filename>
- - <filename>index.html</filename>
- <filename>toolbar.cb_search.html.php</filename>
- <filename>toolbar.cb_search.php</filename>
- <filename>help/cb_search.showmenu.help.html</filename>
- === removed file 'administrator/components/com_cb_search/cbas_version.xml'
- --- administrator/components/com_cb_search/cbas_version.xml 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/cbas_version.xml 1970-01-01 00:00:00 +0000
- @@ -1,5 +0,0 @@
- -<cbasupdate type="versioninfo">
- - <version>2.0.5</version>
- - <information>A new version is available! Please download and reinstall!</information>
- - <date>5.Oct 2006</date>
- -</cbasupdate>
- === modified file 'administrator/components/com_cb_search/install.cb_search.php'
- --- administrator/components/com_cb_search/install.cb_search.php 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/install.cb_search.php 2009-03-11 20:50:16 +0000
- @@ -21,11 +21,11 @@
- </td>
- </tr>
- <tr>
- - <td></td>
- - <td>
- + <td></td>
- + <td>
- <ul>
- <li>
- - This component is a stand alone but needs the Community Builder Component to
- + This component is a stand alone but needs the Community Builder Component to
- run.</li>
- <li>The cb_search.config.php file needs to be writeable. This file is located in
- adminstrator/components/com_cb_search</li>
- @@ -34,110 +34,80 @@
- <p>To add a menu Item, you have to</p>
- <ul>
- <li>
- - You will need to add another sub menu section into your menu. Just add the menu item through the Backend Administration
- + You will need to add another sub menu section into your menu. Just add the menu item through the Backend Administration
- Section.</li>
- <li>You can also use the Community Builder Advances Search Component to display the user
- profile. Just add a menu item as a link and use the following url
- "<b>index.php?option=com_cb_search&task=usersList</b>"</li>
- - <li>NEW - If you have already installed the Advanced Search component, your Itemid in your Main menu has been corrected</li>
- - <li>NEW - An Ajax Search Engine has been implemented - You will need to set up the configuration for the feature</li>
- - <li>NEW - Currently all settings have been deleted and you will need to set the configuration again but at the next upgrade your configuration settings have stayed and you will not need to reset everything!</li>
- </ul>
- - </td>
- + </td>
- </tr>
- <tr>
- <td background="E0E0E0" style="border:1px solid #999;" colspan="2">
- <code>Installation Process:<br />
- <?php
- - //Need to find out if the table #_cb_search is empty
- -
- - $database->setQuery("SELECT COUNT(*) FROM #__cb_search");
- - $components = $database->loadresult();
- - IF($components == 0) {
- - # Add items in the table
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (2, 'Is Null', 0, 1, 'IS NULL', 0, 1);");
- - $iconresult[0] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (6, 'Like', 1, 1, 'Like \'%SEARCHWORD%\'', 0, 1);");
- - $iconresult[1] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (7, 'Is not Null', 0, 1, 'IS NOT NULL', 0, 1);");
- - $iconresult[2] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (8, 'Beginning with', 0, 1, '\'SEARCHWORD%\'', 0, 1);");
- - $iconresult[3] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (9, 'Ending with', 0, 1, '\'%SEARCHWORD\'', 0, 1);");
- - $iconresult[4] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (10, 'Begins with first Letter', 0, 1, '^SEARCHWORD', 0, 1);");
- - $iconresult[5] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (11, 'Equal', 0, 1, '= \'SEARCHWORD\'', 0, 1);");
- - $iconresult[6] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (12, 'Not Equal', 0, 1, '<> \'SEARCHWORD\'', 0, 1);");
- - $iconresult[7] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (13, 'Less than or equal', 0, 1, '<= \'SEARCHWORD\'', 0, 1);");
- - $iconresult[8] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (14, 'Less', 0, 1, '< \'SEARCHWORD\'', 0, 1);");
- - $iconresult[9] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (15, 'Greater than or equal', 0, 1, '>= \'SEARCHWORD\'', 0, 1);");
- - $iconresult[10] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (17, 'AND', 1, 1, 'AND', 0, 2);");
- - $iconresult[11] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (18, 'OR', 0, 1, 'OR', 0, 2);");
- - $iconresult[12] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (19, 'AND (', 0, 1, 'AND (', 0, 2);");
- - $iconresult[13] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (20, 'OR (', 0, 1, 'OR (', 0, 2);");
- - $iconresult[14] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (21, ') AND (', 0, 1, ') AND (', 0, 2);");
- - $iconresult[15] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (22, ') OR (', 0, 1, ') OR (', 0, 2);");
- - $iconresult[16] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (23, ') AND', 0, 1, ') AND', 0, 2);");
- - $iconresult[17] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (24, ') OR', 0, 1, ') OR', 0, 2);");
- - $iconresult[18] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (25, ')', 0, 1, ')', 0, 2);");
- - $iconresult[19] = $database->query();
- - $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (26, '(', 0, 1, '(', 0, 2);");
- - $iconresult[20] = $database->query();
- - foreach ($iconresult as $i=>$icresult) {
- - if ($icresult) {
- - echo "<font color='green'>FINISHED:</font> Loaded record $i .<br />";
- - } else {
- - echo "<font color='red'>ERROR:</font> Could not load the record.<br />";
- - }
- - }
- - }
- -
- - $thefinallink = $mosConfig_live_site."/administrator/index2.php?option=$com_sb_search&task=$update";
- -
- -
- -//If the component is reinstalled, we correct the Itemid in the menusection
- -
- - $query = "SELECT id FROM #__components AS A WHERE A.option = 'com_cb_search'";
- - $database->setQuery($query);
- - $optionid = $database->loadResult();
- -
- -//alter the menu section now with the correct id
- -
- - $query = "UPDATE #__menu SET componentid = '".$optionid."' WHERE link = 'index.php?option=com_cb_search' AND published='1'" ;
- - $database->setQuery($query);
- - if (!$database->query()) {
- - $msgerror = "<font color='red'>ERROR:The component was not preinstalled and the menu item was not altered</font> ";
- - } else {
- - $msgerror = "<font color='green'>The menu link for the Advanced Search Component was updated with the correct Itemid number. No need to re-add the link!!</font> ";
- - }
- - echo $msgerror."<br />";
- + # Add items in the table
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (2, 'Is Null', 0, 1, 'IS NULL', 0, 1);");
- + $iconresult[0] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (6, 'Like', 1, 1, 'Like \'%SEARCHWORD%\'', 0, 1);");
- + $iconresult[1] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (7, 'Is not Null', 0, 1, 'IS NOT NULL', 0, 1);");
- + $iconresult[2] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (8, 'Beginning with', 0, 1, '\'SEARCHWORD%\'', 0, 1);");
- + $iconresult[3] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (9, 'Ending with', 0, 1, '\'%SEARCHWORD\'', 0, 1);");
- + $iconresult[4] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (10, 'Begins with first Letter', 0, 1, '^SEARCHWORD', 0, 1);");
- + $iconresult[5] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (11, 'Equal', 0, 1, '= \'SEARCHWORD\'', 0, 1);");
- + $iconresult[6] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (12, 'Not Equal', 0, 1, '<> \'SEARCHWORD\'', 0, 1);");
- + $iconresult[7] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (13, 'Less than or equal', 0, 1, '<= \'SEARCHWORD\'', 0, 1);");
- + $iconresult[8] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (14, 'Less', 0, 1, '< \'SEARCHWORD\'', 0, 1);");
- + $iconresult[9] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (15, 'Greater than or equal', 0, 1, '>= \'SEARCHWORD\'', 0, 1);");
- + $iconresult[10] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (17, 'AND', 1, 1, 'AND', 0, 2);");
- + $iconresult[11] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (18, 'OR', 0, 1, 'OR', 0, 2);");
- + $iconresult[12] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (19, 'AND (', 0, 1, 'AND (', 0, 2);");
- + $iconresult[13] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (20, 'OR (', 0, 1, 'OR (', 0, 2);");
- + $iconresult[14] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (21, ') AND (', 0, 1, ') AND (', 0, 2);");
- + $iconresult[15] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (22, ') OR (', 0, 1, ') OR (', 0, 2);");
- + $iconresult[16] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (23, ') AND', 0, 1, ') AND', 0, 2);");
- + $iconresult[17] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (24, ') OR', 0, 1, ') OR', 0, 2);");
- + $iconresult[18] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (25, ')', 0, 1, ')', 0, 2);");
- + $iconresult[19] = $database->query();
- + $database->setQuery("INSERT INTO `#__cb_search` (`id`, `name`, `default`, `published`, `sql_code`, `ordering`, `category`) VALUES (26, '(', 0, 1, '(', 0, 2);");
- + $iconresult[20] = $database->query();
- + foreach ($iconresult as $i=>$icresult) {
- + if ($icresult) {
- + echo "<font color='green'>FINISHED:</font> Loaded record $i .<br />";
- + } else {
- + echo "<font color='red'>ERROR:</font> Could not load the record.<br />";
- + }
- + }
- +
- + $thefinallink = $mosConfig_live_site."/administrator/index2.php?option=$com_sb_search&task=$update";
- +
- ?>
- - <font color="green"><b>
- - <?php IF($components == 0) {?>
- - First
- - <?php } ?>
- - Installation finished.</b></font></code>
- + <font color="green"><b>First Installation finished.</b></font></code>
- </td>
- </tr>
- <tr>
- <td width="36"></td>
- <td>
- - To finish the installation you will need to press the Update Icon in the Advanced Search Menu!!!
- + To finish the installation you will need to press the Update Icon in the Advanced Search Menu!!!
- </td>
- </tr>
- === modified file 'administrator/components/com_cb_search/languages/english.php'
- --- administrator/components/com_cb_search/languages/english.php 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/languages/english.php 2009-03-12 01:50:42 +0000
- @@ -10,6 +10,9 @@
- */
- // Header language definitions
- +DEFINE("_SEARCH_ANYWORDS","Search for any words");
- +DEFINE("_SEARCH_ALLWORDS","Search for all words");
- +DEFINE("_SEARCH_PHRASE","Search for phrase");
- DEFINE("_CB_AS_TITLE","Advanced Search");
- DEFINE("_CB_AS_BUTTON","Search");
- DEFINE("_CB_AS_COMP_TITLE","COMMUNITY BUILDER - Advanced Search Component");
- @@ -109,24 +112,24 @@
- DEFINE("_CB_AS_SHOW_ADVANCED","Advanced");
- DEFINE("_CB_AS_SHOW_ADVANCED2","Expert");
- -//Version 2.0.5
- -DEFINE("_CB_AS_USERTYPE","User Type");
- -DEFINE("_CB_AS_USERTYPE_HELP","Define what Users types will be included within the search");
- -DEFINE("_CB_AS_SHOWLIST","Show all User Lists");
- -DEFINE("_CB_AS_SHOWLIST_HELP","Define if you want to show all your Userlist or just the default one");
- -DEFINE("_CB_AS_NEWVERSION","Download new Version!");
- -DEFINE("_CB_AS_SIMPLE_DEFAULT","Simple Menu Default");
- -DEFINE("_CB_AS_SIMPLE_DEFAULT_HELP","Choose which one should be shown as the selected Option");
- -DEFINE("_CB_AS_AJAX_ON","Enable Ajax");
- -DEFINE("_CB_AS_AJAX_ON_HELP","You can turn the Ajax Search Engine On=Yes or Off=No");
- -DEFINE("_CB_AS_AJAX_IMAGE","Ajax Search Image");
- -DEFINE("_CB_AS_AJAX_IMAGE_HELP","Choose which Image you want to show when you have turned the Ajax Search Engine On");
- -DEFINE("_CB_AS_AJAX_IMAGE_SPINNER","Spinner");
- -DEFINE("_CB_AS_AJAX_IMAGE_Toolbar","Toolbar");
- +//Age Search -- BEGIN
- +DEFINE("_CB_AS_AGE","Age");
- +DEFINE("_CB_AS_TOAGE","to");
- +DEFINE("_CB_AS_ENABLE_AGE_SEARCH","Enable age interval search hack");
- +DEFINE("_CB_AS_ENABLE_AGE_SEARCH_HELP","A hack which is made to search age based on certain interval specified");
- +DEFINE("_CB_AS_BIRTHDAY_FIELDNAME","Birthday field name");
- +DEFINE("_CB_AS_BIRTHDAY_FIELDNAME_HELP","The field name of user\\'s birthday used for age interval search");
- +DEFINE("_CB_AS_LOWER_AGE_LIMIT","Lower Age Limit");
- +DEFINE("_CB_AS_LOWER_AGE_LIMIT_HELP","Lower age limit to be displayed in a select list while conducting search");
- +DEFINE("_CB_AS_UPPER_AGE_LIMIT","Upper Age Limit");
- +DEFINE("_CB_AS_UPPER_AGE_LIMIT_HELP","Upper age limit to displayed in a select list while conducting search");
- +DEFINE("_CB_AS_ERR_BAD_INTERVAL","Bad interval for lower and upper age limit");
- +//Age Search -- END
- -// added by Tim Black 6-23-2008
- -DEFINE("_SEARCH_ANYWORDS","Search any words");
- -DEFINE("_SEARCH_ALLWORDS","Search all words");
- -DEFINE("_SEARCH_PHRASE","Search for whole phrase");
- +//Photo only search
- +DEFINE("_CB_AS_EXTRA_FILTER","Extra Filter");
- +DEFINE("_CB_AS_PHOTO_ONLY","Only member with photo");
- +DEFINE("_CB_AS_ENABLE_PHOTO_ONLY_SEARCH","Enable member search with photo only");
- +DEFINE("_CB_AS_ENABLE_PHOTO_ONLY_SEARCH_HELP","If enabled, this will add search capability to return only user with photo");
- ?>
- === modified file 'administrator/components/com_cb_search/tmpl/cb_search.config.tmpl.html'
- --- administrator/components/com_cb_search/tmpl/cb_search.config.tmpl.html 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/tmpl/cb_search.config.tmpl.html 2009-03-11 20:50:16 +0000
- @@ -80,7 +80,16 @@
- <td valign="top" align="left" colspan="3">
- <b><HR></b>
- </td>
- - </tr>
- + </tr>
- + <tr align="center" valign="middle">
- + <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW}:</strong></td>
- + <td align="left" valign="top">
- + {CBSA_LIST3}
- + </td>
- + <td align="left" valign="top">
- + <a href="#" onMouseOver="return overlib('{CB_AS_ALLOW_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- + </td>
- + </tr>
- <tr align="center" valign="middle">
- <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW_MENU_1}:</strong></td>
- <td align="left" valign="top">
- @@ -91,20 +100,6 @@
- </td>
- </tr>
- <tr align="center" valign="middle">
- - <td width="20%" align="left" valign="top"><strong>{CB_AS_SIMPLE_DEFAULT}:</strong></td>
- - <td align="left" valign="top">
- - {CBSA_LIST18}
- - </td>
- - <td align="left" valign="top">
- - <a href="#" onMouseOver="return overlib('{CB_AS_SIMPLE_DEFAULT_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- - </td>
- - </tr>
- - <tr>
- - <td valign="top" align="left" colspan="3">
- - <b><HR></b>
- - </td>
- - </tr>
- - <tr align="center" valign="middle">
- <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW_MENU_2}:</strong></td>
- <td align="left" valign="top">
- {CBSA_LIST5}
- @@ -114,20 +109,6 @@
- </td>
- </tr>
- <tr align="center" valign="middle">
- - <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW}:</strong></td>
- - <td align="left" valign="top">
- - {CBSA_LIST3}
- - </td>
- - <td align="left" valign="top">
- - <a href="#" onMouseOver="return overlib('{CB_AS_ALLOW_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- - </td>
- - </tr>
- - <tr>
- - <td valign="top" align="left" colspan="3">
- - <b><HR></b>
- - </td>
- - </tr>
- - <tr align="center" valign="middle">
- <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW_PAGNAV}:</strong></td>
- <td align="left" valign="top">
- {CBSA_LIST6}
- @@ -149,7 +130,7 @@
- <td valign="top" align="left" colspan="3">
- <b><HR></b>
- </td>
- - </tr>
- + </tr>
- <tr align="center" valign="middle">
- <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW_DEF_EQUAL}:</strong></td>
- <td align="left" valign="top">
- @@ -158,7 +139,7 @@
- <td align="left" valign="top">
- <a href="#" onMouseOver="return overlib('{CB_AS_ALLOW_DEF_EQUAL_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- </td>
- - </tr>
- + </tr>
- <tr align="center" valign="middle">
- <td width="20%" align="left" valign="top"><strong>{CB_AS_ALLOW_DEF_AND}:</strong></td>
- <td align="left" valign="top">
- @@ -185,59 +166,63 @@
- <td align="left" valign="top">
- <a href="#" onMouseOver="return overlib('{CB_AS_ALLOW_DEF_NOT_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- </td>
- - </tr>
- - <tr>
- - <td valign="top" align="left" colspan="3">
- - <b><HR></b>
- - </td>
- - </tr>
- - <tr align="center" valign="middle">
- - <td width="20%" align="left" valign="top"><strong>{CB_AS_USERTYPE}:</strong></td>
- - <td align="left" valign="top">
- - {CBSA_LIST16}
- - </td>
- - <td align="left" valign="top">
- - <a href="#" onMouseOver="return overlib('{CB_AS_USERTYPE_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- - </td>
- - </tr>
- - <tr>
- - <td valign="top" align="left" colspan="3">
- - <b><HR></b>
- - </td>
- - </tr>
- - <tr align="center" valign="middle">
- - <td width="20%" align="left" valign="top"><strong>{CB_AS_SHOWLIST}:</strong></td>
- - <td align="left" valign="top">
- - {CBSA_LIST17}
- - </td>
- - <td align="left" valign="top">
- - <a href="#" onMouseOver="return overlib('{CB_AS_SHOWLIST_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- - </td>
- - </tr>
- - <tr>
- - <td valign="top" align="left" colspan="3">
- - <b><HR></b>
- - </td>
- - </tr>
- - <tr align="center" valign="middle">
- - <td width="20%" align="left" valign="top"><strong>{CB_AS_AJAX_ON}:</strong></td>
- - <td align="left" valign="top">
- - {CBSA_LIST19}
- - </td>
- - <td align="left" valign="top">
- - <a href="#" onMouseOver="return overlib('{CB_AS_AJAX_ON_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- - </td>
- - </tr>
- - <tr align="center" valign="middle">
- - <td width="20%" align="left" valign="top"><strong>{CB_AS_AJAX_IMAGE}:</strong></td>
- - <td align="left" valign="top">
- - {CBSA_LIST20}
- - </td>
- - <td align="left" valign="top">
- - <a href="#" onMouseOver="return overlib('{CB_AS_AJAX_IMAGE_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- - </td>
- - </tr>
- -<!--
- + </tr>
- + <tr>
- + <td valign="top" align="left" colspan="3">
- + <b><hr></b>
- + </td>
- + </tr>
- + <tr align="center" valign="middle">
- + <td width="20%" align="left" valign="top"><strong>{CB_AS_ENABLE_AGE_SEARCH}:</strong></td>
- + <td align="left" valign="top">
- + {CBSA_LIST16}
- + </td>
- + <td align="left" valign="top">
- + <a href="#" onMouseOver="return overlib('{CB_AS_ENABLE_AGE_SEARCH_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- + </td>
- + </tr>
- + <tr align="center" valign="middle">
- + <td width="20%" align="left" valign="top"><strong>{CB_AS_BIRTHDAY_FIELDNAME}:</strong></td>
- + <td align="left" valign="top">
- + <input type="text" name="cbsa_birthday_fieldname" value="{CBSA_LIST17}" maxlength="255">
- + </td>
- + <td align="left" valign="top">
- + <a href="#" onMouseOver="return overlib('{CB_AS_BIRTHDAY_FIELDNAME_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- + </td>
- + </tr>
- + <tr align="center" valign="middle">
- + <td width="20%" align="left" valign="top"><strong>{CB_AS_LOWER_AGE_LIMIT}:</strong></td>
- + <td align="left" valign="top">
- + <input type="text" name="cbsa_lower_age_limit" value="{CBSA_LIST18}" size="4" maxlength="3">
- + </td>
- + <td align="left" valign="top">
- + <a href="#" onMouseOver="return overlib('{CB_AS_LOWER_AGE_LIMIT_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- + </td>
- + </tr>
- + <tr align="center" valign="middle">
- + <td width="20%" align="left" valign="top"><strong>{CB_AS_UPPER_AGE_LIMIT}:</strong></td>
- + <td align="left" valign="top">
- + <input type="text" name="cbsa_upper_age_limit" value="{CBSA_LIST19}" size="4" maxlength="3">
- + </td>
- + <td align="left" valign="top">
- + <a href="#" onMouseOver="return overlib('{CB_AS_UPPER_AGE_LIMIT_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- + </td>
- + </tr>
- + <tr>
- + <td valign="top" align="left" colspan="3">
- + <b><hr></b>
- + </td>
- + </tr>
- + <tr align="center" valign="middle">
- + <td width="20%" align="left" valign="top"><strong>{CB_AS_ENABLE_PHOTO_ONLY_SEARCH}:</strong></td>
- + <td align="left" valign="top">
- + {CBSA_LIST20}
- + </td>
- + <td align="left" valign="top">
- + <a href="#" onMouseOver="return overlib('{CB_AS_ENABLE_PHOTO_ONLY_SEARCH_HELP}', CAPTION, 'Help', ABOVE, RIGHT);" onmouseout="return nd();"><img src="../includes/js/ThemeOffice/tooltip.png" border="0" /></a></td>
- + </td>
- + </tr>
- +<!--
- <tr>
- <td width="100%" valign="top" align="left" colspan="3">
- <b><h1 class="blink">{CB_SA_NA}</b>
- === modified file 'administrator/components/com_cb_search/tmpl/cb_search.showmenu.tmpl.html'
- --- administrator/components/com_cb_search/tmpl/cb_search.showmenu.tmpl.html 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/tmpl/cb_search.showmenu.tmpl.html 2009-03-11 20:50:16 +0000
- @@ -196,15 +196,7 @@
- </td></tr>
- <tr class="thisform">
- <td width="120" bgcolor="#FFFFFF">Installed version:</td>
- - <td bgcolor="#FFFFFF">{LOCALVERSION}</td>
- - </tr>
- - <tr class="thisform">
- - <td width="120" bgcolor="#FFFFFF">Current version:</td>
- - <td bgcolor="#FFFFFF">{TRUNKVERSION}</td>
- - </tr>
- - <tr class="thisform">
- - <td width="120" bgcolor="#FFFFFF">Information:</td>
- - <td bgcolor="#FFFFFF"><font color="#FF0000">{TRUNKDATE}{TRUNKINFO}{UPDATE}</font></td>
- + <td bgcolor="#FFFFFF">2.0.4</td>
- </tr>
- <tr class="thisform">
- <td width="120" bgcolor="#FFFFFF">Team:</td>
- @@ -322,7 +314,7 @@
- <a href="http://www.joomlapolic.com/" target="_blank">Community Builder API</a><br />
- <a href="http://www.dynarch.com/projects/calendar" target="_blank">Calendar</a><br />
- <a href="http://www.bosrup.com/web/overlib/" target="_blank">overLib</a><br />
- - <a href="http://www.ajaxtoolbox.com" target="_blank">AjaxToolbox</a><br />
- +
- </td>
- </tr>
- <tr class="thisform">
- === modified file 'administrator/components/com_cb_search/tmpl/cb_search.simple.tmpl.html'
- --- administrator/components/com_cb_search/tmpl/cb_search.simple.tmpl.html 2008-07-04 21:14:01 +0000
- +++ administrator/components/com_cb_search/tmpl/cb_search.simple.tmpl.html 2009-03-11 20:50:16 +0000
- @@ -4,71 +4,9 @@
- @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
- Joomla is Free Software
- </mos:comment>
- -<mos:tmpl name="header">
- +<mos:tmpl name="header">
- {CALENDAR}
- </mos:tmpl>
- -<mos:tmpl name="ajax">
- -<script type="text/javascript">
- -function SendQuery(key) {
- - if (key.length==0){
- - document.getElementById("autocomplete").innerHTML = '';
- - HideDiv('autocomplete');
- - } else {
- - document.getElementById("autocomplete").innerHTML = ''
- -
- - //need to get the value of the radio button
- - var radios = document.getElementById ('radios');
- - if (radios) {
- - var inputs = radios.getElementsByTagName ('input');
- - if (inputs) {
- - for (var i = 0; i < inputs.length; ++i) {
- - if (inputs[i].type == 'radio' && inputs[i].name == 'searchphrase' && inputs[i].checked)
- - sp=inputs[i].value;
- - }
- - }
- - }
- -
- - //alert('{MOSCONFIG_LIVE_SITE}/index2.php?option=com_cb_search&task=simplesearch&searchword='+key+'&phrase='+sp);
- - ShowDiv("autocomplete");
- - AjaxRequest.get(
- - {
- - 'url':'{MOSCONFIG_LIVE_SITE}/index2.php?option=com_cb_search&task=simplesearch&searchword='+key+'&phrase='+sp
- - ,'onLoading':RequestBegin
- - ,'onComplete':function(req){ document.getElementById("autocomplete").innerHTML = req.responseText; }
- - ,'onError':function(req){ alert('Error!\nStatusText='+req.statusText+'\nContents='+req.responseText);}
- - ,'onSuccess':RequestEnd
- - ,'responseReceived':function(req) { RequestEnd }
- - }
- - );
- - }
- -}
- -
- -function showSpinner(id) {id.style.display = "block";}
- -function hideSpinner(id) {id.style.display = "none";}
- -
- -function RequestBegin() {showSpinner(document.getElementById('spinner'));}
- -function RequestEnd() {hideSpinner(document.getElementById('spinner'));}
- -
- -
- -function ShowDiv(divid)
- -{
- - if (document.layers){
- - document.layers[divid].visibility="show";
- - } else {
- - document.getElementById(divid).style.visibility="visible";
- - }
- -}
- -
- -function HideDiv(divid)
- -{
- - if (document.layers) document.layers[divid].visibility="hide";
- - else document.getElementById(divid).style.visibility="hidden";
- -}
- -</script>
- -<script type="text/javascript" src="{MOSCONFIG_LIVE_SITE}/components/com_cb_search/js/AjaxRequest.js"></script>
- -<script type="text/javascript" src="{MOSCONFIG_LIVE_SITE}/components/com_cb_search/js/sorttable.js"></script>
- -</mos:tmpl>
- -
- <mos:tmpl name="header_1">
- <table>
- <tr>
- @@ -77,45 +15,33 @@
- </table>
- </mos:tmpl>
- <mos:tmpl name="search_1">
- - <table width="100%">
- + <table>
- <tr>
- <td colspan="3" width="100%" class="componentheading">{CB_AS_SEARCH_TITLE_1}</td>
- - </tr>
- + </tr>
- <tr>
- <td valign="top">
- - <form action="{URL}" method="post" id="adminForm2" name="adminForm2">
- + <form action="{URL}" method="post">
- <b>{PROMPT_KEYWORD}:</b>
- </td>
- <td valign="top">
- - <input type="text" name="searchword" id="search_searchword" size="35" value="" class="inputbox" onfocus="this.value = '';" {CALLAJAX} style="WIDTH:200px" autocomplete="off"/>
- - </td>
- - <td valign="middle" align="center">
- + <input type="text" name="searchword" id="search_searchword" size="35" value="" class="inputbox" />
- <input type="image" src="{CB_AS_SEARCH_GIF}" alt="{CB_AS_BUTTON}" align="top" style="border: 0px;" />
- </td>
- + <td>
- + </td>
- </tr>
- <tr>
- - <td colspan="3"><p id="radios">
- + <td colspan="3">
- {LIST}
- - </td></p>
- - </tr>
- - <td colspan="3" valign="middle" align="center">
- -</mos:tmpl>
- -<mos:tmpl name="image_1">
- - <img alt="Spinner" id="spinner" src="{MOSCONFIG_LIVE_SITE}/components/com_cb_search/images/spinner.gif" height="15" width="17" style="display:none;" />
- -</mos:tmpl>
- -<mos:tmpl name="image_2">
- - <img border="0" id="spinner" src="{MOSCONFIG_LIVE_SITE}/components/com_cb_search/images/progressbar.gif" width="280" height="13" style="display:none;" />
- -</mos:tmpl>
- -<mos:tmpl name="search_1b">
- </td>
- </tr>
- <tr>
- <td colspan="3">
- - <input type="hidden" name="id" value="0" />
- - <input type="hidden" name="gid" value="0" />
- - <input type="hidden" name="option" value="{OPTION}" />
- - <input type="hidden" name="task" value="simplesearch" />
- - <div id="autocomplete"></div>
- + <input type="hidden" name="id" value="0" />
- + <input type="hidden" name="gid" value="0" />
- + <input type="hidden" name="option" value="{OPTION}" />
- + <input type="hidden" name="task" value="simplesearch" />
- </form>
- </td>
- </tr>
- @@ -126,7 +52,7 @@
- <table cellpadding="5" cellspacing="0" border="0" width="98%" class="contentpane" id="registrationTable">
- </mos:tmpl>
- <mos:tmpl name="search_2">
- - <table width="100%">
- + <table>
- <form action="{URL}" method="post" id="adminForm" name="adminForm">
- <tr>
- <td colspan="3" width="100%" class="componentheading">{CB_AS_SEARCH_TITLE_2}</td>
- @@ -144,6 +70,22 @@
- <td colspan="{COLSPAN}" class="fieldCell">{FIELD}</td>
- </tr>
- </mos:tmpl>
- +<mos:tmpl name="search_2_ageint">
- + <tr>
- + <td align="right"><b>{TITLE}:</b></td>
- + <td>
- + </td>
- + <td colspan="1" class="fieldCell">{FIELD1} {TO} {FIELD2}</td>
- + </tr>
- +</mos:tmpl>
- +<mos:tmpl name="search_2_photoonly">
- + <tr>
- + <td align="right"><b>{TITLE}:</b></td>
- + <td>
- + </td>
- + <td colspan="1" class="fieldCell"><input type="checkbox" id="photoonly" name="photoonly" value="1"{CHECKED} /><label for="photoonly">{CB_AS_PHOTO_ONLY}</label></td>
- + </tr>
- +</mos:tmpl>
- <mos:tmpl name="search_2_list_footer">
- <tr>
- <td colspan="2">
- @@ -170,6 +112,6 @@
- </td>
- </tr>
- </table>
- -</mos:tmpl>
- +</mos:tmpl>
- <mos:tmpl name="footer">
- </mos:tmpl>
- === modified file 'components/com_cb_search/cb_search.html.php'
- --- components/com_cb_search/cb_search.html.php 2008-07-04 21:14:01 +0000
- +++ components/com_cb_search/cb_search.html.php 2009-03-18 02:58:56 +0000
- @@ -16,27 +16,21 @@
- function simple($option, $rowFields, $rowFieldValues, $regErrorMSG){
- global $mosConfig_absolute_path, $mosConfig_live_site, $Itemid;
- -require ($mosConfig_absolute_path."/administrator/components/com_cb_search/cb_search.config.php");
- +require ($mosConfig_absolute_path."/administrator/components/com_cb_search/cb_search.config.php");
- $Itemid = mosGetParam( $_REQUEST, 'Itemid', '' );
- $option_itemid = "&Itemid=".$Itemid;
- $tmpl = & cb_as :: createTemplate();
- $tmpl->readTemplatesFromInput('cb_search.simple.tmpl.html');
- - $tmpl->addVar('header', 'mosconfig_live_site', $mosConfig_live_site );
- $tmpl->addVar('header', 'calendar', cb_as::cbCalendars(2) );
- //$tmpl->addVar('header', 'index', sefRelToAbs("index.php") );
- $tmpl->displayParsedTemplate('header');
- - //if Ajax is turned on
- - if ($cbsa_ajax_on){
- - $tmpl->addVar('ajax', 'mosconfig_live_site', $mosConfig_live_site );
- - $tmpl->displayParsedTemplate('ajax');
- - }
- -
- if ( $cbsa_show_title ) {
- $tmpl->addVar('header_1', 'cb_as_title', _CB_AS_TITLE );
- $tmpl->displayParsedTemplate('header_1');
- }
- + $searchphrase = mosGetParam( $_REQUEST, 'searchphrase', 'any' );
- $searchphrases = array();
- $phrase = new stdClass();
- @@ -54,8 +48,7 @@
- $phrase->text = _SEARCH_PHRASE;
- $searchphrases[] = $phrase;
- - $lists['searchphrase']= mosHTML::radioList( $searchphrases, 'searchphrase', '', $cbsa_simple_default );
- -
- + $lists['searchphrase']= mosHTML::radioList( $searchphrases, 'searchphrase', '', $searchphrase );
- $image_url = $mosConfig_live_site."/components/com_cb_search/images/search.gif";
- $tabs = new mosTabs(0);
- @@ -64,33 +57,17 @@
- if ( $cbsa_allow_search_1 ){
- $tabs->startTab(_CB_AS_SHOW_SIMPLE,"simple-page");
- $tmpl->addVar('search_1', 'cb_as_search_title_1', _CB_AS_SEARCH_TITLE_1 );
- + $tmpl->addVar('search_1', 'option', $option );
- $tmpl->addVar('search_1', 'url', ampReplace(sefRelToAbs("index.php?option=".$option.$option_itemid)) );
- $tmpl->addVar('search_1', 'cb_as_search_gif', $image_url );
- $tmpl->addVar('search_1', 'cb_as_button', _CB_AS_BUTTON );
- $tmpl->addVar('search_1', 'prompt_keyword', _CB_AS_ALL_FIELDS );
- $tmpl->addVar('search_1', 'list', $lists['searchphrase'] );
- - $tmpl->addVar('search_1', 'mosconfig_live_site', $mosConfig_live_site );
- - if ($cbsa_ajax_on){
- - $tmpl->addVar('search_1', 'callajax', "onKeyUp='SendQuery(this.value)'" );
- - }
- $tmpl->displayParsedTemplate('search_1');
- -
- - if ($cbsa_ajax_on){
- - if ($cbsa_ajax_image=="spinner"){
- - $tmpl->addVar('image_1', 'mosconfig_live_site', $mosConfig_live_site );
- - $tmpl->displayParsedTemplate('image_1');
- - } else {
- - $tmpl->addVar('image_2', 'mosconfig_live_site', $mosConfig_live_site );
- - $tmpl->displayParsedTemplate('image_2');
- - }
- - }
- -
- - $tmpl->addVar('search_1b', 'option', $option );
- - $tmpl->displayParsedTemplate('search_1b');
- $tabs->endTab();
- }
- //$tmpl->displayParsedTemplate('search_1_footer');
- -
- +
- if ( $cbsa_allow_search_2 ){
- $tabs->startTab(_CB_AS_SHOW_ADVANCED,"advanced-page");
- $tmpl->addVar('search_2', 'url', ampReplace(sefRelToAbs("index.php?option=".$option.$option_itemid)) );
- @@ -120,7 +97,7 @@
- } else $oValue = "";
- if(!ISSET($rowFields[$i]->id)) $rowFields[$i]->id="";
- if(!ISSET($rowFieldValues['lst_'.$rowFields[$i]->name])) $rowFieldValues['lst_'.$rowFields[$i]->name]="";
- - if ($rowFields[$i]->type=='multicheckbox' || $rowFields[$i]->type=='multiselect' || $rowFields[$i]->type=='radio' || $rowFields[$i]->type=='checkbox'){
- + if ($rowFields[$i]->type=='multicheckbox' || $rowFields[$i]->type=='multiselect' || $rowFields[$i]->type=='radio'){
- $pfields = "<input readonly type=\"hidden\" name=\"".$rowFields[$i]->name."[]\" value=\"no_check\" checked />";
- }
- $pfields .= cb_as::getFieldEntry(1,$calendars,$rowFields[$i]->type,$rowFields[$i]->name,$rowFields[$i]->description,$rowFields[$i]->title,$oValue,$rowFields[$i]->required,$rowFields[$i]->title,$rowFields[$i]->id,$rowFields[$i]->size, $rowFields[$i]->maxlength, $rowFields[$i]->cols, $rowFields[$i]->rows,$rowFields[$i]->profile,$rowFieldValues['lst_'.$rowFields[$i]->name],$rowFields[$i]->readonly);
- @@ -207,17 +184,51 @@
- $tmpl->displayParsedTemplate('search_2_list');
- $tmpl->clearTemplate('search_2_list');
- }
- +
- + //Age Search -- START
- + if($cbsa_enable_age_search) {
- + $tmpl->addVar('search_2_ageint','title',_CB_AS_AGE);
- + $tmpl->addVar('search_2_ageint','to',_CB_AS_TOAGE);
- + //create the select list
- + $ages = array();
- + $j = $cbsa_lower_age_limit;
- + for($i=0; $j < ($cbsa_upper_age_limit+1); $i++) {
- + $age = new StdClass();
- + $age->value = $j;
- + $age->text = $j;
- + $j++;
- + $ages[] = $age;
- + }
- + $startAge = mosGetParam($_REQUEST,'startage',$cbsa_lower_age_limit);
- + $endAge = mosGetParam($_REQUEST,'endage',$cbsa_upper_age_limit);
- + $selStartAge = mosHTML::selectList($ages,'startage','','value','text',$startAge);
- + $selEndAge = mosHTML::selectList($ages,'endage','','value','text',$endAge);
- + $tmpl->addVar('search_2_ageint','field1',$selStartAge);
- + $tmpl->addVar('search_2_ageint','field2',$selEndAge);
- + $tmpl->displayParsedTemplate('search_2_ageint');
- + }
- + //Age Search -- END
- +
- + //Photo only --START
- + if($cbsa_enable_photo_only_search) {
- + $photoonly = intval(mosGetParam($_REQUEST,'photoonly',0));
- + $cb_sa_photo_only = mosHTML::yesnoRadioList('photoonly','',$photoonly);
- + $tmpl->addVar('search_2_photoonly','title',_CB_AS_EXTRA_FILTER);
- + $tmpl->addVar('search_2_photoonly','cb_as_photo_only',_CB_AS_PHOTO_ONLY);
- + $tmpl->addVar('search_2_photoonly','checked',($photoonly ? ' checked' : ''));
- + $tmpl->displayParsedTemplate('search_2_photoonly');
- + }
- +
- $tmpl->addVar('search_2_list_footer', 'cb_as_search_gif', $image_url );
- $tmpl->addVar('search_2_list_footer', 'option', $option );
- $tmpl->addVar('search_2_list_footer', 'cb_as_button', _CB_AS_BUTTON );
- $tmpl->displayParsedTemplate('search_2_list_footer');
- - $tmpl->displayParsedTemplate('footer');
- $tabs->endTab();
- }
- if($cbsa_allow_adv_search){
- $tabs->startTab(_CB_AS_SHOW_ADVANCED2,"advanced2-page");
- - $cb_sa_adv_url = sefRelToAbs( "index.php?option=com_cb_search&task=advanced&Itemid=$Itemid");
- + $cb_sa_adv_url = sefRelToAbs( "index.php?option=com_cb_search&task=advanced&Itemid=$Itemid");
- $cb_sa_adv_url = ampReplace($cb_sa_adv_url);
- $tmpl->addVar('allow', 'allow_url', $cb_sa_adv_url );
- @@ -339,21 +350,15 @@
- $allusergids=array();
- $usergids=explode(",",$row->usergroupids);
- -$usergids = array_unique($usergids);
- -$cbas_usergids=explode(",",$cbsa_usergid);
- foreach($usergids AS $usergid) {
- - //$allusergids[]=$usergid;
- - foreach($cbas_usergids AS $cbas_usergid){
- - if($usergid=$cbas_usergid){
- - //if ($usergid==29 || $usergid==30) {
- - $groupchildren = array();
- - $groupchildren = $usergid;
- - //$groupchildren = $acl->get_group_children( $usergid, 'ARO','RECURSE' );
- - $allusergids = array_merge($allusergids,$groupchildren);
- - }
- + $allusergids[]=$usergid;
- + if ($usergid==29 || $usergid==30) {
- + $groupchildren = array();
- + $groupchildren = $acl->get_group_children( $usergid, 'ARO','RECURSE' );
- + $allusergids = array_merge($allusergids,$groupchildren);
- }
- }
- -$usergids=implode(",",array_unique($allusergids));
- +$usergids=implode(",",$allusergids);
- // Total
- $database->setQuery("SELECT count(u.id) FROM #__users u, #__comprofiler ue WHERE u.id=ue.id AND u.block !=1 AND ue.approved=1 AND ue.banned=0 AND ue.confirmed=1 AND u.gid IN (".$usergids.")");
- @@ -385,11 +390,11 @@
- $query .= $where;
- $query .= " ".$filterby;
- $query .= " ".$orderby;
- -$query .= " LIMIT $limitstart, $limit";
- +if ($limit) $query .= " LIMIT $limitstart, $limit";
- //echo $query;
- -$cb_sa_base_url = sefRelToAbs("index.php?option=com_cb_search&task=advancedsearch&listid=".$listid.$option_itemid);
- +$cb_sa_base_url = sefRelToAbs("index.php?option=com_cb_search&task=advancedsearch&listid=".$listid.$option_itemid);
- $cb_sa_base_url = ampReplace($cb_sa_base_url);
- $database->setQuery($query);
- @@ -433,38 +438,35 @@
- <td valign="top" class="contentdescription">
- <?php echo _CB_AS_RESULTS_FOUND . ": <b>" . $results_found . "</b> "; ?>
- </td>
- - <?php if ($cbsa_userlist==1){ ?>
- - <form name="adminForm" method="post" action="<?php echo ampReplace(sefRelToAbs($ue_base_url)."&search=".$where);?>" >
- + <form name="adminForm" method="post" action="<?php echo ampReplace(sefRelToAbs($ue_base_url));?>" >
- <td valign = "right"><?php echo $lists['plists']; ?>
- </td>
- </form>
- - <?php } ?>
- - </tr>
- + </tr>
- <?php } else { ?>
- - <tr>
- - <?php if ($cbsa_userlist==1){ ?>
- - <form name="adminForm" method="post" action="<?php echo ampReplace(sefRelToAbs($ue_base_url."&search=".$where));?>" >
- + <tr>
- + <form name="adminForm" method="post" action="<?php echo ampReplace(sefRelToAbs($ue_base_url));?>" >
- <td style="width:100%;text-align:right;"><?php echo $lists['plists']; ?>
- </td>
- </form>
- - <?php } ?>
- - </tr>
- + </tr>
- <?php } ?>
- <tr>
- <td colspan="2">
- - <a href="<?php echo ampReplace(sefRelToAbs("index.php?option=com_cb_search&task=simple&Itemid=$Itemid")); ?>"><?php echo _CB_AS_TITLE; ?></a>
- - </td>
- + <a href="<?php echo ampReplace(sefRelToAbs("index.php?option=com_cb_search&task=simple&Itemid=$Itemid")); ?>"><?php echo _CB_AS_TITLE; ?></a>
- + </td>
- </tr>
- <tr>
- <td colspan="2">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><a href="<?php echo ampReplace(sefRelToAbs($ue_base_url)); ?>" onclick="javascript:adminForm.search.value=''"><?php echo _UE_LIST_ALL; ?></a></td>
- +
- <td align="right"></td>
- </tr>
- </table>
- - <?php
- - if ($cbsa_page_nav == 0 || $cbsa_page_nav == 2){
- + <?php
- + if ($cbsa_page_nav == 0 || $cbsa_page_nav == 2){
- if ($results_found > $limit){ ?>
- <div style="width:100%;text-align:center;"><?php echo cb_as::writePagesLinks($limitstart, $limit, $total, $cb_sa_base_url,$where); ?></div>
- <hr noshade="noshade" size="1" />
- @@ -491,9 +493,9 @@
- } else {
- $class = "sectiontableentry2";
- }
- - //print $user->name;
- + $ueConfig['allow_profilelink']=1; // fix by Tim Black 2-9-2009. This is a hack; the root of the problem is that for some reason $ueConfig isn't in scope. I think the scope issue can't easily be corrected by adding $GLOBALS['ueConfig'] = $ueConfig; to ue_config.php, because that file is re-generated everytime we change CB config settings.
- if($ueConfig['allow_profilelink']==1) {
- - $onclick = "onclick=\"javascript:window.location='".ampReplace(sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".$user->id))."'\"";
- + $onclick = "onclick=\"javascript:window.location='".ampReplace(sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".$user->id))."'\"";
- $style="style=\"cursor:hand;cursor:pointer;\"";
- }
- print "\t<tr class=\"$class\" ".$style." ".$onclick.">\n";
- === modified file 'components/com_cb_search/cb_search.php'
- --- components/com_cb_search/cb_search.php 2008-07-04 21:14:01 +0000
- +++ components/com_cb_search/cb_search.php 2009-04-09 03:24:52 +0000
- @@ -62,7 +62,7 @@
- break;
- case "simplesearch2":
- - simplesearch2($option, $uid, $search_sql);
- + simplesearch2($option, $uid, $search_sql);
- break;
- case "usersList":
- @@ -145,32 +145,7 @@
- $searchword = mosGetParam( $_REQUEST, 'searchword', '' );
- $searchword = $database->getEscaped( trim( $searchword ) );
- $phrase = mosGetParam( $_REQUEST, 'searchphrase', '' );
- - $pattern[0] = "+";
- - $pattern[1] = "%28";
- - $pattern[2] = "%27";
- - $pattern[3] = "%25";
- - $pattern[4] = "%29";
- - $pattern[5] = "%F6";
- - $pattern[6] = "%FC";
- - $pattern[7] = "%E4";
- - $pattern[8] = "%D6";
- - $pattern[9] = "%DC";
- - $pattern[10] = "%C4";
- - $pattern[11] = "%20";
- - $replacement[0] = " ";
- - $replacement[1] = "(";
- - $replacement[2] = "'";
- - $replacement[3] = "%";
- - $replacement[4] = ")";
- - $replacement[5] = "�";
- - $replacement[6] = "�";
- - $replacement[7] = "�";
- - $replacement[8] = "�";
- - $replacement[9] = "�";
- - $replacement[10] = "�";
- - $replacement[11] = " ";
- - $searchword = str_replace($pattern, $replacement, $searchword );
- -
- +
- $check_count = strlen($searchword);
- $where = " AND (";
- @@ -179,23 +154,16 @@
- case 'exact':
- $wheres2 = array();
- //We get the custom fields
- - $query_custom = "SELECT f.* FROM #__comprofiler_fields AS f INNER JOIN #__cb_search_fields AS s ON f.fieldid = s.fieldid"
- - . "\n WHERE (((f.published)=1) AND ((f.profile)=1) AND ((f.name)<>'NA') AND ((s.search)=1))"
- - . "\n ORDER BY f.ordering";
- + $query_custom = "SELECT f.* FROM #__comprofiler_fields f"
- + . "\n WHERE f.published=1 AND f.profile = 1 AND f.name<>'NA'"
- + . "\n ORDER BY f.ordering";
- $database->setQuery( $query_custom );
- $customfield = $database->loadObjectList();
- for ($s=0, $n=count( $customfield ); $s < $n; $s++) {
- $customfields = &$customfield[$s];
- - if (cb_as::getfieldtype($customfields->name)==="multicheckbox" || cb_as::getfieldtype($customfields->name)==="multiselect"){
- - $jocker = "";
- - $jockerend = "%";
- - } else {
- - $jocker = "%";
- - $jockerend = "%";
- - }
- - $wheres2[] = " LOWER(".cb_as::gettable($customfields->name).$customfields->name.") LIKE '".$jocker.$searchword.$jockerend."'";
- -
- + $wheres2[] = " LOWER(".cb_as::gettable($customfields->name).$customfields->name.") LIKE '%$searchword%'";
- +
- }
- $where .= '(' . implode( ') OR (', $wheres2 ) . '))';
- @@ -209,22 +177,14 @@
- foreach ($words as $word) {
- $wheres2 = array();
- //We get the custom fields
- - $query_custom = "SELECT f.* FROM #__comprofiler_fields AS f INNER JOIN #__cb_search_fields AS s ON f.fieldid = s.fieldid"
- - . "\n WHERE (((f.published)=1) AND ((f.profile)=1) AND ((f.name)<>'NA') AND ((s.search)=1))"
- - . "\n ORDER BY f.ordering";
- -
- + $query_custom = "SELECT f.* FROM #__comprofiler_fields f"
- + . "\n WHERE f.published=1 AND f.profile = 1 AND f.name<>'NA'"
- + . "\n ORDER BY f.ordering";
- $database->setQuery( $query_custom );
- $customfield = $database->loadObjectList();
- for ($s=0, $n=count( $customfield ); $s < $n; $s++) {
- $customfields = &$customfield[$s];
- - if (cb_as::getfieldtype($customfields->name)==="multicheckbox" || cb_as::getfieldtype($customfields->name)==="multiselect"){
- - $jocker = "";
- - $jockerend = "%";
- - } else {
- - $jocker = "%";
- - $jockerend = "%";
- - }
- - $wheres2[] = "LOWER(".cb_as::gettable($customfields->name).$customfields->name.") LIKE '".$jocker.$word.$jockerend."'";
- + $wheres2[] = "LOWER(".cb_as::gettable($customfields->name).$customfields->name.") LIKE '%$word%'";
- }
- @@ -309,7 +269,7 @@
- $lfields .= "</td>\n";
- if($row[0]->col2enabled) {
- $col=$row[0]->col2fields;
- - $col=explode('|*|',$col);
- + $col=explode('|*|',$col);
- for ($i=0, $n=count( $col ); $i < $n; $i++) {
- if($i==0) $lfields .= "<td valign='top'>\n";
- else $lfields .= "<br/>\n";
- @@ -504,15 +464,15 @@
- function simplesearch2($option, $uid, $search_sql){
- - global $database,$my,$ueConfig,$_POST,$_REQUEST, $mosConfig_absolute_path;
- + global $database,$my,$ueConfig,$_POST,$_REQUEST, $mosConfig_absolute_path;
- - //We load the CB Saech Config variables
- + //We load the CB Search Config variables
- require_once ($mosConfig_absolute_path."/administrator/components/com_cb_search/cb_search.config.php");
- $where = " AND (";
- //Generate the advanced search criteria
- -
- +
- if(strlen($search_sql)>0) {
- $query2 = " ".$search_sql;
- $pattern[0] = "\'%";
- @@ -536,7 +496,22 @@
- $logical_operator = "";
- $comparision_operator = "";
- $jocker = "";
- -
- +
- +//Age Seach -- BEGIN
- +if($sbsa_enable_age_search) {
- + $custom_where = array('startdate' => '','enddate' => '');
- + $now = time();
- +
- + //modify the reversed startage and endage
- + if($_POST['startage'] > $_POST['endage']) {
- + $temp = $_POST['startage'];
- + $_POST['startage'] = $_POST['endage'];
- + $_POST['endage'] = $temp;
- + }
- +}
- +//Age Search -- END
- +
- +
- $form_fields = array_keys($_POST);
- //echo sizeof($form_fields)."<br>";
- @@ -547,10 +522,38 @@
- $thisField = $form_fields[$i];
- $thisValue = mosGetParam( $_REQUEST, $thisField, '' );
- + //Age Search -- BEGIN
- + if($thisField == 'startage' && $cbsa_enable_age_search) {
- + $start_time = strtotime("-$thisValue year");
- + //$start_date = date('Y-m-d',$now - $start_time);
- + $start_date = date('Y-m-d',$start_time);
- + $custom_where['enddate'] = $start_date;
- + $fieldcount = 0;
- + }
- + elseif ($thisField == 'endage' && $cbsa_enable_age_search) {
- + $addValue = $thisValue + 1;
- + $end_time = strtotime("-$addValue year");
- + //$end_date = date('Y-m-d',$now - $end_time);
- + $end_date = date('Y-m-d',$end_time);
- + $custom_where['startdate'] = $end_date;
- + $fieldcount = 0;
- + }
- + //Age Search -- END
- + //Photo only --BEGIN
- + elseif ($thisField == 'photoonly' && $cbsa_enable_photo_only_search) {
- + if($thisValue) {
- + $custom_where['avatar'] = true;
- + $fieldcount = 0;
- + }
- + }
- + //Photo only -- END
- + else {
- +
- +
- //echo "thisField:".$thisField." - thisValue:".$thisValue."<br>";
- //Define Logical Operator
- -
- +
- $pos = strpos($thisField, "searchoperator");
- if ($pos === 0 ){
- @@ -570,13 +573,9 @@
- }
- if ($fieldcount ==2){
- - //We first check if there is a value to search logical operator
- + //We first check the if there is a value to search logical operator
- if (is_array($thisValue)){
- for ($j = 0; $j < sizeof($thisValue); $j++) {
- - if (cb_as::getfieldtype($thisField)==="multicheckbox" || cb_as::getfieldtype($thisField)==="multiselect"){
- - $jocker = "";
- - }
- -
- if ( strlen($thisValue[$j])>0 && $thisValue[$j] != "no_check" ){
- $fieldvalue = "'".$jocker.$thisValue[$j].$jocker."'";
- $pattern[0] = "\'%";
- @@ -597,13 +596,10 @@
- }
- } else {
- if (strlen($thisValue)>0 ){
- - if (cb_as::getfieldtype($thisField)==="multicheckbox" || cb_as::getfieldtype($thisField)==="multiselect"){
- - $jocker = "";
- - }
- - $fieldvalue = "'".$jocker.$thisValue.$jocker."'";
- - $pattern[0] = "\'%";
- + $fieldvalue = "'".$jocker.$thisValue.$jocker."'";
- + $pattern[0] = "\'%";
- $pattern[1] = "%\'";
- - $pattern[2] = "\'";
- + $pattern[2] = "\'";
- $replacement[0] = "'%";
- $replacement[1] = "%'";
- $replacement[2] = "'";
- @@ -618,13 +614,29 @@
- }
- }
- - $fieldcount=0;
- - }
- + $fieldcount=0;
- + }
- + //Age Search -- BEGIN
- + }
- + //Age Search -- END
- //echo $i.":".$fieldcount.". FieldName: ".$thisField." - FieldValue: ".$fieldvalue."<br>";
- }
- }
- //echo $query2;
- +
- + //Age Search -- BEGIN
- + if($cbsa_enable_age_search) {
- + //now add custom date to query2
- + $query_extra = " AND $cbsa_birthday_fieldname >= '".$custom_where['startdate']."' AND $cbsa_birthday_fieldname < '".$custom_where['enddate']."' ";
- + }
- + //Age Search -- END
- +
- + //Photo Search -- BEGIN
- + if($cbsa_enable_photo_only_search && $custom_where['avatar']) {
- + $query_extra .= " AND avatar IS NOT null AND avatar NOT LIKE '%nophoto.jpg'";
- + }
- +
- //we check to see if $query2 is empty
- @@ -642,14 +654,19 @@
- $add_beg = $where;
- $add_end = " )";
- }
- -
- +
- $query2 = $add_beg.$query2.$add_end;
- + //Age Search & Avatar Only -- BEGIN
- + if($cbsa_enable_age_search || $cbsa_enable_photo_only_search) {
- + $query2 .= $query_extra;
- + }
- + //Age Search -- END
- $CB_Access = "";
- if (!$cbsa_deactivate_allowaccess){
- $CB_Access = " AND useraccessgroupid IN (".implode(',',cb_as::getChildGIDS(cb_as::userGID($uid)))." )";
- }
- -
- +
- $database->setQuery("SELECT listid, title FROM #__comprofiler_lists WHERE published=1 ".$CB_Access." ORDER BY ordering");
- $plists = $database->loadObjectList();
- //print $database->getQuery();
- @@ -765,10 +782,14 @@
- }
- $lfields .= "</td>\n";
- }
- - $row=$row[0];
- -
- - HTML_advancedsearch::usersList($row,$lfields,$lists,$listid, $search_sql, $query2, 0 );
- -
- + $row=$row[0];
- + // Fix by Tim Black 4-8-2009
- + // This is only a quick hack because I couldn't find the right location above to make a more correct change.
- + if ($_POST['cb_gender']=="Male"){
- + $query2 = str_replace("cb_gender LIKE '%Male%'","cb_gender='Male'",$query2);
- + }
- + // end fix
- + HTML_advancedsearch::usersList($row,$lfields,$lists,$listid, $search_sql, $query2, 0 );
- }
- function advanced($option, $regErrorMSG=null){
- @@ -833,7 +854,7 @@
- function advancedsearch($option,$uid, $search_sql){
- global $database,$my,$ueConfig,$_POST,$_REQUEST, $mosConfig_absolute_path;
- - //We load the CB Saech Config variables
- + //We load the CB Search Config variables
- require_once ($mosConfig_absolute_path."/administrator/components/com_cb_search/cb_search.config.php");
- //Generate the advanced search criteria
- === removed file 'components/com_cb_search/images/progressbar.gif'
- Binary files components/com_cb_search/images/progressbar.gif 2008-07-04 21:14:01 +0000 and components/com_cb_search/images/progressbar.gif 1970-01-01 00:00:00 +0000 differ
- === removed file 'components/com_cb_search/images/spinner.gif'
- Binary files components/com_cb_search/images/spinner.gif 2008-07-04 21:14:01 +0000 and components/com_cb_search/images/spinner.gif 1970-01-01 00:00:00 +0000 differ
- === removed file 'components/com_cb_search/js/AjaxRequest.js'
- --- components/com_cb_search/js/AjaxRequest.js 2008-07-04 21:14:01 +0000
- +++ components/com_cb_search/js/AjaxRequest.js 1970-01-01 00:00:00 +0000
- @@ -1,559 +0,0 @@
- -// ===================================================================
- -// Author: Matt Kruse <matt@ajaxtoolbox.com>
- -// WWW: http://www.AjaxToolbox.com/
- -//
- -// NOTICE: You may use this code for any purpose, commercial or
- -// private, without any further permission from the author. You may
- -// remove this notice from your final code if you wish, however it is
- -// appreciated by the author if at least my web site address is kept.
- -//
- -// You may *NOT* re-distribute this code in any way except through its
- -// use. That means, you can include it in your product, or your web
- -// site, or any other form where the code is actually being used. You
- -// may not put the plain javascript up on your site for download or
- -// include it in your javascript libraries for download.
- -// If you wish to share this code with others, please just point them
- -// to the URL instead.
- -// Please DO NOT link directly to my .js files from your site. Copy
- -// the files to your server and use them there. Thank you.
- -// ===================================================================
- -
- -/**
- - * The AjaxRequest class is a wrapper for the XMLHttpRequest objects which
- - * are available in most modern browsers. It simplifies the interfaces for
- - * making Ajax requests, adds commonly-used convenience methods, and makes
- - * the process of handling state changes more intuitive.
- - * An object may be instantiated and used, or the Class methods may be used
- - * which internally create an AjaxRequest object.
- - */
- -function AjaxRequest() {
- - var req = new Object();
- -
- - // -------------------
- - // Instance properties
- - // -------------------
- -
- - /**
- - * Timeout period (in ms) until an async request will be aborted, and
- - * the onTimeout function will be called
- - */
- - req.timeout = null;
- -
- - /**
- - * Since some browsers cache GET requests via XMLHttpRequest, an
- - * additional parameter called AjaxRequestUniqueId will be added to
- - * the request URI with a unique numeric value appended so that the requested
- - * URL will not be cached.
- - */
- - req.generateUniqueUrl = true;
- -
- - /**
- - * The url that the request will be made to, which defaults to the current
- - * url of the window
- - */
- - req.url = window.location.href;
- -
- - /**
- - * The method of the request, either GET (default), POST, or HEAD
- - */
- - req.method = "GET";
- -
- - /**
- - * Whether or not the request will be asynchronous. In general, synchronous
- - * requests should not be used so this should rarely be changed from true
- - */
- - req.async = true;
- -
- - /**
- - * The username used to access the URL
- - */
- - req.username = null;
- -
- - /**
- - * The password used to access the URL
- - */
- - req.password = null;
- -
- - /**
- - * The parameters is an object holding name/value pairs which will be
- - * added to the url for a GET request or the request content for a POST request
- - */
- - req.parameters = new Object();
- -
- - /**
- - * The sequential index number of this request, updated internally
- - */
- - req.requestIndex = AjaxRequest.numAjaxRequests++;
- -
- - /**
- - * Indicates whether a response has been received yet from the server
- - */
- - req.responseReceived = false;
- -
- - /**
- - * The name of the group that this request belongs to, for activity
- - * monitoring purposes
- - */
- - req.groupName = null;
- -
- - /**
- - * The query string to be added to the end of a GET request, in proper
- - * URIEncoded format
- - */
- - req.queryString = "";
- -
- - /**
- - * After a response has been received, this will hold the text contents of
- - * the response - even in case of error
- - */
- - req.responseText = null;
- -
- - /**
- - * After a response has been received, this will hold the XML content
- - */
- - req.responseXML = null;
- -
- - /**
- - * After a response has been received, this will hold the status code of
- - * the response as returned by the server.
- - */
- - req.status = null;
- -
- - /**
- - * After a response has been received, this will hold the text description
- - * of the response code
- - */
- - req.statusText = null;
- -
- - /**
- - * An internal flag to indicate whether the request has been aborted
- - */
- - req.aborted = false;
- -
- - /**
- - * The XMLHttpRequest object used internally
- - */
- - req.xmlHttpRequest = null;
- -
- - // --------------
- - // Event handlers
- - // --------------
- -
- - /**
- - * If a timeout period is set, and it is reached before a response is
- - * received, a function reference assigned to onTimeout will be called
- - */
- - req.onTimeout = null;
- -
- - /**
- - * A function reference assigned will be called when readyState=1
- - */
- - req.onLoading = null;
- -
- - /**
- - * A function reference assigned will be called when readyState=2
- - */
- - req.onLoaded = null;
- -
- - /**
- - * A function reference assigned will be called when readyState=3
- - */
- - req.onInteractive = null;
- -
- - /**
- - * A function reference assigned will be called when readyState=4
- - */
- - req.onComplete = null;
- -
- - /**
- - * A function reference assigned will be called after onComplete, if
- - * the statusCode=200
- - */
- - req.onSuccess = null;
- -
- - /**
- - * A function reference assigned will be called after onComplete, if
- - * the statusCode != 200
- - */
- - req.onError = null;
- -
- - /**
- - * If this request has a group name, this function reference will be called
- - * and passed the group name if this is the first request in the group to
- - * become active
- - */
- - req.onGroupBegin = null;
- -
- - /**
- - * If this request has a group name, and this request is the last request
- - * in the group to complete, this function reference will be called
- - */
- - req.onGroupEnd = null;
- -
- - // Get the XMLHttpRequest object itself
- - req.xmlHttpRequest = AjaxRequest.getXmlHttpRequest();
- - if (req.xmlHttpRequest==null) { return null; }
- -
- - // -------------------------------------------------------
- - // Attach the event handlers for the XMLHttpRequest object
- - // -------------------------------------------------------
- - req.xmlHttpRequest.onreadystatechange =
- - function() {
- - if (req==null || req.xmlHttpRequest==null) { return; }
- - if (req.xmlHttpRequest.readyState==1) { req.onLoadingInternal(req); }
- - if (req.xmlHttpRequest.readyState==2) { req.onLoadedInternal(req); }
- - if (req.xmlHttpRequest.readyState==3) { req.onInteractiveInternal(req); }
- - if (req.xmlHttpRequest.readyState==4) { req.onCompleteInternal(req); }
- - };
- -
- - // ---------------------------------------------------------------------------
- - // Internal event handlers that fire, and in turn fire the user event handlers
- - // ---------------------------------------------------------------------------
- - // Flags to keep track if each event has been handled, in case of
- - // multiple calls (some browsers may call the onreadystatechange
- - // multiple times for the same state)
- - req.onLoadingInternalHandled = false;
- - req.onLoadedInternalHandled = false;
- - req.onInteractiveInternalHandled = false;
- - req.onCompleteInternalHandled = false;
- - req.onLoadingInternal =
- - function() {
- - if (req.onLoadingInternalHandled) { return; }
- - AjaxRequest.numActiveAjaxRequests++;
- - if (AjaxRequest.numActiveAjaxRequests==1 && typeof(window['AjaxRequestBegin'])=="function") {
- - AjaxRequestBegin();
- - }
- - if (req.groupName!=null) {
- - if (typeof(AjaxRequest.numActiveAjaxGroupRequests[req.groupName])=="undefined") {
- - AjaxRequest.numActiveAjaxGroupRequests[req.groupName] = 0;
- - }
- - AjaxRequest.numActiveAjaxGroupRequests[req.groupName]++;
- - if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==1 && typeof(req.onGroupBegin)=="function") {
- - req.onGroupBegin(req.groupName);
- - }
- - }
- - if (typeof(req.onLoading)=="function") {
- - req.onLoading(req);
- - }
- - req.onLoadingInternalHandled = true;
- - };
- - req.onLoadedInternal =
- - function() {
- - if (req.onLoadedInternalHandled) { return; }
- - if (typeof(req.onLoaded)=="function") {
- - req.onLoaded(req);
- - }
- - req.onLoadedInternalHandled = true;
- - };
- - req.onInteractiveInternal =
- - function() {
- - if (req.onInteractiveInternalHandled) { return; }
- - if (typeof(req.onInteractive)=="function") {
- - req.onInteractive(req);
- - }
- - req.onInteractiveInternalHandled = true;
- - };
- - req.onCompleteInternal =
- - function() {
- - if (req.onCompleteInternalHandled || req.aborted) { return; }
- - req.onCompleteInternalHandled = true;
- - AjaxRequest.numActiveAjaxRequests--;
- - if (AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function") {
- - AjaxRequestEnd(req.groupName);
- - }
- - if (req.groupName!=null) {
- - AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;
- - if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function") {
- - req.onGroupEnd(req.groupName);
- - }
- - }
- - req.responseReceived = true;
- - req.status = req.xmlHttpRequest.status;
- - req.statusText = req.xmlHttpRequest.statusText;
- - req.responseText = req.xmlHttpRequest.responseText;
- - req.responseXML = req.xmlHttpRequest.responseXML;
- - if (typeof(req.onComplete)=="function") {
- - req.onComplete(req);
- - }
- - if (req.xmlHttpRequest.status==200 && typeof(req.onSuccess)=="function") {
- - req.onSuccess(req);
- - }
- - else if (typeof(req.onError)=="function") {
- - req.onError(req);
- - }
- -
- - // Clean up so IE doesn't leak memory
- - delete req.xmlHttpRequest['onreadystatechange'];
- - req.xmlHttpRequest = null;
- - };
- - req.onTimeoutInternal =
- - function() {
- - if (req!=null && req.xmlHttpRequest!=null && !req.onCompleteInternalHandled) {
- - req.aborted = true;
- - req.xmlHttpRequest.abort();
- - AjaxRequest.numActiveAjaxRequests--;
- - if (AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function") {
- - AjaxRequestEnd(req.groupName);
- - }
- - if (req.groupName!=null) {
- - AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;
- - if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function") {
- - req.onGroupEnd(req.groupName);
- - }
- - }
- - if (typeof(req.onTimeout)=="function") {
- - req.onTimeout(req);
- - }
- - // Opera won't fire onreadystatechange after abort, but other browsers do.
- - // So we can't rely on the onreadystate function getting called. Clean up here!
- - delete req.xmlHttpRequest['onreadystatechange'];
- - req.xmlHttpRequest = null;
- - }
- - };
- -
- - // ----------------
- - // Instance methods
- - // ----------------
- - /**
- - * The process method is called to actually make the request. It builds the
- - * querystring for GET requests (the content for POST requests), sets the
- - * appropriate headers if necessary, and calls the
- - * XMLHttpRequest.send() method
- - */
- - req.process =
- - function() {
- - if (req.xmlHttpRequest!=null) {
- - // Some logic to get the real request URL
- - if (req.generateUniqueUrl && req.method=="GET") {
- - req.parameters["AjaxRequestUniqueId"] = new Date().getTime() + "" + req.requestIndex;
- - }
- - var content = null; // For POST requests, to hold query string
- - for (var i in req.parameters) {
- - if (req.queryString.length>0) { req.queryString += "&"; }
- - req.queryString += encodeURIComponent(i) + "=" + encodeURIComponent(req.parameters[i]);
- - }
- - if (req.method=="GET") {
- - if (req.queryString.length>0) {
- - req.url += ((req.url.indexOf("?")>-1)?"&":"?") + req.queryString;
- - }
- - }
- - req.xmlHttpRequest.open(req.method,req.url,req.async,req.username,req.password);
- - if (req.method=="POST") {
- - if (typeof(req.xmlHttpRequest.setRequestHeader)!="undefined") {
- - req.xmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
- - }
- - content = req.queryString;
- - }
- - if (req.timeout>0) {
- - setTimeout(req.onTimeoutInternal,req.timeout);
- - }
- - req.xmlHttpRequest.send(content);
- - }
- - };
- -
- - /**
- - * An internal function to handle an Object argument, which may contain
- - * either AjaxRequest field values or parameter name/values
- - */
- - req.handleArguments =
- - function(args) {
- - for (var i in args) {
- - // If the AjaxRequest object doesn't have a property which was passed, treat it as a url parameter
- - if (typeof(req[i])=="undefined") {
- - req.parameters[i] = args[i];
- - }
- - else {
- - req[i] = args[i];
- - }
- - }
- - };
- -
- - /**
- - * Returns the results of XMLHttpRequest.getAllResponseHeaders().
- - * Only available after a response has been returned
- - */
- - req.getAllResponseHeaders =
- - function() {
- - if (req.xmlHttpRequest!=null) {
- - if (req.responseReceived) {
- - return req.xmlHttpRequest.getAllResponseHeaders();
- - }
- - alert("Cannot getAllResponseHeaders because a response has not yet been received");
- - }
- - };
- -
- - /**
- - * Returns the the value of a response header as returned by
- - * XMLHttpRequest,getResponseHeader().
- - * Only available after a response has been returned
- - */
- - req.getResponseHeader =
- - function(headerName) {
- - if (req.xmlHttpRequest!=null) {
- - if (req.responseReceived) {
- - return req.xmlHttpRequest.getResponseHeader(headerName);
- - }
- - alert("Cannot getResponseHeader because a response has not yet been received");
- - }
- - };
- -
- - return req;
- -}
- -
- -// ---------------------------------------
- -// Static methods of the AjaxRequest class
- -// ---------------------------------------
- -
- -/**
- - * Returns an XMLHttpRequest object, either as a core object or an ActiveX
- - * implementation. If an object cannot be instantiated, it will return null;
- - */
- -AjaxRequest.getXmlHttpRequest = function() {
- - if (window.XMLHttpRequest) {
- - return new XMLHttpRequest();
- - }
- - else if (window.ActiveXObject) {
- - // Based on http://jibbering.com/2002/4/httprequest.html
- - /*@cc_on @*/
- - /*@if (@_jscript_version >= 5)
- - try {
- - return new ActiveXObject("Msxml2.XMLHTTP");
- - } catch (e) {
- - try {
- - return new ActiveXObject("Microsoft.XMLHTTP");
- - } catch (E) {
- - return null;
- - }
- - }
- - @end @*/
- - }
- - else {
- - return null;
- - }
- -};
- -
- -/**
- - * See if any request is active in the background
- - */
- -AjaxRequest.isActive = function() {
- - return (AjaxRequest.numActiveAjaxRequests>0);
- -};
- -
- -/**
- - * Make a GET request. Pass an object containing parameters and arguments as
- - * the second argument.
- - * These areguments may be either AjaxRequest properties to set on the request
- - * object or name/values to set in the request querystring.
- - */
- -AjaxRequest.get = function(args) {
- - AjaxRequest.doRequest("GET",args);
- -};
- -
- -/**
- - * Make a POST request. Pass an object containing parameters and arguments as
- - * the second argument.
- - * These areguments may be either AjaxRequest properties to set on the request
- - * object or name/values to set in the request querystring.
- - */
- -AjaxRequest.post = function(args) {
- - AjaxRequest.doRequest("POST",args);
- -};
- -
- -/**
- - * The internal method used by the .get() and .post() methods
- - */
- -AjaxRequest.doRequest = function(method,args) {
- - if (typeof(args)!="undefined" && args!=null) {
- - var myRequest = new AjaxRequest();
- - myRequest.method = method;
- - myRequest.handleArguments(args);
- - myRequest.process();
- - }
- -} ;
- -
- -/**
- - * Submit a form. The requested URL will be the form's ACTION, and the request
- - * method will be the form's METHOD.
- - * Returns true if the submittal was handled successfully, else false so it
- - * can easily be used with an onSubmit event for a form, and fallback to
- - * submitting the form normally.
- - */
- -AjaxRequest.submit = function(theform, args) {
- - var myRequest = new AjaxRequest();
- - if (myRequest==null) { return false; }
- - var serializedForm = AjaxRequest.serializeForm(theform);
- - myRequest.method = theform.method.toUpperCase();
- - myRequest.url = theform.action;
- - myRequest.handleArguments(args);
- - myRequest.queryString = serializedForm;
- - myRequest.process();
- - return true;
- -};
- -
- -/**
- - * Serialize a form into a format which can be sent as a GET string or a POST
- - * content.It correctly ignores disabled fields, maintains order of the fields
- - * as in the elements[] array. The 'file' input type is not supported, as
- - * its content is not available to javascript. This method is used internally
- - * by the submit class method.
- - */
- -AjaxRequest.serializeForm = function(theform) {
- - var els = theform.elements;
- - var len = els.length;
- - var queryString = "";
- - this.addField =
- - function(name,value) {
- - if (queryString.length>0) {
- - queryString += "&";
- - }
- - queryString += encodeURIComponent(name) + "=" + encodeURIComponent(value);
- - };
- - for (var i=0; i<len; i++) {
- - var el = els[i];
- - if (!el.disabled) {
- - switch(el.type) {
- - case 'text': case 'password': case 'hidden': case 'textarea':
- - this.addField(el.name,el.value);
- - break;
- - case 'select-one':
- - if (el.selectedIndex>=0) {
- - this.addField(el.name,el.options[el.selectedIndex].value);
- - }
- - break;
- - case 'select-multiple':
- - for (var j=0; j<el.options.length; j++) {
- - if (el.options[j].selected) {
- - this.addField(el.name,el.options[j].value);
- - }
- - }
- - break;
- - case 'checkbox': case 'radio':
- - if (el.checked) {
- - this.addField(el.name,el.value);
- - }
- - break;
- - }
- - }
- - }
- - return queryString;
- -};
- -
- -// -----------------------
- -// Static Class variables
- -// -----------------------
- -
- -/**
- - * The number of total AjaxRequest objects currently active and running
- - */
- -AjaxRequest.numActiveAjaxRequests = 0;
- -
- -/**
- - * An object holding the number of active requests for each group
- - */
- -AjaxRequest.numActiveAjaxGroupRequests = new Object();
- -
- -/**
- - * The total number of AjaxRequest objects instantiated
- - */
- -AjaxRequest.numAjaxRequests = 0;
- -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement