diff --git a/maarch_entreprise/trunk/admin/contacts/contact_list_by_name.php b/maarch_entreprise/trunk/admin/contacts/contact_list_by_name.php deleted file mode 100644 index 8b7502053431914ebe4dd7195c88d989e7893f0b..0000000000000000000000000000000000000000 --- a/maarch_entreprise/trunk/admin/contacts/contact_list_by_name.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -/* -* Copyright 2008,2009 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. -*/ - -/** -* @brief List of users for autocompletion -* -* -* @file -* @author Laurent Giovannoni <dev@maarch.org> -* @date $date$ -* @version $Revision$ -* @ingroup admin -*/ - -require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_request.php"); -$db = new dbquery(); -$db->connect(); -$listArray = array(); -$db->query("select is_corporate_person, society, lastname, firstname, contact_id from " - .$_SESSION['tablename']['contacts']." where (lower(lastname) like lower('%".$db->protect_string_db($_REQUEST['what'])."%') " - ."or lower(firstname) like lower('".$db->protect_string_db($_REQUEST['what'])."%') " - ."or lower(society) like lower('%".$db->protect_string_db($_REQUEST['what'])."%')) and enabled <> 'N'"); - -//$db->show(); -while ($line = $db->fetch_object()) { - array_push($listArray, $db->show_string($line->society).", ".$db->show_string($line->lastname)." ".$db->show_string($line->firstname)." (contact:".$line->contact_id.")"); -} -echo "<ul>\n"; -$authViewList = 0; -$flagAuthView = false; -foreach ($listArray as $what) { - if ($authViewList >= 10) { - $flagAuthView = true; - } - echo "<li>".$what."</li>\n"; - if($flagAuthView) { - echo "<li>...</li>\n"; - break; - } - $authViewList++; -} -echo "</ul>"; diff --git a/maarch_entreprise/trunk/admin/contacts/contacts.php b/maarch_entreprise/trunk/admin/contacts/contacts.php deleted file mode 100644 index 38d1999f7da82e241b2b3244d317f317bdcd1700..0000000000000000000000000000000000000000 --- a/maarch_entreprise/trunk/admin/contacts/contacts.php +++ /dev/null @@ -1,230 +0,0 @@ -<?php -/* -* Copyright 2008,2009 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. -*/ - -/** -* @brief contacts list -* -* -* @file -* @author Claire Figueras <dev@maarch.org> -* @date $date$ -* @version $Revision$ -* @ingroup admin -*/ -$admin = new core_tools(); -$admin->test_admin('admin_contacts', 'apps'); -$func = new functions(); -$_SESSION['m_admin'] = array(); -/****************Management of the location bar ************/ -$init = false; -if(isset($_REQUEST['reinit']) && $_REQUEST['reinit'] == "true") -{ - $init = true; -} -$level = ""; -if(isset($_REQUEST['level']) && ($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)) -{ - $level = $_REQUEST['level']; -} -$page_path = $_SESSION['config']['businessappurl'].'index.php?page=contacts&admin=contacts'; -$page_label = _CONTACTS_LIST; -$page_id = "contacts"; -$admin->manage_location_bar($page_path, $page_label, $page_id, $init, $level); -/***********************************************************/ -?> -<table width="100%"> - <tr> - <td> - <a href="<?php - echo $_SESSION['config']['businessappurl'] - ;?>index.php?admin=contacts&page=manage_duplicates"> - <h2> - <img src="<?php echo $_SESSION['config']['businessappurl']; - ?>static.php?filename=manage_duplicates.png" alt="" /><?php - echo _MANAGE_DUPLICATES;?> - </h2> - </a> - </td> - <td align="right"> - <input class="button" type="button" value="<?php echo _EXPORT_CONTACT;?>" onclick="window.open('<?php echo $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=admin&page=export_admin_list'?>');"/> - </td> - </tr> -</table> -<?php -require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_request.php"); -require_once("apps".DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_list_show.php"); -$select[$_SESSION['tablename']['contacts']] = array(); -array_push($select[$_SESSION['tablename']['contacts']],"contact_id", "is_corporate_person", "society","lastname","firstname", 'user_id'); -$what = ""; -//$where =" (user_id is null or user_id = '') and enabled = 'Y' "; -$where =" enabled = 'Y' "; -if(isset($_REQUEST['what']) && !empty($_REQUEST['what'])) -{ - $what = $func->protect_string_db($func->wash($_REQUEST['what'], "alphanum", "", "no")); - $contact_id = str_replace(')', '', substr($_REQUEST['what'], strrpos($_REQUEST['what'],'(')+1)); - $contact_id = str_replace('contact:', '', $contact_id); - if($contact_id != substr($_REQUEST['what'], strrpos($_REQUEST['what'],'(')+1) and is_numeric($contact_id)){ - $where .= " and contact_id = " . $contact_id; - } - - else { - $where .= " and (lower(lastname) like lower('".$func->protect_string_db($what,$_SESSION['config']['databasetype'])."%') " - . "or lower(society) like lower('".$func->protect_string_db($what,$_SESSION['config']['databasetype'])."%') ) "; - } -} -$list = new list_show(); -$order = 'asc'; -if(isset($_REQUEST['order']) && !empty($_REQUEST['order'])) -{ - $order = trim($_REQUEST['order']); -} -$field = 'lastname, society'; -if(isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) -{ - $field = trim($_REQUEST['order_field']); -} - -$orderstr = $list->define_order($order, $field); - -//EXPORT DE LA LISTE -$select2[$_SESSION['tablename']['contacts']] = array(); -array_push($select2[$_SESSION['tablename']['contacts']],'lastname as "'._LASTNAME . '"', 'firstname as "'._FIRSTNAME . '"', 'society as "'._SOCIETY . '"', 'email as "'._EMAIL . '"', - 'phone as "'._PHONE . '"', 'address_num as "'._NUMBER . '"', 'address_street as "'._STREET . '"' - , 'address_complement as "'._COMPLEMENT . '"', 'address_postal_code as "'. _POSTAL_CODE . '"', 'address_town as "'._TOWN . '"', - 'address_country as "'._COUNTRY . '"'); - -$request= new request; - -$tab_export = $request->select($select2,$where,$orderstr,$_SESSION['config']['databasetype']); -$_SESSION['export_admin_list'] = array(); -$_SESSION['export_admin_list'] = $tab_export; - -$tab=$request->select($select,$where,$orderstr,$_SESSION['config']['databasetype']); - -for ($i=0;$i<count($tab);$i++) -{ - for ($j=0;$j<count($tab[$i]);$j++) - { - foreach(array_keys($tab[$i][$j]) as $value) - { - if($tab[$i][$j][$value]=="contact_id") - { - $tab[$i][$j]["contact_id"]=$tab[$i][$j]['value']; - $tab[$i][$j]["label"]= _ID; - $tab[$i][$j]["size"]="5"; - $tab[$i][$j]["label_align"]="left"; - $tab[$i][$j]["align"]="left"; - $tab[$i][$j]["valign"]="bottom"; - $tab[$i][$j]["show"]=true; - $tab[$i][$j]["order"]= "contact_id"; - } - if($tab[$i][$j][$value]=="is_corporate_person") - { - $tab[$i][$j]['value']= ($tab[$i][$j]['value'] == 'Y')? _YES : _NO; - $tab[$i][$j]["label"]=_IS_CORPORATE_PERSON; - $tab[$i][$j]["size"]="5"; - $tab[$i][$j]["label_align"]="center"; - $tab[$i][$j]["align"]="center"; - $tab[$i][$j]["valign"]="bottom"; - $tab[$i][$j]["show"]=true; - $tab[$i][$j]["order"]= "is_corporate_person"; - } - if($tab[$i][$j][$value]=="society") - { - $tab[$i][$j]['value']=$request->show_string($tab[$i][$j]['value']); - $tab[$i][$j]["society"]=$tab[$i][$j]['value']; - $tab[$i][$j]["label"]=_SOCIETY; - $tab[$i][$j]["size"]="15"; - $tab[$i][$j]["label_align"]="left"; - $tab[$i][$j]["align"]="left"; - $tab[$i][$j]["valign"]="bottom"; - $tab[$i][$j]["show"]=true; - $tab[$i][$j]["order"]= "society"; - } - if($tab[$i][$j][$value]=="lastname") - { - $tab[$i][$j]['value']=$request->show_string($tab[$i][$j]['value']); - $tab[$i][$j]["lastname"]=$tab[$i][$j]['value']; - $tab[$i][$j]["label"]=_LASTNAME; - $tab[$i][$j]["size"]="15"; - $tab[$i][$j]["label_align"]="left"; - $tab[$i][$j]["align"]="left"; - $tab[$i][$j]["valign"]="bottom"; - $tab[$i][$j]["show"]=true; - $tab[$i][$j]["order"]= "lastname"; - } - if($tab[$i][$j][$value]=="firstname") - { - $tab[$i][$j]["firstname"]= $tab[$i][$j]['value']; - $tab[$i][$j]["label"]=_FIRSTNAME; - $tab[$i][$j]["size"]="15"; - $tab[$i][$j]["label_align"]="center"; - $tab[$i][$j]["align"]="center"; - $tab[$i][$j]["valign"]="bottom"; - $tab[$i][$j]["show"]=true; - $tab[$i][$j]["order"]= "firstname"; - } - if($tab[$i][$j][$value]=="user_id") - { - $tab[$i][$j]["user_id"]= $tab[$i][$j]['value']; - $tab[$i][$j]["label"]=_OWNER; - $tab[$i][$j]["size"]="15"; - $tab[$i][$j]["label_align"]="center"; - $tab[$i][$j]["align"]="center"; - $tab[$i][$j]["valign"]="bottom"; - $tab[$i][$j]["show"]=true; - $tab[$i][$j]["order"]= "user_id"; - } - - } - } -} -$page_name = "contacts"; -$page_name_up = "contact_up"; -$page_name_del = "contact_del"; -$page_name_val= ""; -$page_name_ban = ""; -$page_name_add = "contact_add"; -$label_add = _CONTACT_ADDITION; -$_SESSION['m_admin']['init'] = true; -$title = _CONTACTS_LIST." : ".$i." "._CONTACTS; -$autoCompletionArray = array(); -$autoCompletionArray["list_script_url"] = $_SESSION['config']['businessappurl']."index.php?display=true&admin=contacts&page=contact_list_by_name"; -$autoCompletionArray["number_to_begin"] = 1; - -$list->admin_list($tab, $i, $title, 'contact_id','contacts','contacts','contact_id', true, $page_name_up, $page_name_val, $page_name_ban, $page_name_del, $page_name_add, $label_add, FALSE, FALSE, _ALL_CONTACTS, _CONTACT, $_SESSION['config']['businessappurl'].'static.php?filename=manage_contact_b.gif', false, true, false, true, $what, true, $autoCompletionArray, false, true); -$_SESSION['m_admin']['contacts'] = array(); -$_SESSION['m_admin']['contacts']['id'] = ""; -$_SESSION['m_admin']['contacts']['title'] = ""; -$_SESSION['m_admin']['contacts']['lastname'] = ""; -$_SESSION['m_admin']['contacts']['firtsname'] = ""; -$_SESSION['m_admin']['contacts']['society'] = ""; -$_SESSION['m_admin']['contacts']['function'] = ""; -$_SESSION['m_admin']['contacts']['address_num'] = ""; -$_SESSION['m_admin']['contacts']['address_street'] = ""; -$_SESSION['m_admin']['contacts']['address_complement'] = ""; -$_SESSION['m_admin']['contacts']['address_town'] = ""; -$_SESSION['m_admin']['contacts']['address_postal_code'] = ""; -$_SESSION['m_admin']['contacts']['address_country'] = ""; -$_SESSION['m_admin']['contacts']['email'] = ""; -$_SESSION['m_admin']['contacts']['phone'] = ""; -$_SESSION['m_admin']['contacts']['other_data'] = ""; -$_SESSION['m_admin']['contacts']['is_corporate_person'] = ""; -$_SESSION['m_admin']['contacts']['is_private'] = ""; diff --git a/maarch_entreprise/trunk/class/class_business_app_tools.php b/maarch_entreprise/trunk/class/class_business_app_tools.php index 6ad9982a990b8e4a03302bcd23207810eae66e89..e8e152fa198625244eb001c1ab955f218a561a02 100644 --- a/maarch_entreprise/trunk/class/class_business_app_tools.php +++ b/maarch_entreprise/trunk/class/class_business_app_tools.php @@ -119,7 +119,6 @@ class business_app_tools extends dbquery $_SESSION['tablename']['mlb_doctype_ext'] = (string) $tablename->mlb_doctype_ext; $_SESSION['tablename']['doctypes_indexes'] = (string) $tablename->doctypes_indexes; $_SESSION['tablename']['saved_queries'] = (string) $tablename->saved_queries; - $_SESSION['tablename']['contacts'] = (string) $tablename->contacts; $_SESSION['tablename']['contacts_v2'] = (string) $tablename->contacts_v2; $_SESSION['tablename']['contact_types'] = (string) $tablename->contact_types; $_SESSION['tablename']['contact_purposes'] = (string) $tablename->contact_purposes; diff --git a/maarch_entreprise/trunk/class/class_contacts_v2.php b/maarch_entreprise/trunk/class/class_contacts_v2.php index 058da013b041633d4f1fddb08c11ebed19ce0f3b..d986188475c7dd780cdb56cd199327224557643a 100644 --- a/maarch_entreprise/trunk/class/class_contacts_v2.php +++ b/maarch_entreprise/trunk/class/class_contacts_v2.php @@ -767,28 +767,6 @@ class contacts_v2 extends dbquery unset($_SESSION['m_admin']['address']); } - /** - * Loads all the contacts - * - * @param - */ - public function loadContacts() - { - $contacts = array(); - $this->connect(); - $this->query('select * from '.$_SESSION['tablename']['contacts']); - while($res = $this->fetch_object()) - { - if($res->lastname <> '') - array_push($contacts, "'".$res->lastname.", ".$res->firstname."[".$res->contact_id."]'"); - else - array_push($contacts, "'".$res->society."[".$res->contact_id."]'"); - } - - return $contacts; - } - - /** * delete a contact in the database * @@ -938,116 +916,6 @@ class contacts_v2 extends dbquery exit; } - function get_contact_information($res_id, $category_id,$view ) - //Get contact full information for each case: incoming document or outgoing document - { - $stopthis=false; - $column_title = false; - $column_value = false; - $column_join = false; - - - $this->connect(); - //For this 3 cases, we need to create a different string - - if ($category_id == 'incoming') - { - - $prefix = "<b>"._TO_CONTACT_C."</b>"; - $this->query("SELECT exp_user_id, exp_contact_id from ".$view." WHERE res_id = ".$res_id); - - $compar = $this->fetch_object(); - - - if ($compar->exp_user_id <> '') - { - - $column_title = "user_id"; - $column_value = $compar->exp_user_id; - $column_join = $_SESSION['tablename']['users']; - } - elseif ($compar->exp_contact_id <> '') - { - - $column_title = "contact_id"; - $column_value = $compar->exp_contact_id; - $column_join = $_SESSION['tablename']['contacts']; - } - else - { - $stopthis = true; - } - } - elseif ($category_id == 'outgoing' || $category_id == 'internal') - { - $prefix = "<b>"._FOR_CONTACT_C."</b>"; - - $this->query("SELECT dest_user_id, dest_contact_id from ".$view." WHERE res_id = ".$res_id); - - $compar = $this->fetch_object(); - if ($compar->dest_user_id <> '') - { - - $column_title = "user_id"; - $column_value = $compar->dest_user_id; - $column_join = $_SESSION['tablename']['users']; - } - elseif ($compar->dest_contact_id <> '') - { - - $column_title = "contact_id"; - $column_value = $compar->dest_contact_id; - $column_join = $_SESSION['tablename']['contacts']; - } - else - { - $stopthis = true; - } - } - else - { - $stopthis = true; - $prefix = ''; - } - if($stopthis == true) - { - return false; - } - - //If we need to find a contact, get the society first - if ($column_join == $_SESSION['tablename']['contacts']) - $fields = 'c.firstname, c.lastname, c.society '; - elseif ($column_join == $_SESSION['tablename']['users']) - $fields = 'c.firstname, c.lastname'; - else - $fields = ''; - - //Launching request to restore full contact string - $this->query("SELECT ".$fields." from ".$column_join." c where ".$column_title." = '".$column_value."'"); - - $final = $this->fetch_object(); - - $firstname = $final->firstname; - $lastname = $final->lastname; - if ($final->society <> '') - { - if ($firstname =='' && $lastname == '') - { - $society = $final->society; - } - else - { - $society = " (".$final->society.") "; - } - } - else - $society = ""; - - $the_contact =$prefix." ".$firstname." ".$lastname." ".$society; - return $the_contact; - - } - function get_contact_information_from_view($category_id, $contact_lastname="", $contact_firstname="", $contact_society="", $user_lastname="", $user_firstname="") { if ($category_id == 'incoming') diff --git a/maarch_entreprise/trunk/class/class_lists.php b/maarch_entreprise/trunk/class/class_lists.php index f2265ee352c4289b72e9c3031bc7f93557c389c1..0298ceb14b15a0a4da2f6cc17abd5aed15838180 100644 --- a/maarch_entreprise/trunk/class/class_lists.php +++ b/maarch_entreprise/trunk/class/class_lists.php @@ -430,23 +430,6 @@ class lists extends dbquery } $filters .='/>'; break; - case 'contactBusiness': - if(isset($_SESSION['filters']['contact']['VALUE']) && !empty($_SESSION['filters']['contact']['VALUE'])) { - $contact = $_SESSION['filters']['contact']['VALUE']; - } else { - $contact = '['._CONTACT.']'; - } - $filters .='<input type="text" name="contact_id" id="contact_id" value="'.$contact.'" size="40" ' - .'onfocus="if(this.value==\'['._CONTACT.']\'){this.value=\'\';}" ' - .'onKeyPress="if(event.keyCode == 9 || event.keyCode == 13)loadList(\''.$this->link - .'&filter=contactBusiness&value=\' + this.value, \''.$this->divListId.'\', ' - .$this->modeReturn.');" /> '; - //Autocompletion script and div - $filters .='<div id="contactListByName" class="autocomplete"></div>'; - $filters .='<script type="text/javascript">initList(\'contact_id\', \'contactListByName\', \'' - .$_SESSION['config']['businessappurl'].'index.php?display=true&page=' - .'contact_list_by_name\', \'what\', \'2\');</script>'; - break; case 'type': require_once 'core' . DIRECTORY_SEPARATOR . 'core_tables.php'; @@ -715,15 +698,6 @@ class lists extends dbquery $_SESSION['filters']['contact']['CLAUSE'] = "(exp_user_id = '".$_SESSION['filters']['contact']['VALUE']."' or dest_user_id = '".$_SESSION['filters']['contact']['VALUE']."')"; } - } else if ($_REQUEST['filter'] == 'contactBusiness') { - - $contactTmp = str_replace(')', '', - substr($_SESSION['filters']['contactBusiness']['VALUE'], - strrpos($_SESSION['filters']['contactBusiness']['VALUE'],'(')+1)); - $find1 = strpos($contactTmp, ':'); - $find2 = $find1 + 1; - $contactId = $this->protect_string_db(substr($contactTmp, $find2, strlen($contactTmp))); - $_SESSION['filters']['contact']['CLAUSE'] = "(contact_id = " . $contactId . ")"; } else if ($_REQUEST['filter'] == 'folder') { $folderId = $this->protect_string_db(str_replace(')', '', diff --git a/maarch_entreprise/trunk/indexing_searching/search_adv_result.php b/maarch_entreprise/trunk/indexing_searching/search_adv_result.php index e4c868bfe5e64b44b74f9f9bc41a7dedea9503fc..133fab27c774d18be179ae7037473272c1f8cbb6 100644 --- a/maarch_entreprise/trunk/indexing_searching/search_adv_result.php +++ b/maarch_entreprise/trunk/indexing_searching/search_adv_result.php @@ -249,39 +249,6 @@ if (count($_REQUEST['meta']) > 0) { $folder_name = $func->wash($_REQUEST['folder_name'], "no", _FOLDER_NAME,"no"); $where_request .= " (lower(folder_name) like lower('%".$func->protect_string_db($folder_name)."%') and "; } - // DEST - elseif ($tab_id_fields[$j] == 'dest' && !empty($_REQUEST['dest'])) - { - $json_txt .= " 'dest' : ['".addslashes(trim($_REQUEST['dest']))."'],"; - $dest = $func->wash($_REQUEST['dest'], "no", _DEST,"no"); - $where_request .= " (dest_contact_id in(select contact_id from ".$_SESSION['tablename']['contacts'] - ." where lower(lastname) LIKE lower('".$func->protect_string_db($dest)."%') " - ."or lower(firstname) LIKE lower('".$func->protect_string_db($dest)."%') " - ."or lower(society) LIKE lower('".$func->protect_string_db($dest)."%') " - ."or function LIKE '".$func->protect_string_db($dest)."%') " - ."or dest_user_id in (" - ."select user_id from ".$_SESSION['tablename']['users'] - ." where lower(lastname) LIKE lower('".$func->protect_string_db($dest)."%') " - ."or lower(firstname) LIKE lower('".$func->protect_string_db($dest)."%') " - ."or user_id LIKE '".$func->protect_string_db($dest)."%')) and "; - } - //SHIPPER - elseif ($tab_id_fields[$j] == 'shipper' && !empty($_REQUEST['shipper'])) - { - $json_txt .= " 'shipper' : ['".addslashes(trim($_REQUEST['shipper']))."'],"; - $shipper = $func->wash($_REQUEST['shipper'], "no", _SHIPPER,"no"); - $where_request .= " (exp_contact_id in (" - ."select contact_id from ".$_SESSION['tablename']['contacts'] - ." where lower(lastname) LIKE lower('".$func->protect_string_db($shipper)."%') " - ."or lower(firstname) LIKE lower('".$func->protect_string_db($shipper)."%') " - ."or lower(society) LIKE lower('".$func->protect_string_db($shipper)."%') " - ."or lower(function) LIKE lower('".$func->protect_string_db($shipper)."%')) " - ."or exp_user_id in (" - ."select user_id from ".$_SESSION['tablename']['users'] - ." where lower(lastname) LIKE lower('".$func->protect_string_db($shipper)."%') " - ."or lower(firstname) LIKE lower('".$func->protect_string_db($shipper)."%') " - ."or user_id LIKE '".$func->protect_string_db($shipper)."%')) and "; - } // GED NUM elseif ($tab_id_fields[$j] == 'numged' && !empty($_REQUEST['numged'])) { diff --git a/maarch_entreprise/trunk/my_contacts/contact_list_by_name.php b/maarch_entreprise/trunk/my_contacts/contact_list_by_name.php deleted file mode 100644 index f6bea57a0c7b8ce15a97dc3e1473e78a6a5fbabb..0000000000000000000000000000000000000000 --- a/maarch_entreprise/trunk/my_contacts/contact_list_by_name.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/* -* Copyright 2008,2009 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. -*/ - -/** -* @brief List of users for autocompletion -* -* -* @file -* @author Laurent Giovannoni <dev@maarch.org> -* @date $date$ -* @version $Revision$ -* @ingroup admin -*/ - -$db = new dbquery(); -$db->connect(); -$what = $db->protect_string_db($_REQUEST['what']); -$db->query("select society as tag1, lastname as tag2 from ".$_SESSION['tablename']['contacts'] - ." where (lower(lastname) like lower('" - .$what."%') or lower(society) like lower('" - .$what."%')) and user_id = '" - .$_SESSION['user']['UserId']."' order by lastname, society"); - -$listArray = array(); -while($line = $db->fetch_object()) -{ - if (empty($line->tag2)) - array_push($listArray, $line->tag1); - else - array_push($listArray, $line->tag2); -} -echo "<ul>\n"; -$authViewList = 0; -foreach($listArray as $what) -{ - if($authViewList >= 10) - { - $flagAuthView = true; - } - if(stripos($what, $_REQUEST['what']) === 0) - { - echo "<li>".$what."</li>\n"; - if($flagAuthView) - { - echo "<li>...</li>\n"; - break; - } - $authViewList++; - } -} -echo "</ul>"; diff --git a/maarch_entreprise/trunk/xml/config.xml.default b/maarch_entreprise/trunk/xml/config.xml.default index 8285ae7cb97a0bf265e91b344646f3f761a85ced..8b6545db7785615e69822eecb01c5409e5db2fd1 100644 --- a/maarch_entreprise/trunk/xml/config.xml.default +++ b/maarch_entreprise/trunk/xml/config.xml.default @@ -34,7 +34,6 @@ <mlb_doctype_ext>mlb_doctype_ext</mlb_doctype_ext> <doctypes_indexes>doctypes_indexes</doctypes_indexes> <saved_queries>saved_queries</saved_queries> - <contacts>contacts</contacts> <contacts_v2>contacts_v2</contacts_v2> <contact_types>contact_types</contact_types> <contact_purposes>contact_purposes</contact_purposes> diff --git a/maarch_entreprise/trunk/xml/lists_parameters.xml b/maarch_entreprise/trunk/xml/lists_parameters.xml index 441175d0809d9bf78724c76e5d60fcbcb8b2758b..09f7cc165d55064b13e8ffb5d0996524af478b6d 100644 --- a/maarch_entreprise/trunk/xml/lists_parameters.xml +++ b/maarch_entreprise/trunk/xml/lists_parameters.xml @@ -36,11 +36,6 @@ <LABEL>_CONTACT</LABEL> <ENABLED>true</ENABLED> </FILTER> - <FILTER> - <ID>contactBusiness</ID> - <LABEL>_CONTACT</LABEL> - <ENABLED>true</ENABLED> - </FILTER> <FILTER> <ID>isViewed</ID> <LABEL>_VIEWED</LABEL>